[BUGFIX] Update wizard uses hardcoded fileadmin/ dir
authorAndreas Wolf <andreas.wolf@typo3.org>
Tue, 24 Apr 2012 13:54:47 +0000 (15:54 +0200)
committerSusanne Moog <typo3@susannemoog.de>
Fri, 4 May 2012 17:59:43 +0000 (19:59 +0200)
The migration wizard for TCEforms always moved files to fileadmin/
instead of taking the configured alternative fileadmin directory into
account.

Change-Id: I3f877a2421833fb8bf3914487147fbb6386e30dc
Fixes: #36781
Related: #36400
Releases: 6.0
Reviewed-on: http://review.typo3.org/10929
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader
Reviewed-by: Susanne Moog
Tested-by: Susanne Moog
typo3/sysext/install/Classes/Updates/File/TceformsUpdateWizard.php

index 0635886..ed95c61 100644 (file)
@@ -199,6 +199,8 @@ class Tx_Install_Updates_File_TceformsUpdateWizard extends Tx_Install_Updates_Ba
                        $linkContents = explode(LF, $row[$linkField]);
                }
 
+               $fileadminDirectory = rtrim($GLOBALS['TYPO3_CONF_VARS']['BE']['fileadminDir'], '/') . '/';
+
                $queries = array();
                $i = 0;
                foreach ($fieldItems as $item) {
@@ -207,7 +209,7 @@ class Tx_Install_Updates_File_TceformsUpdateWizard extends Tx_Install_Updates_Ba
 
                                // copy file
                        $sourcePath = PATH_site . $fieldConfiguration['sourcePath'] . $item;
-                       $targetPath = PATH_site.'fileadmin/'.$fieldConfiguration['targetPath']. $item;
+                       $targetPath = PATH_site . $fileadminDirectory . $fieldConfiguration['targetPath'] . $item;
                        if(!is_dir(dirname($targetPath))) {
                                t3lib_div::mkdir_deep(dirname($targetPath));
                        }