*** empty log message ***
[Packages/TYPO3.CMS.git] / typo3 / alt_clickmenu.php
index 0624c12..c620762 100755 (executable)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *  
-*  (c) 1999-2003 Kasper Skaarhoj (kasper@typo3.com)
+*  (c) 1999-2004 Kasper Skaarhoj (kasper@typo3.com)
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is 
@@ -155,8 +155,8 @@ class clickMenu {
        function init($item)    {
 
                        // Setting GPvars:
-               $this->cmLevel = intval(t3lib_div::GPvar('cmLevel'));
-               $this->CB = t3lib_div::GPvar('CB');
+               $this->cmLevel = intval(t3lib_div::_GP('cmLevel'));
+               $this->CB = t3lib_div::_GP('CB');
 
 
                        // Explode the incoming command:
@@ -525,7 +525,7 @@ class clickMenu {
        }
 
        /**
-        * Adding CM element for Create new wizard (either db_new.php or sysext/cms/layout/db_new_content_el.php)
+        * Adding CM element for Create new wizard (either db_new.php or sysext/cms/layout/db_new_content_el.php or custom wizard)
         * 
         * @param       string          Table name
         * @param       integer         UID for the current record.
@@ -534,7 +534,12 @@ class clickMenu {
         * @internal
         */
        function DB_newWizard($table,$uid,$rec) {
-               $url = ($table=='pages' || !t3lib_extMgm::isLoaded('cms')) ? 'db_new.php?id='.$uid.'&pagesOnly=1' : 'sysext/cms/layout/db_new_content_el.php?id='.$rec['pid'].'&sys_language_uid='.intval($rec['sys_language_uid']);
+                       //  If mod.web_list.newContentWiz.overrideWithExtension is set, use that extension's create new content wizard instead:
+               $tmpTSc = t3lib_BEfunc::getModTSconfig($this->pageinfo['uid'],'mod.web_list');
+               $tmpTSc = $tmpTSc ['properties']['newContentWiz.']['overrideWithExtension'];
+               $newContentWizScriptPath = t3lib_extMgm::isLoaded($tmpTSc) ? (t3lib_extMgm::extRelPath($tmpTSc).'mod1/db_new_content_el.php') : (TYPO3_mainDir.'sysext/cms/layout/db_new_content_el.php');
+
+               $url = ($table=='pages' || !t3lib_extMgm::isLoaded('cms')) ? 'db_new.php?id='.$uid.'&pagesOnly=1' : $newContentWizScriptPath.'?id='.$rec['pid'].'&sys_language_uid='.intval($rec['sys_language_uid']);
                return $this->linkItem(
                        $GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->getLL('CM_newWizard')),
                        $this->excludeIcon('<img'.t3lib_iconWorks::skinImg($this->PH_backPath,'gfx/new_'.($table=='pages'?'page':'record').'.gif','width="'.($table=='pages'?'13':'16').'" height="12"').' alt="" />'),
@@ -870,7 +875,7 @@ class clickMenu {
        function FILE_paste($path,$target,$elInfo)      {       
                $editOnClick='';
                $loc='top.content'.($this->listFrame && !$this->alwaysContentFrame ?'.list_frame':'');
-               $conf=$loc." && confirm(".$GLOBALS['LANG']->JScharCode(sprintf($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:mess'.($elInfo[2]=='copy'?'copy':'move').'_into'),$elInfo[0],$elInfo[1])).")";
+               $conf=$loc." && confirm(".$GLOBALS['LANG']->JScharCode(sprintf($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:mess.'.($elInfo[2]=='copy'?'copy':'move').'_into'),$elInfo[0],$elInfo[1])).")";
                $editOnClick='if('.$conf.'){'.$loc.".document.location=top.TS.PATH_typo3+'".$this->clipObj->pasteUrl('_FILE',$path,0).
                        "&redirect='+top.rawurlencode(".$this->frameLocation($loc.'.document').'); hideCM();}';
                
@@ -1165,8 +1170,8 @@ class SC_alt_clickmenu {
                global $BE_USER,$BACK_PATH;
                
                        // Setting GPvars:
-               $this->backPath = t3lib_div::GPvar('backPath');
-               $this->item = t3lib_div::GPvar('item');
+               $this->backPath = t3lib_div::_GP('backPath');
+               $this->item = t3lib_div::_GP('item');
 
                        // Setting pseudo module name
                $this->MCONF['name']='xMOD_alt_clickmenu.php';
@@ -1253,7 +1258,6 @@ class SC_alt_clickmenu {
         * @return      void            
         */
        function main() {
-               global $HTTP_GET_VARS;
 
                        // Initialize Clipboard object:
                $clipObj = t3lib_div::makeInstance('t3lib_clipboard');
@@ -1261,7 +1265,8 @@ class SC_alt_clickmenu {
                $clipObj->lockToNormal();       // This locks the clipboard to the Normal for this request.
                
                        // Update clipboard if some actions are sent.
-               $CB = $HTTP_GET_VARS['CB'];
+               $CB = t3lib_div::_GET('CB');
+               
                $clipObj->setCmd($CB);
                $clipObj->cleanCurrent();
                $clipObj->endClipboard();       // Saves