X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=inc%2Fmodule-functions.php;h=39fab38c7ae6e8e2885eb1a9ed7623f745028c4b;hb=6b2fd39cc3c1d16e4495bbf2645e77be3fa2badd;hp=befb470dc4a6bec169397a17474bb52ff78dcd80;hpb=c0f672a1c9250dc1d8d3ed97d919c4fe3e213313;p=mailer.git diff --git a/inc/module-functions.php b/inc/module-functions.php index befb470dc4..39fab38c7a 100644 --- a/inc/module-functions.php +++ b/inc/module-functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2012 by Mailer Developer Team * + * Copyright (c) 2009 - 2013 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -116,7 +116,7 @@ function getModuleStatus ($module) { // Is the module_status entry there? if (!isModuleStatusSet($module)) { // Abort - reportBug('Module status not set. module=' . $module); + reportBug(__FUNCTION__, __LINE__, 'Module status not set. module=' . $module); } // END - if // Return it @@ -288,7 +288,7 @@ function checkModulePermissions ($module = '') { // Data is missing so we add it if (isExtensionInstalledAndNewer('sql_patches', '0.3.6')) { /* - * Since 0.3.6 we have a has_menu column, this took me a half + * Since 0.3.6 there is a has_menu column, this took me a half * hour to find a loop here... *sigh* */ SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_mod_reg` @@ -388,9 +388,9 @@ function ifModuleHasMenu ($module, $forceDb = FALSE) { } elseif (!isExtensionInstalled('sql_patches')) { // 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! - logDebugMessage(__FUNCTION__, __LINE__, 'This should never be reached.'); + } elseif (!isInstallationPhase()) { + // Unsupported state, but ignored in installation phase + logDebugMessage(__FUNCTION__, __LINE__, 'This should never be reached, module[' . gettype($module) . ']=' . $module . ',forceDb=' . intval($forceDb)); } // Return status @@ -421,7 +421,7 @@ function loadModule () { $isModuleValid = FALSE; // Construct module name - $GLOBALS['module_inc'] = sprintf("inc/modules/%s.php", getModule()); + $GLOBALS['module_inc'] = sprintf("inc/modules/%s.php", getModule()); // Check module permission (again) $moduleState = checkModulePermissions(); @@ -529,8 +529,8 @@ function doIncludeModule () { function getMenuModeFromModule () { // Is cache set? if (!isset($GLOBALS[__FUNCTION__])) { - // Default is NULL - $GLOBALS[__FUNCTION__] = NULL; + // Default is 'noindex' which is invalid for SQL tables but okay for meta data template + $GLOBALS[__FUNCTION__] = 'noindex'; // Determine it hard-coded if (getModule() == 'login') {