Fixed bug #15686: Call the list module through the dispatcher instead directly (Thank...
authorSteffen Kamper <info@sk-typo3.de>
Fri, 17 Dec 2010 12:09:12 +0000 (12:09 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Fri, 17 Dec 2010 12:09:12 +0000 (12:09 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@9821 709f56b5-9817-0410-a4d7-c38de5d9e867

25 files changed:
ChangeLog
t3lib/class.t3lib_befunc.php
t3lib/class.t3lib_clipboard.php
t3lib/class.t3lib_extmgm.php
typo3/alt_clickmenu.php
typo3/alt_shortcut.php
typo3/class.db_list.inc
typo3/db_list.php
typo3/db_new.php
typo3/sysext/cms/layout/db_layout.php
typo3/sysext/cms/tslib/class.tslib_adminpanel.php
typo3/sysext/func/mod1/index.php
typo3/sysext/impexp/app/index.php
typo3/sysext/info/mod1/index.php
typo3/sysext/lang/locallang_core.xml
typo3/sysext/list/ext_autoload.php
typo3/sysext/list/ext_tables.php
typo3/sysext/list/mod1/conf.php
typo3/sysext/list/mod1/db_list.php
typo3/sysext/list/mod1/index.php [new file with mode: 0644]
typo3/sysext/perm/mod1/index.php
typo3/sysext/tstemplate/ts/index.php
typo3/sysext/version/cm1/index.php
typo3/template.php
typo3/wizard_list.php

index 02a3207..c0c4a6d 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,7 @@
 
 2010-12-17  Steffen Kamper  <steffen@typo3.org>
 
+       * Fixed bug #15686: Call the list module through the dispatcher instead directly (Thanks to Helmut Hummel)
        * Fixed bug #16735: Inclusion of js/css for loadResourcesForRegisteredNavigationComponents lacks loading order
        * Fixed bug #16084: Clicking a label should set the focus on the input field
 
index dde5276..9a4bc4a 100644 (file)
@@ -3219,6 +3219,61 @@ final class t3lib_BEfunc {
        }
 
 
+
+       /**
+        * Returns the URL to a given module
+        *
+        * @param string $moduleName Name of the module
+        * @param array $urlParameters URL parameters that should be added as key value pairs
+        * @param bool/string $backPathOverride backpath that should be used instead of the global $BACK_PATH
+        * @param bool $returnAbsoluteUrl If set to true, the URL returned will be absolute, $backPathOverride will be ignored in this case
+        * @return bool/string calculated URL or FALSE
+        */
+       public static function getModuleUrl($moduleName, $urlParameters = array(), $backPathOverride = FALSE, $returnAbsoluteUrl = FALSE) {
+               if (!$GLOBALS['BE_USER']->check('modules', $moduleName)) {
+                       return FALSE;
+               }
+
+               if ($backPathOverride === FALSE) {
+                       $backPath = $GLOBALS['BACK_PATH'];
+               } else {
+                       $backPath = $backPathOverride;
+               }
+
+               $allUrlParameters = array();
+               $allUrlParameters['M'] = $moduleName;
+               $allUrlParameters = array_merge($allUrlParameters, $urlParameters);
+
+               $url = 'mod.php?' . t3lib_div::implodeArrayForUrl('', $allUrlParameters, '', TRUE);
+
+               if ($returnAbsoluteUrl) {
+                       return t3lib_div::getIndpEnv('TYPO3_REQUEST_DIR') . $url;
+               } else {
+                       return $backPath . $url;
+               }
+       }
+
+       /**
+        * Return a link to the list view
+        *
+        * @param array $urlParameters URL parameters that should be added as key value pairs
+        * @param string $linkTitle title for the link tag
+        * @param string $linkText optional link text after the icon
+        * @return string a complete link tag or empty string
+        */
+       public static function getListViewLink($urlParameters = array(), $linkTitle = '', $linkText = '') {
+               $url = self::getModuleUrl('web_list', $urlParameters);
+
+               if (!t3lib_extMgm::isLoaded('list') || $url === FALSE) {
+                       return '';
+               } else {
+                       return '<a href="' . htmlspecialchars($url) . '" title="' . htmlspecialchars($linkTitle) . '">' .
+                                       t3lib_iconWorks::getSpriteIcon('actions-system-list-open') .
+                                       htmlspecialchars($linkText) .
+                                       '</a>';
+               }
+       }
+
        /*******************************************
         *
         * Core
index e6530ba..dd4d468 100644 (file)
@@ -562,7 +562,10 @@ class t3lib_clipboard {
                        } else {
                                if (t3lib_extMgm::isLoaded('list')) {
                                        $str = '<a href="' . htmlspecialchars(
-                                               $this->backPath . t3lib_extMgm::extRelPath('list') . 'mod1/db_list.php?id=' . $rec['pid']
+                                               t3lib_BEfunc::getModuleUrl(
+                                                       'web_list',
+                                                       array('id' => $rec['pid']),
+                                                       $this->backPath)
                                        ) . '">' . $str . '</a>';
                                }
                        }
index 66721aa..3128440 100644 (file)
@@ -1463,32 +1463,6 @@ $TYPO3_LOADED_EXT = unserialize(stripslashes(\'' . addslashes(serialize($extensi
        }
 
        /**
-        * Static function for create a link to list view
-        *
-        * @param string $id page id / resource id
-        * @param string $additionalParams eg "&returnUrl=..."
-        * @param string $linkTitle title for the link tag
-        * @param string $linkText optional link text after the icon
-        * @param boolean $linkOnly if true only the href will be returned
-        * @return string link / href
-        */
-       public function createListViewLink($id, $additionalParams = '', $linkTitle = '', $linkText = '', $linkOnly = FALSE) {
-               if (!self::isLoaded('list') || !$GLOBALS['BE_USER']->check('modules', 'web_list')) {
-                       return '';
-               }
-               $href = $GLOBALS['BACK_PATH'] . self::extRelPath('list') . 'mod1/db_list.php?id=' .
-                               $id . $additionalParams;
-               if ($linkOnly) {
-                       return $href;
-               } else {
-                       return '<a href="' . htmlspecialchars($href) . '" title="' . htmlspecialchars($linkTitle) . '">' .
-                                       t3lib_iconWorks::getSpriteIcon('actions-system-list-open') .
-                                       $linkText .
-                                       '</a>';
-               }
-       }
-
-       /**
         * Gets the behaviour for caching ext_tables.php and ext_localconf.php files
         * (see $TYPO3_CONF_VARS['EXT']['extCache'] setting in the install tool).
         *
index 1265a32..bf4663b 100644 (file)
@@ -560,7 +560,10 @@ class clickMenu {
         * @internal
         */
        function DB_db_list($table,$uid,$rec)   {
-               $url = t3lib_div::getIndpEnv('TYPO3_REQUEST_DIR') . t3lib_extMgm::extRelPath('list') . 'mod1/db_list.php?table='.($table=='pages'? '' : $table) . '&id=' . ($table == 'pages' ? $uid : $rec['pid']);
+               $urlParams = array();
+               $urlParams['id'] = ($table == 'pages') ? $uid : $rec['pid'];
+               $urlParams['table'] = $table == 'pages' ? '' : $table;
+               $url = t3lib_BEfunc::getModuleUrl('web_list', $urlParams, '', TRUE);
                return $this->linkItem(
                        $GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->getLL('CM_db_list')),
                        $this->excludeIcon(t3lib_iconWorks::getSpriteIcon('actions-system-list-open')),
index 0e91aaf..b103f76 100644 (file)
@@ -479,9 +479,12 @@ class SC_alt_shortcut {
 
                        // Load search for something.
                if ($this->searchFor)   {
-                       $firstMP = intval($GLOBALS['WEBMOUNTS'][0]);
+                       $urlParameters = array();
+                       $urlParameters['id'] = intval($GLOBALS['WEBMOUNTS'][0]);
+                       $urlParameters['search_field'] = $this->searchFor;
+                       $urlParameters['search_levels'] = 4;
                        $this->content .= $this->doc->wrapScriptTags('jump(unescape("' .
-                               rawurlencode(t3lib_extMgm::extRelPath('list') . 'mod1/db_list.php?id=' . $firstMP . '&search_field=' . rawurlencode($this->searchFor) . '&search_levels=4') .
+                               rawurlencode(t3lib_BEfunc::getModuleUrl('web_list', $urlParameters, '')) .
                        '"), "web_list", "web");');
                }
        }
index f738294..9699f93 100644 (file)
@@ -701,24 +701,38 @@ class recordList extends t3lib_recordList {
         * @return      string          URL
         */
        function listURL($altId='',$table=-1,$exclList='')      {
-               $id = strcmp($altId, '') ? $altId : $this->id;
-               $additionalParams = '&table=' . rawurlencode($table == -1 ? $this->table : $table) .
-                       ($this->thumbs ? '&imagemode=' . $this->thumbs : '') .
-                       ($this->returnUrl ? '&returnUrl=' . rawurlencode($this->returnUrl) : '') .
-                       ($this->searchString ? '&search_field=' . rawurlencode($this->searchString) : '') .
-                       ($this->searchLevels ? '&search_levels=' . rawurlencode($this->searchLevels) : '') .
-                       ($this->showLimit ? '&showLimit=' . rawurlencode($this->showLimit) : '') .
-                       ($this->firstElementNumber ? '&pointer=' . rawurlencode($this->firstElementNumber) : '') .
-                       ((!$exclList || !t3lib_div::inList($exclList, 'sortField')) && $this->sortField ? '&sortField=' . rawurlencode($this->sortField) : '') .
-                       ((!$exclList || !t3lib_div::inList($exclList, 'sortRev')) && $this->sortRev ? '&sortRev=' . rawurlencode($this->sortRev) : '');
-
-               return t3lib_extMgm::createListViewLink(
-                       $id,
-                       $additionalParams,
-                       '',
-                       '',
-                       TRUE
-               );
+               $urlParameters = array();
+               if (strcmp($altId, '')) {
+                       $urlParameters['id'] = $altId;
+               } else {
+                       $urlParameters['id'] = $this->id;
+               }
+               if ($this->thumbs) {
+                       $urlParameters['imagemode'] = $this->thumbs;
+               }
+               if ($this->returnUrl) {
+                       $urlParameters['returnUrl'] = $this->returnUrl;
+               }
+               if ($this->searchString) {
+                       $urlParameters['search_field'] = $this->searchString;
+               }
+               if ($this->searchLevels) {
+                       $urlParameters['search_levels'] = $this->searchLevels;
+               }
+               if ($this->showLimit) {
+                       $urlParameters['showLimit'] = $this->showLimit;
+               }
+               if ($this->firstElementNumber) {
+                       $urlParameters['pointer'] = $this->firstElementNumber;
+               }
+               if ((!$exclList || !t3lib_div::inList($exclList, 'sortField')) && $this->sortField) {
+                       $urlParameters['sortField'] = $this->sortField;
+               }
+               if ((!$exclList || !t3lib_div::inList($exclList, 'sortRev')) && $this->sortRev) {
+                       $urlParameters['sortRev'] = $this->sortRev;
+               }
+
+               return t3lib_BEfunc::getModuleUrl('web_list', $urlParameters);
        }
 
        /**
index 352aac5..ac78bd9 100644 (file)
@@ -42,7 +42,7 @@ t3lib_div::deprecationLog('The list module is a system extension now, do not lin
        'Referer: ' . t3lib_div::getIndpEnv('HTTP_REFERER')
 );
 if (t3lib_extMgm::isLoaded('list')) {
-       t3lib_utility_Http::redirect(t3lib_extMgm::extRelPath('list') . 'mod1/db_list.php?' . $query);
+       t3lib_utility_Http::redirect(t3lib_BEfunc::getModuleUrl('web_list', array(), '', TRUE) . '&' . $query);
 } else {
        $title = sprintf($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:extension.not.installed'), 'list');
        $message = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:link.to.dblist.correctly');
index 93c5e42..4530802 100644 (file)
@@ -328,10 +328,12 @@ class SC_db_new {
 
                                // Record list
                                // If access to Web>List for user, then link to that module.
-                       $buttons['record_list'] = t3lib_extMgm::createListViewLink(
-                               $this->pageinfo['uid'],
-                               '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI')),
-                               $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showList', TRUE)
+                       $buttons['record_list'] = t3lib_BEfunc::getListViewLink(
+                               array(
+                                       'id' => $this->pageinfo['uid'],
+                                       'returnUrl' => t3lib_div::getIndpEnv('REQUEST_URI'),
+                               ),
+                               $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showList')
                        );
                }
 
index b442a21..dbef98e 100755 (executable)
@@ -1247,10 +1247,12 @@ class SC_db_layout {
                }
 
                        // If access to Web>List for user, then link to that module.
-               $buttons['record_list'] = t3lib_extMgm::createListViewLink(
-                       $this->pageinfo['uid'],
-                       '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI')),
-                       $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showList', TRUE)
+               $buttons['record_list'] = t3lib_BEfunc::getListViewLink(
+                       array(
+                               'id' => $this->pageinfo['uid'],
+                               'returnUrl' => t3lib_div::getIndpEnv('REQUEST_URI'),
+                       ),
+                       $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showList')
                );
 
                if (!$this->modTSconfig['properties']['disableIconToolbar'])    {
index 0ebaa78..2755a0c 100644 (file)
@@ -817,7 +817,10 @@ $query . '
                        }
                }
                if ($GLOBALS['BE_USER']->check('modules', 'web_list')) {
-                       $toolBar .= '<a href="' . htmlspecialchars(TYPO3_mainDir . t3lib_extMgm::extRelPath('list') . 'mod1/db_list.php?id=' . $id . '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))) . '">' .
+                       $urlParams = array();
+                       $urlParams['id'] = $id;
+                       $urlParams['returnUrl'] = t3lib_div::getIndpEnv('REQUEST_URI');
+                       $toolBar .= '<a href="' . htmlspecialchars(t3lib_BEfunc::getModuleUrl('web_list', $urlParams, '', TRUE)) . '">' .
                                        '<img src="' . TYPO3_mainDir . 'gfx/list.gif" width="11" height="11" hspace="2" border="0" align="top" title="' . $this->extGetLL('edit_db_list') . '" alt="" /></a>';
                }
 
index 1522381..988eac5 100755 (executable)
@@ -205,11 +205,14 @@ class SC_mod_web_func_index extends t3lib_SCbase {
                        }
 
                                // If access to Web>List for user, then link to that module.
-                       $buttons['record_list'] = t3lib_extMgm::createListViewLink(
-                               $this->pageinfo['uid'],
-                               '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI')),
-                               $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showList', TRUE)
+                       $buttons['record_list'] = t3lib_BEfunc::getListViewLink(
+                               array(
+                                       'id' => $this->pageinfo['uid'],
+                                       'returnUrl' => t3lib_div::getIndpEnv('REQUEST_URI'),
+                               ),
+                               $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showList')
                        );
+
                }
                return $buttons;
        }
index 930d919..c9887c9 100755 (executable)
@@ -390,10 +390,12 @@ class SC_mod_tools_log_index extends t3lib_SCbase {
 
                                                // Record list
                                                // If access to Web>List for user, then link to that module.
-                                       $buttons['record_list'] = t3lib_extMgm::createListViewLink(
-                                               $this->pageinfo['uid'],
-                                               '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI')),
-                                               $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showList', TRUE)
+                                       $buttons['record_list'] = t3lib_BEfunc::getListViewLink(
+                                               array(
+                                                       'id' => $this->pageinfo['uid'],
+                                                       'returnUrl' => t3lib_div::getIndpEnv('REQUEST_URI'),
+                                               ),
+                                               $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showList')
                                        );
                                }
                        }
index 2de83d3..f7fd8d8 100755 (executable)
@@ -200,11 +200,14 @@ class SC_mod_web_info_index extends t3lib_SCbase {
                }
 
                        // If access to Web>List for user, then link to that module.
-               $buttons['record_list'] = t3lib_extMgm::createListViewLink(
-                       $this->pageinfo['uid'],
-                       '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI')),
-                       $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showList', TRUE)
+               $buttons['record_list'] = t3lib_BEfunc::getListViewLink(
+                       array(
+                               'id' => $this->pageinfo['uid'],
+                               'returnUrl' => t3lib_div::getIndpEnv('REQUEST_URI'),
+                       ),
+                       $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showList')
                );
+
                return $buttons;
        }
 
index 1ca7637..2431b36 100755 (executable)
@@ -296,7 +296,7 @@ Check also the following points:\n
 - javascript: method\'s name should be like: &quot;TYPO3.MyExtension.Sample.myMethod&quot;\n</label>
                        <label index="ExtDirect.noNamespace">Ext Direct error in &quot;%s&quot;: no namespace has been found.</label>
                        <label index="extension.not.installed">Extension "%s" is not installed.</label>
-                       <label index="link.to.dblist.correctly">Please, do not link to this page. Use t3lib_extMgm::createListViewLink() for link generation.</label>
+                       <label index="link.to.dblist.correctly">Please, do not link to this page. Use t3lib_BEfunc::getListViewLink() for link generation.</label>
                        <label index="link.to.filefile.correctly">Please, do not link to this page.</label>
                        <label index="loadingIndicator">Loading ...</label>
                </languageKey>
index fd49963..80da4ba 100644 (file)
@@ -5,6 +5,6 @@
 
 $extensionPath = t3lib_extMgm::extPath('list');
 return array(
-       'sc_db_list' => $extensionPath . 'mod1/db_list.php',
+       'sc_db_list' => $extensionPath . 'mod1/index.php',
 );
 ?>
\ No newline at end of file
index 0c55592..1d55bdc 100644 (file)
@@ -4,6 +4,7 @@ if (!defined ('TYPO3_MODE')) {
 }
 
 if (TYPO3_MODE === 'BE') {
+       t3lib_extMgm::addModulePath('web_list', t3lib_extMgm::extPath($_EXTKEY) . 'mod1/');
        t3lib_extMgm::addModule('web', 'list', '', t3lib_extMgm::extPath($_EXTKEY) . 'mod1/');
 }
 ?>
\ No newline at end of file
index aa6902c..f8e216b 100755 (executable)
@@ -1,12 +1,12 @@
 <?php
-define('TYPO3_MOD_PATH', 'sysext/list/mod1/');
-$BACK_PATH='../../../';
 
-$MLANG['default']['tabs_images']['tab'] = 'list.gif';
-$MLANG['default']['ll_ref']='LLL:EXT:lang/locallang_mod_web_list.php';
+       // DO NOT REMOVE OR CHANGE THESE 2 LINES:
+$MCONF['name'] = 'web_list';
+$MCONF['script'] = '_DISPATCH';
+
+$MCONF['access'] = 'user,group';
 
-$MCONF['script']='db_list.php';
-$MCONF['access']='user,group';
-$MCONF['name']='web_list';
+$MLANG['default']['tabs_images']['tab'] = 'list.gif';
+$MLANG['default']['ll_ref'] = 'LLL:EXT:lang/locallang_mod_web_list.php';
 
 ?>
\ No newline at end of file
index 7f3e2f5..89d0f36 100644 (file)
  */
 
 
-unset($MCONF);
-require ('conf.php');
-require ($BACK_PATH.'init.php');
-require ($BACK_PATH.'template.php');
 $LANG->includeLLFile('EXT:lang/locallang_mod_web_list.xml');
 require_once ($BACK_PATH.'class.db_list.inc');
 require_once ($BACK_PATH.'class.db_list_extra.inc');
@@ -231,7 +227,7 @@ class SC_db_list {
                        // Initialize the dblist object:
                $dblist = t3lib_div::makeInstance('localRecordList');
                $dblist->backPath = $BACK_PATH;
-               $dblist->script = t3lib_extMgm::extRelPath('list') . 'mod1/db_list.php';
+               $dblist->script = t3lib_BEfunc::getModuleUrl('web_list', array(), '');
                $dblist->calcPerms = $BE_USER->calcPerms($this->pageinfo);
                $dblist->thumbs = $BE_USER->uc['thumbnailsByDefault'];
                $dblist->returnUrl=$this->returnUrl;
@@ -402,7 +398,7 @@ class SC_db_list {
                                        $this->id,
                                        'SET[bigControlPanel]',
                                        $this->MOD_SETTINGS['bigControlPanel'],
-                                       'db_list.php',
+                                       '',
                                        ($this->table ? '&table=' . $this->table : ''),
                                        'id="checkLargeControl"'
                                );
@@ -421,7 +417,7 @@ class SC_db_list {
                                                $this->id,
                                                'SET[clipBoard]',
                                                $this->MOD_SETTINGS['clipBoard'],
-                                               'db_list.php',
+                                               '',
                                                ($this->table ? '&table=' . $this->table : ''),
                                                'id="checkShowClipBoard"'
                                        );
@@ -440,7 +436,7 @@ class SC_db_list {
                                        $this->id,
                                        'SET[localization]',
                                        $this->MOD_SETTINGS['localization'],
-                                       'db_list.php',
+                                       '',
                                        ($this->table ? '&table=' . $this->table : ''),
                                        'id="checkLocalization"'
                                );
diff --git a/typo3/sysext/list/mod1/index.php b/typo3/sysext/list/mod1/index.php
new file mode 100644 (file)
index 0000000..075e04e
--- /dev/null
@@ -0,0 +1,3 @@
+<?php\r
+require_once(t3lib_extMgm::extPath('list') . 'mod1/db_list.php');\r
+?>\r
index 1aa6408..1ddfc4a 100755 (executable)
@@ -360,10 +360,12 @@ class SC_mod_web_perm_index {
                }
 
                        // If access to Web>List for user, then link to that module.
-               $buttons['record_list'] = t3lib_extMgm::createListViewLink(
-                       $this->pageinfo['uid'],
-                       '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI')),
-                       $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showList', TRUE)
+               $buttons['record_list'] = t3lib_BEfunc::getListViewLink(
+                       array(
+                               'id' => $this->pageinfo['uid'],
+                               'returnUrl' => t3lib_div::getIndpEnv('REQUEST_URI'),
+                       ),
+                       $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showList')
                );
                return $buttons;
        }
index f66f755..35803dc 100644 (file)
@@ -255,10 +255,12 @@ class SC_mod_web_ts_index extends t3lib_SCbase {
                                        '</a>';
 
                                // If access to Web>List for user, then link to that module.
-                       $buttons['record_list'] = t3lib_extMgm::createListViewLink(
-                               $this->pageinfo['uid'],
-                               '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI')),
-                               $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showList', TRUE)
+                       $buttons['record_list'] = t3lib_BEfunc::getListViewLink(
+                               array(
+                                       'id' => $this->pageinfo['uid'],
+                                       'returnUrl' => t3lib_div::getIndpEnv('REQUEST_URI'),
+                               ),
+                               $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showList')
                        );
 
                        if ($this->extClassConf['name'] == 'tx_tstemplateinfo') {
index 87d7bc7..1f4e904 100755 (executable)
@@ -356,11 +356,14 @@ class tx_version_cm1 extends t3lib_SCbase {
                        }
 
                                // If access to Web>List for user, then link to that module.
-                       $buttons['record_list'] = t3lib_extMgm::createListViewLink(
-                               $this->pageinfo['uid'],
-                               '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI')),
-                               $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showList', TRUE)
+                       $buttons['record_list'] = t3lib_BEfunc::getListViewLink(
+                               array(
+                                       'id' => $this->pageinfo['uid'],
+                                       'returnUrl' => t3lib_div::getIndpEnv('REQUEST_URI'),
+                               ),
+                               $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showList')
                        );
+
                }
                return $buttons;
        }
index 4876299..2f15932 100644 (file)
@@ -387,12 +387,13 @@ class template {
         */
        function viewPageIcon($id,$backPath,$addParams='hspace="3"')    {
                global $BE_USER;
-               $str = '';
                        // If access to Web>List for user, then link to that module.
-               $str .= t3lib_extMgm::createListViewLink(
-                       $id,
-                       '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI')),
-                       $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showList', TRUE)
+               $str = t3lib_BEfunc::getListViewLink(
+                       array(
+                               'id' => $id,
+                               'returnUrl' => t3lib_div::getIndpEnv('REQUEST_URI'),
+                       ),
+                       $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showList')
                );
 
                        // Make link to view page
index ad9c5bd..f36831b 100644 (file)
@@ -119,13 +119,11 @@ class SC_wizard_list {
                if (!strcmp($this->pid,'') || strcmp($this->id,''))     {       // If pid is blank OR if id is set, then return...
                        $redirectUrl = t3lib_div::sanitizeLocalUrl($this->P['returnUrl']);
                } else {        // Otherwise, show the list:
-                       $redirectUrl = t3lib_extMgm::createListViewLink(
-                               $this->pid,
-                               '&table=' . $this->P['params']['table'] . '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI')),
-                               '',
-                               '',
-                               TRUE
-                       );
+                       $urlParameters = array();
+                       $urlParameters['id'] = $this->pid;
+                       $urlParameters['table'] = $this->P['params']['table'];
+                       $urlParameters['returnUrl'] = t3lib_div::getIndpEnv('REQUEST_URI');
+                       $redirectUrl = t3lib_BEfunc::getModuleUrl('web_list', $urlParameters);
                }
                t3lib_utility_Http::redirect($redirectUrl);
        }