Fixes for extension problems while installing/removing (still double-registration...
[mailer.git] / inc / mysql-manager.php
index 726ddbd2053f115cc376782e439317c299957269..7137be73f1506e172de78d16de92b78503ed3168 100644 (file)
@@ -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
@@ -426,8 +426,8 @@ function ADD_MENU ($mode, $act, $wht) {
                        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);
@@ -491,6 +491,8 @@ function ADD_MENU ($mode, $act, $wht) {
                        } else {
                                // This is a menu block... ;-)
                                enableBlockMode();
+
+                               // Load menu block
                                $INC_BLOCK = sprintf("inc/modules/%s/action-%s.php", $mode, $content['action']);
                                if (isFileReadable($INC_BLOCK)) {
                                        // Load include file