fixing bug where old awstats - config will not be removed due to check on wrong panel - name

This commit is contained in:
Florian Aders (EleRas)
2010-04-08 14:36:20 +00:00
parent 43fe968ad0
commit 5d214e5bd7

View File

@@ -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']);
}