ftimme
2012-11-29 8bd8abe05a5b4af81ccce03394d28a376cbf05b6
interface/web/admin/system_config_edit.php
@@ -105,6 +105,16 @@
      $section = $app->tform->getCurrentTab();
      
      $server_config_array = $app->getconf->get_global_config();
      foreach($app->tform->formDef['tabs'][$section]['fields'] as $key => $field) {
         if ($field['formtype'] == 'CHECKBOX') {
            if($this->dataRecord[$key] == '') {
               // if a checkbox is not set, we set it to the unchecked value
               $this->dataRecord[$key] = $field['value'][0];
            }
         }
      }
      $new_config = $app->tform->encode($this->dataRecord,$section);
        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
@@ -134,7 +144,7 @@
         $app->db->query($sql);
         $sql = "REPLACE INTO domain (sys_userid, sys_groupid, sys_perm_user, sys_perm_group, sys_perm_other, domain ) " .
            "SELECT sys_userid, sys_groupid, sys_perm_user, sys_perm_group, sys_perm_other, domain " .
            "FROM web_domain";
            "FROM web_domain WHERE type NOT IN ('subdomain','vhostsubdomain')";
         $app->db->query($sql);
      }