Fixed bug #15155: Move file list from mod to sysext
authorSteffen Kamper <info@sk-typo3.de>
Sun, 18 Jul 2010 19:41:22 +0000 (19:41 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Sun, 18 Jul 2010 19:41:22 +0000 (19:41 +0000)
Fixed bug #15154: Move Extension manager from mod to sysext
Fixed bug #15153: Move mod/user/ws to sysext version
Fixed bug #15152: Move Web>List from mod to sysext
Fixed bug #15151: Move Web>Access from mod to sysext
Fixed bug #15150: Move Web>Func from mod to sysext
Fixed bug #15149: Move Web>Info from mod to sysext

git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@8209 709f56b5-9817-0410-a4d7-c38de5d9e867

23 files changed:
ChangeLog
t3lib/class.t3lib_befunc.php
t3lib/class.t3lib_clipboard.php
t3lib/class.t3lib_extmgm.php
t3lib/class.t3lib_loadmodules.php
t3lib/config_default.php
typo3/alt_clickmenu.php
typo3/alt_shortcut.php
typo3/backend.php
typo3/class.db_list.inc
typo3/class.file_list.inc
typo3/classes/class.workspaceselector.php
typo3/db_new.php
typo3/file_upload.php
typo3/js/backendsearch.js
typo3/sysext/cms/layout/db_layout.php
typo3/sysext/cms/tslib/class.tslib_adminpanel.php
typo3/sysext/impexp/app/index.php
typo3/sysext/tsconfig_help/mod1/index.php
typo3/sysext/tstemplate/ts/index.php
typo3/sysext/version/tasks/class.tx_version_tasks_autopublish.php
typo3/template.php
typo3/wizard_list.php

index c49f505..c3ebd98 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2010-07-18  Steffen Kamper  <info@sk-typo3.de>
 
+       * Fixed bug #15155: Move file list from mod to sysext
+       * Fixed bug #15154: Move Extension manager from mod to sysext
+       * Fixed bug #15153: Move mod/user/ws to sysext version
+       * Fixed bug #15152: Move Web>List from mod to sysext
+       * Fixed bug #15151: Move Web>Access from mod to sysext
+       * Fixed bug #15150: Move Web>Func from mod to sysext
+       * Fixed bug #15149: Move Web>Info from mod to sysext
        * Fixed bug #15169: Superfluous comma in CSS
 
 2010-07-18  Susanne Moog  <typo3@susanne-moog.de>
index 9f3469b..71a3e58 100644 (file)
@@ -2615,7 +2615,11 @@ final class t3lib_BEfunc {
         */
        public static function viewOnClick($id, $backPath = '', $rootLine = '', $anchor = '', $altUrl = '', $addGetVars = '', $switchFocus = TRUE) {
 
-               $viewScriptPreviewEnabled  = '/' . TYPO3_mainDir . 'mod/user/ws/wsol_preview.php?id=';
+               $viewScriptPreviewEnabled  = t3lib_extMgm::isLoaded('version') ?
+                       '/' . TYPO3_mainDir . t3lib_extMgm::extRelPath('version') . 'ws/wsol_preview.php?id='
+                       :
+                       '/index.php?id='
+               ;
                $viewScriptPreviewDisabled = '/index.php?id=';
                if ($altUrl) {
                        $viewScriptPreviewEnabled = $viewScriptPreviewDisabled = $altUrl;
index 20473d2..af54f93 100644 (file)
@@ -570,13 +570,21 @@ class t3lib_clipboard {
                        if ($this->fileMode)    {
                                $str=$GLOBALS['TBE_TEMPLATE']->dfw($str);
                        } else {
-                               $str='<a href="'.htmlspecialchars($this->backPath.'db_list.php?id='.$rec['pid']).'">'.$str.'</a>';
+                               if (t3lib_extMgm::isLoaded('list')) {
+                                       $str = '<a href="' . htmlspecialchars(
+                                               $this->backPath . t3lib_extMgm::extRelPath('list') . 'mod1/db_list.php?id=' . $rec['pid']
+                                       ) . '">' . $str . '</a>';
+                               }
                        }
                } elseif (file_exists($rec))    {
                        if (!$this->fileMode)   {
                                $str=$GLOBALS['TBE_TEMPLATE']->dfw($str);
                        } else {
-                               $str='<a href="'.htmlspecialchars($this->backPath.'file_list.php?id='.dirname($rec)).'">'.$str.'</a>';
+                               if (t3lib_extMgm::isLoaded('filelist')) {
+                                       $str = '<a href="' . htmlspecialchars(
+                                               $this->backPath . t3lib_extMgm::extRelPath('filelist') . 'mod1/file_list.php?id=' . dirname($rec)
+                                       ) . '">' . $str . '</a>';
+                               }
                        }
                }
                return $str;
index 35d513a..f36eb3d 100644 (file)
@@ -1506,6 +1506,32 @@ $TYPO3_LOADED_EXT = unserialize(stripslashes(\''.addslashes(serialize($extension
                }
                return $out;
        }
+
+       /**
+        * 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>';
+               }
+       }
 }
 
 ?>
\ No newline at end of file
index 2f265ea..7b62dc5 100644 (file)
@@ -138,39 +138,6 @@ class t3lib_loadModules {
                        // unset the array for calling backend modules based on external backend module dispatchers in typo3/mod.php
                unset($modulesArray['_configuration']);
 
-                       /*
-                               With the above data for modules the result of this function call will be:
-
-                               Array
-                               (
-                                   [web] => Array
-                                       (
-                                           [0] => list
-                                           [1] => info
-                                           [2] => perm
-                                           [3] => func
-                                       )
-
-                                   [file] => Array
-                                       (
-                                           [0] => list
-                                       )
-
-                                   [user] => 1
-                                   [tools] => Array
-                                       (
-                                           [0] => em
-                                           [1] => install
-                                           [2] => txphpmyadmin
-                                       )
-
-                                   [help] => Array
-                                       (
-                                           [0] => about
-                                       )
-
-                               )
-                       */
                $theMods = $this->parseModulesArray($modulesArray);
 
                        /*
@@ -245,121 +212,6 @@ class t3lib_loadModules {
                                }
                        }
                }
-       /*
-               At this point $this->modules should look like this:
-               Only modules which were accessible to the $BE_USER is listed in this array.
-
-               Array
-               (
-                   [web] => Array
-                       (
-                           [name] => web
-                           [script] => dummy.php
-                           [defaultMod] => list
-                           [sub] => Array
-                               (
-                                   [list] => Array
-                                       (
-                                           [name] => web_list
-                                           [script] => mod/web/list/../../../db_list.php
-                                       )
-
-                                   [info] => Array
-                                       (
-                                           [name] => web_info
-                                           [script] => mod/web/info/index.php
-                                       )
-
-                                   [perm] => Array
-                                       (
-                                           [name] => web_perm
-                                           [script] => mod/web/perm/index.php
-                                       )
-
-                                   [func] => Array
-                                       (
-                                           [name] => web_func
-                                           [script] => mod/web/func/index.php
-                                       )
-
-                               )
-
-                       )
-
-                   [file] => Array
-                       (
-                           [name] => file
-                           [script] => dummy.php
-                           [sub] => Array
-                               (
-                                   [list] => Array
-                                       (
-                                           [name] => file_list
-                                           [script] => mod/file/list/../../../file_list.php
-                                       )
-
-                               )
-
-                       )
-
-                   [user] => Array
-                       (
-                           [name] => user
-                           [script] => dummy.php
-                           [defaultMod] => task
-                       )
-
-                   [tools] => Array
-                       (
-                           [name] => tools
-                           [script] => dummy.php
-                           [sub] => Array
-                               (
-                                   [em] => Array
-                                       (
-                                           [name] => tools_em
-                                           [script] => mod/tools/em/index.php
-                                       )
-
-                                   [install] => Array
-                                       (
-                                           [name] => tools_install
-                                           [script] => ext/install/mod/../../../install/index.php
-                                       )
-
-                                   [txphpmyadmin] => Array
-                                       (
-                                           [name] => tools_txphpmyadmin
-                                           [script] => ext/phpmyadmin/modsub/index.php
-                                       )
-
-                               )
-
-                       )
-
-                   [help] => Array
-                       (
-                           [name] => help
-                           [script] => dummy.php
-                           [defaultMod] => welcome
-                           [sub] => Array
-                               (
-                                   [about] => Array
-                                       (
-                                           [name] => help_about
-                                           [script] => mod/help/about/index.php
-                                       )
-
-                               )
-
-                       )
-
-               )
-
-       */
-
-#debug($this->modules);
-#debug($GLOBALS['LANG']->moduleLabels);
        }
 
        /**
index 061382d..5b5bd64 100644 (file)
@@ -183,7 +183,7 @@ $TYPO3_CONF_VARS = array(
                'requiredExt' => 'cms,lang,sv',                 // String (exclude). List of extensions which are REQUIRED and cannot be unloaded by the Extension Manager!
                'excludeForPackaging' => '(CVS|\..*|.*~|.*\.bak)',              // String list: List of directories and files which will not be packaged into extensions nor taken into account otherwise by the Extension Manager. Perl regular expression syntax!
                'extCache' => 1,                                                // Integer. 0,1,2,3: 0: ext-scripts (ext_localconf.php and ext_tables.php) are NOT cached, but included every time. 1: scripts cached to typo3conf/temp_CACHED_[sitePathHash]* (saves some milliseconds even with PHP accelerators), 2: scripts cached and prefix includes a hash based on the 'extList' string, 3: scripts cached to typo3conf/temp_CACHED_* (no hash included at all...)
-               'extList' => 'version,tsconfig_help,context_help,extra_page_cm_options,impexp,belog,about,cshmanual,aboutmodules,setup,opendocs,install,t3editor,felogin,feedit,recycler',                                              // String (exclude) List of extensions which are enabled for this install. Use the Extension Manager (EM) to manage this!
+               'extList' => 'em,list,filelist,version,tsconfig_help,context_help,extra_page_cm_options,impexp,belog,about,cshmanual,aboutmodules,setup,opendocs,install,t3editor,felogin,feedit,recycler',                                             // String (exclude) List of extensions which are enabled for this install. Use the Extension Manager (EM) to manage this!
                'extList_FE' => '',                                             // String (exclude). Same as extList, but only this extensions are loaded in FE
                'extConf' => array(                                             // Config-options for extensions, stored as serialized arrays by extension-keys. Handled automatically by the EM.
 //                     '--key--' => array()
@@ -279,7 +279,6 @@ $TYPO3_CONF_VARS = array(
                        'ShortcutMenu::create'       => 'typo3/classes/class.shortcutmenu.php:ShortcutMenu->createAjaxShortcut',
                        'ModuleMenu::saveMenuState'  => 'typo3/classes/class.modulemenu.php:ModuleMenu->saveMenuState',
                        'ModuleMenu::render'         => 'typo3/classes/class.modulemenu.php:ModuleMenu->renderAjax',
-                       'SC_mod_web_perm_ajax::dispatch' => 'typo3/mod/web/perm/class.sc_mod_web_perm_ajax.php:SC_mod_web_perm_ajax->dispatch',
                        'BackendLogin::login'                           => 'typo3/classes/class.ajaxlogin.php:AjaxLogin->login',
                        'BackendLogin::logout'                          => 'typo3/classes/class.ajaxlogin.php:AjaxLogin->logout',
                        'BackendLogin::refreshLogin'            => 'typo3/classes/class.ajaxlogin.php:AjaxLogin->refreshLogin',
index aea4603..bb37cff 100644 (file)
@@ -553,7 +553,7 @@ class clickMenu {
         * @internal
         */
        function DB_db_list($table,$uid,$rec)   {
-               $url = t3lib_div::getIndpEnv('TYPO3_REQUEST_DIR') . 'db_list.php?table='.($table=='pages'? '' : $table) . '&id=' . ($table == 'pages' ? $uid : $rec['pid']);
+               $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']);
                return $this->linkItem(
                        $GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->getLL('CM_db_list')),
                        $this->excludeIcon(t3lib_iconWorks::getSpriteIcon('actions-system-list-open')),
index 7985299..5b2361a 100644 (file)
@@ -461,7 +461,9 @@ class SC_alt_shortcut {
                        // Load search for something.
                if ($this->searchFor)   {
                        $firstMP = intval($GLOBALS['WEBMOUNTS'][0]);
-                       $this->content.= $this->doc->wrapScriptTags('jump(unescape("'.rawurlencode('db_list.php?id='.$firstMP.'&search_field='.rawurlencode($this->searchFor).'&search_levels=4').'"),"web_list","web");');
+                       $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') .
+                       '"), "web_list", "web");');
                }
        }
 
index 775f26a..2e8df64 100644 (file)
@@ -387,6 +387,7 @@ class TYPO3backend {
                        'moduleMenuWidth' => $this->menuWidth - 1,
                        'topBarHeight' => (isset($GLOBALS['TBE_STYLES']['dims']['topFrameH']) ? intval($GLOBALS['TBE_STYLES']['dims']['topFrameH']) : 30),
                        'showRefreshLoginPopup' => isset($GLOBALS['TYPO3_CONF_VARS']['BE']['showRefreshLoginPopup']) ? intval($GLOBALS['TYPO3_CONF_VARS']['BE']['showRefreshLoginPopup']) : FALSE,
+                       'listModulePath' => t3lib_extMgm::isLoaded('list') ? t3lib_extMgm::extRelPath('list') . 'mod1/' : '',
                );
                $t3LLLcore = array(
                        'waitTitle' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:mess.refresh_login_logging_in') ,
index 9f634d3..9bdc97d 100644 (file)
@@ -701,18 +701,24 @@ class recordList extends t3lib_recordList {
         * @return      string          URL
         */
        function listURL($altId='',$table=-1,$exclList='')      {
-               return $GLOBALS['BACK_PATH'] . $this->script.
-                       '?id='.(strcmp($altId,'')?$altId:$this->id).
-                       '&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):'')
-                       ;
+               $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
+               );
        }
 
        /**
index 58ea172..2578952 100644 (file)
@@ -191,7 +191,7 @@ class fileList extends t3lib_recordList {
                }
 
                $buttons['refresh'] = '<a href="'.htmlspecialchars($this->listURL()).'" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.reload', 1) . '">'.
-                               t3lib_iconWorks::getSpriteIcon('actions-system-refresh')  . 
+                               t3lib_iconWorks::getSpriteIcon('actions-system-refresh')  .
                        '</a>';
 
                return array($buttons, $otherMarkers);
@@ -472,10 +472,10 @@ class fileList extends t3lib_recordList {
                                        $this->totalbytes+=$theFile['size'];
                                        $ext = $items['files'][$key][fileext];
                                        $icon = t3lib_BEfunc::getFileIcon($ext);
-                                       
+
                                                // The icon with link
                                        $theIcon = t3lib_iconWorks::getSpriteIconForFile($theFile['fileext'], array('title' => htmlspecialchars($theFile['file'])));
-                                       
+
                                        if ($this->clickMenus) $theIcon = $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($theIcon,$theFile['path'].$theFile['file']);
 
                                                //      Preparing and getting the data-array
@@ -512,13 +512,13 @@ class fileList extends t3lib_recordList {
                                                                        $thumbData = array();
                                                                        $theFile_R = rawurlencode($theFile['path'].$theFile['file']);
                                                                        $titleCol = $this->fieldArray[0];
-                       
+
                                                                        $theFile_abs = $theFile['path'].$theFile['file'];
                                                                        $check = basename($theFile_abs).':'.filemtime($theFile_abs).':'.$GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'];
                                                                        $params = '&file='.$theFile_R;
                                                                        $params.= '&md5sum='.t3lib_div::shortMD5($check);
                                                                        $href = $this->backPath.$this->thumbScript.'?&dummy='.$GLOBALS['EXEC_TIME'].$params;
-                       
+
                                                                        $theData[$field] .= '<br /><img src="'.htmlspecialchars($href).'" hspace="2" title="'.htmlspecialchars(trim($theFile['file'])).'" alt="'.htmlspecialchars(trim($theFile['file'])).'" />';
                                                                }
                                                        break;
@@ -565,7 +565,7 @@ class fileList extends t3lib_recordList {
                } else {
                        $params='&SET[sort]='.$col.'&SET[reverse]=0';
                }
-               $href = $this->script.'?id='.rawurlencode($path).$params;
+               $href = $GLOBALS['BACK_PATH'] . t3lib_extMgm::extRelPath('filelist') . 'mod1/' . $this->script . '?id=' . rawurlencode($path) . $params;
                return '<a href="'.htmlspecialchars($href).'">'.$code.'</a>';
        }
 
@@ -657,7 +657,7 @@ class fileList extends t3lib_recordList {
                $elFromTable = $this->clipObj->elFromTable('_FILE');
                if (@is_dir($fullIdent) && count($elFromTable)) {
                        $cells[]='<a href="'.htmlspecialchars($this->clipObj->pasteUrl('_FILE',$fullIdent)).'" onclick="return '.htmlspecialchars($this->clipObj->confirmMsg('_FILE',$fullIdent,'into',$elFromTable)).'" title="' . $GLOBALS['LANG']->getLL('clip_pasteInto', TRUE) . '">'.
-                         t3lib_iconWorks::getSpriteIcon('actions-document-paste-into') . 
+                         t3lib_iconWorks::getSpriteIcon('actions-document-paste-into') .
                        '</a>';
                }
 
index 3538fe0..e0924f7 100644 (file)
@@ -70,7 +70,7 @@ class WorkspaceSelector implements backend_toolbarItem {
        public function checkAccess() {
                if (t3lib_extMgm::isLoaded('version')) {
                        $MCONF = array();
-                       include('mod/user/ws/conf.php');
+                       include(t3lib_extMgm::extPath('version') . 'ws/conf.php');
 
                        return ($GLOBALS['BE_USER']->modAccess(array('name' => 'user', 'access' => 'user,group'), false) && $GLOBALS['BE_USER']->modAccess($MCONF, false));
                }
@@ -227,7 +227,7 @@ class WorkspaceSelector implements backend_toolbarItem {
 
                        // go to workspace module link
                $workspaceMenu[] = '<li>' . $stateUncheckedIcon . ' ' .
-                       '<a href="mod/user/ws/index.php" target="content" id="goToWsModule">' .
+                       '<a href="' . t3lib_extMgm::extRelPath('version') . 'ws/index.php" target="content" id="goToWsModule">' .
                        ' '. $GLOBALS['LANG']->getLL('shortcut_workspace', true) . '</a></li>';
 
                $workspaceMenu[] = '</ul>';
index 2a9565f..0afff67 100644 (file)
@@ -327,12 +327,12 @@ class SC_db_new {
                                '</a>';
 
                                // Record list
-                       if ($GLOBALS['BE_USER']->check('modules', 'web_list')) {
-                               $href = $this->backPath . 'db_list.php?id=' . $this->pageinfo['uid'] . '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'));
-                               $buttons['record_list'] = '<a href="' . htmlspecialchars($href) . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showList', 1) . '">' .
-                                               t3lib_iconWorks::getSpriteIcon('actions-system-list-open') .
-                                       '</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)
+                       );
                }
 
 
index 2e5d891..fdb8bf9 100644 (file)
@@ -113,7 +113,7 @@ class SC_file_upload {
                $this->number = t3lib_div::_GP('number');
                $this->target = t3lib_div::_GP('target');
                $this->returnUrl = t3lib_div::_GP('returnUrl');
-               $this->returnUrl = $this->returnUrl ? $this->returnUrl : t3lib_div::getIndpEnv('TYPO3_SITE_URL') . TYPO3_mainDir . 'file_list.php?id=' . rawurlencode($this->target);
+               $this->returnUrl = $this->returnUrl ? $this->returnUrl : t3lib_div::getIndpEnv('TYPO3_SITE_URL') . TYPO3_mainDir . t3lib_extMgm::extRelPath('filelist') . 'mod1/file_list.php?id=' . rawurlencode($this->target);
 
                // set the number of input fields
                if (empty($this->number)) {
index d408259..7bfb682 100644 (file)
@@ -148,7 +148,7 @@ var BackendSearch = Class.create({
                                                break;
                                        case 'search':
                                                this.jump(
-                                                       unescape('db_list.php?id=' + jsonResponse.firstMountPoint + '&search_field=' + jsonResponse.searchFor + '&search_levels=4'),
+                                                       unescape(TYPO3.configuration.listModulePath + 'db_list.php?id=' + jsonResponse.firstMountPoint + '&search_field=' + jsonResponse.searchFor + '&search_levels=4'),
                                                        'web_list',
                                                        'web'
                                                );
index b5e2c55..bbec374 100755 (executable)
@@ -1197,12 +1197,11 @@ class SC_db_layout {
                }
 
                        // If access to Web>List for user, then link to that module.
-               if ($BE_USER->check('modules','web_list'))      {
-                       $href = $BACK_PATH . 'db_list.php?id=' . $this->pageinfo['uid'] . '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'));
-                       $buttons['record_list'] = '<a href="' . htmlspecialchars($href) . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showList', TRUE) . '">' .
-                                       t3lib_iconWorks::getSpriteIcon('actions-system-list-open') .
-                               '</a>';
-               }
+               $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)
+               );
 
                if (!$this->modTSconfig['properties']['disableIconToolbar'])    {
 
index bfdf010..6fc710a 100644 (file)
@@ -817,7 +817,7 @@ $query . '
                        }
                }
                if ($GLOBALS['BE_USER']->check('modules', 'web_list')) {
-                       $toolBar .= '<a href="' . htmlspecialchars(TYPO3_mainDir . 'db_list.php?id=' . $id . '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))) . '">' .
+                       $toolBar .= '<a href="' . htmlspecialchars(TYPO3_mainDir . t3lib_extMgm::extRelPath('list') . 'mod1/db_list.php?id=' . $id . '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))) . '">' .
                                        '<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 ae15068..23aa38a 100755 (executable)
@@ -391,13 +391,13 @@ class SC_mod_tools_log_index extends t3lib_SCbase {
                                                t3lib_iconWorks::getSpriteIcon('actions-document-view') .
                                  '</a>';
 
-                                       // Record list
-                                       if ($GLOBALS['BE_USER']->check('modules', 'web_list')) {
-                                               $href = $this->doc->backPath . 'db_list.php?id=' . $this->pageinfo['uid'] . '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'));
-                                               $buttons['record_list'] = '<a href="' . htmlspecialchars($href) . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showList', TRUE) . '">' .
-                                                       t3lib_iconWorks::getSpriteIcon('actions-system-list-open') .
-                                         '</a>';
-                                       }
+                                               // 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)
+                                       );
                                }
                        }
                }
@@ -1290,7 +1290,8 @@ class SC_mod_tools_log_index extends t3lib_SCbase {
                                                unset($passParams['import_file']);
 
                                                $thisScriptUrl = t3lib_div::getIndpEnv('REQUEST_URI').'?M=xMOD_tximpexp&id='.$this->id.t3lib_div::implodeArrayForUrl('tx_impexp',$passParams);
-                                               $emURL = $this->doc->backPath.'mod/tools/em/index.php?CMD[requestInstallExtensions]='.implode(',',$extKeysToInstall).'&returnUrl='.rawurlencode($thisScriptUrl);
+                                               $emURL = $this->doc->backPath . t3lib_extMgm::extRelPath('em') . 'mod1/index.php?CMD[requestInstallExtensions]=' .
+                                                       implode(',', $extKeysToInstall) . '&returnUrl=' . rawurlencode($thisScriptUrl);
                                                $extensionInstallationMessage = 'Before you can install this T3D file you need to install the extensions "'.implode('", "',$extKeysToInstall).'". Clicking Import will first take you to the Extension Manager so these dependencies can be resolved.';
                                        }
 
index d9bcaa3..d0d9f64 100644 (file)
@@ -28,7 +28,7 @@ unset($MCONF);
 require_once('conf.php');
 require_once($BACK_PATH.'init.php');
 require_once($BACK_PATH.'template.php');
-require_once($BACK_PATH.'mod/tools/em/class.em_unzip.php');
+require_once($BACK_PATH . 'sysext/em/mod1/class.em_unzip.php');
 
 $LANG->includeLLFile('EXT:tsconfig_help/mod1/locallang.xml');
 $BE_USER->modAccess($MCONF,1); // This checks permissions and exits if the users has no permission for entry.
@@ -302,6 +302,7 @@ class tx_tsconfighelp_module1 extends t3lib_SCbase {
         */
        function unzip($file, $path)    {
                        // we use the unzip class of the Extension Manager here
+                       // TODO: move unzip class to core
                $unzip = t3lib_div::makeInstance('em_unzip', $file);
                $ret = $unzip->extract(array('add_path'=>$path));
                return (is_array($ret));
index 46ce8b1..d9b9bce 100644 (file)
@@ -253,12 +253,11 @@ class SC_mod_web_ts_index extends t3lib_SCbase {
                                        '</a>';
 
                                // If access to Web>List for user, then link to that module.
-                       if ($GLOBALS['BE_USER']->check('modules', 'web_list')) {
-                               $href = $GLOBALS['BACK_PATH'] . 'db_list.php?id=' . $this->pageinfo['uid'] . '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'));
-                               $buttons['record_list'] = '<a href="' . htmlspecialchars($href) . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showList', TRUE) . '">' .
-                                                       t3lib_iconWorks::getSpriteIcon('actions-system-list-open') .
-                                               '</a>';
-                       }
+                       $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)
+                       );
 
                        if ($this->extClassConf['name'] == 'tx_tstemplateinfo') {
                                        // NEW button
index 6f5cd66..9bf4aed 100644 (file)
@@ -43,7 +43,7 @@ class tx_version_tasks_AutoPublish extends tx_scheduler_Task {
         */
        public function execute() {
                        // Load the workspace library class and instatiate it
-               require_once(PATH_typo3 . 'mod/user/ws/class.wslib.php');
+               require_once(t3lib_extMgm::extPath('version') . 'ws/class.wslib.php');
                $autopubObj = t3lib_div::makeInstance('wslib');
                        // Publish the workspaces that need to be
                $autopubObj->autoPublishWorkspaces();
index 13a9648..84a3d58 100644 (file)
@@ -372,12 +372,12 @@ class template {
                global $BE_USER;
                $str = '';
                        // If access to Web>List for user, then link to that module.
-               if ($BE_USER->check('modules','web_list'))      {
-                       $href=$backPath.'db_list.php?id='.$id.'&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'));
-                       $str.= '<a href="'.htmlspecialchars($href).'">'.
-                                       '<img'.t3lib_iconWorks::skinImg($backPath,'gfx/list.gif','width="11" height="11"').' title="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showList',1).'"'.($addParams?' '.trim($addParams):'').' alt="" />'.
-                                       '</a>';
-               }
+               $str .= t3lib_extMgm::createListViewLink(
+                       $id,
+                       '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI')),
+                       $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showList', TRUE)
+               );
+
                        // Make link to view page
                $str.= '<a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::viewOnClick($id,$backPath,t3lib_BEfunc::BEgetRootLine($id))).'">'.
                                '<img'.t3lib_iconWorks::skinImg($backPath,'gfx/zoom.gif','width="12" height="12"').' title="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showPage',1).'"'.($addParams?' '.trim($addParams):"").' hspace="3" alt="" />'.
index 8d9d182..2441e1c 100644 (file)
@@ -119,7 +119,13 @@ class SC_wizard_list {
                if (!strcmp($this->pid,'') || strcmp($this->id,''))     {       // If pid is blank OR if id is set, then return...
                        $redirectUrl = $this->P['returnUrl'];
                } else {        // Otherwise, show the list:
-                       $redirectUrl = 'db_list.php?id=' . $this->pid . '&table=' . $this->P['params']['table'] . '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'));
+                       $redirectUrl = t3lib_extMgm::createListViewLink(
+                               $this->pid,
+                               '&table=' . $this->P['params']['table'] . '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI')),
+                               '',
+                               '',
+                               TRUE
+                       );
                }
                t3lib_utility_Http::redirect($redirectUrl);
        }