Handle traffic which may be from last year

Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
This commit is contained in:
Roman Schmerold (BNoiZe)
2014-01-05 17:26:42 +01:00
parent c288d31762
commit d5df53bb60

View File

@@ -249,6 +249,8 @@ class MailLogParser {
* @param int traffic
*/
private function _addDomainTraffic($domain, $traffic, $timestamp) {
if ($timestamp < ($this->startTime + 60 * 60 * 24)) {
// Only add traffic if it's not in the future!
$date = date("Y-m-d", $timestamp);
if (in_array($domain, $this->myDomains)) {
if (array_key_exists($domain, $this->domainTraffic) && array_key_exists($date, $this->domainTraffic[$domain])) {
@@ -262,6 +264,8 @@ class MailLogParser {
}
}
}
/**
* getLogTimestamp