Fixing mailtraffic cron, fixes traffic graph sorting

Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
This commit is contained in:
Roman Schmerold (BNoiZe)
2013-12-22 10:57:56 +01:00
parent 82f3d8d18c
commit 429f748ad8
5 changed files with 10 additions and 6 deletions

View File

@@ -55,7 +55,7 @@ if (!is_null($month) && !is_null($year)) {
AND `month` = :month
AND `year` = :year
GROUP BY `day`
ORDER BY `day` ASC"
ORDER BY `day` DESC"
);
$params = array(
"customerid" => $userinfo['customerid'],

View File

@@ -156,6 +156,8 @@ class MailLogParser {
}
}
}
fclose($file_handle);
return true;
}
@@ -196,6 +198,8 @@ class MailLogParser {
}
}
}
fclose($file_handle);
return true;
}
@@ -233,6 +237,8 @@ class MailLogParser {
}
}
}
fclose($file_handle);
return true;
}

View File

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

View File

@@ -12,7 +12,7 @@ $(document).ready(function(){
var i = 1;
var links = [];
$('#datalegend').remove();
$('#datatable tr').each(function() {
$('#datatable tr').reverse().each(function() {
var row = $(this);
var day = $(row).children().first().text();
var ftpd = $(row).children().first().next().text();

View File

@@ -12,7 +12,7 @@ $(document).ready(function(){
var i = 1;
var links = [];
$('#datalegend').remove();
$('#datatable tr').each(function() {
$('#datatable tr').reverse().each(function() {
var row = $(this);
var day = $(row).children().first().text();
var ftpd = $(row).children().first().next().text();