Till Brehm
2014-04-05 eccd040318ae657b24aeb983e613c1b38cd34e45
Fixed: FS#3067 - open_basedir in vhost subdomain can not be changed
2 files modified
5 ■■■■■ changed files
interface/lib/plugins/sites_web_vhost_subdomain_plugin.inc.php 2 ●●●●● patch | view | raw | blame | history
interface/web/sites/web_vhost_subdomain_edit.php 3 ●●●●● patch | view | raw | blame | history
interface/lib/plugins/sites_web_vhost_subdomain_plugin.inc.php
@@ -45,6 +45,7 @@
    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 @@
        $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);
    }
    }
}
interface/web/sites/web_vhost_subdomain_edit.php
@@ -607,6 +607,8 @@
    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 @@
        $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);
    }
    }
}