X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmysql-manager.php;h=279808c0ce4768053e601a02f005a8883d6cdb76;hb=4c934f57eb7749817b41b78818c90766f7777500;hp=c4803ae00bd7d0d40acc5bb3457978d65a50a505;hpb=3819d37a11c5a1c29745fd1139ab07cefbb5ecd6;p=mailer.git diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php index c4803ae00b..279808c0ce 100644 --- a/inc/mysql-manager.php +++ b/inc/mysql-manager.php @@ -926,20 +926,15 @@ function GET_ACTION ($MODE, &$wht) } elseif (!empty($GLOBALS['action'])) { // Get it directly from URL return $GLOBALS['action']; - } else { - // Everything else will be touched after checking the module has a menu assigned } //* DEBUG: */ echo __LINE__."*".$ret."*
\n"; - if (MODULE_HAS_MENU($MODE)) - { + if (MODULE_HAS_MENU($MODE)) { // Rewriting modules to menu - switch ($MODE) - { + switch ($MODE) { case "index": $MODE = "guest"; break; case "login": $MODE = "member"; break; - break; - } + } // END - switch // Guest and member menu is "main" as the default if (empty($ret)) $ret = "main"; @@ -950,11 +945,11 @@ function GET_ACTION ($MODE, &$wht) if (SQL_NUMROWS($result) == 1) { // Load action value and pray that this one is the right you want... ;-) list($ret) = SQL_FETCHROW($result); - } + } // END - if // Free memory SQL_FREERESULT($result); - } + } // END - if // Return action value return $ret; @@ -965,9 +960,11 @@ function GET_CATEGORY ($cid) { $ret = _CATEGORY_404; // Is the category id set? - if (!empty($cid)) { - - // Lookup the category + if ($cid == "0") { + // No category + $ret = _CATEGORY_NONE; + } elseif ($cid > 0) { + // Lookup the category in database $result = SQL_QUERY_ESC("SELECT cat FROM "._MYSQL_PREFIX."_cats WHERE id=%s LIMIT 1", array(bigintval($cid)), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) {