X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmysql-manager.php;h=7137be73f1506e172de78d16de92b78503ed3168;hb=4bde8a00c73cd3188258a59ae44a6374a40a3f7a;hp=d0edc7d94fb381bb8337a3dae2ceedb09cd149a7;hpb=a6f31d458bf99f570e5c5efe7ea5f072eb2ae41b;p=mailer.git diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php index d0edc7d94f..7137be73f1 100644 --- a/inc/mysql-manager.php +++ b/inc/mysql-manager.php @@ -217,7 +217,7 @@ function checkModulePermissions ($mod) { } // END - if // Still no luck or not found? - if ((($ret == 'cache_miss') || ($found === false)) && (getOutputMode() == '0')) { + if (($ret == 'cache_miss') || ($found === false)) { // ----- 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 @@ -410,8 +410,8 @@ function ADD_MENU ($mode, $act, $wht) { } // END - if // Load SQL data and add the menu to the output stream... - $result_main = SQL_QUERY_ESC("SELECT title, action FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE (`what`='' OR `what` IS NULL)".$AND." ORDER BY `sort`", - array($mode), __FUNCTION__, __LINE__); + $result_main = SQL_QUERY_ESC("SELECT `title`, `action` FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE (`what`='' OR `what` IS NULL)".$AND." ORDER BY `sort`", + array($mode), __FUNCTION__, __LINE__); //* DEBUG: */ echo __LINE__.'/'.$main_cnt.'/'.$main_action.'/'.$sub_what.':'.getWhat()."*
\n"; if (SQL_NUMROWS($result_main) > 0) { OUTPUT_HTML(""); @@ -419,15 +419,15 @@ function ADD_MENU ($mode, $act, $wht) { while ($content = SQL_FETCHARRAY($result_main)) { //* DEBUG: */ echo __LINE__.'/'.$main_cnt.'/'.$content['action'].'/'.$sub_what.':'.getWhat()."*
\n"; // Init variables - $GLOBALS['block_mode'] = false; + enableBlockMode(false); $act = $content['action']; // Load menu header template - LOAD_TEMPLATE($mode."_menu_title", false, $content); + 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); @@ -490,7 +490,9 @@ function ADD_MENU ($mode, $act, $wht) { } } else { // This is a menu block... ;-) - $GLOBALS['block_mode'] = true; + enableBlockMode(); + + // Load menu block $INC_BLOCK = sprintf("inc/modules/%s/action-%s.php", $mode, $content['action']); if (isFileReadable($INC_BLOCK)) { // Load include file