]> git.mxchange.org Git - mailer.git/blobdiff - inc/mysql-manager.php
Fix for SQL with ref_depth=NULL
[mailer.git] / inc / mysql-manager.php
index 48db0063ba2e835b4f1430f1cc3080cb469e0fd5..f38e7aec5dae6d6ebb8d025f968a736cc9141ba8 100644 (file)
@@ -163,10 +163,10 @@ function addYouAreHereLink ($accessLevel, $FQFN, $return = false) {
                        $GLOBALS['nav_depth'] = '0';
 
                        // Run the post-filter chain
-                       $ret = runFilterChain('post_youhere_line', array('access_level' => $accessLevel, 'type' => $type, 'content' => ''));
+                       $ret = runFilterChain('post_youhere_line', array('access_level' => $accessLevel, 'type' => $type, 'content' => $OUT));
 
-                       // Add additional content
-                       $OUT .= $ret['content'];
+                       // Get content from filter back
+                       $OUT = $ret['content'];
                } // END - if
        } // END - if
 
@@ -184,7 +184,6 @@ function addYouAreHereLink ($accessLevel, $FQFN, $return = false) {
 function addMenu ($mode, $action, $what) {
        // Init some variables
        $main_cnt = '0';
-       $ADD = '';
 
        // is the menu action valid?
        if (!isMenuActionValid($mode, $action, $what, true)) {
@@ -192,8 +191,10 @@ function addMenu ($mode, $action, $what) {
        } // END - if
 
        // Non-admin shall not see all menus
-       if (!isAdmin()) {
-               $ADD = " AND `visible`='Y' AND `locked`='N'";
+       $ADD = " AND `visible`='Y' AND `locked`='N'";
+       if (isAdmin()) {
+               // Is admin, so make all visible
+               $ADD = '';
        } // END - if
 
        // Load SQL data and add the menu to the output stream...