chjacobsen
2011-04-01 e0db878eb71dd40d6c000f1debedad3f16f15ba6
interface/web/sites/web_domain_edit.php
@@ -196,7 +196,8 @@
      }
      $ssl_domain_select = '';
      $ssl_domains = array($this->dataRecord["domain"],'www.'.$this->dataRecord["domain"]);
      $tmp = $app->db->queryOneRecord("SELECT domain FROM web_domain WHERE domain_id = ".$this->id);
      $ssl_domains = array($tmp["domain"],'www.'.$tmp["domain"]);
      if(is_array($ssl_domains)) {
         foreach( $ssl_domains as $ssl_domain) {
            $selected = ($ssl_domain == $this->dataRecord['ssl_domain'])?'SELECTED':'';
@@ -330,10 +331,14 @@
            }
         }
         // Clients may not set the client_group_id, so we unset them if user is not a admin and the client is not a reseller
         if(!$app->auth->has_clients($_SESSION['s']['user']['userid'])) unset($this->dataRecord["client_group_id"]);
      }
      //* make sure that the email domain is lowercase
      if(isset($this->dataRecord["domain"])) $this->dataRecord["domain"] = strtolower($this->dataRecord["domain"]);
      parent::onSubmit();
@@ -342,7 +347,7 @@
   function onAfterInsert() {
      global $app, $conf;
      // make sure that the record belongs to the clinet group and not the admin group when a dmin inserts it
      // make sure that the record belongs to the clinet group and not the admin group when admin inserts it
      // also make sure that the user can not delete domain created by a admin
      if($_SESSION["s"]["user"]["typ"] == 'admin' && isset($this->dataRecord["client_group_id"])) {
         $client_group_id = intval($this->dataRecord["client_group_id"]);