// Get password from cache
$data['password'] = $cacheArray['admins']['password'][$aid];
$ret = "pass";
- if (isset($_CONFIG['cache_hits'])) { $_CONFIG['cache_hits']++; } else { $_CONFIG['cache_hits'] = 1; }
+ if (getConfig('cache_hits') > 0) { $_CONFIG['cache_hits']++; } else { $_CONFIG['cache_hits'] = 1; }
// Include more admins data?
if (GET_EXT_VERSION("admins") >= "0.7.0") {
$menuTitle = array();
// Is there a cache instance?
- if ((is_object($cacheInstance)) && (isset($_CONFIG['cache_admin_menu'])) && ($_CONFIG['cache_admin_menu'] == "Y")) {
+ if ((is_object($cacheInstance)) && (getConfig('cache_admin_menu') == "Y")) {
// Create cache name
$cacheName = "admin_".$act."_".$wht."_".GET_LANGUAGE()."_".strtolower(get_session('admin_login'));
eval($eval);
// Is there a cache instance again?
- if ((is_object($cacheInstance)) && (isset($_CONFIG['cache_admin_menu'])) && ($_CONFIG['cache_admin_menu'] == "Y")) {
+ if ((is_object($cacheInstance)) && (getConfig('cache_admin_menu') == "Y")) {
// Init cache
$cacheInstance->init($cacheName);
global $_CONFIG, $cacheArray;
// Set the global mode as the mode for all admins
- $MODE = $_CONFIG['admin_menu']; $ADMIN = $MODE;
+ $MODE = getConfig('admin_menu');
+ $ADMIN = $MODE;
// Get admin id
$aid = GET_CURRENT_ADMIN_ID();
if (isset($cacheArray['admins']['la_mode'][$aid])) {
// Load from cache
$ADMIN = $cacheArray['admins']['la_mode'][$aid];
- if (isset($_CONFIG['cache_hits'])) { $_CONFIG['cache_hits']++; } else { $_CONFIG['cache_hits'] = 1; }
+ if (getConfig('cache_hits') > 0) { $_CONFIG['cache_hits']++; } else { $_CONFIG['cache_hits'] = 1; }
} 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",
- array($aid), __FILE__, __LINE__);
+ array($aid), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Load data
list($ADMIN) = SQL_FETCHROW($result);
global $_CONFIG;
// Set temporary the new settings
- $_CONFIG = array_merge($_CONFIG, $settingsArray);
+ $_CONFIG = merge_array($_CONFIG, $settingsArray);
// Now get the test URL
$content = GET_URL("check-updates3.php");