From 51a7b5e29a1cbf53e9858a6b11aa0be1f8fc59d2 Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Fri, 27 May 2016 12:14:24 -0400
Subject: [PATCH] Merge branch 'stable-3.1' of git.ispconfig.org:ispconfig/ispconfig3 into stable-3.1

---
 interface/web/sites/web_vhost_domain_edit.php |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/interface/web/sites/web_vhost_domain_edit.php b/interface/web/sites/web_vhost_domain_edit.php
index a007e31..09ff8ab 100644
--- a/interface/web/sites/web_vhost_domain_edit.php
+++ b/interface/web/sites/web_vhost_domain_edit.php
@@ -219,8 +219,9 @@
 			//* Fill the IPv6 select field with the IP addresses that are allowed for this client
 			$sql = "SELECT ip_address FROM server_ip WHERE server_id IN ? AND ip_type = 'IPv6' AND (client_id = 0 OR client_id=?)";
 			$ips = $app->db->queryAllRecords($sql, explode(',', $client['web_servers']), $_SESSION['s']['user']['client_id']);
-			$ip_select = ($web_config[$server_id]['enable_ip_wildcard'] == 'y')?"<option value='*'>*</option>":"";
+			//$ip_select = ($web_config[$server_id]['enable_ip_wildcard'] == 'y')?"<option value='*'>*</option>":"";
 			//$ip_select = "";
+			$ip_select = "<option value=''></option>";
 			if(is_array($ips)) {
 				foreach( $ips as $ip) {
 					$selected = ($ip["ip_address"] == $this->dataRecord["ipv6_address"])?'SELECTED':'';
@@ -1340,8 +1341,9 @@
 		
 		// Letsencrypt can not be activated before the website has been created
 		// So we deactivate it here and add a datalog update in onAfterInsert
-		if(isset($this->dataRecord['ssl_letsencrypt']) && $this->dataRecord['ssl_letsencrypt'] == 'y') {
+		if(isset($this->dataRecord['ssl_letsencrypt']) && $this->dataRecord['ssl_letsencrypt'] == 'y' && isset($this->dataRecord['ssl']) && $this->dataRecord['ssl'] == 'y') {
 			$this->dataRecord['ssl_letsencrypt'] = 'n';
+			$this->dataRecord['ssl'] = 'n';
 			$this->_letsencrypt_on_insert = true;
 		}
 	}
@@ -1421,6 +1423,7 @@
 		if($this->_letsencrypt_on_insert == true) {
 			$tmp = $web_rec;
 			$tmp['ssl_letsencrypt'] = 'y';
+			$tmp['ssl'] = 'y';
 			$app->db->datalogUpdate('web_domain', $tmp, 'domain_id', $this->id);
 			unset($tmp);
 		}

--
Gitblit v1.9.1