Commit 6088a9c6 authored by Till Brehm's avatar Till Brehm

#4977 stats Folder created even when Statistics set to none

parent bb00dc2d
......@@ -719,7 +719,7 @@ class apache2_plugin {
if(!is_dir($data['new']['document_root'].'/' . $web_folder)) $app->system->mkdirpath($data['new']['document_root'].'/' . $web_folder);
if(!is_dir($data['new']['document_root'].'/' . $web_folder . '/error') and $data['new']['errordocs']) $app->system->mkdirpath($data['new']['document_root'].'/' . $web_folder . '/error');
if(!is_dir($data['new']['document_root'].'/' . $web_folder . '/stats')) $app->system->mkdirpath($data['new']['document_root'].'/' . $web_folder . '/stats');
if($data['new']['stats_type'] != '' && !is_dir($data['new']['document_root'].'/' . $web_folder . '/stats')) $app->system->mkdirpath($data['new']['document_root'].'/' . $web_folder . '/stats');
//if(!is_dir($data['new']['document_root'].'/'.$log_folder)) exec('mkdir -p '.$data['new']['document_root'].'/'.$log_folder);
if(!is_dir($data['new']['document_root'].'/ssl')) $app->system->mkdirpath($data['new']['document_root'].'/ssl');
if(!is_dir($data['new']['document_root'].'/cgi-bin')) $app->system->mkdirpath($data['new']['document_root'].'/cgi-bin');
......@@ -1005,8 +1005,10 @@ class apache2_plugin {
$app->system->chgrp($data['new']['document_root'].'/web', $groupname);
$app->system->chown($data['new']['document_root'].'/web/error', $username);
$app->system->chgrp($data['new']['document_root'].'/web/error', $groupname);
$app->system->chown($data['new']['document_root'].'/web/stats', $username);
$app->system->chgrp($data['new']['document_root'].'/web/stats', $groupname);
if($data['new']['stats_type'] != '') {
$app->system->chown($data['new']['document_root'].'/web/stats', $username);
$app->system->chgrp($data['new']['document_root'].'/web/stats', $groupname);
}
$app->system->chown($data['new']['document_root'].'/webdav', $username);
$app->system->chgrp($data['new']['document_root'].'/webdav', $groupname);
$app->system->chown($data['new']['document_root'].'/private', $username);
......@@ -1046,8 +1048,10 @@ class apache2_plugin {
$app->system->chgrp($data['new']['document_root'].'/web', $groupname);
$app->system->chown($data['new']['document_root'].'/web/error', $username);
$app->system->chgrp($data['new']['document_root'].'/web/error', $groupname);
$app->system->chown($data['new']['document_root'].'/web/stats', $username);
$app->system->chgrp($data['new']['document_root'].'/web/stats', $groupname);
if($data['new']['stats_type'] != '') {
$app->system->chown($data['new']['document_root'].'/web/stats', $username);
$app->system->chgrp($data['new']['document_root'].'/web/stats', $groupname);
}
$app->system->chown($data['new']['document_root'].'/webdav', $username);
$app->system->chgrp($data['new']['document_root'].'/webdav', $groupname);
}
......@@ -1060,16 +1064,20 @@ class apache2_plugin {
$app->system->chgrp($data['new']['document_root'].'/' . $web_folder, $groupname);
$app->system->chown($data['new']['document_root'].'/' . $web_folder . '/error', $username);
$app->system->chgrp($data['new']['document_root'].'/' . $web_folder . '/error', $groupname);
$app->system->chown($data['new']['document_root'].'/' . $web_folder . '/stats', $username);
$app->system->chgrp($data['new']['document_root'].'/' . $web_folder . '/stats', $groupname);
if($data['new']['stats_type'] != '') {
$app->system->chown($data['new']['document_root'].'/' . $web_folder . '/stats', $username);
$app->system->chgrp($data['new']['document_root'].'/' . $web_folder . '/stats', $groupname);
}
} else {
$app->system->chmod($data['new']['document_root'].'/' . $web_folder, 0755);
$app->system->chown($data['new']['document_root'].'/' . $web_folder, $username);
$app->system->chgrp($data['new']['document_root'].'/' . $web_folder, $groupname);
$app->system->chown($data['new']['document_root'].'/' . $web_folder . '/error', $username);
$app->system->chgrp($data['new']['document_root'].'/' . $web_folder . '/error', $groupname);
$app->system->chown($data['new']['document_root'].'/' . $web_folder . '/stats', $username);
$app->system->chgrp($data['new']['document_root'].'/' . $web_folder . '/stats', $groupname);
if($data['new']['stats_type'] != '') {
$app->system->chown($data['new']['document_root'].'/' . $web_folder . '/stats', $username);
$app->system->chgrp($data['new']['document_root'].'/' . $web_folder . '/stats', $groupname);
}
}
}
......
......@@ -566,7 +566,7 @@ class nginx_plugin {
if(!is_dir($data['new']['document_root'].'/' . $web_folder)) $app->system->mkdirpath($data['new']['document_root'].'/' . $web_folder);
if(!is_dir($data['new']['document_root'].'/' . $web_folder . '/error') and $data['new']['errordocs']) $app->system->mkdirpath($data['new']['document_root'].'/' . $web_folder . '/error');
if(!is_dir($data['new']['document_root'].'/' . $web_folder . '/stats')) $app->system->mkdirpath($data['new']['document_root'].'/' . $web_folder . '/stats');
if($data['new']['stats_type'] != '' && !is_dir($data['new']['document_root'].'/' . $web_folder . '/stats')) $app->system->mkdirpath($data['new']['document_root'].'/' . $web_folder . '/stats');
//if(!is_dir($data['new']['document_root'].'/'.$log_folder)) exec('mkdir -p '.$data['new']['document_root'].'/'.$log_folder);
if(!is_dir($data['new']['document_root'].'/ssl')) $app->system->mkdirpath($data['new']['document_root'].'/ssl');
if(!is_dir($data['new']['document_root'].'/cgi-bin')) $app->system->mkdirpath($data['new']['document_root'].'/cgi-bin');
......@@ -853,8 +853,10 @@ class nginx_plugin {
$app->system->chgrp($data['new']['document_root'].'/web', $groupname);
$app->system->chown($data['new']['document_root'].'/web/error', $username);
$app->system->chgrp($data['new']['document_root'].'/web/error', $groupname);
$app->system->chown($data['new']['document_root'].'/web/stats', $username);
$app->system->chgrp($data['new']['document_root'].'/web/stats', $groupname);
if($data['new']['stats_type'] != '') {
$app->system->chown($data['new']['document_root'].'/web/stats', $username);
$app->system->chgrp($data['new']['document_root'].'/web/stats', $groupname);
}
//$app->system->chown($data['new']['document_root'].'/webdav',$username);
//$app->system->chgrp($data['new']['document_root'].'/webdav',$groupname);
$app->system->chown($data['new']['document_root'].'/private', $username);
......@@ -900,8 +902,10 @@ class nginx_plugin {
$app->system->chgrp($data['new']['document_root'].'/web', $groupname);
$app->system->chown($data['new']['document_root'].'/web/error', $username);
$app->system->chgrp($data['new']['document_root'].'/web/error', $groupname);
$app->system->chown($data['new']['document_root'].'/web/stats', $username);
$app->system->chgrp($data['new']['document_root'].'/web/stats', $groupname);
if($data['new']['stats_type'] != '') {
$app->system->chown($data['new']['document_root'].'/web/stats', $username);
$app->system->chgrp($data['new']['document_root'].'/web/stats', $groupname);
}
//$app->system->chown($data['new']['document_root'].'/webdav',$username);
//$app->system->chgrp($data['new']['document_root'].'/webdav',$groupname);
......@@ -919,16 +923,20 @@ class nginx_plugin {
$app->system->chgrp($data['new']['document_root'].'/' . $web_folder, $groupname);
$app->system->chown($data['new']['document_root'].'/' . $web_folder . '/error', $username);
$app->system->chgrp($data['new']['document_root'].'/' . $web_folder . '/error', $groupname);
$app->system->chown($data['new']['document_root'].'/' . $web_folder . '/stats', $username);
$app->system->chgrp($data['new']['document_root'].'/' . $web_folder . '/stats', $groupname);
if($data['new']['stats_type'] != '') {
$app->system->chown($data['new']['document_root'].'/' . $web_folder . '/stats', $username);
$app->system->chgrp($data['new']['document_root'].'/' . $web_folder . '/stats', $groupname);
}
} else {
$app->system->chmod($data['new']['document_root'].'/' . $web_folder, 0755);
$app->system->chown($data['new']['document_root'].'/' . $web_folder, $username);
$app->system->chgrp($data['new']['document_root'].'/' . $web_folder, $groupname);
$app->system->chown($data['new']['document_root'].'/' . $web_folder . '/error', $username);
$app->system->chgrp($data['new']['document_root'].'/' . $web_folder . '/error', $groupname);
$app->system->chown($data['new']['document_root'].'/' . $web_folder . '/stats', $username);
$app->system->chgrp($data['new']['document_root'].'/' . $web_folder . '/stats', $groupname);
if($data['new']['stats_type'] != '') {
$app->system->chown($data['new']['document_root'].'/' . $web_folder . '/stats', $username);
$app->system->chgrp($data['new']['document_root'].'/' . $web_folder . '/stats', $groupname);
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment