Compare commits
7 Commits
2b549c7b38
...
b2f9fa6846
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b2f9fa6846 | ||
|
|
a38cc25301 | ||
|
|
52f18c53ea | ||
|
|
115ba55cd5 | ||
|
|
e53cca6393 | ||
|
|
b33989a340 | ||
|
|
8ea39bd09c |
@ -27,8 +27,8 @@ use TYPO3\CMS\Extbase\Property\PropertyMappingConfigurationBuilder;
|
||||
use TYPO3\CMS\Extbase\Service\EnvironmentService;
|
||||
use TYPO3\CMS\Extbase\Service\ExtensionService;
|
||||
use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
|
||||
use Blueways\BwCaptcha\Validation\Validator\CaptchaValidator;
|
||||
use TYPO3\CMS\Frontend\Authentication\FrontendUserAuthentication;
|
||||
use TYPO3\CMS\Core\Utility\DebugUtility;
|
||||
|
||||
class ActionController extends BaseController
|
||||
{
|
||||
@ -838,8 +838,8 @@ class ActionController extends BaseController
|
||||
}
|
||||
}
|
||||
/** **/
|
||||
protected function valideCaptcha($captchaId, $value
|
||||
) {
|
||||
protected function valideCaptcha($value
|
||||
): void {
|
||||
$captchaPhrases = $this->getFeUser()->getKey('ses', 'captchaPhrases');
|
||||
if (!$captchaPhrases || !is_array($captchaPhrases) || !is_string($value)) {
|
||||
$this->addValidationError(
|
||||
@ -863,7 +863,7 @@ class ActionController extends BaseController
|
||||
unset($captchaPhrases[$lifetime]);
|
||||
$this->getFeUser()->setKey('ses', 'captchaPhrases', $captchaPhrases);
|
||||
$this->getFeUser()->storeSessionData();
|
||||
return true;
|
||||
return ;
|
||||
}
|
||||
}
|
||||
$this->addValidationError(
|
||||
|
||||
@ -44,7 +44,8 @@ class ApiUtility
|
||||
$queryResult,
|
||||
$additionalAttributes = [],
|
||||
$mapping = [],
|
||||
$rootRowClass = null
|
||||
$rootRowClass = null,
|
||||
$options = []
|
||||
) {
|
||||
$this->objectManager = GeneralUtility::makeInstance(
|
||||
ObjectManager::class
|
||||
@ -130,7 +131,8 @@ class ApiUtility
|
||||
$methodResult,
|
||||
$additionalAttributes[$attributeName],
|
||||
$mapping,
|
||||
$nextLevelClass
|
||||
$nextLevelClass,
|
||||
$options
|
||||
);
|
||||
if ($imageStorage) {
|
||||
foreach ($attributeResult as &$attributeResultRow) {
|
||||
@ -167,7 +169,8 @@ class ApiUtility
|
||||
[$methodResult],
|
||||
$additionalAttributes[$attributeName],
|
||||
$mapping,
|
||||
$nextLevelClass
|
||||
$nextLevelClass,
|
||||
$options
|
||||
)[0];
|
||||
$rowResult[$attributeName . 'Uid']
|
||||
= $rowResult[$attributeName]['uid'];
|
||||
@ -218,6 +221,10 @@ class ApiUtility
|
||||
}
|
||||
}
|
||||
}
|
||||
if (($options['clearIds'] ?? '' ) === true) {
|
||||
unset($rowResult['uid']);
|
||||
unset($rowResult['pid']);
|
||||
}
|
||||
$result[] = $rowResult;
|
||||
}
|
||||
return $result;
|
||||
|
||||
@ -37,4 +37,22 @@ class InterfaceUtility
|
||||
}, ARRAY_FILTER_USE_KEY);
|
||||
return array_values($constants);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all interface constants per prefix
|
||||
*/
|
||||
public static function parseInterfaceConstantsAssoc(
|
||||
$interfaceClass, $prefix
|
||||
) {
|
||||
$constants = (new \ReflectionClass($interfaceClass))
|
||||
->getConstants();
|
||||
$constants = array_filter($constants, function($key) use ($prefix) {
|
||||
if (substr($key, 0, strlen($prefix) + 1)
|
||||
== strtoupper($prefix) . '_'
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
}, ARRAY_FILTER_USE_KEY);
|
||||
return $constants;
|
||||
}
|
||||
}
|
||||
|
||||
@ -21,7 +21,7 @@ use TYPO3\CMS\Fluid\View\StandaloneView;
|
||||
use TYPO3\CMS\Fluid\View\TemplatePaths;
|
||||
use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
|
||||
use Symfony\Component\Mime\Address;
|
||||
use TYPO3\CMS\Frontend\Page\PageRepository;
|
||||
use TYPO3\CMS\Core\Domain\Repository\PageRepository;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
@ -65,12 +65,13 @@ class TranslationUtility
|
||||
if (!$extensionKey) {
|
||||
$extensionKey = 'site_templates';
|
||||
}
|
||||
return implode([
|
||||
'LLL:EXT:',
|
||||
$extensionKey,
|
||||
'/Resources/Private/Language/locallang_db.xlf:',
|
||||
$key
|
||||
]);
|
||||
$translation = LocalizationUtility::translate(
|
||||
'LLL:EXT:'
|
||||
. $extensionKey
|
||||
. '/Resources/Private/Language/locallang_db.xlf:'
|
||||
. $key
|
||||
);
|
||||
return $translation;
|
||||
} else {
|
||||
if ($extensionKey) {
|
||||
$translation = LocalizationUtility::translate(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user