14050_cleaning_t3lib_arraybrowser
[Packages/TYPO3.CMS.git] / t3lib / class.t3lib_scbase.php
index d16f83e..5494ee6 100644 (file)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *
-*  (c) 1999-2005 Kasper Skaarhoj (kasperYYYY@typo3.com)
+*  (c) 1999-2010 Kasper Skårhøj (kasperYYYY@typo3.com)
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is
@@ -28,9 +28,9 @@
  * Contains the parent class for 'ScriptClasses' in backend modules.
  *
  * $Id$
- * Revised for TYPO3 3.6 July/2003 by Kasper Skaarhoj
+ * Revised for TYPO3 3.6 July/2003 by Kasper Skårhøj
  *
- * @author     Kasper Skaarhoj <kasperYYYY@typo3.com>
+ * @author     Kasper Skårhøj <kasperYYYY@typo3.com>
  */
 /**
  * [CLASS/FUNCTION INDEX of SCRIPT]
  *  249:     function init()
  *  269:     function menuConfig()
  *  292:     function mergeExternalItems($modName,$menuKey,$menuArr)
- *  312:     function handleExternalFunctionValue($MM_key='function', $MS_value=NULL)
- *  330:     function getExternalItemConfig($modName,$menuKey,$value='')
- *  344:     function checkExtObj()
- *  358:     function checkSubExtObj()
- *  370:     function extObjHeader()
- *  379:     function extObjContent()
+ *  317:     function handleExternalFunctionValue($MM_key='function', $MS_value=NULL)
+ *  335:     function getExternalItemConfig($modName,$menuKey,$value='')
+ *  349:     function checkExtObj()
+ *  363:     function checkSubExtObj()
+ *  375:     function extObjHeader()
+ *  384:     function extObjContent()
  *
  * TOTAL FUNCTIONS: 9
  * (This index is automatically created/updated by the extension "extdeveval")
@@ -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:
  * Parent class for 'ScriptClasses' in backend modules.
  * See example comment above.
  *
- * @author     Kasper Skaarhoj <kasperYYYY@typo3.com>
+ * @author     Kasper Skårhøj <kasperYYYY@typo3.com>
  * @package TYPO3
  * @subpackage t3lib
  * @see t3lib_extobjbase
@@ -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