Even more indexes rewritten to __FUNCTION__
authorRoland Häder <roland@mxchange.org>
Tue, 3 Aug 2010 23:21:30 +0000 (23:21 +0000)
committerRoland Häder <roland@mxchange.org>
Tue, 3 Aug 2010 23:21:30 +0000 (23:21 +0000)
inc/libs/sponsor_functions.php
inc/mysql-manager.php
inc/wrapper-functions.php

index d54a64238a42f2d22e02b4bbc08bc371d32c95b2..3346bead8c17dc029d9de84cf5b02b73e3b48e57 100644 (file)
@@ -806,13 +806,13 @@ function isCurrentSponsorIdSet () {
 // Is given sponsor_id valid?
 function isValidSponsorId ($sponsor_id) {
        // Do we have cache?
-       if (!isset($GLOBALS['is_valid_sponsor_id'][$sponsor_id])) {
+       if (!isset($GLOBALS[__FUNCTION__][$sponsor_id])) {
                // Check it out
-               $GLOBALS['is_valid_sponsor_id'][$sponsor_id] = ((!is_null($sponsor_id)) && (!empty($sponsor_id)) && ($sponsor_id > 0));
+               $GLOBALS[__FUNCTION__][$sponsor_id] = ((!is_null($sponsor_id)) && (!empty($sponsor_id)) && ($sponsor_id > 0));
        } // END - if
 
        // Return cache
-       return $GLOBALS['is_valid_sponsor_id'][$sponsor_id];
+       return $GLOBALS[__FUNCTION__][$sponsor_id];
 }
 
 // Getter for sponsor data
index 120f26fe5edbac2fdac442b38e76e2ebbf1a4cd1..18b9be1b48bf06c2a706ec29932637bf6465c705 100644 (file)
@@ -371,10 +371,10 @@ function isMember () {
        if ((!isset($GLOBALS['last_online'])) || (!is_array($GLOBALS['last_online']))) $GLOBALS['last_online'] = array();
 
        // is the cache entry there?
-       if (isset($GLOBALS['is_member'])) {
+       if (isset($GLOBALS[__FUNCTION__])) {
                // Then return it
-               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'CACHED! (' . intval($GLOBALS['is_member']) . ')');
-               return $GLOBALS['is_member'];
+               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'CACHED! (' . intval($GLOBALS[__FUNCTION__]) . ')');
+               return $GLOBALS[__FUNCTION__];
        } elseif ((!isSessionVariableSet('userid')) || (!isSessionVariableSet('u_hash'))) {
                // No member
                //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'No member set in cookie/session.');
@@ -424,7 +424,7 @@ function isMember () {
        }
 
        // Cache status
-       $GLOBALS['is_member'] = $ret;
+       $GLOBALS[__FUNCTION__] = $ret;
 
        // Return status
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ret=' . intval($ret));
@@ -540,9 +540,9 @@ function isAdmin () {
        } // END - if
 
        // Do we have cache?
-       if (!isset($GLOBALS['is_admin'][$adminId])) {
+       if (!isset($GLOBALS[__FUNCTION__][$adminId])) {
                // Init it with failed
-               $GLOBALS['is_admin'][$adminId] = false;
+               $GLOBALS[__FUNCTION__][$adminId] = false;
 
                // Search in array for entry
                if (isset($GLOBALS['admin_hash'])) {
@@ -568,12 +568,12 @@ function isAdmin () {
                if (!empty($valPass)) {
                        // Check if password is valid
                        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, '(' . $valPass . '==' . $passCookie . ')='.intval($valPass == $passCookie));
-                       $GLOBALS['is_admin'][$adminId] = (($GLOBALS['admin_hash'] == $passCookie) || ((strlen($GLOBALS['admin_hash']) == 32) && ($GLOBALS['admin_hash'] == md5($passCookie))) || (($GLOBALS['admin_hash'] == '*FAILED*') && (!isExtensionActive('cache'))));
+                       $GLOBALS[__FUNCTION__][$adminId] = (($GLOBALS['admin_hash'] == $passCookie) || ((strlen($GLOBALS['admin_hash']) == 32) && ($GLOBALS['admin_hash'] == md5($passCookie))) || (($GLOBALS['admin_hash'] == '*FAILED*') && (!isExtensionActive('cache'))));
                } // END - if
        } // END - if
 
        // Return result of comparision
-       return $GLOBALS['is_admin'][$adminId];
+       return $GLOBALS[__FUNCTION__][$adminId];
 }
 
 // Generates a list of "max receiveable emails per day"
index b5fef6af950db2ab03a84681f2a083496886e60e..1d49f0ac9b04d044e79f9205bb9de654cd3a6815 100644 (file)
@@ -326,13 +326,13 @@ function isInstalled () {
 // Check wether an admin is registered
 function isAdminRegistered () {
        // Is cache set?
-       if (!isset($GLOBALS['is_admin_registered'])) {
+       if (!isset($GLOBALS[__FUNCTION__])) {
                // Simply check it
-               $GLOBALS['is_admin_registered'] = ((isConfigEntrySet('ADMIN_REGISTERED')) && (getConfig('ADMIN_REGISTERED') == 'Y'));
+               $GLOBALS[__FUNCTION__] = ((isConfigEntrySet('ADMIN_REGISTERED')) && (getConfig('ADMIN_REGISTERED') == 'Y'));
        } // END - if
 
        // Return it
-       return $GLOBALS['is_admin_registered'];
+       return $GLOBALS[__FUNCTION__];
 }
 
 // Checks wether the reset mode is active