[TASK] Call sanitizeLocalUrl only once in recordList
authorDominique Feyer <dfeyer@ttree.ch>
Wed, 18 Jul 2012 13:53:49 +0000 (15:53 +0200)
committerHelmut Hummel <helmut.hummel@typo3.org>
Thu, 19 Jul 2012 09:34:24 +0000 (11:34 +0200)
recordList calls t3lib_div::sanitizeLocalUrl twice.
Store the result in a variable, so that one call is
enough.

Change-Id: I56a2d3b5ff0e75e4409829fbcc7db64ee98bec38
Resolves: #39060
Releases: 6.0
Reviewed-on: http://review.typo3.org/12874
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
typo3/class.db_list.inc

index 07ec34e..e43ad4d 100644 (file)
@@ -201,9 +201,10 @@ class recordList extends t3lib_recordList {
                        // Save modified user uc
                        $GLOBALS['BE_USER']->uc['moduleData']['list'] = $this->tablesCollapsed;
                        $GLOBALS['BE_USER']->writeUC($GLOBALS['BE_USER']->uc);
-                       if (t3lib_div::sanitizeLocalUrl(t3lib_div::_GP('returnUrl'))) {
-                               $location = t3lib_div::sanitizeLocalUrl(t3lib_div::_GP('returnUrl'));
-                               t3lib_utility_Http::redirect($location);
+
+                       $returnUrl = t3lib_div::sanitizeLocalUrl(t3lib_div::_GP('returnUrl'));
+                       if ($returnUrl !== '') {
+                               t3lib_utility_Http::redirect($returnUrl);
                        }
                }