X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmysql-manager.php;h=ac33024157fe66bd8571ab9c771c204517f1512e;hb=8d4176053d397a86baca20b4d7ab7ed526355be8;hp=30aa831a000bf40ea87d550c7444c0dc160917a1;hpb=8b4478db59f4631cae077d87cc40aa8a56bfba0c;p=mailer.git
diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php
index 30aa831a00..ac33024157 100644
--- a/inc/mysql-manager.php
+++ b/inc/mysql-manager.php
@@ -18,6 +18,7 @@
* svn:keywords Date Revision" (autoprobset!) at least!!!!!! *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
+ * Copyright (c) 2009, 2010 by Mailer Developer Team *
* For more information visit: http://www.mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -78,8 +79,8 @@ function getModuleTitle ($module) {
// Still no luck or empty title?
if (empty($data['title'])) {
// No name found
- $data['title'] = sprintf("%s (%s)", getMessage('LANG_UNKNOWN_MODULE'), $module);
- if (SQL_NUMROWS($result) == '0') {
+ $data['title'] = getMaskedMessage('UNKNOWN_MODULE_DETECTED', $module);
+ if ((is_resource($result)) && (SQL_HASZERONUMS($result))) {
// Add module to database
$dummy = checkModulePermissions($module);
} // END - if
@@ -138,10 +139,10 @@ function checkModulePermissions ($module = '') {
// Check for prefix is a extension...
$modSplit = explode('_', $module);
$extension = ''; $module_chk = $module;
- //* DEBUG: */ print(__LINE__."*".count($modSplit)."*/".$module."*
");
+ //* DEBUG: */ debugOutput(__LINE__.'*'.count($modSplit).'/'.$module.'*');
if (count($modSplit) == 2) {
// Okay, there is a seperator (_) in the name so is the first part a module?
- //* DEBUG: */ print(__LINE__."*".$modSplit[0]."*
");
+ //* DEBUG: */ debugOutput(__LINE__.'*'.$modSplit[0].'*');
if (isExtensionActive($modSplit[0])) {
// The prefix is an extension's name, so let's set it
$extension = $modSplit[0]; $module = $modSplit[1];
@@ -261,7 +262,7 @@ function checkModulePermissions ($module = '') {
// Destroy cache here
// @TODO Rewrite this to a filter
- if ((getOutputMode() == '0') || (getOutputMode() == -1)) rebuildCacheFile('modules', 'modules');
+ if ((getOutputMode() == '0') || (getOutputMode() == -1)) rebuildCache('modules', 'modules');
// And reload data
unset($GLOBALS['module_status'][$module]);
@@ -272,7 +273,7 @@ function checkModulePermissions ($module = '') {
}
} elseif (($ret == 'cache_miss') && (getOutputMode() == '0')) {
// Rebuild the cache files
- rebuildCacheFile('modules', 'modules');
+ rebuildCache('modules', 'modules');
} elseif ($found === false) {
// Problem with module detected
logDebugMessage(__FUNCTION__, __LINE__, sprintf("Problem in module %s detected. ret=%s, locked=%s, hidden=%s, mem=%s, admin=%s, output_mode=%s",
@@ -301,6 +302,7 @@ function addMenuDescription ($accessLevel, $FQFN, $return = false) {
$LINK_ADD = '';
$OUT = '';
$ADD = '';
+ $prefix = '';
// First we have to do some analysis...
if (substr($file, 0, 7) == 'action-') {
@@ -326,7 +328,7 @@ function addMenuDescription ($accessLevel, $FQFN, $return = false) {
if (isAdmin()) $ADD = '';
$dummy = substr($search, 0, -4);
- $ADD .= " AND `action`='".getModeAction($accessLevel, $dummy)."'";
+ $ADD .= " AND `action`='".getActionFromModuleWhat($accessLevel, $dummy)."'";
} elseif (($accessLevel == 'sponsor') || ($accessLevel == 'engine')) {
// Sponsor / engine menu
$type = 'what';
@@ -343,11 +345,19 @@ function addMenuDescription ($accessLevel, $FQFN, $return = false) {
// Begin the navigation line
if ((!isset($GLOBALS['nav_depth'])) && ($return === false)) {
+ // Init nav_depth
$GLOBALS['nav_depth'] = '0';
- $prefix = '