From 9433345975bb4f8ed69294a079ae7c19e99a9337 Mon Sep 17 00:00:00 2001 From: Torsten Oppermann <torsten@sgalinski.de> Date: Tue, 18 Sep 2018 14:47:05 +0200 Subject: [PATCH] [TASK] Remove unnecessary code --- Classes/Service/RegisterService.php | 33 +------------------- Classes/XClass/Form/FormEditorController.php | 1 - 2 files changed, 1 insertion(+), 33 deletions(-) diff --git a/Classes/Service/RegisterService.php b/Classes/Service/RegisterService.php index df540cd5..63e04c36 100644 --- a/Classes/Service/RegisterService.php +++ b/Classes/Service/RegisterService.php @@ -48,27 +48,6 @@ class RegisterService implements \TYPO3\CMS\Core\SingletonInterface { */ private $registerArray = []; - /** - * contains the paths to the registration files - * - * @var array - */ - private $registrationFiles = []; - - /** - * Enables extensions to add their registration files - * - * @param string $pathToRegisterFile - * @api - */ - public function register($pathToRegisterFile) { - if (\file_exists($pathToRegisterFile)) { - $this->registrationFiles[] = [ - 'path' => $pathToRegisterFile - ]; - } - } - /** * Get all registered templates from the cache * @@ -80,7 +59,7 @@ class RegisterService implements \TYPO3\CMS\Core\SingletonInterface { public function getRegisterArray(): array { $cacheManager = GeneralUtility::makeInstance(CacheManager::class); $cache = $cacheManager->getCache(self::CACHE_NAME); - $cacheId = \md5('sg_mail'); + $cacheId = 'sg_mail'; $entry = $cache->get($cacheId); if (!$entry) { @@ -223,16 +202,6 @@ class RegisterService implements \TYPO3\CMS\Core\SingletonInterface { ]; } - /** - * Get an array with a list of filepaths of all registration files - * - * @api - * @return array - */ - public function getRegistrationFiles(): array { - return $this->registrationFiles; - } - /** * Returns the path to the configured location where automatic mail template registrations should be * diff --git a/Classes/XClass/Form/FormEditorController.php b/Classes/XClass/Form/FormEditorController.php index abf5e5c4..769a6196 100644 --- a/Classes/XClass/Form/FormEditorController.php +++ b/Classes/XClass/Form/FormEditorController.php @@ -139,7 +139,6 @@ class FormEditorController extends \TYPO3\CMS\Form\Controller\FormEditorControll // call register function in register service class $registrationService->getRegisterArray(); - $this->clearCaches(); } -- GitLab