// Get password from cache
$data['password'] = $cacheArray['admins']['password'][$admin_login];
$ret = "pass";
- $_CONFIG['cache_hits']++;
+ if (isset($_CONFIG['cache_hits'])) { $_CONFIG['cache_hits']++; } else { $_CONFIG['cache_hits'] = 1; }
// Include more admins data?
if (GET_EXT_VERSION("admins") >= "0.7.0") {
$data['login_failtures'] = $cacheArray['admins']['login_failtures'][$admin_login];
$data['last_failture'] = $cacheArray['admins']['last_failture'][$admin_login];
} // END - if
- } elseif (EXT_IS_ACTIVE("cache")) {
+ } elseif (!EXT_IS_ACTIVE("cache")) {
$ADD = "";
if (GET_EXT_VERSION("admins") >= "0.7.0") {
// Load them here
// Initialize some variables
$done = false;
$seek++;
+ $next=-1;
$found = false;
// Is the file there and read-/write-able?
if (strpos($line, $search) > -1) { $next = 0; $found = true; }
if ($next > -1) {
- if ($next == $seek) {
+ if ($next === $seek) {
$next = -1;
$line = $prefix . $DATA . $suffix."\n";
} else {
if (isset($cacheArray['admins']['la_mode'][get_session('admin_login')])) {
// Load from cache
$ADMIN = $cacheArray['admins']['la_mode'][get_session('admin_login')];
- $_CONFIG['cache_hits']++;
+ if (isset($_CONFIG['cache_hits'])) { $_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 login='%s' LIMIT 1",