Sergio Cambra
2014-07-09 3e94c8b7d989a3964a8d0d7c916292d28b9bd0ad
interface/web/dns/dns_soa_edit.php
@@ -82,6 +82,14 @@
   function onShowEnd() {
      global $app, $conf;
      $app->uses('ini_parser,getconf');
      $settings = $app->getconf->get_global_config('domains');
      /*
       * Now we have to check, if we should use the domain-module to select the domain
       * or not
       */
      if ($settings['use_domain_module'] != 'y') {
      // If user is admin, we will allow him to select to whom this record belongs
      if($_SESSION["s"]["user"]["typ"] == 'admin') {
         // Getting Domains of the user
@@ -118,7 +126,7 @@
            $app->tpl->setVar("client_group_id", $client_select);
         }
      $app->tpl->setVar("client_group_id", $client_select);
      }
//   }
@@ -150,12 +158,6 @@
   }
   /*
    * Now we have to check, if we should use the domain-module to select the domain
    * or not
    */
   $app->uses('ini_parser,getconf');
   $settings = $app->getconf->get_global_config('domains');
   if ($settings['use_domain_module'] == 'y') {
      /*
       * The domain-module is in use.
@@ -201,6 +203,9 @@
   $app->uses('ini_parser,getconf');
   $settings = $app->getconf->get_global_config('domains');
   if ($settings['use_domain_module'] == 'y') {
      if ($_SESSION["s"]["user"]["typ"] == 'admin' || $app->auth->has_clients($_SESSION['s']['user']['userid'])) {
         $this->dataRecord['client_group_id'] = $app->tools_sites->getClientIdForDomain($this->dataRecord['origin']);
      }
      $domain_check = $app->tools_sites->checkDomainModuleDomain($this->dataRecord['origin']);
      if(!$domain_check) {
         // invalid domain selected