} else {
// @TODO Nothing helped???
DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("ret=%s,locked=%s,admin=%s,mem=%s",
- $ret,
- $locked,
- $admin,
- $mem
+ $ret,
+ $locked,
+ $admin,
+ $mem
));
}
} // END - if
// Still no luck or not found?
- if ((($ret == 'cache_miss') || ($found === false)) && (getOutputMode() == '0')) {
+ if (($found === false) && (!EXT_IS_ACTIVE('cache')) && ($ret != 'done')) {
// ----- Legacy module ----- ---- Module in base folder ---- --- Module with extension's name ---
if ((isFileReadable(sprintf("%sinc/modules/%s.php", constant('PATH'), $mod))) || (isFileReadable(sprintf("%s%s.php", constant('PATH'), $mod))) || (isFileReadable(sprintf("%s%s/%s.php", constant('PATH'), $extension, $mod)))) {
// Data is missing so we add it
// Module not found we don't add it to the database
$ret = '404';
}
- } elseif (!$found) {
+ } elseif ($ret == 'cache_miss') {
+ // Rebuild the cache files
+ rebuildCacheFiles('modreg', 'modreg');
+ } elseif ($found === false) {
// Problem with module detected
DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Problem in module %s detected. ret=%s, locked=%s, hidden=%s, mem=%s, admin=%s",
$mod,
LOAD_TEMPLATE($mode . '_menu_title', false, $content);
// Sub menu
- $result_sub = SQL_QUERY_ESC("SELECT title AS sub_title, what AS sub_what FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ".$AND." ORDER BY `sort`",
- array($mode, $content['action']), __FUNCTION__, __LINE__);
+ $result_sub = SQL_QUERY_ESC("SELECT `title` AS sub_title, `what` AS sub_what FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ".$AND." ORDER BY `sort`",
+ array($mode, $content['action']), __FUNCTION__, __LINE__);
// Get number of rows
$ctl = SQL_NUMROWS($result_sub);
} else {
// This is a menu block... ;-)
enableBlockMode();
+
+ // Load menu block
$INC_BLOCK = sprintf("inc/modules/%s/action-%s.php", $mode, $content['action']);
if (isFileReadable($INC_BLOCK)) {
// Load include file