]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/admin-inc.php
Global removed on many places, rewritten to use incrementConfigEntry()
[mailer.git] / inc / modules / admin / admin-inc.php
index 38bd814274fdaf32df5e7870b8188c10b01c0b30..5965d8f3942c88a52c38107a96d1d5cf815039ff 100644 (file)
@@ -59,7 +59,7 @@ function REGISTER_ADMIN ($user, $md5, $email=WEBMASTER)
 }
 // Only be executed on login procedure!
 function CHECK_ADMIN_LOGIN ($admin_login, $password) {
-       global $cacheArray, $_CONFIG, $cacheInstance;
+       global $cacheArray, $cacheInstance;
 
        // By default no admin is found
        $ret = "404";
@@ -75,7 +75,7 @@ function CHECK_ADMIN_LOGIN ($admin_login, $password) {
                // Get password from cache
                $data['password'] = $cacheArray['admins']['password'][$aid];
                $ret = "pass";
-               if (getConfig('cache_hits') > 0) { $_CONFIG['cache_hits']++; } else { $_CONFIG['cache_hits'] = 1; }
+               incrementConfigEntry('cache_hits');
 
                // Include more admins data?
                if (GET_EXT_VERSION("admins") >= "0.7.0") {
@@ -212,7 +212,7 @@ function LOGIN_ADMIN ($adminLogin, $passHash) {
 
 // Only be executed on cookie checking
 function CHECK_ADMIN_COOKIES ($admin_login, $password) {
-       global $cacheArray, $_CONFIG;
+       global $cacheArray;
        $ret = "404"; $pass = "";
 
        // Get hash
@@ -303,7 +303,7 @@ function admin_WriteData ($file, $comment, $prefix, $suffix, $DATA, $seek=0) {
 
 //
 function ADMIN_DO_ACTION($wht) {
-       global $menuDesription, $menuTitle, $_CONFIG, $cacheArray, $DATA;
+       global $menuDesription, $menuTitle, $cacheArray, $DATA;
 
        //* DEBUG: */ echo __LINE__."*".$wht."/".$GLOBALS['module']."/".$GLOBALS['action']."/".$GLOBALS['what']."*<br />\n";
        if (EXT_IS_ACTIVE("cache")) {
@@ -373,7 +373,7 @@ LIMIT 1", array($act, $wht, $wht), __FILE__, __LINE__);
 }
 //
 function ADD_ADMIN_MENU($act, $wht, $return=false) {
-       global $menuDesription, $menuTitle, $cacheInstance, $_CONFIG;
+       global $menuDesription, $menuTitle, $cacheInstance;
 
        // Init variables
        $SUB = false;
@@ -773,7 +773,7 @@ function ADMIN_USER_PROFILE_LINK ($uid, $title="", $wht="list_user") {
 }
 //
 function ADMIN_CHECK_MENU_MODE() {
-       global $_CONFIG, $cacheArray;
+       global $cacheArray;
 
        // Set the global mode as the mode for all admins
        $MODE = getConfig('admin_menu');
@@ -786,7 +786,7 @@ function ADMIN_CHECK_MENU_MODE() {
        if (isset($cacheArray['admins']['la_mode'][$aid])) {
                // Load from cache
                $ADMIN = $cacheArray['admins']['la_mode'][$aid];
-               if (getConfig('cache_hits') > 0) { $_CONFIG['cache_hits']++; } else { $_CONFIG['cache_hits'] = 1; }
+               incrementConfigEntry('cache_hits');
        } elseif (GET_EXT_VERSION("admins") >= "0.6.7") {
                // Load from database when version of "admins" is enough
                $result = SQL_QUERY_ESC("SELECT la_mode FROM "._MYSQL_PREFIX."_admins WHERE id=%s LIMIT 1",
@@ -808,7 +808,6 @@ function ADMIN_CHECK_MENU_MODE() {
 }
 // Change activation status
 function ADMIN_CHANGE_ACTIVATION_STATUS ($IDs, $table, $row, $idRow = "id") {
-       global $_CONFIG;
        $cnt = 0; $newStatus = "Y";
        if ((is_array($IDs)) && (count($IDs) > 0)) {
                // "Walk" all through and count them
@@ -887,7 +886,6 @@ function ADMIN_SEND_BUILD_MAILS ($mode, $table, $content, $id, $subjectPart="")
 }
 // Build a special template list
 function ADMIN_BUILD_LIST ($listType, $IDs, $table, $columns, $filterFunctions, $extraValues, $idColumn, $userIdColumn) {
-       global $_CONFIG;
        $OUT = ""; $SW = 2;
 
        // "Walk" through all entries
@@ -1207,7 +1205,6 @@ function ADMIN_TEST_PROXY_SETTINGS ($settingsArray) {
 }
 // Sends out a link to the given email adress so the admin can reset his/her password
 function ADMIN_SEND_PASSWORD_RESET_LINK ($email) {
-       global $_CONFIG;
        // Init output
        $OUT = "";