From 5d214e5bd70b73b71df3554a7e5077acdddc2a45 Mon Sep 17 00:00:00 2001 From: "Florian Aders (EleRas)" Date: Thu, 8 Apr 2010 14:36:20 +0000 Subject: [PATCH] fixing bug where old awstats - config will not be removed due to check on wrong panel - name --- scripts/jobs/cron_tasks.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/jobs/cron_tasks.php b/scripts/jobs/cron_tasks.php index 5968b033..cbd560df 100644 --- a/scripts/jobs/cron_tasks.php +++ b/scripts/jobs/cron_tasks.php @@ -54,6 +54,7 @@ while($row = $db->fetch_array($result_tasks)) if ($settings['system']['awstats_enabled'] == '1') { $awstatsclean['header'] = "## GENERATED BY FROXLOR\n"; + $awstatsclean['headerold'] = "## GENERATED BY SYSCP\n"; $awstatsclean['path'] = '/etc/awstats'; /** @@ -74,7 +75,7 @@ while($row = $db->fetch_array($result_tasks)) $awstatsclean['fh'] = fopen($awstatsclean['fullentry'], 'r'); $awstatsclean['headerRead'] = fgets($awstatsclean['fh'], strlen($awstatsclean['header'])+1); fclose($awstatsclean['fh']); - if($awstatsclean['headerRead'] == $awstatsclean['header']) { + if($awstatsclean['headerRead'] == $awstatsclean['header'] || $awstatsclean['headerRead'] == $awstatsclean['headeroƶd']) { $cronlog->logAction(CRON_ACTION, LOG_INFO, "Removing awstats configuration ".$awstatsclean['fullentry']." for re-creation"); @unlink($awstatsclean['fullentry']); }