From ff765b864cfad62d4504ae204ed56f57a4a80bb9 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Mon, 12 Sep 2011 06:42:38 -0400
Subject: [PATCH] Fix: FS#1690 - Awstats shows only the last month.
---
server/cron_daily.php | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/server/cron_daily.php b/server/cron_daily.php
index c62923b..7198b95 100644
--- a/server/cron_daily.php
+++ b/server/cron_daily.php
@@ -200,15 +200,15 @@
if(is_link('/var/log/ispconfig/httpd/'.$domain.'/yesterday-access.log')) unlink('/var/log/ispconfig/httpd/'.$domain.'/yesterday-access.log');
symlink($logfile,'/var/log/ispconfig/httpd/'.$domain.'/yesterday-access.log');
- $awmonth = date("m");
- if (date("d") == 1) {
- $awmonth = date("m")-1;
- }
-
+ $awmonth = date("n");
$awyear = date("Y");
- if (date("m") == 1) {
- $awyear = date("Y")-1;
- $awmonth = "12";
+
+ if (date("d") == 1) {
+ $awmonth = date("m")-1;
+ if (date("m") == 1) {
+ $awyear = date("Y")-1;
+ $awmonth = "12";
+ }
}
// awstats_buildstaticpages.pl -update -config=mydomain.com -lang=en -dir=/var/www/domain.com/web/stats -awstatsprog=/path/to/awstats.pl
--
Gitblit v1.9.1