]> git.mxchange.org Git - mailer.git/blobdiff - inc/mysql-manager.php
More globals rewritten, see #100
[mailer.git] / inc / mysql-manager.php
index db512f6b59950527d42a58bb58efc1688d286809..2a9072d89719481bfc2fd1aa85c2e8225f474c3d 100644 (file)
@@ -201,8 +201,6 @@ function CHECK_MODULE ($mod) {
 
 // Add menu description pending on given file name (without path!)
 function ADD_DESCR ($ACC_LVL, $FQFN, $return = false, $output = true) {
-       global $NAV_DEPTH;
-
        // Use only filename of the FQFN...
        $file = basename($FQFN);
 
@@ -263,11 +261,11 @@ function ADD_DESCR ($ACC_LVL, $FQFN, $return = false, $output = true) {
        }
 
        // Begin the navigation line
-       if ((!isset($NAV_DEPTH)) && (!$return)) {
-               $NAV_DEPTH = 0;
+       if ((!isset($GLOBALS['nav_depth'])) && (!$return)) {
+               $GLOBALS['nav_depth'] = 0;
                $prefix = "<div class=\"you_are_here\">{--YOU_ARE_HERE--}&nbsp;<strong><a class=\"you_are_here\" href=\"{!URL!}/modules.php?module=".$GLOBALS['module'].$LINK_ADD."\">Home</a></strong>";
        } else {
-               if (!$return) $NAV_DEPTH++;
+               if (!$return) $GLOBALS['nav_depth']++;
                $prefix = "";
        }
 
@@ -302,7 +300,7 @@ function ADD_DESCR ($ACC_LVL, $FQFN, $return = false, $output = true) {
                                //* DEBUG: */ echo __LINE__."+".$type."+<br />\n";
                                // Add closing div and br-tag
                                $OUT .= "</div><br />\n";
-                               $NAV_DEPTH = "0";
+                               $GLOBALS['nav_depth'] = "0";
 
                                // Run the filter chain
                                $ret = RUN_FILTER('post_youhere_line', array('access_level' => $ACC_LVL, 'type' => $type, 'content' => ""));
@@ -505,7 +503,6 @@ function IS_ADMIN ($admin="") {
 
 // Generates a list of "max receiveable emails per day"
 function ADD_MAX_RECEIVE_LIST ($MODE, $default = "", $return = false) {
-       global $_POST;
        $OUT = "";
        switch ($MODE) {
        case "guest":
@@ -580,8 +577,9 @@ function SEARCH_EMAIL_USERTAB ($email) {
 
 // Checks wether the current user is a member
 function IS_MEMBER () {
-       global $status, $LAST;
-       if (!is_array($LAST)) $LAST = array();
+       // @TODO Why is this global??? #100
+       global $status;
+       if (!is_array($GLOBALS['last'])) $GLOBALS['last'] = array();
        $ret = false;
 
        // is the cache entry there?
@@ -606,9 +604,9 @@ function IS_MEMBER () {
                        $valPass = generatePassString($password);
 
                        // Transfer last module and online time
-                       if ((!empty($mod)) && (empty($LAST['module']))) {
-                               $LAST['module'] = $mod;
-                               $LAST['online'] = $onl;
+                       if ((!empty($mod)) && (empty($GLOBALS['last']['module']))) {
+                               $GLOBALS['last']['module'] = $mod;
+                               $GLOBALS['last']['online'] = $onl;
                        } // END - if
 
                        // So did we now have valid data and an unlocked user?
@@ -694,9 +692,9 @@ function VALIDATE_MENU_ACTION ($MODE, $act, $wht, $UPDATE=false) {
        // Return result
        return $ret;
 }
+
 //
-function GET_MOD_DESCR($MODE, $wht, $column="what")
-{
+function GET_MOD_DESCR($MODE, $wht, $column="what") {
        // Fix empty "what"
        if (empty($wht)) {
                $wht = "welcome";
@@ -853,9 +851,7 @@ function COUNT_MODULE($mod) {
 }
 // Get action value from mode (admin/guest/member) and what-value
 function GET_ACTION ($MODE, &$wht) {
-       global $ret;
-
-       // @DEPRECATED Init status
+       // Init status
        $ret = "";
 
        //* DEBUG: */ echo __LINE__."=".$MODE."/".$wht."/".$GLOBALS['action']."=<br />";