public function SiteAuditCheckWatchdogAge::getResultInfo in Site Audit 7
Same name and namespace in other branches
- 8.2 Check/Watchdog/Age.php \SiteAuditCheckWatchdogAge::getResultInfo()
Implements \SiteAudit\Check\Abstract\getResultInfo().
Overrides SiteAuditCheckAbstract::getResultInfo
File
- Check/
Watchdog/ Age.php, line 36 - Contains \SiteAudit\Check\Watchdog\Age.
Class
- SiteAuditCheckWatchdogAge
- Class SiteAuditCheckWatchdogAge.
Code
public function getResultInfo() {
// If two different days...
if (date('Y-m-d', $this->ageOldest) != date('Y-m-d', $this->ageNewest)) {
return dt('From @from to @to (@days days)', array(
'@from' => date('r', $this->ageOldest),
'@to' => date('r', $this->ageNewest),
'@days' => round(($this->ageNewest - $this->ageOldest) / 86400, 2),
));
}
// Same day; don't calculate number of days.
return dt('From @from to @to', array(
'@from' => date('r', $this->ageOldest),
'@to' => date('r', $this->ageNewest),
));
}