From 8a1f4cf9991515f0ce7b7bcd3dc1c55274ab0370 Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Wed, 20 Jul 2016 12:22:06 -0400
Subject: [PATCH] Do not add www as subdomain to a letsencrypt ssl cert when the domain of the webiste is already www.example.com (and not example.com) even if auto subdomain is set to www.

---
 server/plugins-available/software_update_plugin.inc.php |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/server/plugins-available/software_update_plugin.inc.php b/server/plugins-available/software_update_plugin.inc.php
index bd8159e..640d7a9 100644
--- a/server/plugins-available/software_update_plugin.inc.php
+++ b/server/plugins-available/software_update_plugin.inc.php
@@ -248,7 +248,7 @@
 			//* Connect to the database
 			$link = mysqli_connect($clientdb_host, $clientdb_user, $clientdb_password);
 			if (!$link) {
-				$app->log('Unable to connect to the database'.mysqli_error($link), LOGLEVEL_ERROR);
+				$app->log('Unable to connect to the database'.mysqli_connect_error(), LOGLEVEL_ERROR);
 				return;
 			}
 
@@ -267,7 +267,6 @@
 				$app->log('Unable to create database user'.$db_config['database_user'].' '.mysqli_error($link), LOGLEVEL_ERROR);
 			}
 
-			mysqli_query($link, "FLUSH PRIVILEGES;");
 			mysqli_close($link);
 
 		}

--
Gitblit v1.9.1