Added TSconfig option (options.overridePageModule) for replacing the default Page...
authorRobert Lemke <robert.lemke@typo3.org>
Tue, 16 Dec 2003 20:38:30 +0000 (20:38 +0000)
committerRobert Lemke <robert.lemke@typo3.org>
Tue, 16 Dec 2003 20:38:30 +0000 (20:38 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@73 709f56b5-9817-0410-a4d7-c38de5d9e867

t3lib/class.t3lib_tsfebeuserauth.php
typo3/alt_clickmenu.php
typo3/alt_doc_nodoc.php
typo3/alt_shortcut.php

index 46e266e..2577479 100755 (executable)
@@ -331,6 +331,10 @@ class t3lib_tsfeBeUserAuth extends t3lib_beUserAuth {
        function extGetCategory_edit($out='')   {
                $out.=$this->extGetHead('edit');
                if ($this->uc['TSFE_adminConfig']['display_edit'])      {
+                               // If another page module was specified, replace the default Page module with the new one
+                       $newPageModule = trim($GLOBALS['BE_USER']->getTSConfigVal('options.overridePageModule'));
+                       $pageModule = t3lib_BEfunc::isModuleSetInTBE_MODULES($newPageModule) ? $newPageModule : 'web_layout';
+                       
                        $this->extNeedUpdate=1;
                        $out.=$this->extGetItem('edit_displayFieldIcons', '<input type="hidden" name="TSFE_ADMIN_PANEL[edit_displayFieldIcons]" value="0" /><input type="checkbox" name="TSFE_ADMIN_PANEL[edit_displayFieldIcons]" value="1"'.($this->uc['TSFE_adminConfig']['edit_displayFieldIcons']?' checked="checked"':'').' />');
                        $out.=$this->extGetItem('edit_displayIcons', '<input type="hidden" name="TSFE_ADMIN_PANEL[edit_displayIcons]" value="0" /><input type="checkbox" name="TSFE_ADMIN_PANEL[edit_displayIcons]" value="1"'.($this->uc['TSFE_adminConfig']['edit_displayIcons']?' checked="checked"':'').' />');
@@ -346,7 +350,7 @@ class t3lib_tsfeBeUserAuth extends t3lib_beUserAuth {
                                                        if (parent.opener.top.content && parent.opener.top.content.nav_frame && parent.opener.top.content.nav_frame.refresh_nav)        {
                                                                parent.opener.top.content.nav_frame.refresh_nav();
                                                        }
-                                                       parent.opener.top.goToModule("web_layout");
+                                                       parent.opener.top.goToModule("'.$pageModule.'");
                                                        parent.opener.top.focus();
                                                } else {
                                                        vHWin=window.open(\''.TYPO3_mainDir.'alt_main.php\',\''.md5('Typo3Backend-'.$GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']).'\',\'status=1,menubar=1,scrollbars=1,resizable=1\');
index 0c77d4e..2d13b9e 100755 (executable)
@@ -585,6 +585,9 @@ class clickMenu {
         */
        function DB_edit($table,$uid)   {
                global $BE_USER;
+                       // If another module was specified, replace the default Page module with the new one
+               $newPageModule = trim($GLOBALS['BE_USER']->getTSConfigVal('options.overridePageModule'));
+               $pageModule = t3lib_BEfunc::isModuleSetInTBE_MODULES($newPageModule) ? $newPageModule : 'web_layout';
 
                $editOnClick='';
                $loc='top.content'.($this->listFrame && !$this->alwaysContentFrame ?'.list_frame':'');
@@ -593,14 +596,14 @@ class clickMenu {
                if (
                                $this->iParts[0]=='pages' && 
                                $this->iParts[1] && 
-                               $GLOBALS['BE_USER']->check('modules','web_layout')
+                               $GLOBALS['BE_USER']->check('modules', $pageModule)
                        )       {
                        $theIcon = t3lib_iconWorks::skinImg($this->backPath,'gfx/edit_page.gif','width="12" height="12"');
                        $this->editPageIconSet=1;
                        if ($BE_USER->uc['classicPageEditMode'] || !t3lib_extMgm::isLoaded('cms'))      {
                                $addParam='&editRegularContentFromId='.intval($this->iParts[1]);
                        } else {
-                               $editOnClick="top.fsMod.recentIds['web']=".intval($this->iParts[1]).";top.goToModule('web_layout',1);";
+                               $editOnClick="top.fsMod.recentIds['web']=".intval($this->iParts[1]).";top.goToModule('".$pageModule."',1);";
                        }
                }
                if (!$editOnClick)      {
index b9cd3d6..aef192a 100755 (executable)
@@ -112,10 +112,14 @@ class SC_alt_doc_nodoc {
                
                        // Add a message, telling that no documents were open...
                $msg[]='<p>'.$LANG->getLL('noDocuments_msg',1).'</p><br />';
+
+                       // If another page module was specified, replace the default Page module with the new one
+               $newPageModule = trim($BE_USER->getTSConfigVal('options.overridePageModule'));
+               $pageModule = t3lib_BEfunc::isModuleSetInTBE_MODULES($newPageModule) ? $newPageModule : 'web_layout';
                
                        // Perform some acccess checks:
                $a_wl = $BE_USER->check('modules','web_list');
-               $a_wp = t3lib_extMgm::isLoaded('cms') && $BE_USER->check('modules','web_layout');
+               $a_wp = t3lib_extMgm::isLoaded('cms') && $BE_USER->check('modules',$pageModule);
                
 
                        // Finding module images: PAGE
@@ -133,7 +137,7 @@ class SC_alt_doc_nodoc {
                if ($a_wl || $a_wp)     {
                        $msg_2 = array();
                        if ($a_wp)      {       // Web>Page:
-                               $msg_2[]='<strong><a href="#" onclick="top.goToModule(\'web_layout\'); return false;">'.$LANG->getLL('noDocuments_pagemodule',1).$img_web_layout.'</a></strong>';
+                               $msg_2[]='<strong><a href="#" onclick="top.goToModule(\''.$pageModule.'\'); return false;">'.$LANG->getLL('noDocuments_pagemodule',1).$img_web_layout.'</a></strong>';
                                if ($a_wl)      $msg_2[]=$LANG->getLL('noDocuments_OR');
                        }
                        if ($a_wl)      {       // Web>List
index af6f998..8209e1b 100755 (executable)
@@ -202,6 +202,10 @@ class SC_alt_shortcut {
        function init() {
                global $BACK_PATH;
 
+                       // If another page module was specified, replace the default Page module with the new one
+               $newPageModule = trim($GLOBALS['BE_USER']->getTSConfigVal('options.overridePageModule'));
+               $pageModule = t3lib_BEfunc::isModuleSetInTBE_MODULES($newPageModule) ? $newPageModule : 'web_layout';
+
                $this->doc = t3lib_div::makeInstance('template');
                $this->doc->backPath = $BACK_PATH;
                $this->doc->form='<form action="alt_shortcut.php" name="shForm" method="post">';
@@ -232,7 +236,7 @@ class SC_alt_shortcut {
                                        top.content.nav_frame.refresh_nav();
                                }
 
-                               top.goToModule("web_layout");
+                               top.goToModule("'.$pageModule.'");
                        }
                        ');
                $this->content.=$this->doc->startPage('Shortcut frame');