Florian Schaal
2014-10-29 872f64b3574232bfafa2d2a33fa3ad44696c44c7
interface/web/sites/web_childdomain_edit.php
@@ -81,7 +81,7 @@
            if(!$app->tform->checkClientLimit('limit_web_aliasdomain', "(type = 'alias' OR type = 'vhostalias')")) {
               $app->error($app->tform->wordbook["limit_web_aliasdomain_txt"]);
            }
            if(!$app->tform->checkResellerLimit('limit_web_aliasdomain', "type = 'alias'")) {
            if(!$app->tform->checkResellerLimit('limit_web_aliasdomain', "(type = 'alias' OR type = 'vhostalias')")) {
               $app->error('Reseller: '.$app->tform->wordbook["limit_web_aliasdomain_txt"]);
            }
         }
@@ -105,7 +105,7 @@
         /*
          * The domain-module is in use.
         */
         $domains = $app->tools_sites->getDomainModuleDomains();
         $domains = $app->tools_sites->getDomainModuleDomains($this->_vhostdomain_type == 'subdomain' ? null : "web_domain", $this->dataRecord["domain"]);
         $domain_select = '';
         $selected_domain = '';
         if(is_array($domains) && sizeof($domains) > 0) {
@@ -165,6 +165,13 @@
   function onSubmit() {
      global $app, $conf;
      // Get the record of the parent domain
      if(!@$this->dataRecord["parent_domain_id"] && $this->id) {
         $tmp = $app->db->queryOneRecord("SELECT parent_domain_id FROM web_domain WHERE domain_id = ".$app->functions->intval($this->id));
         if($tmp) $this->dataRecord["parent_domain_id"] = $tmp['parent_domain_id'];
         unset($tmp);
      }
      // Get the record of the parent domain
      $parent_domain = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ".$app->functions->intval(@$this->dataRecord["parent_domain_id"]) . " AND ".$app->tform->getAuthSQL('r'));
@@ -207,7 +214,7 @@
      //* make sure that the domain is lowercase
      if(isset($this->dataRecord["domain"])) $this->dataRecord["domain"] = strtolower($this->dataRecord["domain"]);
      parent::onSubmit();
   }