Skip to content
Snippets Groups Projects
Commit eccd0403 authored by Till Brehm's avatar Till Brehm
Browse files

Fixed: FS#3067 - open_basedir in vhost subdomain can not be changed

parent 4b5da4ef
Branches
Tags
No related merge requests found
......@@ -45,6 +45,7 @@ class sites_web_vhost_subdomain_plugin {
function sites_web_vhost_subdomain_edit($event_name, $page_form) {
global $app, $conf;
if(isset($page_form->dataRecord["parent_domain_id"]) && $page_form->dataRecord["parent_domain_id"] != $page_form->oldDataRecord["parent_domain_id"]) {
// Get configuration for the web system
$app->uses("getconf");
$web_config = $app->getconf->get_server_config($app->functions->intval($page_form->dataRecord['server_id']), 'web');
......@@ -64,5 +65,6 @@ class sites_web_vhost_subdomain_plugin {
$sql = "UPDATE web_domain SET sys_groupid = ".$app->functions->intval($parent_domain['sys_groupid']).",system_user = '$system_user', system_group = '$system_group', document_root = '$document_root', allow_override = '$htaccess_allow_override', php_open_basedir = '$php_open_basedir' WHERE domain_id = ".$page_form->id;
$app->db->query($sql);
}
}
}
......@@ -607,6 +607,8 @@ class page_action extends tform_actions {
function onAfterUpdate() {
global $app, $conf;
//* Update settings when parent domain gets changed
if(isset($this->dataRecord["parent_domain_id"]) && $this->dataRecord["parent_domain_id"] != $this->oldDataRecord["parent_domain_id"]) {
// Get configuration for the web system
$app->uses("getconf");
$web_rec = $app->tform->getDataRecord($this->id);
......@@ -625,6 +627,7 @@ class page_action extends tform_actions {
$sql = "UPDATE web_domain SET sys_groupid = ".$app->functions->intval($this->parent_domain_record['sys_groupid']).",system_user = '$system_user', system_group = '$system_group', document_root = '$document_root', allow_override = '$htaccess_allow_override', php_open_basedir = '$php_open_basedir' WHERE domain_id = ".$this->id;
$app->db->query($sql);
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment