// Display results:
$out="";
-
+#debug($this->extensionInfoArray);
// PER EXTENSION:
if (is_array($this->extensionInfoArray["ext"])) {
$extensionKeysCollect=array();
$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);
$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);
+ }
+ }
}
}
* $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")) {
}
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);
+ }
+ }
}
}
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
+?>
'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.
)
);
$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;