PSR 7 Fixes

This commit is contained in:
Andy Miller
2019-05-27 19:21:17 +03:00
parent ec74b02590
commit 856be28b3a

View File

@@ -1447,7 +1447,7 @@ class Admin
public function adminNiceTime($date, $long_strings = true)
{
if (empty($date)) {
return $this->translate('GRAV.NICETIME.NO_DATE_PROVIDED', null, true);
return $this->translate('GRAV.NICETIME.NO_DATE_PROVIDED', null);
}
if ($long_strings) {
@@ -1487,17 +1487,17 @@ class Admin
// check validity of date
if (empty($unix_date)) {
return $this->translate('GRAV.NICETIME.BAD_DATE', null, true);
return $this->translate('GRAV.NICETIME.BAD_DATE', null);
}
// is it future date or past date
if ($now > $unix_date) {
$difference = $now - $unix_date;
$tense = $this->translate('GRAV.NICETIME.AGO', null, true);
$tense = $this->translate('GRAV.NICETIME.AGO', null);
} else {
$difference = $unix_date - $now;
$tense = $this->translate('GRAV.NICETIME.FROM_NOW', null, true);
$tense = $this->translate('GRAV.NICETIME.FROM_NOW', null);
}
$len = count($lengths) - 1;
@@ -1519,7 +1519,7 @@ class Admin
}
}
$periods[$j] = $this->translate('GRAV.'.$periods[$j], null, true);
$periods[$j] = $this->translate('GRAV.'.$periods[$j], null);
return "{$difference} {$periods[$j]} {$tense}";
}