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:
Sarjuuk
2014-07-03 21:49:09 +02:00
parent e0f4e9403a
commit 727d450923
25 changed files with 1735 additions and 1291 deletions

View File

@@ -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];