X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodule-functions.php;h=a87301c9377c070a3d73481ccd4cf2ef9ba23004;hb=6bd47661d7ec406cd276f0835364b1e3f933d6c8;hp=9c1c823b6428e5719345c9e556ce854afab029a5;hpb=517ed50cc4e716f1d34fbfc3a1befcba591eb698;p=mailer.git diff --git a/inc/module-functions.php b/inc/module-functions.php index 9c1c823b64..a87301c937 100644 --- a/inc/module-functions.php +++ b/inc/module-functions.php @@ -46,7 +46,7 @@ function getModuleTitle ($module) { if (!isset($GLOBALS[__FUNCTION__][$module])) { // Init variables $data['title'] = ''; - $result = false; + $result = FALSE; // Is the script installed? if ((isInstalled()) && ($module != 'error')) { @@ -126,7 +126,7 @@ function getModuleStatus ($module) { // Checks whether the given module is registered function isModuleRegistered ($module) { // By default nothing is found - $found = false; + $found = FALSE; // Check if cache is latest version if (isExtensionInstalledAndNewer('cache', '0.1.2')) { @@ -137,7 +137,7 @@ function isModuleRegistered ($module) { incrementStatsEntry('cache_hits'); // Is found - $found = true; + $found = TRUE; } else { // No, then we have to update it! setModuleStatus($module, 'cache_miss'); @@ -157,7 +157,7 @@ function isModuleRegistered ($module) { } // END - foreach // Mark as found - $found = true; + $found = TRUE; } elseif (isDebugModeEnabled()) { // Debug message only in debug-mode... logDebugMessage(__FUNCTION__, __LINE__, 'Module ' . $module . ' not found.'); @@ -253,7 +253,7 @@ function checkModulePermissions ($module = '') { $found = isModuleRegistered($module_chk); // Is the module found? - if ($found === true) { + if ($found === TRUE) { // Check returned values against current access permissions // // Admin access ----- Guest access ----- --- Guest or member? --- @@ -282,7 +282,7 @@ function checkModulePermissions ($module = '') { } // END - if // Still no luck or not found? - if (($found === false) && (!isExtensionActive('cache')) && (getModuleStatus($module_chk) != 'done')) { + if (($found === FALSE) && (!isExtensionActive('cache')) && (getModuleStatus($module_chk) != 'done')) { // ----- Default module ----- ---- Module in base folder ---- --- Module with extension's name --- if ((isIncludeReadable(sprintf("inc/modules/%s.php", $module))) || (isIncludeReadable(sprintf("%s.php", $module))) || (isIncludeReadable(sprintf("%s/%s.php", $extension, $module)))) { // Data is missing so we add it @@ -326,7 +326,7 @@ VALUES } elseif ((getModuleStatus($module_chk) == 'cache_miss') && (isHtmlOutputMode())) { // Rebuild the cache files rebuildCache('modules', 'modules'); - } elseif ($found === false) { + } elseif ($found === FALSE) { // Problem with module detected logDebugMessage(__FUNCTION__, __LINE__, sprintf("Problem in module %s detected. getModuleStatus()=%s,locked=%d,hidden=%d,mem=%d,admin=%d,output_mode=%s", $module_chk, @@ -347,9 +347,9 @@ VALUES } // Checks if the module has a menu -function ifModuleHasMenu ($module, $forceDb = false) { +function ifModuleHasMenu ($module, $forceDb = FALSE) { // All is false by default - $ret = false; + $ret = FALSE; // Extension installed and newer than or has version 0.1.2? if (isExtensionInstalledAndNewer('cache', '0.1.2')) { @@ -366,7 +366,7 @@ function ifModuleHasMenu ($module, $forceDb = false) { // Admin/guest/member/sponsor modules have always a menu! $ret = in_array($module, array('admin', 'index', 'login', 'sponsor')); } - } elseif ((isExtensionInstalledAndNewer('sql_patches', '0.3.6')) && ((!isExtensionActive('cache')) || ($forceDb === true))) { + } elseif ((isExtensionInstalledAndNewer('sql_patches', '0.3.6')) && ((!isExtensionActive('cache')) || ($forceDb === TRUE))) { // Check database for entry $result = SQL_QUERY_ESC("SELECT `has_menu` FROM `{?_MYSQL_PREFIX?}_mod_reg` WHERE `module`='%s' LIMIT 1", array($module), __FUNCTION__, __LINE__); @@ -386,7 +386,7 @@ function ifModuleHasMenu ($module, $forceDb = false) { // Free memory SQL_FREERESULT($result); } elseif (!isExtensionInstalled('sql_patches')) { - // No sql_patches installed, so maybe in admin/guest/member/sponsor area or no admin registered? + // No ext-sql_patches installed, so maybe in admin/guest/member/sponsor area or no admin registered? $ret = in_array($module, array('admin', 'index', 'login', 'sponsor')); // Then there is a menu! } else { // Unsupported state! @@ -418,7 +418,7 @@ function addModuleSql ($module, $title, $locked, $hidden, $adminOnly, $memOnly) // Load the currently set module function loadModule () { // By default all modules are invalid - $isModuleValid = false; + $isModuleValid = FALSE; // Construct module name $GLOBALS['module_inc'] = sprintf("inc/modules/%s.php", getModule()); @@ -435,7 +435,7 @@ function loadModule () { // Does the module exists on local file system? if ((isIncludeReadable($GLOBALS['module_inc'])) && (!ifFatalErrorsDetected())) { // Module is valid, active and located on the local disk... - $isModuleValid = true; + $isModuleValid = TRUE; } elseif (!ifFatalErrorsDetected()) { // Set HTTP status setHttpStatus('404'); @@ -492,7 +492,7 @@ function doIncludeModule () { loadIncludeOnce('inc/header.php'); // Modules are by default not valid! - $isModuleValid = false; + $isModuleValid = FALSE; // By default NULL is used $GLOBALS['module_inc'] = NULL; @@ -510,7 +510,7 @@ function doIncludeModule () { } // Is the module valid? - if (($isModuleValid === true) && (!is_null($GLOBALS['module_inc']))) { + if (($isModuleValid === TRUE) && (!is_null($GLOBALS['module_inc']))) { // Run pre-filter runFilterChain('pre_module_load');