[BUGFIX] Fix backpath for add wizards in IRRE records (Backport fix from master)
authorSebastian Fischer <typo3@evoweb.de>
Wed, 14 Sep 2011 13:09:37 +0000 (15:09 +0200)
committerSteffen Ritter <info@rs-websystems.de>
Sun, 18 Sep 2011 07:30:27 +0000 (09:30 +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: I1a3c5274783609127ba29d0546c55450cecd1cd2
Resolves: #29770
Releases: 4.6, 4.5, 4.4
Reviewed-on: http://review.typo3.org/5017
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
t3lib/class.t3lib_tceforms_inline.php

index 9e44717..d8254ae 100644 (file)
@@ -416,7 +416,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]) != '') {
-                                       $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 = '';
@@ -2604,4 +2604,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']);
 }
 
-?>
\ No newline at end of file
+?>