]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/admin-inc.php
More globals rewritten, see #100
[mailer.git] / inc / modules / admin / admin-inc.php
index e7b1acb6195185bad6baabc8fb6e00b097cabaea..ea677c8fdbc60bf4d1e2b7f9535623cb94ba6833 100644 (file)
@@ -232,7 +232,7 @@ function CHECK_ADMIN_COOKIES ($admin_login, $password) {
 
 //
 function ADMIN_DO_ACTION($wht) {
-       global $menuDesription, $menuTitle, $DATA;
+       global $DATA;
        //* DEBUG: */ echo __LINE__."*".$wht."/".$GLOBALS['module']."/".$GLOBALS['action']."/".$GLOBALS['what']."*<br />\n";
 
        // Remove any spaces from variable
@@ -297,15 +297,13 @@ LIMIT 1", array($act, $wht, $wht), __FILE__, __LINE__);
 }
 //
 function ADD_ADMIN_MENU($act, $wht, $return=false) {
-       global $menuDesription, $menuTitle;
-
        // Init variables
        $SUB = false;
        $OUT = "";
 
        // Menu descriptions
-       $menuDesription = array();
-       $menuTitle = array();
+       $GLOBALS['menu']['description'] = array();
+       $GLOBALS['menu']['title'] = array();
 
        // Is there a cache instance?
        if ((is_object($GLOBALS['cache_instance'])) && (getConfig('cache_admin_menu') == "Y")) {
@@ -319,8 +317,8 @@ function ADD_ADMIN_MENU($act, $wht, $return=false) {
 
                        // Extract all parts
                        $OUT = base64_decode($data['output'][0]);
-                       $menuTitle = unserialize(base64_decode($data['title'][0]));
-                       $menuDescription = unserialize(base64_decode($data['descr'][0]));
+                       $GLOBALS['menu']['title'] = unserialize(base64_decode($data['title'][0]));
+                       $GLOBALS['menu']['description'] = unserialize(base64_decode($data['descr'][0]));
 
                        // Return or output content?
                        if ($return) {
@@ -347,8 +345,8 @@ function ADD_ADMIN_MENU($act, $wht, $return=false) {
                        if ($ACL === true) {
                                if (!$SUB) {
                                        // Insert compiled menu title and description
-                                       $menuTitle[$menu]      = $title;
-                                       $menuDesription[$menu] = $descr;
+                                       $GLOBALS['menu']['title'][$menu]      = $title;
+                                       $GLOBALS['menu']['description'][$menu] = $descr;
                                }
                                $OUT .= "<tr>
        <td class=\"admin_menu\" colspan=\"2\">
@@ -376,8 +374,8 @@ function ADD_ADMIN_MENU($act, $wht, $return=false) {
                                        array($menu), __FILE__, __LINE__);
                                if ((SQL_NUMROWS($result_what) > 0) && ($act == $menu))
                                {
-                                       $menuDesription = array();
-                                       $menuTitle = array(); $SUB = true;
+                                       $GLOBALS['menu']['description'] = array();
+                                       $GLOBALS['menu']['title'] = array(); $SUB = true;
                                        $OUT .= "<tr>
        <td width=\"10\" class=\"seperator\">&nbsp;</td>
        <td class=\"admin_menu\">
@@ -394,8 +392,8 @@ function ADD_ADMIN_MENU($act, $wht, $return=false) {
                                                $readable = INCLUDE_READABLE($INC);
                                                if ($ACL === true) {
                                                        // Insert compiled title and description
-                                                       $menuTitle[$wht_sub]      = $title_what;
-                                                       $menuDesription[$wht_sub] = $desc_what;
+                                                       $GLOBALS['menu']['title'][$wht_sub]      = $title_what;
+                                                       $GLOBALS['menu']['description'][$wht_sub] = $desc_what;
                                                        $OUT .= "<tr>
        <td class=\"admin_menu\" colspan=\"2\">
                <NOBR>&nbsp;<strong>--&gt;</strong>&nbsp;";
@@ -463,8 +461,8 @@ function ADD_ADMIN_MENU($act, $wht, $return=false) {
                // Prepare cache data
                $data = array(
                        'output' => base64_encode($OUT),
-                       'title'  => $menuTitle,
-                       'descr'  => $menuDesription
+                       'title'  => $GLOBALS['menu']['title'],
+                       'descr'  => $GLOBALS['menu']['description']
                );
 
                // Write the data away