mcramer
2012-08-20 c3bf39efc438d869645049e17549c9644a5467c2
interface/web/admin/system_config_edit.php
@@ -88,11 +88,11 @@
        
      $server_config_array = $app->getconf->get_global_config();
      $new_config = $app->tform->encode($this->dataRecord,$section);
        if($section == 'sites' && $new_config['vhost_subdomains'] != $server_config_array['vhost_subdomains']) {
            // check for existing subdomains
            $check = $app->db->queryOneRecord("SELECT COUNT(*) as `cnt` FROM `web_domain` WHERE `type` = 'subdomain' OR `type` = 'vhostsubdomain'");
        if($section == 'sites' && $new_config['vhost_subdomains'] != 'y' && $server_config_array['vhost_subdomains'] == 'y') {
            // check for existing vhost subdomains, if found the mode cannot be disabled
            $check = $app->db->queryOneRecord("SELECT COUNT(*) as `cnt` FROM `web_domain` WHERE `type` = 'vhostsubdomain'");
            if($check['cnt'] > 0) {
                $new_config['vhost_subdomains'] = $server_config_array['vhost_subdomains'];
                $new_config['vhost_subdomains'] = 'y';
            }
        }
        $server_config_array[$section] = $new_config;