From 6a00b4e599f724cbc9a12927c8a0446ef5621028 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Wed, 23 Dec 2015 12:21:09 -0500
Subject: [PATCH] Merge branch 'master' into 'master'

---
 interface/web/sites/web_vhost_domain_edit.php  |    2 +-
 install/install.php                            |    1 +
 install/lib/installer_base.lib.php             |    9 ++++++++-
 interface/web/admin/form/server_ip.tform.php   |    2 +-
 install/sql/incremental/upd_dev_collection.sql |    2 +-
 install/update.php                             |    1 +
 6 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/install/install.php b/install/install.php
index 7b883ad..0236820 100644
--- a/install/install.php
+++ b/install/install.php
@@ -139,6 +139,7 @@
 //** Installer Interface
 //****************************************************************************************************
 $inst = new installer();
+if (!$inst->get_php_version()) die('ISPConfig requieres PHP '.$inst->min_php."\n");
 
 swriteln($inst->lng('    Following will be a few questions for primary configuration so be careful.'));
 swriteln($inst->lng('    Default values are in [brackets] and can be accepted with <ENTER>.'));
diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index c333a5e..fcbab59 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -36,6 +36,7 @@
 	public $conf;
 	public $install_ispconfig_interface = true;
 	public $is_update = false; // true if it is an update, falsi if it is a new install
+	public $min_php = '5.3.3'; // minimal php-version for update / install
 	protected $mailman_group = 'list';
 
 
@@ -129,6 +130,12 @@
 
 	}
 	*/
+
+	//** Detect PHP-Version
+	public function get_php_version() {
+		if(version_compare(PHP_VERSION, $this->min_php, '<')) return false;
+		else return true;
+	}
 
 	//** Detect installed applications
 	public function find_installed_apps() {
@@ -2737,4 +2744,4 @@
 
 }
 
-?>
+?>
\ No newline at end of file
diff --git a/install/sql/incremental/upd_dev_collection.sql b/install/sql/incremental/upd_dev_collection.sql
index 3e80fbd..4c23d5f 100644
--- a/install/sql/incremental/upd_dev_collection.sql
+++ b/install/sql/incremental/upd_dev_collection.sql
@@ -188,4 +188,4 @@
   ADD COLUMN `bootorder` INT(11) NOT NULL DEFAULT '1' AFTER `start_boot`,
   ADD COLUMN `custom` text;
 
-ALTER TABLE `web_domain` ADD `ssl_letsencrypt` enum('n','y') NOT NULL DEFAULT 'n' AFETR `ssl`;
+ALTER TABLE `web_domain` ADD `ssl_letsencrypt` enum('n','y') NOT NULL DEFAULT 'n' AFTER `ssl`;
diff --git a/install/update.php b/install/update.php
index 840a52a..60cd81b 100644
--- a/install/update.php
+++ b/install/update.php
@@ -174,6 +174,7 @@
 $conf['ispconfig_log_priority'] = $conf_old["log_priority"];
 
 $inst = new installer();
+if (!$inst->get_php_version()) die('ISPConfig requieres PHP '.$inst->min_php."\n");
 $inst->is_update = true;
 
 //** Detect the installed applications
diff --git a/interface/web/admin/form/server_ip.tform.php b/interface/web/admin/form/server_ip.tform.php
index c044f2d..0dbdfe1 100644
--- a/interface/web/admin/form/server_ip.tform.php
+++ b/interface/web/admin/form/server_ip.tform.php
@@ -105,7 +105,7 @@
 			'formtype' => 'SELECT',
 			'default' => '',
 			'datasource' => array (  'type' => 'SQL',
-				'querystring' => "SELECT client_id,CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as name FROM client WHERE {AUTHSQL} ORDER BY contact_name",
+				'querystring' => "(SELECT 0 AS client_id, '' AS name) UNION ALL (SELECT client_id,CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as name FROM client WHERE {AUTHSQL} ORDER BY contact_name)",
 				'keyfield'=> 'client_id',
 				'valuefield'=> 'name'
 			),
diff --git a/interface/web/sites/web_vhost_domain_edit.php b/interface/web/sites/web_vhost_domain_edit.php
index c1a726a..6dcd7a3 100644
--- a/interface/web/sites/web_vhost_domain_edit.php
+++ b/interface/web/sites/web_vhost_domain_edit.php
@@ -218,7 +218,7 @@
 			//* 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 = "<option value=''></option>";
+			$ip_select = ($web_config[$server_id]['enable_ip_wildcard'] == 'y')?"<option value='*'>*</option>":"";
 			//$ip_select = "";
 			if(is_array($ips)) {
 				foreach( $ips as $ip) {

--
Gitblit v1.9.1