fix usage of sql-server description and info in customer-mysql, thx Sephi

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2013-12-03 22:58:56 +01:00
parent 6c424dff6a
commit 83a77acc02
8 changed files with 59 additions and 18 deletions

View File

@@ -231,10 +231,12 @@ class Database {
// either root or unprivileged user
if (self::$_needroot) {
$caption = $sql_root[self::$_dbserver]['caption'];
$user = $sql_root[self::$_dbserver]['user'];
$password = $sql_root[self::$_dbserver]['password'];
$host = $sql_root[self::$_dbserver]['host'];
} else {
$caption = 'localhost';
$user = $sql["user"];
$password = $sql["password"];
$host = $sql["host"];
@@ -246,7 +248,8 @@ class Database {
'user' => $user,
'passwd' => $password,
'host' => $host,
'db' => $sql["db"]
'db' => $sql["db"],
'caption' => $caption
);
}

View File

@@ -28,7 +28,7 @@ return array(
'type' => 'text',
),
'mysql_server' => array(
'visible' => (1 < count($sql_root) ? true : false),
'visible' => (1 < $count_mysqlservers ? true : false),
'label' => $lng['mysql']['mysql_server'],
'type' => 'select',
'select_var' => $mysql_servers,

View File

@@ -34,10 +34,10 @@ return array(
'value' => $result['description'],
),
'mysql_server' => array(
'visible' => (1 < count($sql_root) ? true : false),
'visible' => (1 < $count_mysqlservers ? true : false),
'label' => $lng['mysql']['mysql_server'],
'type' => 'label',
'value' => $sql_root[$result['dbserver']]['caption']
'value' => $sql_root['caption']
),
'mysql_password' => array(
'label' => $lng['changepassword']['new_password_ifnotempty'],