[BUGFIX] Initialize ExtendedFileUtility only if an actual upload happens 78/45878/3
authorGeorg Ringer <georg.ringer@gmail.com>
Thu, 14 Jan 2016 10:03:49 +0000 (11:03 +0100)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Thu, 14 Jan 2016 17:38:09 +0000 (18:38 +0100)
There is no need to initialize ExtendedFileUtility every request in
EXT:impexp. Check if an upload is actually performed.

Change-Id: I45ff2affd38cf00b3e182741749fb567f6853658
Resolves: #72692
Releases: master
Reviewed-on: https://review.typo3.org/45878
Reviewed-by: Susanne Moog <typo3@susannemoog.de>
Tested-by: Susanne Moog <typo3@susannemoog.de>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/impexp/Classes/Controller/ImportExportController.php

index 0e84ba6..68537c7 100644 (file)
@@ -170,7 +170,6 @@ class ImportExportController extends BaseScriptClass
         $inData = GeneralUtility::_GP('tx_impexp');
         $this->content .= '<h3>' . $this->lang->getLL('title_' . (string)$inData['action'], true) . '</h3>';
         $this->content .= '<div style="padding-top: 5px;"></div>';
-        $this->checkUpload();
         switch ((string)$inData['action']) {
             case 'export':
                 $this->shortcutName = $this->lang->getLL('title_export');
@@ -179,6 +178,9 @@ class ImportExportController extends BaseScriptClass
                 break;
             case 'import':
                 $this->shortcutName = $this->lang->getLL('title_import');
+                if (GeneralUtility::_POST('_upload')) {
+                    $this->checkUpload();
+                }
                 // Finally: If upload went well, set the new file as the import file:
                 if (!empty($this->uploadedFiles[0])) {
                     // Only allowed extensions....