Skip to content
Snippets Groups Projects
Commit 1fd62fa0 authored by Alexander Schnitzler's avatar Alexander Schnitzler Committed by Helmut Hummel
Browse files

[TASK] Remove superflous require_once in t3editor hook

\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
parent 53d2f313
......@@ -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');
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment