fix deletion of htpasswd/diroption files if no more htpasswds/diroptions are in the database

This commit is contained in:
Michael Kaufmann (d00p)
2010-12-21 10:55:08 +00:00
parent ced64138e8
commit b9d68a17fa
2 changed files with 11 additions and 1 deletions

View File

@@ -1125,6 +1125,11 @@ class apache
$this->wipeOutOldDiroptionConfigs();
}
}
else
{
// no more diroptions, but there might be some file-corpses which have to be removed
$this->wipeOutOldDiroptionConfigs();
}
// Write htpasswds
@@ -1160,6 +1165,11 @@ class apache
$this->logger->logAction(CRON_ACTION, LOG_WARNING, 'WARNING!!! ' . $this->settings['system']['apacheconf_htpasswddir'] . ' is not a directory. htpasswd directory protection is disabled!!!');
}
}
else
{
// no more htpasswds, but there might be some file-corpses which have to be removed
$this->wipeOutOldHtpasswdConfigs();
}
// Write virtualhosts

View File

@@ -68,7 +68,7 @@ while($row = $db->fetch_array($result_tasks))
{
$awstatsclean['dir'] = dir($awstatsclean['path']);
while($awstatsclean['entry'] = $awstatsclean['dir']->read()) {
$awstatsclean['fullentry'] = $awstatsclean['path'].'/'.$awstatsclean['entry'];
$awstatsclean['fullentry'] = makeCorrectFile($awstatsclean['path'].'/'.$awstatsclean['entry']);
/**
* dont do anything if the file does not exist
*/