Fixed mailtraffic not using lastrun time

Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
This commit is contained in:
Roman Schmerold (BNoiZe)
2013-12-20 23:19:50 +01:00
parent a92cdb2926
commit 9acaa94895
2 changed files with 2 additions and 4 deletions

2
.gitignore vendored
View File

@@ -7,5 +7,3 @@ install/update.log
.settings/
*.diff
*~
parse.php

View File

@@ -152,8 +152,8 @@ if (Settings::Get('system.diskquota_enabled')) {
*/
if (Settings::Get("system.mailtraffic_enabled")) {
$stmt = Database::prepare("SELECT lastrun FROM `" . TABLE_PANEL_CRONRUNS . "` WHERE `cronfile` = 'cron_traffic.php'");
$result = Database::pexecute_first($stmt, array());
$mailTrafficCalc = new MailLogParser(0);
$lastRunResult = Database::pexecute_first($stmt, array());
$mailTrafficCalc = new MailLogParser($lastRunResult['lastrun']);
}
$result_stmt = Database::query("SELECT * FROM `" . TABLE_PANEL_CUSTOMERS . "` ORDER BY `customerid` ASC");