Commit 1a37954b authored by tbrehm's avatar tbrehm

Fixed: FS#1589 - Webalizer problem wihen time is changing

parent 5320b620
......@@ -116,7 +116,8 @@ $sql = "SELECT domain_id, domain, document_root FROM web_domain WHERE stats_type
$records = $app->db->queryAllRecords($sql);
foreach($records as $rec) {
$yesterday = date('Ymd',time() - 86400);
//$yesterday = date('Ymd',time() - 86400);
$yesterday = date('Ymd',strtotime("-1 day", time()));
$logfile = escapeshellcmd($rec['document_root'].'/log/'.$yesterday.'-access.log');
if(!@is_file($logfile)) {
$logfile = escapeshellcmd($rec['document_root'].'/log/'.$yesterday.'-access.log.gz');
......@@ -156,7 +157,8 @@ $records = $app->db->queryAllRecords($sql);
$web_config = $app->getconf->get_server_config($conf['server_id'], 'web');
foreach($records as $rec) {
$yesterday = date('Ymd',time() - 86400);
//$yesterday = date('Ymd',time() - 86400);
$yesterday = date('Ymd',strtotime("-1 day", time()));
$logfile = escapeshellcmd($rec['document_root'].'/log/'.$yesterday.'-access.log');
if(!@is_file($logfile)) {
$logfile = escapeshellcmd($rec['document_root'].'/log/'.$yesterday.'-access.log.gz');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment