]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/admin-inc.php
Functions imported, some dev-scripts added
[mailer.git] / inc / modules / admin / admin-inc.php
index c7ed2575c9acf71e71ce4a33a1d2a2b825c34312..7ab5e1283ab55aa84f147e8d87058e4efb97c780 100644 (file)
@@ -412,25 +412,19 @@ function ADD_ADMIN_MENU($act, $wht, $return=false) {
 
        // Build main menu
        $result_main = SQL_QUERY("SELECT action, title, descr FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE (what='' OR `what` IS NULL) ORDER BY `sort`, id DESC", __FILE__, __LINE__);
-       if (SQL_NUMROWS($result_main) > 0)
-       {
+       if (SQL_NUMROWS($result_main) > 0) {
                $OUT = "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"admin_menu_main\">
 <tr><td colspan=\"2\" height=\"7\" class=\"seperator\">&nbsp;</td></tr>\n";
-               while (list($menu, $title, $descr) = SQL_FETCHROW($result_main))
-               {
-                       if ((EXT_IS_ACTIVE("admins")) && (GET_EXT_VERSION("admins") > "0.2"))
-                       {
+               while (list($menu, $title, $descr) = SQL_FETCHROW($result_main)) {
+                       if ((EXT_IS_ACTIVE("admins")) && (GET_EXT_VERSION("admins") > "0.2")) {
                                $ACL = ADMINS_CHECK_ACL($menu, "");
-                       }
-                        else
-                       {
+                       } else {
                                // ACL is "allow"... hmmm
                                $ACL = true;
                        }
-                       if ($ACL)
-                       {
-                               if (!$SUB)
-                               {
+
+                       if ($ACL === true) {
+                               if (!$SUB) {
                                        // Insert compiled menu title and description
                                        $menuTitle[$menu]      = $title;
                                        $menuDesription[$menu] = $descr;
@@ -537,7 +531,7 @@ function ADD_ADMIN_MENU($act, $wht, $return=false) {
 
        // Compile and run the code here. This inserts all constants into the
        // HTML output. Costs me some time to figure this out... *sigh* Quix0r
-       $eval = "\$OUT = \"".COMPILE_CODE(addslashes($OUT))."\";";
+       $eval = "\$OUT = \"".COMPILE_CODE(SQL_ESCAPE($OUT))."\";";
        eval($eval);
 
        // Is there a cache instance again?