Skip to content

Commit ff765b8

Browse files
committed
Fix: FS#1690 - Awstats shows only the last month.
1 parent 499037a commit ff765b8

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

server/cron_daily.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -200,15 +200,15 @@ function setConfigVar( $filename, $varName, $varValue ) {
200200
if(is_link('/var/log/ispconfig/httpd/'.$domain.'/yesterday-access.log')) unlink('/var/log/ispconfig/httpd/'.$domain.'/yesterday-access.log');
201201
symlink($logfile,'/var/log/ispconfig/httpd/'.$domain.'/yesterday-access.log');
202202

203-
$awmonth = date("m");
204-
if (date("d") == 1) {
205-
$awmonth = date("m")-1;
206-
}
207-
203+
$awmonth = date("n");
208204
$awyear = date("Y");
209-
if (date("m") == 1) {
210-
$awyear = date("Y")-1;
211-
$awmonth = "12";
205+
206+
if (date("d") == 1) {
207+
$awmonth = date("m")-1;
208+
if (date("m") == 1) {
209+
$awyear = date("Y")-1;
210+
$awmonth = "12";
211+
}
212212
}
213213

214214
// awstats_buildstaticpages.pl -update -config=mydomain.com -lang=en -dir=/var/www/domain.com/web/stats -awstatsprog=/path/to/awstats.pl

0 commit comments

Comments
 (0)