mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-14 01:34:55 +02:00
* new account.login view for tibiacom template
* added new indicator icons for create account, create character and change character name * attempt to fix incorrect views counter behavior (its resetting to 0 in some cases) * moved check_* functions to class Validator * from now all validators ajax requests will fire onblur instead of onkeyup * ajax requests returns now json instead of xml * added 404 response when file is not found * fixed gallery
This commit is contained in:
@@ -15,19 +15,20 @@ $views_counter = 1; // default value, must be here!
|
||||
if($cache->enabled())
|
||||
{
|
||||
$value = 0;
|
||||
if(!$cache->fetch('views_counter', $value))
|
||||
if(!$cache->fetch('views_counter', $value) || $value <= 1)
|
||||
{
|
||||
$value = 0;
|
||||
if(fetchDatabaseConfig('views_counter', $value))
|
||||
$views_counter = $value;
|
||||
else
|
||||
registerDatabaseConfig('views_counter', 1); // save in the database
|
||||
registerDatabaseConfig('views_counter', 2); // save in the database
|
||||
}
|
||||
else
|
||||
else {
|
||||
$views_counter = $value;
|
||||
}
|
||||
|
||||
$cache->set('views_counter', ++$views_counter, 60 * 60);
|
||||
if(($views_counter % COUNTER_SYNC) == 0) // sync with database
|
||||
if($views_counter > 1 && ($views_counter % COUNTER_SYNC) == 0) // sync with database
|
||||
updateDatabaseConfig('views_counter', $views_counter);
|
||||
/*
|
||||
{
|
||||
|
Reference in New Issue
Block a user