From 04620b7ff00c194ae1bf4c398ebcb26d5c950b6a Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Tue, 11 Jan 2011 09:54:43 -0500
Subject: [PATCH] Merged these revisions from trunk: 2153-2164,2166,2168,2171

---
 interface/web/sites/web_domain_edit.php |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/interface/web/sites/web_domain_edit.php b/interface/web/sites/web_domain_edit.php
index 3146939..0b47a3f 100644
--- a/interface/web/sites/web_domain_edit.php
+++ b/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();

--
Gitblit v1.9.1