HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Developers' Forum (http://www.howtoforge.com/forums/forumdisplay.php?f=33)
-   -   Mail Stats bug ISPconfig 3.08 RC1 (http://www.howtoforge.com/forums/showthread.php?t=30134)

mghens 9th January 2009 03:02

Mail Stats bug ISPconfig 3.08 RC1
 
in cron_daily.php

Changes I made to get mail stats to work:


--- cron_daily.php 2009-01-08 16:56:23.000000000 -0800
+++ cron_daily.php.orig 2009-01-08 16:55:14.000000000 -0800
@@ -48,13 +48,13 @@
$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 @@
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");
@@ -87,10 +87,11 @@

till 9th January 2009 10:55

Hi, Its great that you post changes. But please post bugs to the bugtracker and not here. Bugs posted here may not get handled and fixed by the developers.

http://bugtracker.ispconfig.org

And please add a description waht the bug was and what you changed.

mghens 9th January 2009 19:44

Ok

I have them in the bugtracker


All times are GMT +2. The time now is 10:49.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.