[TASK] Remove function index
[Packages/TYPO3.CMS.git] / typo3 / sysext / lowlevel / class.tx_lowlevel_cleaner_core.php
index b993539..2f4db04 100644 (file)
 /**
  * Core functions for cleaning and analysing
  *
- * $Id$
- *
  * @author     Kasper Skårhøj <kasperYYYY@typo3.com>
  */
-/**
- * [CLASS/FUNCTION INDEX of SCRIPT]
- *
- *
- *
- *   71: class tx_lowlevel_cleaner_core extends t3lib_cli
- *   88:     function tx_lowlevel_cleaner_core()
- *
- *              SECTION: CLI functionality
- *  134:     function cli_main($argv)
- *  193:     function cli_referenceIndexCheck()
- *  228:     function cli_noExecutionCheck($matchString)
- *  251:     function cli_printInfo($header,$res)
- *
- *              SECTION: Page tree traversal
- *  331:     function genTree($rootID,$depth=1000,$echoLevel=0,$callBack='')
- *  369:     function genTree_traverse($rootID,$depth,$echoLevel=0,$callBack='',$versionSwapmode='',$rootIsVersion=0,$accumulatedPath='')
- *
- *              SECTION: Helper functions
- *  554:     function infoStr($rec)
- *
- * TOTAL FUNCTIONS: 8
- * (This index is automatically created/updated by the extension "extdeveval")
- *
- */
 
 
 /**
@@ -78,16 +51,18 @@ class tx_lowlevel_cleaner_core extends t3lib_cli {
 
        var $performanceStatistics = array();
 
+       protected $workspaceIndex = array();
+
 
        /**
         * Constructor
         *
         * @return      void
         */
-       function tx_lowlevel_cleaner_core()     {
+       function __construct()  {
 
                        // Running parent class constructor
-               parent::t3lib_cli();
+               parent::__construct();
 
                $this->cleanerModules = (array)$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['lowlevel']['cleanerModules'];
 
@@ -329,10 +304,13 @@ class tx_lowlevel_cleaner_core extends t3lib_cli {
         */
        function genTree($rootID,$depth=1000,$echoLevel=0,$callBack='') {
 
-               $pt = t3lib_div::milliseconds();$this->performanceStatistics['genTree()']='';
+               $pt = t3lib_div::milliseconds();
+               $this->performanceStatistics['genTree()'] = '';
 
                        // Initialize:
-               $this->workspaceIndex = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid,title','sys_workspace','1=1'.t3lib_BEfunc::deleteClause('sys_workspace'),'','','','uid');
+               if (t3lib_extMgm::isLoaded('workspaces')) {
+                       $this->workspaceIndex = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid,title','sys_workspace','1=1'.t3lib_BEfunc::deleteClause('sys_workspace'),'','','','uid');
+               }
                $this->workspaceIndex[-1] = TRUE;
                $this->workspaceIndex[0] = TRUE;
 
@@ -350,7 +328,9 @@ class tx_lowlevel_cleaner_core extends t3lib_cli {
                );
 
                        // Start traversal:
-               $pt2 = t3lib_div::milliseconds();$this->performanceStatistics['genTree_traverse()']=''; $this->performanceStatistics['genTree_traverse():TraverseTables']='';
+               $pt2 = t3lib_div::milliseconds();
+               $this->performanceStatistics['genTree_traverse()'] = '';
+               $this->performanceStatistics['genTree_traverse():TraverseTables'] = '';
                $this->genTree_traverse($rootID,$depth,$echoLevel,$callBack);
                $this->performanceStatistics['genTree_traverse()'] = t3lib_div::milliseconds()-$pt2;