Fixed bug #15502: localization links in list mode are brocken (Thanks to Bjoern Pedersen)
authorSteffen Kamper <info@sk-typo3.de>
Tue, 24 Aug 2010 10:43:55 +0000 (10:43 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Tue, 24 Aug 2010 10:43:55 +0000 (10:43 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@8667 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/class.db_list.inc
typo3/class.db_list_extra.inc

index 0dcc3fb..2f07d42 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-08-24  Steffen Kamper  <steffen@typo3.org>
+
+       * Fixed bug #15502: localization links in list mode are brocken (Thanks to Bjoern Pedersen)
+
 2010-08-24  Sebastian Kurfuerst  <sebastian@typo3.org>
 
        * Raised Fluid and Extbase version numbers to 1.3.0alpha1. See ChangeLog.txt in Extbase/Fluid for a full list of changes.
index f791e91..db4c617 100644 (file)
@@ -828,8 +828,9 @@ class recordList extends t3lib_recordList {
 
                        if (is_array($localizedRecord)) {
                                        // Create parameters and finally run the classic page module for creating a new page translation
+                               $url = substr($this->listURL(), strlen($this->backPath));
                                $params = '&edit['.$table.']['.$localizedRecord['uid'].']=edit';
-                               $returnUrl = '&returnUrl='.rawurlencode($this->listURL());
+                               $returnUrl = '&returnUrl='.rawurlencode($url);
                                $location = $GLOBALS['BACK_PATH'].'alt_doc.php?'.$params.$returnUrl;
 
                                t3lib_utility_Http::redirect($location);
index e0e6859..bb189be 100644 (file)
@@ -1570,9 +1570,10 @@ class localRecordList extends recordList {
                        $lNew = '';
                        foreach($this->pageOverlays as $lUid_OnPage => $lsysRec)        {
                                if (!isset($translations['translations'][$lUid_OnPage]) && $GLOBALS['BE_USER']->checkLanguageAccess($lUid_OnPage))      {
-                                       $href = $this->backPath . $GLOBALS['TBE_TEMPLATE']->issueCommand(
-                                               '&cmd['.$table.']['.$row['uid'].'][localize]='.$lUid_OnPage,
-                                               $this->listURL().'&justLocalized='.rawurlencode($table.':'.$row['uid'].':'.$lUid_OnPage)
+                                       $url = substr($this->listURL(), strlen($this->backPath));
+                                       $href = $GLOBALS['SOBE']->doc->issueCommand(
+                                               '&cmd[' . $table . '][' . $row['uid'] . '][localize]=' . $lUid_OnPage,
+                                               $url . '&justLocalized=' . rawurlencode($table . ':' . $row['uid'] . ':' . $lUid_OnPage)
                                        );
                                        $language = t3lib_BEfunc::getRecord('sys_language', $lUid_OnPage, 'title');
                                        $lC = ($this->languageIconTitles[$lUid_OnPage]['flagIcon'] ? '<img src="'.$this->languageIconTitles[$lUid_OnPage]['flagIcon'].'" class="absmiddle" alt="" />' : $this->languageIconTitles[$lUid_OnPage]['title']);