*** empty log message ***
authorKasper Skårhøj <kasper@typo3.org>
Fri, 24 Oct 2003 14:21:17 +0000 (14:21 +0000)
committerKasper Skårhøj <kasper@typo3.org>
Fri, 24 Oct 2003 14:21:17 +0000 (14:21 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@37 709f56b5-9817-0410-a4d7-c38de5d9e867

t3lib/class.t3lib_superadmin.php
t3lib/class.t3lib_tcemain.php
t3lib/config_default.php

index 4492323..701fadb 100755 (executable)
@@ -332,7 +332,7 @@ class t3lib_superadmin {
                        // Display results:
                $out="";
                
-               
+#debug($this->extensionInfoArray);
                        // PER EXTENSION:
                if (is_array($this->extensionInfoArray["ext"])) {
                        $extensionKeysCollect=array();
@@ -450,12 +450,12 @@ class t3lib_superadmin {
                        $filesHash = unserialize($EM_CONF[$extKey]["_md5_values_when_last_written"]);
 
 #                      debug(count($filesHash),1);
-                       if (is_array($filesHash) && count($filesHash)<50)       {
+                       if (!is_array($filesHash) || count($filesHash)<150)     {
                                        // Get all files list (may take LOONG time):
                                $extPath=$path.$extKey."/";
                                $fileArr = array();
                                $fileArr = $this->removePrefixPathFromList($this->getAllFilesAndFoldersInPath($fileArr,$extPath),$extPath);
-               
+
                                        // Number of files:
                                $eInfo["numberfiles"]=count($fileArr);
 
index 29d79f5..ba341d8 100755 (executable)
@@ -2222,6 +2222,19 @@ class t3lib_TCEmain      {
                                        $this->clear_cacheCmd($cmdPart);        
                                }
                        }
+
+                               // Call post processing function for clear-cache:
+                       global $TYPO3_CONF_VARS;
+                       if (is_array($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearCachePostProc']))    {
+                               foreach($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearCachePostProc'] as $funcRef)      {
+                                       $a = array(
+                                               'table' => $table,
+                                               'uid' => $uid,
+                                               'uid_page' => $uid_page
+                                       );
+                                       t3lib_div::callUserFunction($funcRef,$a,$this);
+                               }
+                       }               
                }
        }
 
@@ -3590,11 +3603,16 @@ class t3lib_TCEmain     {
         * $cacheCmd='pages':   Clears cache for all pages. Requires admin-flag to be set for BE_USER
         * $cacheCmd='all':             Clears all cache_tables. This is necessary if templates are updated. Requires admin-flag to be set for BE_USER
         * $cacheCmd=[integer]:         Clears cache for the page pointed to by $cacheCmd (an integer).
+        *
+        * Can call a list of post processing functions as defined in $TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearCachePostProc'] (num array with values being the function references, called by t3lib_div::callUserFunction())
         * 
-        * @param       [type]          $cacheCmd: ...
-        * @return      [type]          ...
+        * @param       string          The cache comment, see above description.
+        * @return      void
         */
        function clear_cacheCmd($cacheCmd)      {
+               global $TYPO3_CONF_VARS;
+               
+                       // Clear cache for either ALL pages or ALL tables!
                switch($cacheCmd)       {
                        case "pages":
                                if ($this->admin || $this->BE_USER->getTSConfigVal("options.clearCache.pages")) {
@@ -3613,11 +3631,20 @@ class t3lib_TCEmain     {
                                }
                        break;
                }
+                       // Clear cache for a page ID!
                if (t3lib_div::testInt($cacheCmd))      {
                        if (t3lib_extMgm::isLoaded("cms"))      {
                                $res = mysql(TYPO3_db,"DELETE FROM cache_pages WHERE page_id=".intval($cacheCmd));
                        }
                }
+               
+                       // Call post processing function for clear-cache:
+               if (is_array($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearCachePostProc']))    {
+                       foreach($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearCachePostProc'] as $funcRef)      {
+                               $a =array('cacheCmd'=>$cacheCmd);
+                               t3lib_div::callUserFunction($funcRef,$a,$this);
+                       }
+               }               
        }
 }
 
@@ -3665,4 +3692,4 @@ REMEMBER to UPDATE the real messages set in tools/log/localconf_log.php
 if (defined("TYPO3_MODE") && $TYPO3_CONF_VARS[TYPO3_MODE]["XCLASS"]["t3lib/class.t3lib_tcemain.php"])  {
        include_once($TYPO3_CONF_VARS[TYPO3_MODE]["XCLASS"]["t3lib/class.t3lib_tcemain.php"]);
 }
-?>
\ No newline at end of file
+?>
index a0078ce..7fcfd3d 100755 (executable)
@@ -170,6 +170,8 @@ $TYPO3_CONF_VARS = Array(
        'MODS' => Array(                // Backend Module Configuration (obsolete, make extension instead)
        ),
        'USER' => Array(                // Here you may define your own setup-vars for use in your include-scripts. (obsolete, make extension instead)
+       ),
+       'SC_OPTIONS' => Array(          // Here you can more or less freely define additional configuration for scripts in TYPO3. Of course the features supported depends on the script. See documentation "Inside TYPO3" for examples. Keys in the array are the relative path of a script and values can then be anything that scripts wants to define for itself.
        )
 );
 
@@ -230,13 +232,13 @@ if ($GLOBALS['TYPO3_CONF_VARS']['GFX']['im_imvMaskState'])        {
        $GLOBALS['TYPO3_CONF_VARS']['GFX']['im_negate_mask']=$GLOBALS['TYPO3_CONF_VARS']['GFX']['im_negate_mask']?0:1;
 }
 
-// simple debug function which prints output immediately
+       // simple debug function which prints output immediately
 function xdebug($var="",$br=0) {
                // If you wish to use the debug()-function, and it does not output something, please edit the IP mask in TYPO3_CONF_VARS
        if (!t3lib_div::cmpIP(t3lib_div::getIndpEnv('REMOTE_ADDR'), $GLOBALS['TYPO3_CONF_VARS']['SYS']['devIPmask']))   return;
        t3lib_div::debug($var,$br);
 }
-// Debug function which calls $GLOBALS['error'] error handler if available
+       // Debug function which calls $GLOBALS['error'] error handler if available
 function debug($variable, $name='*variable*', $line='*line*', $file='*file*', $recursiveDepth=3, $debugLevel=E_DEBUG)  {
                // If you wish to use the debug()-function, and it does not output something, please edit the IP mask in TYPO3_CONF_VARS
        if (!t3lib_div::cmpIP(t3lib_div::getIndpEnv('REMOTE_ADDR'), $GLOBALS['TYPO3_CONF_VARS']['SYS']['devIPmask']))   return;