X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmysql-manager.php;h=b986d783baef83eb44ccdc717ba0f9a62040e1e0;hp=bf3b16b973dd738593a02176c010254269a115e7;hb=adb34cea9c14bcac14030f8eb1e6ae2c3231c962;hpb=d0c133d3ee415498b9b69237f2806ac15b04ae18 diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php index bf3b16b973..b986d783ba 100644 --- a/inc/mysql-manager.php +++ b/inc/mysql-manager.php @@ -296,7 +296,7 @@ function addMenuDescription ($accessLevel, $FQFN, $return = false) { // Init variables $LINK_ADD = ''; $OUT = ''; - $AND = ''; + $ADD = ''; // First we have to do some analysis... if (substr($file, 0, 7) == 'action-') { @@ -308,33 +308,33 @@ function addMenuDescription ($accessLevel, $FQFN, $return = false) { $modCheck = getModuleFromFileName($file, $accessLevel); // Add what - $AND = " AND (`what`='' OR `what` IS NULL)"; + $ADD = " AND (`what`='' OR `what` IS NULL)"; } elseif (substr($file, 0, 5) == 'what-') { - // This is an admin what file! + // This is a 'what file'! $type = 'what'; $search = substr($file, 5); - $AND = " AND `visible`='Y' AND `locked`='N'"; + $ADD = " AND `visible`='Y' AND `locked`='N'"; // Get access level from it $modCheck = getModuleFromFileName($file, $accessLevel); // Do we have admin? Then display all - if (isAdmin()) $AND = ''; + if (isAdmin()) $ADD = ''; $dummy = substr($search, 0, -4); - $AND .= " AND `action`='".getModeAction($accessLevel, $dummy)."'"; + $ADD .= " AND `action`='".getModeAction($accessLevel, $dummy)."'"; } elseif (($accessLevel == 'sponsor') || ($accessLevel == 'engine')) { // Sponsor / engine menu $type = 'what'; $search = $file; $modCheck = getModule(); - $AND = ''; + $ADD = ''; } else { // Other $type = 'menu'; $search = $file; $modCheck = getModule(); - $AND = ''; + $ADD = ''; } // Begin the navigation line @@ -356,7 +356,7 @@ function addMenuDescription ($accessLevel, $FQFN, $return = false) { if (((isExtensionInstalledAndNewer('sql_patches', '0.2.3')) && (getConfig('youre_here') == 'Y')) || ((isAdmin()) && ($modCheck == 'admin'))) { // Output HTML code - $OUT = $prefix . ""); @@ -388,7 +388,7 @@ function addMenuDescription ($accessLevel, $FQFN, $return = false) { function addMenu ($mode, $action, $what) { // Init some variables $main_cnt = '0'; - $AND = ''; + $ADD = ''; // is the menu action valid? if (!isMenuActionValid($mode, $action, $what, true)) { @@ -397,11 +397,11 @@ function addMenu ($mode, $action, $what) { // Non-admin shall not see all menus if (!isAdmin()) { - $AND = " AND `visible`='Y' AND `locked`='N'"; + $ADD = " AND `visible`='Y' AND `locked`='N'"; } // 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` ASC", + $result_main = SQL_QUERY_ESC("SELECT `title`, `action` FROM `{?_MYSQL_PREFIX?}_%s_menu` WHERE (`what`='' OR `what` IS NULL)".$ADD." ORDER BY `sort` ASC", array($mode), __FUNCTION__, __LINE__); //* DEBUG: */ print(__LINE__.'/'.$main_cnt.':'.getWhat()."*
"); @@ -418,7 +418,7 @@ function addMenu ($mode, $action, $what) { $GLOBALS['rows'] .= loadTemplate($mode . '_menu_title', true, $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`", + $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 ".$ADD." ORDER BY `sort`", array($mode, $content['action']), __FUNCTION__, __LINE__); // Get number of rows