Compare commits
5 Commits
master
...
task-updat
Author | SHA1 | Date | |
---|---|---|---|
9108dab451 | |||
5cf947a1da | |||
6388fd7bb0 | |||
14e1490a22 | |||
![]() |
a02b1bb939 |
@ -95,10 +95,10 @@ class AbstractCommandController extends Commands
|
||||
ObjectManager::class
|
||||
);
|
||||
$this->initFrontendController();
|
||||
$this->configurationManager = $this->objectManager->get(
|
||||
$this->configurationManager = GeneralUtility::makeInstance(
|
||||
ConfigurationManagerInterface::class
|
||||
);
|
||||
$this->apiUtility = $this->objectManager->get(
|
||||
$this->apiUtility = GeneralUtility::makeInstance(
|
||||
\Cjel\TemplatesAide\Utility\ApiUtility::class
|
||||
);
|
||||
$this->configurationManager->setConfiguration(array());
|
||||
@ -115,7 +115,7 @@ class AbstractCommandController extends Commands
|
||||
$frameworkConfiguration['persistence']['storagePid']
|
||||
)
|
||||
);
|
||||
$this->logManager = $this->objectManager->get(
|
||||
$this->logManager = GeneralUtility::makeInstance(
|
||||
LogManager::Class
|
||||
);
|
||||
$this->importLogger = $this->logManager->getLogger(
|
||||
@ -130,7 +130,7 @@ class AbstractCommandController extends Commands
|
||||
get_class($this)
|
||||
);
|
||||
foreach ($classInfo->getInjectMethods() as $method => $className) {
|
||||
$class = $this->objectManager->get(
|
||||
$class = GeneralUtility::makeInstance(
|
||||
$className
|
||||
);
|
||||
$this->{$method}($class);
|
||||
|
@ -31,6 +31,13 @@ use TYPO3\CMS\Extbase\Reflection\ReflectionService;
|
||||
use TYPO3\CMS\Frontend\Plugin\AbstractPlugin;
|
||||
use TYPO3\CMS\Frontend\Utility\EidUtility;
|
||||
|
||||
use TYPO3\CMS\Core\Context\Context;
|
||||
use TYPO3\CMS\Core\Http\ResponseFactory;
|
||||
use TYPO3\CMS\Core\Routing\PageArguments;
|
||||
use TYPO3\CMS\Core\Site\SiteFinder;
|
||||
use TYPO3\CMS\Frontend\Authentication\FrontendUserAuthentication;
|
||||
use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController;
|
||||
|
||||
/**
|
||||
* AbstractEIDController
|
||||
*/
|
||||
@ -120,10 +127,10 @@ class AbstractEIDController
|
||||
ObjectManager::class
|
||||
);
|
||||
$this->initFrontendController();
|
||||
$this->configurationManager = $this->objectManager->get(
|
||||
$this->configurationManager = GeneralUtility::makeInstance(
|
||||
ConfigurationManagerInterface::class
|
||||
);
|
||||
$this->apiUtility = $this->objectManager->get(
|
||||
$this->apiUtility = GeneralUtility::makeInstance(
|
||||
\Cjel\TemplatesAide\Utility\ApiUtility::class
|
||||
);
|
||||
$frameworkConfiguration = $this->configurationManager->getConfiguration(
|
||||
@ -142,22 +149,25 @@ class AbstractEIDController
|
||||
$frameworkConfiguration['persistence']['storagePid']
|
||||
)
|
||||
);
|
||||
$this->logManager = $this->objectManager->get(
|
||||
$this->logManager = GeneralUtility::makeInstance(
|
||||
LogManager::Class
|
||||
);
|
||||
$this->importLogger = $this->logManager->getLogger(
|
||||
'importLogger'
|
||||
);
|
||||
$this->reflectionService = GeneralUtility::makeInstance(
|
||||
ReflectionService::class, GeneralUtility::makeInstance(
|
||||
CacheManager::class
|
||||
)
|
||||
ReflectionService::class
|
||||
);
|
||||
$classInfo = $this->reflectionService->getClassSchema(
|
||||
get_class($this)
|
||||
);
|
||||
foreach ($classInfo->getInjectMethods() as $method => $className) {
|
||||
$class = $this->objectManager->get(
|
||||
if (version_compare(TYPO3_branch, '10.0', '>=')) {
|
||||
$className = $className
|
||||
->getFirstParameter()
|
||||
->getDependency();
|
||||
}
|
||||
$class = GeneralUtility::makeInstance(
|
||||
$className
|
||||
);
|
||||
$this->{$method}($class);
|
||||
@ -193,23 +203,53 @@ class AbstractEIDController
|
||||
//if (count($result) < 1) {
|
||||
// throw new \Exception('Domain not configured');
|
||||
//}
|
||||
$frontendController = GeneralUtility::makeInstance(
|
||||
\TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::class,
|
||||
$GLOBALS['TYPO3_CONF_VARS'],
|
||||
null,
|
||||
0,
|
||||
true
|
||||
|
||||
|
||||
$context = GeneralUtility::makeInstance(Context::class);
|
||||
|
||||
|
||||
|
||||
|
||||
$siteFinder = GeneralUtility::makeInstance(SiteFinder::class);
|
||||
$site = $siteFinder->getSiteByPageId(1049);
|
||||
|
||||
$siteLanguage = reset($site->getLanguages());
|
||||
|
||||
$pageArguments = GeneralUtility::makeInstance(
|
||||
PageArguments::class,
|
||||
1049,
|
||||
'0',
|
||||
[]
|
||||
);
|
||||
|
||||
$frontendUser = GeneralUtility::makeInstance(
|
||||
FrontendUserAuthentication::class
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
$frontendController = GeneralUtility::makeInstance(
|
||||
TypoScriptFrontendController::class,
|
||||
$context,
|
||||
$site,
|
||||
$siteLanguage,
|
||||
$pageArguments,
|
||||
$frontendUser
|
||||
|
||||
);
|
||||
|
||||
//die;
|
||||
$GLOBALS['LANG'] = GeneralUtility::makeInstance(LanguageService::class);
|
||||
$GLOBALS['LANG']->init('default');
|
||||
$GLOBALS['TSFE'] = $frontendController;
|
||||
$frontendController->connectToDB();
|
||||
$frontendController->fe_user = EidUtility::initFeUser();
|
||||
$frontendController->id = $result[0]['pid'];
|
||||
//$frontendController->connectToDB();
|
||||
//$frontendController->fe_user = EidUtility::initFeUser();
|
||||
//$frontendController->id = 1049;
|
||||
$frontendController->determineId();
|
||||
$frontendController->initTemplate();
|
||||
//$frontendController->initTemplate();
|
||||
$frontendController->getConfigArray();
|
||||
EidUtility::initTCA();
|
||||
//EidUtility::initTCA();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -226,6 +266,12 @@ class AbstractEIDController
|
||||
ServerRequestInterface $request,
|
||||
ResponseInterface $response = null
|
||||
) {
|
||||
if (!$response) {
|
||||
$responseFactory = GeneralUtility::makeInstance(
|
||||
ResponseFactory::class
|
||||
);
|
||||
$response = $responseFactory->createResponse();
|
||||
}
|
||||
$apiObject = explode('/', $request->getUri()->getPath())[3];
|
||||
$apiObjectId = explode('/', $request->getUri()->getPath())[4];
|
||||
if (!$apiObject) {
|
||||
@ -306,7 +352,7 @@ class AbstractEIDController
|
||||
*/
|
||||
public function persistAll()
|
||||
{
|
||||
($this->objectManager->get(
|
||||
(GeneralUtility::makeInstance(
|
||||
PersistenceManager::class
|
||||
))->persistAll();
|
||||
}
|
||||
|
@ -27,7 +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 Psr\Http\Message\ResponseInterface;
|
||||
use TYPO3\CMS\Core\Http\RequestFactory;
|
||||
class ActionController extends BaseController
|
||||
{
|
||||
|
||||
@ -121,10 +122,7 @@ class ActionController extends BaseController
|
||||
*/
|
||||
protected $ajaxEnv = [];
|
||||
|
||||
/**
|
||||
* @var \TYPO3\CMS\Extbase\Service\ExtensionService
|
||||
*/
|
||||
protected $extensionService;
|
||||
|
||||
|
||||
/**
|
||||
* uribuilder
|
||||
@ -137,12 +135,14 @@ class ActionController extends BaseController
|
||||
protected $config = [];
|
||||
|
||||
/**
|
||||
* propertyMappginConfigrtationBuolder
|
||||
* ExtensionService
|
||||
*
|
||||
* @var ExtensionService
|
||||
*/
|
||||
protected $propertyMapperConfigurationBuilder;
|
||||
protected $extensionService;
|
||||
|
||||
/**
|
||||
* @param \TYPO3\CMS\Extbase\Service\ExtensionService $extensionService
|
||||
* @param
|
||||
*/
|
||||
public function injectExtensionService(ExtensionService $extensionService)
|
||||
{
|
||||
@ -165,21 +165,22 @@ class ActionController extends BaseController
|
||||
$this->environmentService = $environmentService;
|
||||
}
|
||||
|
||||
/**
|
||||
* propertyMapper
|
||||
*
|
||||
* @var PropertyMapper
|
||||
*/
|
||||
protected $propertyMapper;
|
||||
// /**
|
||||
// * propertyMapper
|
||||
// *
|
||||
// * @var PropertyMapper
|
||||
// */
|
||||
// protected $propertyMapper;
|
||||
|
||||
/**
|
||||
* @param
|
||||
*/
|
||||
public function injectPropertyMapper(
|
||||
PropertyMapper $propertyMapper
|
||||
) {
|
||||
$this->propertyMapper = $propertyMapper;
|
||||
}
|
||||
// /**
|
||||
// * @param
|
||||
// */
|
||||
// public function injectPropertyMapper(
|
||||
// PropertyMapper $propertyMapper
|
||||
// ):void {
|
||||
// // \TYPO3\CMS\Core\Utility\DebugUtility::debug($propertyMapper);die;
|
||||
// $this->propertyMapper = $propertyMapper;
|
||||
// }
|
||||
|
||||
/**
|
||||
* propertyMappingConfigurationBuilder
|
||||
@ -221,6 +222,7 @@ class ActionController extends BaseController
|
||||
*/
|
||||
public function initializeAction()
|
||||
{
|
||||
|
||||
if ($GLOBALS['TSFE']->config['config']) {
|
||||
$this->config = GeneralUtility::removeDotsFromTS(
|
||||
$GLOBALS['TSFE']->config['config']
|
||||
@ -237,13 +239,13 @@ class ActionController extends BaseController
|
||||
}
|
||||
$this->contentObjectUid =
|
||||
$this->configurationManager->getContentObject()->data['uid'];
|
||||
$this->cacheManager = $this->objectManager->get(
|
||||
$this->cacheManager = GeneralUtility::makeInstance(
|
||||
CacheManager::class
|
||||
);
|
||||
//$this->cache = $this->cacheManager->getCache(
|
||||
// 'tobereplaced' //TODO: Replaceme
|
||||
//);
|
||||
$this->logManager = $this->objectManager->get(
|
||||
$this->logManager = GeneralUtility::makeInstance(
|
||||
LogManager::Class
|
||||
);
|
||||
$this->importLogger = $this->logManager->getLogger(
|
||||
@ -252,7 +254,7 @@ class ActionController extends BaseController
|
||||
$this->generalLogger = $this->logManager->getLogger(
|
||||
__CLASS__
|
||||
);
|
||||
$this->dataMapper = $this->objectManager->get(
|
||||
$this->dataMapper = GeneralUtility::makeInstance(
|
||||
DataMapper::Class
|
||||
);
|
||||
$this->arguments->addNewArgument('step', 'string', false, false);
|
||||
@ -264,7 +266,7 @@ class ActionController extends BaseController
|
||||
*/
|
||||
public function getUriBuilder()
|
||||
{
|
||||
return $this->objectManager->get(
|
||||
return GeneralUtility::makeInstance(
|
||||
UriBuilder::class
|
||||
);
|
||||
}
|
||||
@ -274,7 +276,7 @@ class ActionController extends BaseController
|
||||
*/
|
||||
public function persistAll()
|
||||
{
|
||||
($this->objectManager->get(
|
||||
(GeneralUtility::makeInstance(
|
||||
PersistenceManager::class
|
||||
))->persistAll();
|
||||
}
|
||||
@ -450,21 +452,7 @@ class ActionController extends BaseController
|
||||
$schema
|
||||
);
|
||||
if (!$validationResult->isValid()) {
|
||||
//foreach ($validationResult->getErrors() as $error){
|
||||
// $field = implode('.', $error->dataPointer());
|
||||
// if ($error->keyword() == 'required') {
|
||||
// $tmp = $error->dataPointer();
|
||||
// array_push($tmp, $error->keywordArgs()['missing']);
|
||||
// $field = implode('.', $tmp);
|
||||
// }
|
||||
// if ($error->keyword() == 'additionalProperties') {
|
||||
// continue;
|
||||
// }
|
||||
// $this->errors[$field] = [
|
||||
// 'keyword' => $error->keyword(),
|
||||
// 'details' => $error->keywordArgs()
|
||||
// ];
|
||||
//}
|
||||
|
||||
if ($translate) {
|
||||
$this->translateErrorMessages($validationResult);
|
||||
}
|
||||
@ -665,6 +653,7 @@ class ActionController extends BaseController
|
||||
*/
|
||||
public function initializePropertyMappingConfigurationFromRequest(\TYPO3\CMS\Extbase\Mvc\Request $request, $propertyMappingConfiguration, $propertyNameTest)
|
||||
{
|
||||
|
||||
$trustedPropertiesToken = $request->getInternalArgument('__trustedProperties');
|
||||
if (!is_string($trustedPropertiesToken)) {
|
||||
return;
|
||||
@ -677,14 +666,10 @@ class ActionController extends BaseController
|
||||
}
|
||||
$trustedProperties = unserialize($serializedTrustedProperties, ['allowed_classes' => false]);
|
||||
foreach ($trustedProperties as $propertyName => $propertyConfiguration) {
|
||||
|
||||
//if (!$controllerArguments->hasArgument($propertyName)) {
|
||||
// continue;
|
||||
//}
|
||||
if ($propertyName != $propertyNameTest) {
|
||||
continue;
|
||||
}
|
||||
//$propertyMappingConfiguration = $controllerArguments->getArgument($propertyName)->getPropertyMappingConfiguration();
|
||||
|
||||
$this->modifyPropertyMappingConfiguration($propertyConfiguration, $propertyMappingConfiguration);
|
||||
}
|
||||
}
|
||||
@ -731,6 +716,7 @@ class ActionController extends BaseController
|
||||
$errorStatus = null,
|
||||
$object = 'data'
|
||||
) {
|
||||
|
||||
$this->setAjaxEnv($object);
|
||||
if ($result == null) {
|
||||
$result = [];
|
||||
@ -740,6 +726,7 @@ class ActionController extends BaseController
|
||||
$result,
|
||||
['errors' => $this->errors]
|
||||
);
|
||||
|
||||
}
|
||||
if (!empty($this->errorLabels)) {
|
||||
$result = array_merge(
|
||||
@ -754,13 +741,23 @@ class ActionController extends BaseController
|
||||
);
|
||||
}
|
||||
if ($this->pageType) {
|
||||
$requestFactory = GeneralUtility::makeInstance(RequestFactory::class);
|
||||
if (is_array($this->responseStatus)) {
|
||||
$this->response->setStatus(
|
||||
array_key_first($this->responseStatus)
|
||||
);
|
||||
// $this->response->setStatus(
|
||||
// array_key_first($this->responseStatus)
|
||||
// );
|
||||
$response = $this->responseFactory
|
||||
->createResponse()
|
||||
->withHeader('Content-Type', 'application/json; charset=utf-8')
|
||||
->withStatus(array_key_first($this->responseStatus), '');
|
||||
} else {
|
||||
$this->response->setStatus($this->responseStatus);
|
||||
//$this->response->setStatus($this->responseStatus);
|
||||
$response = $this->responseFactory
|
||||
->createResponse()
|
||||
->withHeader('Content-Type', 'application/json; charset=utf-8')
|
||||
->withStatus($this->responseStatus, '');
|
||||
}
|
||||
|
||||
if ($this->pageType == $this->ajaxPageType) {
|
||||
if ($this->environmentService->isEnvironmentInBackendMode()) {
|
||||
header('Content-Type: application/json');
|
||||
@ -775,7 +772,13 @@ class ActionController extends BaseController
|
||||
if ($this->reload) {
|
||||
$result['reload'] = true;
|
||||
}
|
||||
return json_encode($result);
|
||||
|
||||
//\TYPO3\CMS\Core\Utility\DebugUtility::debug($result);die;
|
||||
//return json_encode($result);
|
||||
|
||||
|
||||
$response->getBody()->write(json_encode($result));
|
||||
return $response;
|
||||
}
|
||||
$result = array_merge(
|
||||
$result,
|
||||
@ -789,6 +792,13 @@ class ActionController extends BaseController
|
||||
['ajaxEnv' => $this->ajaxEnv]
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
$this->view->assignMultiple($result);
|
||||
return $this->responseFactory
|
||||
->createResponse()
|
||||
->withHeader('Content-Type', 'text/html; charset=utf-8')
|
||||
->withStatus(200, 'Super ok!')
|
||||
->withBody($this->streamFactory->createStream($this->view->render()));
|
||||
}
|
||||
}
|
||||
|
@ -45,9 +45,6 @@ class EIDController extends AbstractEIDController
|
||||
ResponseInterface $response = null
|
||||
) {
|
||||
$GLOBALS['TSFE']->fe_user->setKey('ses', 'scriptstate', 0);
|
||||
//\TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump(
|
||||
// $GLOBALS['TSFE']->fe_user->getKey('ses', 'scriptstate')
|
||||
//);
|
||||
$GLOBALS["TSFE"]->storeSessionData();
|
||||
$response->getBody()->write(\json_encode([]));
|
||||
return $response;
|
||||
|
@ -11,17 +11,7 @@ namespace Cjel\TemplatesAide\Hooks;
|
||||
* (c) 2018 Philipp Dieter <philippdieter@attic-media.net>
|
||||
*
|
||||
***/
|
||||
|
||||
//use GridElementsTeam\Gridelements\Backend\LayoutSetup;
|
||||
//use TYPO3\CMS\Backend\Controller\ContentElement\NewContentElementController;
|
||||
//use TYPO3\CMS\Backend\Utility\BackendUtility;
|
||||
use TYPO3\CMS\Backend\Wizard\NewContentElementWizardHookInterface;
|
||||
//use TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider;
|
||||
//use TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider;
|
||||
//use TYPO3\CMS\Core\Imaging\IconRegistry;
|
||||
//use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
//use TYPO3\CMS\Core\Utility\StringUtility;
|
||||
//use TYPO3\CMS\Lang\LanguageService;
|
||||
|
||||
/**
|
||||
* Class/Function which manipulates the rendering of items within the new content element wizard
|
||||
|
@ -75,14 +75,6 @@ class Double2Converter extends AbstractTypeConverter
|
||||
$value *= -1;
|
||||
}
|
||||
$value = number_format($value, 2, '.', '');
|
||||
//\TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump(
|
||||
// $source, null, 3
|
||||
//);
|
||||
//if (is_string($source)) {
|
||||
// if ($source === '') {
|
||||
// $source = [];
|
||||
// }
|
||||
//}
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
|
@ -80,10 +80,10 @@ trait DependencyInjectionTrait
|
||||
$this->objectManager = GeneralUtility::makeInstance(
|
||||
ObjectManager::class
|
||||
);
|
||||
$this->configurationManager = $this->objectManager->get(
|
||||
$this->configurationManager = GeneralUtility::makeInstance(
|
||||
ConfigurationManagerInterface::class
|
||||
);
|
||||
$this->apiUtility = $this->objectManager->get(
|
||||
$this->apiUtility = GeneralUtility::makeInstance(
|
||||
ApiUtility::class
|
||||
);
|
||||
$frameworkConfiguration = $this->configurationManager->getConfiguration(
|
||||
@ -102,11 +102,7 @@ trait DependencyInjectionTrait
|
||||
$frameworkConfiguration['persistence']['storagePid']
|
||||
)
|
||||
);
|
||||
$this->reflectionService = GeneralUtility::makeInstance(
|
||||
ReflectionService::class, GeneralUtility::makeInstance(
|
||||
CacheManager::class
|
||||
)
|
||||
);
|
||||
$this->reflectionService = GeneralUtility::makeInstance(ReflectionService::class);
|
||||
$classInfo = $this->reflectionService->getClassSchema(
|
||||
get_class($this)
|
||||
);
|
||||
|
@ -127,22 +127,12 @@ trait ValidationTrait
|
||||
if (is_array($input) && array_key_exists('eID', $input)) {
|
||||
unset($input['eID']);
|
||||
}
|
||||
//@TODO make optional when usiing rest api
|
||||
//array_walk_recursive(
|
||||
// $input,
|
||||
// function (&$value) {
|
||||
// if (filter_var($value, FILTER_VALIDATE_INT)) {
|
||||
// $value = (int)$value;
|
||||
// }
|
||||
// }
|
||||
//);
|
||||
$input = ArrayUtility::toObject($input);
|
||||
$validationResult = $validator->dataValidation(
|
||||
$input,
|
||||
json_encode($schema),
|
||||
-1
|
||||
);
|
||||
|
||||
if (!$validationResult->isValid()) {
|
||||
$this->isValid = false;
|
||||
$this->responseStatus = [400 => 'validationError'];
|
||||
|
@ -47,7 +47,7 @@ class ApiUtility
|
||||
$this->objectManager = GeneralUtility::makeInstance(
|
||||
ObjectManager::class
|
||||
);
|
||||
$this->imageService = $this->objectManager->get(
|
||||
$this->imageService = GeneralUtility::makeInstance(
|
||||
imageService::class
|
||||
);
|
||||
if (1 == 0) {
|
||||
@ -171,6 +171,12 @@ class ApiUtility
|
||||
) {
|
||||
$rowResult[$attributeName] = [];
|
||||
foreach ($methodResult as $object) {
|
||||
if (!method_exists(
|
||||
$methodResult,
|
||||
'getOriginalResource'
|
||||
)) {
|
||||
continue;
|
||||
}
|
||||
$rowResult[$attributeName]
|
||||
= $this->filereferenceToApi(
|
||||
$methodResult->getOriginalResource()
|
||||
@ -220,7 +226,7 @@ class ApiUtility
|
||||
$this->objectManager = GeneralUtility::makeInstance(
|
||||
ObjectManager::class
|
||||
);
|
||||
$this->imageService = $this->objectManager->get(
|
||||
$this->imageService = GeneralUtility::makeInstance(
|
||||
imageService::class
|
||||
);
|
||||
$httpHost = GeneralUtility::getIndpEnv('HTTP_HOST');
|
||||
@ -235,13 +241,8 @@ class ApiUtility
|
||||
0
|
||||
);
|
||||
$processingInstructionsPreview = array(
|
||||
//'width' => '1024c',
|
||||
//'height' => '768c',
|
||||
//'minWidth' => $minWidth,
|
||||
//'minHeight' => $minHeight,
|
||||
'maxWidth' => '1024',
|
||||
'maxHeight' => '768',
|
||||
//'crop' => $crop,
|
||||
);
|
||||
$processedImagePreview = $this->imageService
|
||||
->applyProcessingInstructions(
|
||||
|
@ -20,6 +20,7 @@ use TYPO3\CMS\Extbase\Service\ImageService;
|
||||
use TYPO3\CMS\Fluid\View\StandaloneView;
|
||||
use TYPO3\CMS\Fluid\View\TemplatePaths;
|
||||
use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
|
||||
use Symfony\Component\Mime\Address;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -176,7 +177,7 @@ class MailUtility
|
||||
$templateNameText = 'Mails/DefaultText';
|
||||
}
|
||||
$objectManager = GeneralUtility::makeInstance(ObjectManager::class);
|
||||
$configurationManager = $objectManager->get(
|
||||
$configurationManager = GeneralUtility::makeInstance(
|
||||
ConfigurationManagerInterface::class
|
||||
);
|
||||
$typoScript = $configurationManager->getConfiguration(
|
||||
@ -185,9 +186,9 @@ class MailUtility
|
||||
$settings =
|
||||
(array)$typoScript['module.']['tx_templatesaide.']['settings.'];
|
||||
$settings = GeneralUtility::removeDotsFromTS($settings);
|
||||
$htmlView = $objectManager->get(StandaloneView::class);
|
||||
$htmlView = GeneralUtility::makeInstance(StandaloneView::class);
|
||||
$htmlView->setTemplate($templateNameHtml);
|
||||
$textView = $objectManager->get(StandaloneView::class);
|
||||
$textView = GeneralUtility::makeInstance(StandaloneView::class);
|
||||
if ($templatePaths) {
|
||||
$partialRootPaths = $htmlView->getPartialRootPaths();
|
||||
$partialRootPaths[] = GeneralUtility::getFileAbsFileName(
|
||||
@ -215,8 +216,17 @@ class MailUtility
|
||||
}
|
||||
$textView->setTemplate($templateNameText);
|
||||
$mail = GeneralUtility::makeInstance(MailMessage::class);
|
||||
$mail->setFrom($sender);
|
||||
if (version_compare(TYPO3_branch, '10.0', '>=')) {
|
||||
$mail->subject($subject);
|
||||
if ($sender) {
|
||||
$mail->from($sender);
|
||||
}
|
||||
} else {
|
||||
$mail->setSubject($subject);
|
||||
if ($sender) {
|
||||
$mail->setFrom($sender);
|
||||
}
|
||||
}
|
||||
$bodydataText = [];
|
||||
$bodydataHtml = [];
|
||||
foreach ($data as $row) {
|
||||
@ -308,83 +318,20 @@ class MailUtility
|
||||
$bodydataText[] = $textRow;
|
||||
$bodydataHtml[] = $htmlRow;
|
||||
break;
|
||||
//case 'button':
|
||||
// $row['data'] = str_replace(
|
||||
// "\\\n",
|
||||
// '',
|
||||
// $row['data']
|
||||
// );
|
||||
// $htmlRow = $row;
|
||||
// $htmlRow['data'] = preg_replace_callback(
|
||||
// '/\[.*\]/mU',
|
||||
// function($matches) {
|
||||
// foreach ($matches as $match) {
|
||||
// $test = preg_replace_callback(
|
||||
// '/\[(\S*)\s(.*)\]/mU',
|
||||
// function($matchesInner) {
|
||||
//
|
||||
// return '<a href="'
|
||||
// . $matchesInner[1]
|
||||
// . '">'
|
||||
// . $matchesInner[2]
|
||||
// . '</a>';
|
||||
// },
|
||||
// $match
|
||||
// );
|
||||
// \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump(
|
||||
// $test, null, 3, true, false
|
||||
// );
|
||||
// return $test;
|
||||
// }
|
||||
// },
|
||||
// $htmlRow['data']
|
||||
// );
|
||||
// \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump(
|
||||
// $htmlRow['data'], null, 3, true, false
|
||||
// );
|
||||
// $htmlRow['data'] = preg_replace_callback(
|
||||
// '/\*.*\*/mU',
|
||||
// function($matches) {
|
||||
// foreach ($matches as $match) {
|
||||
// return '<b>'
|
||||
// . substr($match, 1, -1)
|
||||
// . '</b>';
|
||||
// }
|
||||
// },
|
||||
// $htmlRow['data']
|
||||
// );
|
||||
// $textRow = $row;
|
||||
// $textRow['data'] = preg_replace_callback(
|
||||
// '/\[.*\]/mU',
|
||||
// function($matches) {
|
||||
// foreach ($matches as $match) {
|
||||
// return preg_replace_callback(
|
||||
// '/\[(\S*)\s(.*)\]/mU',
|
||||
// function($matchesInner) {
|
||||
// if (
|
||||
// $matchesInner[2] == $matchesInner[1]
|
||||
// ) {
|
||||
// return $matchesInner[1];
|
||||
// }
|
||||
// return $matchesInner[2]
|
||||
// . ': '
|
||||
// . $matchesInner[1];
|
||||
// },
|
||||
// $match
|
||||
// );
|
||||
// }
|
||||
// },
|
||||
// $textRow['data']
|
||||
// );
|
||||
// $bodydataText[] = $textRow;
|
||||
// $bodydataHtml[] = $htmlRow;
|
||||
// break;
|
||||
case 'attachment':
|
||||
if (version_compare(TYPO3_branch, '10.0', '>=')) {
|
||||
$mail->attach(
|
||||
$row['data'][0],
|
||||
$row['data'][1],
|
||||
$row['data'][2]
|
||||
);
|
||||
}else {
|
||||
$mail->attach(new \Swift_Attachment(
|
||||
$row['data'][0],
|
||||
$row['data'][1],
|
||||
$row['data'][2]
|
||||
));
|
||||
}
|
||||
break;
|
||||
case 'attachmentBase64':
|
||||
$attachmentdata = explode(',', $row['data']);
|
||||
@ -392,19 +339,24 @@ class MailUtility
|
||||
$mimetype = $matches[1];
|
||||
preg_match('/\w*\/(.*);\w*/', $attachmentdata[0], $matches);
|
||||
$fileextension = $matches[1];
|
||||
if (version_compare(TYPO3_branch, '10.0', '>=')) {
|
||||
$mail->attach(
|
||||
base64_decode($attachmentdata[1]),
|
||||
'attachment.' . $fileextension,
|
||||
$mimetype
|
||||
);
|
||||
}else {
|
||||
$mail->attach(new \Swift_Attachment(
|
||||
base64_decode($attachmentdata[1]),
|
||||
'attachment.' . $fileextension,
|
||||
$mimetype
|
||||
));
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
$textView->assign('content', $bodydataText);
|
||||
$htmlView->assign('content', $bodydataHtml);
|
||||
//\TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump(
|
||||
// $bodydataHtml, null, 8, true, false
|
||||
//);
|
||||
$domain = $settings['mailDomain'];
|
||||
if ($assetDomain) {
|
||||
$domain = $assetDomain;
|
||||
@ -443,16 +395,30 @@ class MailUtility
|
||||
);
|
||||
foreach ($recipientsIntercecpted as $recipientIntercepted) {
|
||||
foreach ($recipients as $recipient) {
|
||||
|
||||
if (version_compare(TYPO3_branch, '10.0', '>=')) {
|
||||
$mail->subject(
|
||||
$subjectOrig . ' [ORIG-TO: ' . trim($recipient) . ']'
|
||||
);
|
||||
$mail->to(new Address(trim($recipientIntercepted)));
|
||||
}else {
|
||||
$mail->setSubject(
|
||||
$subjectOrig . ' [ORIG-TO: ' . trim($recipient) . ']'
|
||||
);
|
||||
$mail->setTo(trim($recipientIntercepted));
|
||||
}
|
||||
|
||||
$mail->send();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
foreach ($recipients as $recipient) {
|
||||
if (version_compare(TYPO3_branch, '10.0', '>=')) {
|
||||
$mail->to(new Address(trim($recipient)));
|
||||
}else {
|
||||
$mail->setTo(trim($recipient));
|
||||
}
|
||||
|
||||
$mail->send();
|
||||
}
|
||||
}
|
||||
|
43
Classes/Utility/SessionUtility.php
Normal file
43
Classes/Utility/SessionUtility.php
Normal file
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
namespace Cjel\TemplatesAide\Utility;
|
||||
|
||||
/***
|
||||
*
|
||||
* This file is part of the "Templates Aide" Extension for TYPO3 CMS.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* filey as part of the extension by 2024 Philipp Dieter <philipp.dieter@attic-media.net>
|
||||
*
|
||||
***/
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class SessionUtility
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static function setSessionValue(
|
||||
$type, $key, $value
|
||||
) {
|
||||
$request = $GLOBALS['TYPO3_REQUEST'];
|
||||
$frontendUser = $request->getAttribute('frontend.user');
|
||||
$frontendUser->setKey($type, $key, $value);
|
||||
$frontendUser->storeSessionData();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static function getSessionValue(
|
||||
$type, $key
|
||||
) {
|
||||
$request = $GLOBALS['TYPO3_REQUEST'];
|
||||
$frontendUser = $request->getAttribute('frontend.user');
|
||||
return $frontendUser->getKey($type, $key);
|
||||
}
|
||||
}
|
@ -29,6 +29,7 @@ class TcaUtility
|
||||
public static function configureSelect(
|
||||
&$tca, $column, $element, $options, $extensionKey = null
|
||||
) {
|
||||
|
||||
foreach ($options as &$option) {
|
||||
$translationKey = "option.$element.$column.$option[0]";
|
||||
$translation = self::getTranslation(
|
||||
|
@ -60,10 +60,6 @@ class WordWrapViewHelper extends AbstractViewHelper
|
||||
continue;
|
||||
}
|
||||
$temp = '';
|
||||
//while (mb_strlen($line) > $limit) {
|
||||
// $temp .= mb_substr($line, 0, $limit - 1);
|
||||
// $line = mb_substr($line, $limit - 1);
|
||||
//}
|
||||
if (false === empty($temp)) {
|
||||
$output .= $temp . $glue . $line . $glue;
|
||||
} else {
|
||||
|
@ -1,7 +1,8 @@
|
||||
<?php
|
||||
namespace Cjel\TemplatesAide\ViewHelpers;
|
||||
|
||||
use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
|
||||
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
|
||||
class HeaderDataViewHelper extends AbstractViewHelper
|
||||
@ -25,12 +26,7 @@ class HeaderDataViewHelper extends AbstractViewHelper
|
||||
}
|
||||
switch ($type){
|
||||
case 'tracking':
|
||||
//if(GeneralUtility::getApplicationContext()->isProduction()){
|
||||
$GLOBALS['TSFE']->additionalHeaderData[] = $data;
|
||||
//} else {
|
||||
// $GLOBALS['TSFE']->additionalHeaderData[]
|
||||
// = '<meta name="placeholder" content="tracking" />';
|
||||
//}
|
||||
break;
|
||||
case 'title':
|
||||
$GLOBALS['TSFE']->additionalHeaderData[]
|
||||
|
@ -60,14 +60,10 @@ class ImageAppendViewHelper extends AbstractTagBasedViewHelper
|
||||
{
|
||||
foreach ($this->arguments['images'] as $image) {
|
||||
$imagePath = $image->getForLocalProcessing(false);
|
||||
//$image = $this->imageService->getImage('', $imageArgument, true);
|
||||
//$image = $this->imageService->getImageUri($image);
|
||||
|
||||
$imageMagickFile = ImageMagickFile::fromFilePath($imagePath, 0);
|
||||
|
||||
\TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump(
|
||||
$imageMagickFile, null, 3
|
||||
);
|
||||
// \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump(
|
||||
// $imageMagickFile, null, 3
|
||||
// );
|
||||
|
||||
|
||||
|
||||
|
@ -4,7 +4,8 @@ namespace Cjel\TemplatesAide\ViewHelpers;
|
||||
use TYPO3\CMS\Core\Database\Connection;
|
||||
use TYPO3\CMS\Core\Database\ConnectionPool;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
|
||||
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
|
||||
|
||||
class ScriptswitchNoscriptViewHelper extends AbstractViewHelper {
|
||||
|
||||
@ -21,10 +22,6 @@ class ScriptswitchNoscriptViewHelper extends AbstractViewHelper {
|
||||
public function render()
|
||||
{
|
||||
|
||||
//\TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump(
|
||||
// $GLOBALS['TSFE']->fe_user->getKey('ses', 'scriptstate')
|
||||
//);
|
||||
|
||||
$scriptstate = $GLOBALS['TSFE']->fe_user->getKey('ses', 'scriptstate');
|
||||
|
||||
if ($scriptstate) {
|
||||
|
@ -46,7 +46,7 @@ class TranslationViewHelper extends AbstractViewHelper
|
||||
'array',
|
||||
'The arguments',
|
||||
false,
|
||||
false
|
||||
[]
|
||||
);
|
||||
}
|
||||
|
||||
@ -63,6 +63,8 @@ class TranslationViewHelper extends AbstractViewHelper
|
||||
\Closure $renderChildrenClosure,
|
||||
RenderingContextInterface $renderingContext
|
||||
) {
|
||||
|
||||
|
||||
$translation = LocalizationUtility::translate(
|
||||
$arguments['key'],
|
||||
$arguments['extensionKey'],
|
||||
|
10
Configuration/Services.yaml
Normal file
10
Configuration/Services.yaml
Normal file
@ -0,0 +1,10 @@
|
||||
services:
|
||||
_defaults:
|
||||
autowire: true
|
||||
autoconfigure: true
|
||||
public: false
|
||||
Cjel\TemplatesAide\:
|
||||
resource: '../Classes/*'
|
||||
exclude: '../Classes/Standalone/*'
|
||||
Cjel\TemplatesAide\Utility\ApiUtility:
|
||||
public: true
|
8
Configuration/TCA/Overrides/pages.php
Normal file
8
Configuration/TCA/Overrides/pages.php
Normal file
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
use \TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
|
||||
|
||||
ExtensionManagementUtility::registerPageTSConfigFile(
|
||||
'templates_aide',
|
||||
'Resources/Private/PageTSConfig/default.tsconfig',
|
||||
'Default Config'
|
||||
);
|
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
defined('TYPO3_MODE') || die('Access denied.');
|
||||
defined('TYPO3') or die();
|
||||
|
||||
call_user_func(function() {
|
||||
unset($GLOBALS['TCA']['tx_templatesaide_domain_model_dummy']);
|
||||
|
@ -8,7 +8,7 @@ return [
|
||||
'cruser_id' => 'cruser_id',
|
||||
'versioningWS' => true,
|
||||
'languageField' => 'sys_language_uid',
|
||||
'transOrigPointerField' => 'l10n_parent',
|
||||
|
||||
'transOrigDiffSourceField' => 'l10n_diffsource',
|
||||
'delete' => 'deleted',
|
||||
'enablecolumns' => [
|
||||
|
@ -256,7 +256,7 @@ TYPO3:
|
||||
__inheritances:
|
||||
10: 'TYPO3.CMS.Form.mixins.finishersEmailMixin'
|
||||
|
||||
EmailToReceiver:
|
||||
EmailsToReceiver:
|
||||
__inheritances:
|
||||
10: 'TYPO3.CMS.Form.mixins.finishersEmailMixin'
|
||||
|
||||
|
@ -46,13 +46,13 @@
|
||||
"emConf": {
|
||||
"category": "plugin",
|
||||
"custom_category": "",
|
||||
"dependsOn": "typo3 => 8.7.0-9.5.99\n",
|
||||
"dependsOn": "typo3 => 8.7.0-11.5.99\n",
|
||||
"disableLocalization": false,
|
||||
"disableVersioning": false,
|
||||
"skipGenerateDocumentationTemplate": false,
|
||||
"sourceLanguage": "en",
|
||||
"state": "alpha",
|
||||
"targetVersion": "9.5.0-9.5.99",
|
||||
"targetVersion": "9.5.0-11.5.99",
|
||||
"version": "0.0.1"
|
||||
},
|
||||
"extensionKey": "templates_aide",
|
||||
|
3
Makefile.old
Normal file
3
Makefile.old
Normal file
@ -0,0 +1,3 @@
|
||||
add_upstreams:
|
||||
git remote add upstream-dt git@git.datentonne.net:typo3/template_aide.git
|
||||
git remote add upstream-gs ssh://vcs@phabricator.glanzstueck.agency/source/typo3-template_aide.git
|
@ -1,6 +1,3 @@
|
||||
#options.pageTree.showPageIdWithTitle = 1
|
||||
options.pageTree.showNavTitle = 1
|
||||
|
||||
options {
|
||||
folderTree {
|
||||
uploadFieldsInLinkBrowser = 0
|
||||
|
@ -9,7 +9,7 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"typo3/cms-core": "8.7.0 - 10.99.99",
|
||||
"typo3/cms-core": "8.7.0 - 11.5.99",
|
||||
"sarhan/php-flatten": "^4.0"
|
||||
},
|
||||
"autoload": {
|
||||
@ -23,7 +23,11 @@
|
||||
}
|
||||
},
|
||||
"replace": {
|
||||
"templates_aide": "self.version",
|
||||
"typo3-ter/templates-aide": "self.version"
|
||||
},
|
||||
"extra": {
|
||||
"typo3/cms": {
|
||||
"extension-key": "templates_aide"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -16,14 +16,14 @@ $EM_CONF[$_EXTKEY] = [
|
||||
'category' => 'plugin',
|
||||
'author' => 'Philipp Dieter',
|
||||
'author_email' => 'philippdieter@attic-media.net',
|
||||
'state' => 'alpha',
|
||||
'state' => 'stable',
|
||||
'uploadfolder' => 0,
|
||||
'createDirs' => '',
|
||||
'clearCacheOnLoad' => 0,
|
||||
'version' => '0.0.1',
|
||||
'constraints' => [
|
||||
'depends' => [
|
||||
'typo3' => '8.7.0-10.99.99',
|
||||
'typo3' => '8.7.0-11.99.99',
|
||||
],
|
||||
'conflicts' => [],
|
||||
'suggests' => [],
|
||||
|
@ -1,19 +1,19 @@
|
||||
<?php
|
||||
defined('TYPO3_MODE') || die('Access denied.');
|
||||
|
||||
defined('TYPO3') or die();
|
||||
use Cjel\TemplatesAide\Controller\DummyController;
|
||||
call_user_func(
|
||||
function()
|
||||
{
|
||||
|
||||
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
|
||||
'Cjel.TemplatesAide',
|
||||
'TemplatesAide',
|
||||
'Dummy',
|
||||
[
|
||||
'Dummy' => 'list'
|
||||
DummyController::class => 'list'
|
||||
],
|
||||
// non-cacheable actions
|
||||
[
|
||||
'Dummy' => ''
|
||||
DummyController::class => ''
|
||||
]
|
||||
);
|
||||
|
||||
@ -83,10 +83,5 @@ call_user_func(
|
||||
$_GET['eID'] = 'script_disabled';
|
||||
}
|
||||
}
|
||||
//$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['script_enable'] =
|
||||
// \Cjel\TemplatesAide\Controller\EIDController::class
|
||||
// . '::scriptEnable';
|
||||
|
||||
|
||||
}
|
||||
);
|
||||
|
@ -1,12 +1,12 @@
|
||||
<?php
|
||||
defined('TYPO3_MODE') || die('Access denied.');
|
||||
defined('TYPO3') or die();
|
||||
|
||||
call_user_func(
|
||||
function()
|
||||
{
|
||||
|
||||
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
|
||||
'Cjel.TemplatesAide',
|
||||
'TemplatesAide',
|
||||
'Dummy',
|
||||
'dummy'
|
||||
);
|
||||
@ -22,7 +22,7 @@ call_user_func(
|
||||
|
||||
use Cjel\TemplatesAide\Property\TypeConverter\Double2Converter;
|
||||
use TYPO3\CMS\Extbase\Utility\ExtensionUtility;
|
||||
|
||||
use TYPO3\CMS\Core\Http\ApplicationType;
|
||||
call_user_func(
|
||||
function()
|
||||
{
|
||||
@ -30,12 +30,12 @@ call_user_func(
|
||||
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms']['db_new_content_el']['wizardItemsHook'][] =
|
||||
\Cjel\TemplatesAide\Hooks\WizardItems::class;
|
||||
|
||||
if(\TYPO3\CMS\Core\Utility\GeneralUtility::getApplicationContext()->isDevelopment()) {
|
||||
if(\TYPO3\CMS\Core\Core\Environment::getContext()->isDevelopment()) {
|
||||
$GLOBALS['TBE_STYLES']['skins']['backend']['stylesheetDirectories']['dev'] =
|
||||
'EXT:templates_aide/Resources/Public/Css/backend/dev';
|
||||
}
|
||||
|
||||
if(\TYPO3\CMS\Core\Utility\GeneralUtility::getApplicationContext()->__toString() === 'Production/Stage') {
|
||||
if(\TYPO3\CMS\Core\Core\Environment::getContext()->__toString() === 'Production/Stage') {
|
||||
$GLOBALS['TBE_STYLES']['skins']['backend']['stylesheetDirectories']['dev'] =
|
||||
'EXT:templates_aide/Resources/Public/Css/backend/production-stage';
|
||||
}
|
||||
@ -43,21 +43,10 @@ call_user_func(
|
||||
$GLOBALS['TBE_STYLES']['skins']['backend']['stylesheetDirectories']['templates_aide_default'] =
|
||||
'EXT:templates_aide/Resources/Public/Css/backend/default';
|
||||
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::registerPageTSConfigFile(
|
||||
'templates_aide',
|
||||
'Resources/Private/PageTSConfig/default.tsconfig',
|
||||
'Default Config'
|
||||
);
|
||||
|
||||
|
||||
ExtensionUtility::registerTypeConverter(Double2Converter::class);
|
||||
|
||||
if (TYPO3_MODE == 'BE') {
|
||||
//$pageRenderer = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
|
||||
// \TYPO3\CMS\Core\Page\PageRenderer::class
|
||||
//);
|
||||
//$pageRenderer->loadRequireJsModule('TYPO3/CMS/TemplatesAide/NewContentElementWizardPreview');
|
||||
|
||||
if (TYPO3_MODE == 'BE')
|
||||
{
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addUserTSConfig(
|
||||
'<INCLUDE_TYPOSCRIPT: source="FILE:EXT:templates_aide/Resources/Private/UserTSConfig/default.ts">'
|
||||
);
|
||||
@ -70,9 +59,17 @@ $GLOBALS['TYPO3_USER_SETTINGS']['columns']['disableDragModal'] = [
|
||||
'type' => 'check',
|
||||
'label' => 'LLL:EXT:templates_aide/Resources/Private/Language/locallang.xlf:disableDragModal',
|
||||
];
|
||||
$GLOBALS['TYPO3_USER_SETTINGS']['showitem'] = str_replace(
|
||||
|
||||
if (version_compare(TYPO3_branch, '10.0', '>=')) {
|
||||
$GLOBALS['TYPO3_USER_SETTINGS']['showitem'] = str_replace(
|
||||
'showHiddenFilesAndFolders',
|
||||
'showHiddenFilesAndFolders,disableDragModal',
|
||||
$GLOBALS['TYPO3_USER_SETTINGS']['showitem'],
|
||||
);
|
||||
} else {
|
||||
$GLOBALS['TYPO3_USER_SETTINGS']['showitem'] = str_replace(
|
||||
'recursiveDelete',
|
||||
'recursiveDelete,disableDragModal',
|
||||
$GLOBALS['TYPO3_USER_SETTINGS']['showitem'],
|
||||
);
|
||||
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user