From 8aeb9f4169c43eb4d8c2c8bb2f89e866ef25bc27 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Sun, 31 Aug 2008 06:31:31 -0400
Subject: [PATCH] Added missing menu titles and form titles to language files.
---
install/lib/installer_base.lib.php | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index cd94f5a..7b38923 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -157,17 +157,17 @@
$from_host = $conf['hostname'];
}
+ // Delete ISPConfig user, in case that it exists
+ $this->db->query("DELETE FROM mysql.user WHERE User = '".$cf['ispconfig_user']."' AND Host = '".$from_host."';");
+ $this->db->query("DELETE FROM mysql.db WHERE Db = '".$cf['database']."' AND Host = '".$from_host."';");
+ $this->db->query('FLUSH PRIVILEGES;');
+
//* Create the ISPConfig database user
$query = 'GRANT SELECT, INSERT, UPDATE, DELETE ON '.$cf['database'].".* "
."TO '".$cf['ispconfig_user']."'@'".$from_host."' "
."IDENTIFIED BY '".$cf['ispconfig_password']."';";
if(!$this->db->query($query)) {
- $tmp = $this->db->queryOneRecord("SELECT * from mysql.user WHERE User = '".$cf['ispconfig_user']."' AND Host = '$from_host'")
- if($tmp["User"] == $cf['ispconfig_user'])) {
- $this->db->query("UPDATE mysql.user SET `password` = PASSWORD('".$cf['ispconfig_password']."') WHERE User = '".$cf['ispconfig_user']."' AND Host = '$from_host'");
- } else {
- $this->error('Unable to create database user: '.$cf['ispconfig_user']);
- }
+ $this->error('Unable to create database user: '.$cf['ispconfig_user'].' Error: '.$this->db->errorMessage);
}
//* Reload database privelages
--
Gitblit v1.9.1