From 88273a930b0d36fb17ba64b5db6ff1052df5da89 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Tue, 15 Nov 2011 03:58:16 -0500
Subject: [PATCH] - Added code to preserve permissions of invoices folder in the installer. - Fixed a problem with german umlauts in monitor. - Added code to update.php and autoupdate.php that checks the mysql root password before the update starts. - Fixed: FS#1848 - changing password of ssh user >>> rights in webXX are changed
---
install/update.php | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/install/update.php b/install/update.php
index 58b366f..769cdce 100644
--- a/install/update.php
+++ b/install/update.php
@@ -139,11 +139,17 @@
$clientdb_user = '';
$clientdb_password = '';
-//** Ask user for mysql admin_password if empty
-if( empty($conf["mysql"]["admin_password"]) ) {
-
- $conf["mysql"]["admin_password"] = $inst->free_query('MySQL root password', $conf['mysql']['admin_password']);
-}
+//** Test mysql root connection
+$finished = false;
+do {
+ if(@mysql_connect($conf["mysql"]["host"],$conf["mysql"]["admin_user"],$conf["mysql"]["admin_password"])) {
+ $finished = true;
+ } else {
+ swriteln($inst->lng('Unable to connect to mysql server').' '.mysql_error());
+ $conf["mysql"]["admin_password"] = $inst->free_query('MySQL root password', $conf['mysql']['admin_password']);
+ }
+} while ($finished == false);
+unset($finished);
/*
* Prepare the dump of the database
--
Gitblit v1.9.1