[BUGFIX] Remove superfluous call of ExtendedFileUtility::init() 83/49983/4
authorNicole Cordes <typo3@cordes.co>
Tue, 20 Sep 2016 16:18:50 +0000 (18:18 +0200)
committerAndreas Fernandez <typo3@scripting-base.de>
Wed, 28 Sep 2016 06:58:58 +0000 (08:58 +0200)
This patch is a follow up to https://review.typo3.org/45695 which
removed the BasicFileUtility::init but didn't removed the extending
usages of it.

Furthermore a wrong variable was used to initialize the file permissions
in \TYPO3\CMS\Core\Utility\File\BasicFileUtility which is also fixed.

Resolves: #78016
Releases: master
Change-Id: Iaa6f98e536a16a5741a88199de8952008df1fd0d
Reviewed-on: https://review.typo3.org/49983
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
typo3/sysext/core/Classes/Utility/File/BasicFileUtility.php
typo3/sysext/filelist/Classes/Controller/FileListController.php
typo3/sysext/impexp/Classes/Controller/ImportExportController.php
typo3/sysext/lowlevel/Classes/RteImagesCommand.php

index 50a363b..dba44bc 100644 (file)
@@ -67,8 +67,8 @@ class BasicFileUtility
      */
     public function __construct()
     {
-        $this->fileExtensionPermissions['allow'] = GeneralUtility::uniqueList(strtolower($GLOBALS['TYPO3_CONF_VARS']['BE']['filePermissions']['webspace']['allow']));
-        $this->fileExtensionPermissions['deny'] = GeneralUtility::uniqueList(strtolower($GLOBALS['TYPO3_CONF_VARS']['BE']['filePermissions']['webspace']['deny']));
+        $this->fileExtensionPermissions['allow'] = GeneralUtility::uniqueList(strtolower($GLOBALS['TYPO3_CONF_VARS']['BE']['fileExtensions']['webspace']['allow']));
+        $this->fileExtensionPermissions['deny'] = GeneralUtility::uniqueList(strtolower($GLOBALS['TYPO3_CONF_VARS']['BE']['fileExtensions']['webspace']['deny']));
     }
 
     /**
index 55f34c3..faf5e27 100644 (file)
@@ -372,7 +372,6 @@ class FileListController extends ActionController
                     // Init file processing object for deleting and pass the cmd array.
                     /** @var ExtendedFileUtility $fileProcessor */
                     $fileProcessor = GeneralUtility::makeInstance(ExtendedFileUtility::class);
-                    $fileProcessor->init([], $GLOBALS['TYPO3_CONF_VARS']['BE']['fileExtensions']);
                     $fileProcessor->setActionPermissions();
                     $fileProcessor->setExistingFilesConflictMode($this->overwriteExistingFiles);
                     $fileProcessor->start($FILE);
index 4de045c..3a4cb35 100644 (file)
@@ -952,7 +952,6 @@ class ImportExportController extends BaseScriptClass
         $file = GeneralUtility::_GP('file');
         // Initializing:
         $this->fileProcessor = GeneralUtility::makeInstance(ExtendedFileUtility::class);
-        $this->fileProcessor->init([], $GLOBALS['TYPO3_CONF_VARS']['BE']['fileExtensions']);
         $this->fileProcessor->setActionPermissions();
         $conflictMode = empty(GeneralUtility::_GP('overwriteExistingFiles')) ? DuplicationBehavior::__default : DuplicationBehavior::REPLACE;
         $this->fileProcessor->setExistingFilesConflictMode(DuplicationBehavior::cast($conflictMode));
index 26dbda7..e8adb5b 100644 (file)
@@ -261,7 +261,6 @@ Reports problems with RTE images';
     {
         if (!is_object($this->fileProcObj)) {
             $this->fileProcObj = GeneralUtility::makeInstance(ExtendedFileUtility::class);
-            $this->fileProcObj->init([], $GLOBALS['TYPO3_CONF_VARS']['BE']['fileExtensions']);
             $this->fileProcObj->setActionPermissions();
         }
         return $this->fileProcObj;