From: Roland Häder Date: Tue, 3 Aug 2010 23:21:30 +0000 (+0000) Subject: Even more indexes rewritten to __FUNCTION__ X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2e33dfdf1973c145784a172982b2c15ffa923d2f;p=mailer.git Even more indexes rewritten to __FUNCTION__ --- diff --git a/inc/libs/sponsor_functions.php b/inc/libs/sponsor_functions.php index d54a64238a..3346bead8c 100644 --- a/inc/libs/sponsor_functions.php +++ b/inc/libs/sponsor_functions.php @@ -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 diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php index 120f26fe5e..18b9be1b48 100644 --- a/inc/mysql-manager.php +++ b/inc/mysql-manager.php @@ -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" diff --git a/inc/wrapper-functions.php b/inc/wrapper-functions.php index b5fef6af95..1d49f0ac9b 100644 --- a/inc/wrapper-functions.php +++ b/inc/wrapper-functions.php @@ -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