Dominik Mueller
2014-01-23 f902e3bd4322fafacbb6f5717ca731db7ae3dba9
interface/web/sites/web_vhost_aliasdomain_edit.php
@@ -347,11 +347,6 @@
            $domain_select .= "<option value=''></option>\r\n";
         }
         $app->tpl->setVar("domain_option", $domain_select);
         $this->dataRecord['domain'] = substr($this->dataRecord["domain"], 0, strlen($this->dataRecord['domain']) - strlen($selected_domain) - 1);
      } else {
         // remove the parent domain part of the domain name before we show it in the text field.
         $this->dataRecord["domain"] = str_replace('.'.$parent_domain["domain"], '', $this->dataRecord["domain"]);
      }
      $app->tpl->setVar("domain", $this->dataRecord["domain"]);
@@ -389,17 +384,14 @@
         $app->uses('ini_parser,getconf');
         $settings = $app->getconf->get_global_config('domains');
         if ($settings['use_domain_module'] == 'y') {
            $domain_check = $app->tools_sites->checkDomainModuleDomain($this->dataRecord['sel_domain']);
            $domain_check = $app->tools_sites->checkDomainModuleDomain($this->dataRecord['domain']);
            if(!$domain_check) {
               // invalid domain selected
               $app->tform->errorMessage .= $app->tform->lng("domain_error_empty")."<br />";
            } else {
               $this->dataRecord['domain'] = $this->dataRecord['domain'] . '.' . $domain_check;
               $this->dataRecord['domain'] = $domain_check;
            }
         } else {
            $this->dataRecord["domain"] = $this->dataRecord["domain"].'.'.$parent_domain["domain"];
         }
         $this->dataRecord['web_folder'] = strtolower($this->dataRecord['web_folder']);
         if(substr($this->dataRecord['web_folder'], 0, 1) === '/') $this->dataRecord['web_folder'] = substr($this->dataRecord['web_folder'], 1);