// 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
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.');
}
// Cache status
- $GLOBALS['is_member'] = $ret;
+ $GLOBALS[__FUNCTION__] = $ret;
// Return status
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ret=' . intval($ret));
} // 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'])) {
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"
// 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