Merging my branch and d00ps branches to trunk
This commit is contained in:
@@ -53,28 +53,47 @@ while($row = $db->fetch_array($result_tasks))
|
||||
|
||||
if($row['type'] == '1')
|
||||
{
|
||||
//dhr: cleanout froxlor-generated awstats configs prior to re-creation
|
||||
if ($settings[system][awstats_enabled] == '1')
|
||||
{
|
||||
$awstatsclean[header] = "## GENERATED BY FROXLOR\n";
|
||||
$awstatsclean[path] = '/etc/awstats';
|
||||
$awstatsclean[dir] = dir($awstatsclean[path]);
|
||||
while($awstatsclean[entry] = $awstatsclean[dir]->read()) {
|
||||
$awstatsclean[fullentry] = $awstatsclean[path].'/'.$awstatsclean[entry];
|
||||
$awstatsclean[fh] = fopen($awstatsclean[fullentry], 'r');
|
||||
$awstatsclean[headerRead] = fgets($awstatsclean[fh], strlen($awstatsclean[header])+1);
|
||||
fclose($awstatsclean[fh]);
|
||||
if($awstatsclean[headerRead] == $awstatsclean[header]) {
|
||||
@unlink($awstatsclean[fullentry]);
|
||||
}
|
||||
}
|
||||
unset($awstatsclean);
|
||||
}
|
||||
//end dhr
|
||||
|
||||
if(!isset($webserver))
|
||||
{
|
||||
if($settings['system']['webserver'] == "apache2")
|
||||
{
|
||||
if($settings['system']['mod_fcgid'] == 1)
|
||||
{
|
||||
$webserver = new apache_fcgid($db, $cronlog, $debugHandler, $settings);
|
||||
$webserver = new apache_fcgid($db, $cronlog, $debugHandler, $idna_convert, $settings);
|
||||
}
|
||||
else
|
||||
{
|
||||
$webserver = new apache($db, $cronlog, $debugHandler, $settings);
|
||||
$webserver = new apache($db, $cronlog, $debugHandler, $idna_convert, $settings);
|
||||
}
|
||||
}
|
||||
elseif($settings['system']['webserver'] == "lighttpd")
|
||||
{
|
||||
if($settings['system']['mod_fcgid'] == 1)
|
||||
{
|
||||
$webserver = new lighttpd_fcgid($db, $cronlog, $debugHandler, $settings);
|
||||
$webserver = new lighttpd_fcgid($db, $cronlog, $debugHandler, $idna_convert, $settings);
|
||||
}
|
||||
else
|
||||
{
|
||||
$webserver = new lighttpd($db, $cronlog, $debugHandler, $settings);
|
||||
{
|
||||
$webserver = new lighttpd($db, $cronlog, $debugHandler, $idna_convert, $settings);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user