From 1b4ba060046fc3142b88ce027c9e7c52c80235bf Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Sun, 11 Jan 2009 16:19:35 +0000
Subject: [PATCH] Fixed: FS#418 - Mail traffice stats not being generated.

---
 server/cron_daily.php | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/server/cron_daily.php b/server/cron_daily.php
index e186756e7..88caab96b 100644
--- a/server/cron_daily.php
+++ b/server/cron_daily.php
@@ -48,13 +48,13 @@ $app->uses('ini_parser,file,services');
 $sql = "SELECT mailuser_id,maildir FROM mail_user WHERE server_id = ".$conf["server_id"];
 $records = $app->db->queryAllRecords($sql);
 foreach($records as $rec) {
-	if(@is_file($rec["maildir"].'.ispconfig_mailsize')) {
+	if(@is_file($rec["maildir"].'/.ispconfig_mailsize')) {
 		
 		// rename file
-		rename($rec["maildir"].'.ispconfig_mailsize',$rec["maildir"].'.ispconfig_mailsize_save');
+		rename($rec["maildir"].'/.ispconfig_mailsize',$rec["maildir"].'/.ispconfig_mailsize_save');
 		
 		// Read the file
-		$lines = file($rec["maildir"].'.ispconfig_mailsize_save');
+		$lines = file($rec["maildir"].'/.ispconfig_mailsize_save');
 		$mail_traffic = 0;
 		foreach($lines as $line) {
 			$mail_traffic += intval($line);
@@ -62,7 +62,7 @@ foreach($records as $rec) {
 		unset($lines);
 		
 		// Delete backup file
-		if(@is_file($rec["maildir"].'.ispconfig_mailsize_save')) unlink($rec["maildir"].'.ispconfig_mailsize_save');
+		if(@is_file($rec["maildir"].'/.ispconfig_mailsize_save')) unlink($rec["maildir"].'/.ispconfig_mailsize_save');
 		
 		// Save the traffic stats in the sql database
 		$tstamp = date("Y-m");
-- 
GitLab