[TASK] Remove superflous require_once in t3editor hook 48/27848/3
authorAlexander Schnitzler <git@alexanderschnitzler.de>
Tue, 25 Feb 2014 16:58:58 +0000 (17:58 +0100)
committerHelmut Hummel <helmut.hummel@typo3.org>
Fri, 28 Feb 2014 19:22:02 +0000 (20:22 +0100)
\TYPO3\CMS\T3editor\Hook\FileEditHook::save() requires
init.php which is not necessary at all as the method
itself is only called through ajax.php, which requires
init.php itself anyway.

Resolves: #55676
Releases: 6.2
Change-Id: Iaaf0805b73ebbb97e6689bcaa8064dc350187e66
Reviewed-on: https://review.typo3.org/27848
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Oliver Klee
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
typo3/sysext/t3editor/Classes/Hook/FileEditHook.php

index 9e69bd3..09e5aed 100644 (file)
@@ -110,12 +110,14 @@ class FileEditHook {
        }
 
        /**
+        * @param array $parameters
+        * @param mixed $pObj
+        *
         * @return boolean TRUE if successful
         */
        public function save($parameters, $pObj) {
                $savingsuccess = FALSE;
                if ($parameters['type'] == $this->ajaxSaveType) {
-                       require_once 'init.php';
                        $tceFile = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Controller\\File\\FileController');
                        $tceFile->processAjaxRequest(array(), $parameters['ajaxObj']);
                        $result = $parameters['ajaxObj']->getContent('result');