} // END - if
// Major error in module registry is the default
- $ret = "major";
+ $ret = 'major';
// Check if script is installed if not return a 'done' to prevent some errors
if ((!isInstalled()) || (isInstalling()) || (!isAdminRegistered())) {
if (GET_EXT_VERSION('cache') >= '0.1.2') {
// Is the cache there?
if (!isset($GLOBALS['cache_array']['modules'])) {
- // This should normally not happen...
- debug_report_bug("Cache 'modules' is gone.");
+ // This happens when a new extension is registered while ext-cache is installed
+ $ret = 'cache_miss';
} // END - if
// Is the module cached?
$found = true;
} else {
// No, then we have to update it!
- $ret = "cache_miss";
+ $ret = 'cache_miss';
}
} elseif (!EXT_IS_ACTIVE('cache')) {
// Check for module in database
$ret = 'done';
} elseif ($locked == 'Y') {
// Module is locked
- $ret = "locked";
+ $ret = 'locked';
} elseif (($mem == 'Y') && (!IS_MEMBER())) {
// You have to login first!
- $ret = "mem_only";
+ $ret = 'mem_only';
} elseif (($admin == 'Y') && (!IS_ADMIN())) {
// Only the Admin is allowed to enter this module!
- $ret = "admin_only";
+ $ret = 'admin_only';
} else {
// @TODO Nothing helped???
DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("ret=%s,locked=%s,admin=%s,mem=%s",
} // END - if
// Still no luck or not found?
- if (($ret == "cache_miss") || (!$found)) {
+ if (($ret == 'cache_miss') || (!$found)) {
// ----- 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
// Everthing is fine?
if (SQL_AFFECTEDROWS() < 1) {
// Something bad happend!
- return "major";
+ return 'major';
} // END - if
// Destroy cache here
- rebuildCacheFiles("modreg", "modreg");
+ rebuildCacheFiles('modreg', 'modreg');
// And reload data
$ret = checkModulePermissions($mod_chk);
$AND = '';
// First we have to do some analysis...
- if (substr($file, 0, 7) == "action-") {
+ if (substr($file, 0, 7) == 'action-') {
// This is an action file!
$type = 'action';
$search = substr($file, 7);
break;
}
$AND = " AND (`what`='' OR `what` IS NULL)";
- } elseif (substr($file, 0, 5) == "what-") {
+ } elseif (substr($file, 0, 5) == 'what-') {
// This is an admin what file!
$type = 'what';
$search = substr($file, 5);