diff --git a/main.php3 b/main.php3 index c13994803..9dd089f67 100755 --- a/main.php3 +++ b/main.php3 @@ -27,7 +27,7 @@ else if (isset($reload) && $reload) { ?> 0) { * Reload mysql (flush privileges) */ if (($server > 0) && isset($mode) && ($mode == 'reload')) { - $result = mysql_query('FLUSH PRIVILEGES') or mysql_die('', 'FLUSH PRIVILEGES', FALSE, 'main.php3?lang=' . $lang . '&server=' . $server); + $result = mysql_query('FLUSH PRIVILEGES'); // Debug: or mysql_die('', 'FLUSH PRIVILEGES', FALSE, 'main.php3?lang=' . $lang . '&server=' . $server); echo '
';
if ($result != 0) {
echo $strMySQLReloaded;
@@ -102,8 +102,14 @@ if ($server == 0 || count($cfgServers) > 1) {
if (!empty($val['port'])) {
echo ':' . $val['port'];
}
+ if (!empty($val['socket'])) {
+ echo ':' . $val['socket'];
+ }
+ // loic1: if 'only_db' is an array and there is more than one
+ // value, displaying such informations may not be a so good
+ // idea
if (!empty($val['only_db'])) {
- echo ' - ' . $val['only_db'];
+ echo ' - ' . (is_array($val['only_db']) ? implode(', ', $val['only_db']) : $val['only_db']);
}
if (!empty($val['user']) && !($val['adv_auth'])) {
echo ' (' . $val['user'] . ')';
@@ -145,7 +151,7 @@ if ($server > 0
0
}
// Does user have global Create priv?
+ $create = FALSE;
$local_query = 'SELECT * FROM mysql.user WHERE User = \'' . sql_addslashes($cfgServer['user']) . '\'';
$rs_usr = mysql_query($local_query, $stdlink);
if ($rs_usr) {
@@ -233,8 +240,8 @@ if ($server > 0
break;
} // end if
} // end while
+ mysql_free_result($rs_usr);
} // end if
- mysql_free_result($rs_usr);
} // end if
// The user is allowed to create a db
@@ -265,7 +272,7 @@ if ($server > 0
-
+
@@ -273,7 +280,7 @@ if ($server > 0
-
+
@@ -281,12 +288,12 @@ if ($server > 0
-
+
@@ -295,12 +302,12 @@ if ($server > 0
echo "\n";
}
- if ($result_usr['Reload_priv'] == 'Y') {
+ if (isset($result_usr) && $result_usr['Reload_priv'] == 'Y') {
?>
-
+
@@ -315,7 +322,7 @@ if ($server > 0
-
+
@@ -339,7 +346,7 @@ if ($server > 0
-
+
(*)
@@ -371,7 +378,7 @@ if ($server > 0
-
+
@@ -380,7 +387,7 @@ if ($server > 0
-
+
@@ -389,7 +396,7 @@ if ($server > 0
-
+
@@ -398,7 +405,7 @@ if ($server > 0
-
+
@@ -411,7 +418,7 @@ if ($server > 0
-
+