[BUGFIX] Fix backpath for add wizards in IRRE records
authorSebastian Fischer <typo3@evoweb.de>
Wed, 14 Sep 2011 13:09:37 +0000 (15:09 +0200)
committerSteffen Ritter <info@rs-websystems.de>
Fri, 16 Sep 2011 06:00:25 +0000 (08:00 +0200)
As in typo3/init.php the TYPO3_mainDir is set to 'typo3/' the replacement in
renderForeignRecord could not work because it uses the TYPO3_mainDir . '%2Fajax.php'
which results in typo3//ajax.php
By this the backpath of the add wizard in IRRE foreign records is fixed.

Change-Id: Id2bb587243b7ffbf8458ac3cecfa9ddaa5266d5c
Resolves: #29770
Releases: 4.6, 4.5, 4.4
Reviewed-on: http://review.typo3.org/4976
Reviewed-by: Björn Pedersen
Reviewed-by: Tobias Liebig
Tested-by: Tobias Liebig
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
t3lib/class.t3lib_tceforms_inline.php

index 30557ad..0b7366c 100644 (file)
@@ -358,7 +358,7 @@ class t3lib_TCEforms_inline {
                                        // Replace returnUrl in Wizard-Code, if this is an AJAX call
                                $ajaxArguments = t3lib_div::_GP('ajax');
                                if (isset($ajaxArguments[2]) && trim($ajaxArguments[2]) != '') {
                                        // Replace returnUrl in Wizard-Code, if this is an AJAX call
                                $ajaxArguments = t3lib_div::_GP('ajax');
                                if (isset($ajaxArguments[2]) && trim($ajaxArguments[2]) != '') {
-                                       $fields = str_replace('P[returnUrl]=%2F' . rawurlencode(TYPO3_mainDir) . '%2Fajax.php', 'P[returnUrl]=' . rawurlencode($ajaxArguments[2]), $fields);
+                                       $fields = str_replace('P[returnUrl]=%2F' . rawurlencode(TYPO3_mainDir) . 'ajax.php', 'P[returnUrl]=' . rawurlencode($ajaxArguments[2]), $fields);
                                }
                        } else {
                                $combination = '';
                                }
                        } else {
                                $combination = '';
@@ -2491,4 +2491,4 @@ if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLA
        include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_tceforms_inline.php']);
 }
 
        include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_tceforms_inline.php']);
 }
 
-?>
\ No newline at end of file
+?>