* left.php3: on login with std_auth, only the databases on which

the user has rights will be shown (test = @mysql_select_db($dbname)).
This commit is contained in:
Olivier Müller
2001-08-29 17:15:56 +00:00
parent 2051533d0d
commit 615106c70c
2 changed files with 13 additions and 2 deletions

View File

@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
$Id$
$Source$
2001-08-29 Olivier M<>ller <om@omnis.ch>
* left.php3: on login with std_auth, only the databases on which
the user has rights will be shown (tested with @mysql_select_db($dbname)).
2001-08-29 Marc Delisle <lem9@users.sourceforge.net>
* lang/romanian.inc.php3 updates, thanks to Valics Lehel
* Documentation.html, added a FAQ about "too many fields"

View File

@@ -24,7 +24,7 @@ if ($server > 0) {
if ($num_dbs) {
$true_dblist = array();
for ($i = 0; $i < $num_dbs; $i++) {
// $dblink = @mysql_select_db(backquote($dblist[$i]));
// $dblink = @mysql_select_db(backquote($dblist[$i]));
$dblink = @mysql_select_db($dblist[$i]);
if ($dblink) {
$true_dblist[] = $dblist[$i];
@@ -39,9 +39,16 @@ if ($server > 0) {
else {
$dbs = mysql_list_dbs() or mysql_die('', 'mysql_list_dbs()', FALSE, FALSE);
$num_dbs = @mysql_num_rows($dbs);
$real_num_dbs = 0;
for ($i = 0; $i < $num_dbs; $i++) {
$dblist[] = mysql_dbname($dbs, $i);
$db_name_tmp = mysql_dbname($dbs, $i);
$dblink = @mysql_select_db($db_name_tmp);
if ($dblink) {
$dblist[] = $db_name_tmp;
$real_num_dbs++;
}
} // end for
$num_dbs = $real_num_dbs;
} // end else
} else {
$num_dbs = 0;