Revize 1774
Přidáno uživatelem Ondřej Fibich před asi 12 roky(ů)
freenetis/branches/testing/application/helpers/callback.php | ||
---|---|---|
// don't print days
|
||
unset($interval['days']);
|
||
|
||
// remove all empty keys
|
||
while (current($interval) == 0)
|
||
{
|
||
array_shift($interval);
|
||
}
|
||
|
||
$units = array
|
||
(
|
||
'y' => 'year',
|
||
... | ... | |
$pieces = array();
|
||
foreach ($interval as $unit => $val)
|
||
{
|
||
// do not work with empty values (fixes #412)
|
||
if (empty($val))
|
||
{
|
||
continue;
|
||
}
|
||
|
||
// make plural (if needed) and translate
|
||
$unit = strtolower(__($units[$unit]. (($val > 1) ? 's' : '')));
|
||
|
Také k dispozici: Unified diff
Oprava:
- #412: Chybny vypocet date diff v monitoringu - zacyklene