migrated a few functions to new Settings class and removed unused function createAWStatsVhost(), refs #1325
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
@@ -28,8 +28,6 @@
|
||||
*/
|
||||
function createAWStatsConf($logFile, $siteDomain, $hostAliases, $customerDocroot, $awstats_params = array()) {
|
||||
|
||||
global $settings;
|
||||
|
||||
// Generation header
|
||||
$header = "## GENERATED BY FROXLOR\n";
|
||||
$header2 = "## Do not remove the line above! This tells Froxlor to update this configuration\n## If you wish to manually change this configuration file, remove the first line to make sure Froxlor won't rebuild this file\n## Generated for domain {SITE_DOMAIN} on " . date('l dS \of F Y h:i:s A') . "\n";
|
||||
@@ -42,8 +40,8 @@ function createAWStatsConf($logFile, $siteDomain, $hostAliases, $customerDocroot
|
||||
makeChownWithNewStats($awstats_params);
|
||||
|
||||
// weird but could happen...
|
||||
if (!is_dir($settings['system']['awstats_conf'])) {
|
||||
safe_exec('mkdir -p '.escapeshellarg($settings['system']['awstats_conf']));
|
||||
if (!is_dir(Settings::Get('system.awstats_conf'))) {
|
||||
safe_exec('mkdir -p '.escapeshellarg(Settings::Get('system.awstats_conf')));
|
||||
}
|
||||
|
||||
// These are the variables we will replace
|
||||
@@ -59,11 +57,11 @@ function createAWStatsConf($logFile, $siteDomain, $hostAliases, $customerDocroot
|
||||
$siteDomain,
|
||||
$hostAliases,
|
||||
$awstats_dir,
|
||||
makeCorrectDir($settings['system']['awstats_conf'])
|
||||
makeCorrectDir(Settings::Get('system.awstats_conf'))
|
||||
);
|
||||
|
||||
// File names
|
||||
$domain_file = makeCorrectFile($settings['system']['awstats_conf'].'/awstats.' . $siteDomain . '.conf');
|
||||
$domain_file = makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.' . $siteDomain . '.conf');
|
||||
$model_file = FROXLOR_INSTALL_DIR.'/templates/misc/awstatsmodel/awstats.froxlor.model.conf';
|
||||
$model_file = makeCorrectFile($model_file);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user