Fixed: FS#3067 - open_basedir in vhost subdomain can not be changed
| | |
| | | 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'); |
| | |
| | | $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); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | 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); |
| | |
| | | $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); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |