mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
removing smarty - part XII
- readded quest/quests, zones - delayed filter-evaluation, also linked filterObj to page to be applied to cacheKey - added check for modulo calculation with floats (fixes "0 years" - duarions) Quests: * added category-locales * creating objectives shouldn't be quite as intensive anymore
This commit is contained in:
@@ -832,11 +832,11 @@ class Util
|
||||
else
|
||||
{
|
||||
$_ = $s['d'] + $s['h'] / 24;
|
||||
if ($_ && !($_ % 364)) // whole years
|
||||
if ($_ > 1 && !($_ % 364)) // whole years
|
||||
return round(($s['d'] + $s['h'] / 24) / 364, 2)." ".Lang::$timeUnits[$s['d'] / 364 == 1 && !$s['h'] ? 'sg' : 'pl'][0];
|
||||
if ($_ && !($_ % 30)) // whole month
|
||||
if ($_ > 1 && !($_ % 30)) // whole month
|
||||
return round(($s['d'] + $s['h'] / 24) / 30, 2)." ".Lang::$timeUnits[$s['d'] / 30 == 1 && !$s['h'] ? 'sg' : 'pl'][1];
|
||||
if ($_ && !($_ % 7)) // whole weeks
|
||||
if ($_ > 1 && !($_ % 7)) // whole weeks
|
||||
return round(($s['d'] + $s['h'] / 24) / 7, 2)." ".Lang::$timeUnits[$s['d'] / 7 == 1 && !$s['h'] ? 'sg' : 'pl'][2];
|
||||
if ($s['d'])
|
||||
return round($s['d'] + $s['h'] / 24, 2)." ".Lang::$timeUnits[$s['d'] == 1 && !$s['h'] ? 'sg' : 'pl'][3];
|
||||
|
||||
Reference in New Issue
Block a user