From dad105ff4110e29a584af3e5dc75c0f3cfcd0dce Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Mon, 29 Feb 2016 14:25:26 -0500
Subject: [PATCH] Merge branch 'master' into 'stable-3.1'
---
install/lib/installer_base.lib.php | 7 ++++++-
interface/web/admin/form/server_ip.tform.php | 2 +-
install/lib/update.lib.php | 7 ++++++-
install/uninstall.php | 10 +++++-----
4 files changed, 18 insertions(+), 8 deletions(-)
diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 363a38c..bbf8cfd 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -217,7 +217,12 @@
//* check sql-mode
$check_sql_mode = $this->db->queryOneRecord("SELECT @@sql_mode");
- if ($check_sql_mode['@@sql_mode'] != '' && $check_sql_mode['@@sql_mode'] != 'NO_ENGINE_SUBSTITUTION') die('Wrong SQL-mode. You should use NO_ENGINE_SUBSTITUTION');
+ if ($check_sql_mode['@@sql_mode'] != '' && $check_sql_mode['@@sql_mode'] != 'NO_ENGINE_SUBSTITUTION') {
+ echo "Wrong SQL-mode. You should use NO_ENGINE_SUBSTITUTION. Add\n\n";
+ echo " sql-mode=\"NO_ENGINE_SUBSTITUTION\"\n\n";
+ echo"to the mysqld-section in /etc/mysql/my.cnf and restart mysqld afterwards\n";
+ die();
+ }
//** Create the database
if(!$this->db->query('CREATE DATABASE IF NOT EXISTS ?? DEFAULT CHARACTER SET ?', $conf['mysql']['database'], $conf['mysql']['charset'])) {
diff --git a/install/lib/update.lib.php b/install/lib/update.lib.php
index 9fb57cb..a6bb42d 100644
--- a/install/lib/update.lib.php
+++ b/install/lib/update.lib.php
@@ -125,7 +125,12 @@
//* check sql-mode
$check_sql_mode = $inst->db->queryOneRecord("SELECT @@sql_mode");
- if ($check_sql_mode['@@sql_mode'] != '' && $check_sql_mode['@@sql_mode'] != 'NO_ENGINE_SUBSTITUTION') die('Wrong SQL-mode. You should use NO_ENGINE_SUBSTITUTION');
+ if ($check_sql_mode['@@sql_mode'] != '' && $check_sql_mode['@@sql_mode'] != 'NO_ENGINE_SUBSTITUTION') {
+ echo "Wrong SQL-mode. You should use NO_ENGINE_SUBSTITUTION. Add\n\n";
+ echo " sql-mode=\"NO_ENGINE_SUBSTITUTION\"\n\n";
+ echo"to the mysqld-section in /etc/mysql/my.cnf and restart mysqld afterwards\n";
+ die();
+ }
//* Update $conf array with values from the server.ini that shall be preserved
$tmp = $inst->db->queryOneRecord("SELECT * FROM ?? WHERE server_id = ?", $conf["mysql"]["database"] . '.server', $conf['server_id']);
diff --git a/install/uninstall.php b/install/uninstall.php
index 198a145..c565d46 100644
--- a/install/uninstall.php
+++ b/install/uninstall.php
@@ -36,7 +36,7 @@
require_once "/usr/local/ispconfig/server/lib/config.inc.php";
require_once "/usr/local/ispconfig/server/lib/app.inc.php";
-require "/usr/local/ispconfig/server/mysql_clientdb.conf";
+require "/usr/local/ispconfig/server/lib/mysql_clientdb.conf";
//** The banner on the command line
echo "\n\n".str_repeat('-', 80)."\n";
@@ -51,7 +51,7 @@
echo "\n".str_repeat('-', 80)."\n";
echo "\n\n>> Uninstall \n\n";
-echo "Are you sure you want to uninsatll ISPConfig? [no]";
+echo "Are you sure you want to uninstall ISPConfig? [no]";
$input = fgets(STDIN);
$do_uninstall = rtrim($input);
@@ -62,11 +62,11 @@
$link = mysqli_connect($clientdb_host, $clientdb_user, $clientdb_password);
if (!$link) {
- echo "Unable to connect to the database'.mysql_error($link)";
+ echo "Unable to connect to the database. mysql_error($link)";
} else {
- $result=mysqli_query($link,"DROP DATABASE ".$conf['db_database']."';");
+ $result=mysqli_query($link,"DROP DATABASE ".$conf['db_database'].";");
if (!$result) echo "Unable to remove the ispconfig-database ".$conf['db_database']." ".mysqli_error($link)."\n";
- $result=mysqli_query($link,"DROP USER '".$conf['db_user'] ."';");
+ $result=mysqli_query($link,"DROP USER '".$conf['db_user']."'@'".$conf['db_host']."';");
if (!$result) echo "Unable to remove the ispconfig-database-user ".$conf['db_user']." ".mysqli_error($link)."\n";
}
mysqli_close($link);
diff --git a/interface/web/admin/form/server_ip.tform.php b/interface/web/admin/form/server_ip.tform.php
index 49a59de..cd7190e 100644
--- a/interface/web/admin/form/server_ip.tform.php
+++ b/interface/web/admin/form/server_ip.tform.php
@@ -121,7 +121,7 @@
'ip_address' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
- 'validators' => array ( 0 => array ( 'type' => 'CUSTOME', 'class' => 'validate_server', 'function' => 'check_server_ip',
+ 'validators' => array ( 0 => array ( 'type' => 'CUSTOM', 'class' => 'validate_server', 'function' => 'check_server_ip',
'errmsg'=> 'ip_error_wrong'),
1 => array ( 'type' => 'UNIQUE',
'errmsg'=> 'ip_error_unique'),
--
Gitblit v1.9.1