From 883811d967971ee4747f25215f601f5e5cc2d69f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=B6ffler?= <loeffler@spooner-web.de> Date: Sun, 7 Oct 2012 12:17:44 +0200 Subject: [PATCH] [BUGFIX] Hardcoded fileadmin directory in Import-Export $fileAdminDir is hardcoded in t3lib\class.t3lib_softrefproc.php and typo3\sysext\impexp\class.tx_impexp.php $TYPO3_CONF_VARS['BE']['fileadminDir'] should be used instead Change-Id: I9f381507a762352ce6a555134534481e4df61f92 Releases: 4.5, 4.6, 4.7, 6.0 Resolves: #41120 Reviewed-on: http://review.typo3.org/15378 Reviewed-by: Wouter Wolters Reviewed-by: Philipp Gampe Reviewed-by: Georg Ringer Tested-by: Georg Ringer Reviewed-by: Oliver Hader Tested-by: Oliver Hader --- .../core/Classes/Database/SoftReferenceIndex.php | 10 +++++++++- typo3/sysext/impexp/classes/ImportExport.php | 3 ++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/typo3/sysext/core/Classes/Database/SoftReferenceIndex.php b/typo3/sysext/core/Classes/Database/SoftReferenceIndex.php index 308ad7fa9953..1d89dc33a998 100644 --- a/typo3/sysext/core/Classes/Database/SoftReferenceIndex.php +++ b/typo3/sysext/core/Classes/Database/SoftReferenceIndex.php @@ -85,7 +85,7 @@ class SoftReferenceIndex { /** * @todo Define visibility */ - public $fileAdminDir = 'fileadmin'; + public $fileAdminDir = ''; // Internal: /** @@ -93,6 +93,14 @@ class SoftReferenceIndex { */ public $tokenID_basePrefix = ''; + /** + * Class construct to set global variable + * + */ + public function __construct() { + $this->fileAdminDir = !empty($GLOBALS['TYPO3_CONF_VARS']['BE']['fileadminDir']) ? $GLOBALS['TYPO3_CONF_VARS']['BE']['fileadminDir'] : 'fileadmin'; + } + /** * Main function through which all processing happens * diff --git a/typo3/sysext/impexp/classes/ImportExport.php b/typo3/sysext/impexp/classes/ImportExport.php index c4a3486d35ee..2a3a03592547 100644 --- a/typo3/sysext/impexp/classes/ImportExport.php +++ b/typo3/sysext/impexp/classes/ImportExport.php @@ -80,7 +80,7 @@ class ImportExport { /** * @todo Define visibility */ - public $fileadminFolderName = 'fileadmin'; + public $fileadminFolderName = ''; // Whether "import" or "export" mode of object. Set through init() function /** @@ -310,6 +310,7 @@ class ImportExport { $this->compress = function_exists('gzcompress'); $this->dontCompress = $dontCompress; $this->mode = $mode; + $this->fileadminFolderName = !empty($GLOBALS['TYPO3_CONF_VARS']['BE']['fileadminDir']) ? $GLOBALS['TYPO3_CONF_VARS']['BE']['fileadminDir'] : 'fileadmin'; } /************************** -- GitLab