Fixed bug #14771: Updates for taskcenter, sys_action, impexp (Thanks to Georg Ringer)
[Packages/TYPO3.CMS.git] / t3lib / class.t3lib_scbase.php
index 7de582c..f60cf96 100644 (file)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *
-*  (c) 1999-2005 Kasper Skaarhoj (kasperYYYY@typo3.com)
+*  (c) 1999-2010 Kasper Skaarhoj (kasperYYYY@typo3.com)
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is
@@ -80,7 +80,6 @@
  *             require ($BACK_PATH.'init.php');
  *             require ($BACK_PATH.'template.php');
  *             $LANG->includeLLFile('EXT:prototype/locallang.php');
- *             require_once(PATH_t3lib.'class.t3lib_scbase.php');              // NOTICE THE INCLUSION OF t3lib_SCbase
  *             $BE_USER->modAccess($MCONF,1);
  *
  *                     // SC_mod_prototype EXTENDS THE CLASS t3lib_SCbase with a main() and printContent() function:
@@ -223,6 +222,8 @@ class t3lib_SCbase {
 
        /**
         * Generally used to hold an instance of the 'template' class from typo3/template.php
+        *
+        * @var template
         */
        var $doc;
 
@@ -275,7 +276,6 @@ class t3lib_SCbase {
                #debug($this->MOD_MENU['function'],$this->MCONF['name']);
                #debug($this->modTSconfig['properties']);
 
-                       // CLEANSE 'function' SETTINGS
                $this->MOD_SETTINGS = t3lib_BEfunc::getModuleData($this->MOD_MENU, t3lib_div::_GP('SET'), $this->MCONF['name'], $this->modMenu_type, $this->modMenu_dontValidateList, $this->modMenu_setDefaultList);
        }
 
@@ -292,8 +292,7 @@ class t3lib_SCbase {
        function mergeExternalItems($modName,$menuKey,$menuArr) {
                $mergeArray = $GLOBALS['TBE_MODULES_EXT'][$modName]['MOD_MENU'][$menuKey];
                if (is_array($mergeArray))      {
-                       reset($mergeArray);
-                       while(list($k,$v)=each($mergeArray))    {
+                       foreach ($mergeArray as $k => $v) {
                                if ((string)$v['ws']==='' ||
                                        ($GLOBALS['BE_USER']->workspace===0 && t3lib_div::inList($v['ws'],'online')) ||
                                        ($GLOBALS['BE_USER']->workspace===-1 && t3lib_div::inList($v['ws'],'offline')) ||
@@ -351,7 +350,7 @@ class t3lib_SCbase {
                        $this->extObj = t3lib_div::makeInstance($this->extClassConf['name']);
                        $this->extObj->init($this,$this->extClassConf);
                                // Re-write:
-                       $this->MOD_SETTINGS = t3lib_BEfunc::getModuleData($this->MOD_MENU, t3lib_div::_GP('SET'), $this->MCONF['name']);
+                       $this->MOD_SETTINGS = t3lib_BEfunc::getModuleData($this->MOD_MENU, t3lib_div::_GP('SET'), $this->MCONF['name'], $this->modMenu_type, $this->modMenu_dontValidateList, $this->modMenu_setDefaultList);
                }
        }
 
@@ -381,9 +380,13 @@ class t3lib_SCbase {
         *
         * @return      void
         */
-       function extObjContent()        {
-               $this->extObj->pObj = &$this;
-               if (is_callable(array($this->extObj, 'main')))  $this->content.=$this->extObj->main();
+       function extObjContent() {
+               $this->extObj->pObj = $this;
+
+               if (is_callable(array($this->extObj, 'main'))) {
+                       $this->content .= $this->extObj->main();
+               }
        }
 }
-?>
+
+?>
\ No newline at end of file