patch #669255
This commit is contained in:
@@ -5,6 +5,11 @@ phpMyAdmin - Changelog
|
|||||||
$Id$
|
$Id$
|
||||||
$Source$
|
$Source$
|
||||||
|
|
||||||
|
2003-02-04 Alexander M. Turek <rabus@users.sourceforge.net>
|
||||||
|
* common.lib.php3: Patch #669255 (Initial DB list for MySQL > 4.0.2), thanks
|
||||||
|
to Charles Bailey (charles_bailey).
|
||||||
|
* ldi_check.php3: Backslahes should be escaped.
|
||||||
|
|
||||||
2003-02-04 Michal Cihar <nijel@users.sourceforge.net>
|
2003-02-04 Michal Cihar <nijel@users.sourceforge.net>
|
||||||
* Documentation.*: Added information about binary checbox when uploading
|
* Documentation.*: Added information about binary checbox when uploading
|
||||||
files.
|
files.
|
||||||
|
@@ -804,19 +804,24 @@ h1 {font-family: sans-serif; font-size: large; font-weight: bold}
|
|||||||
// ... first checks whether the "safe_show_database" is on or not
|
// ... first checks whether the "safe_show_database" is on or not
|
||||||
// (if MYSQL supports this)
|
// (if MYSQL supports this)
|
||||||
if (PMA_MYSQL_INT_VERSION >= 32330) {
|
if (PMA_MYSQL_INT_VERSION >= 32330) {
|
||||||
$local_query = 'SHOW VARIABLES LIKE \'safe_show_database\'';
|
$is_safe_show_dbs = FALSE;
|
||||||
$rs = PMA_mysql_query($local_query, $dbh); // Debug: or PMA_mysqlDie('', $local_query, FALSE);
|
if (PMA_MYSQL_INT_VERSION >= 40002) {
|
||||||
$is_safe_show_dbs = ($rs) ? @PMA_mysql_result($rs, 0, 'Value') : FALSE;
|
$is_safe_show_dbs = 'ON';
|
||||||
|
}
|
||||||
// ... and if on, try to get the available dbs list
|
else {
|
||||||
|
$local_query = 'SHOW VARIABLES LIKE \'safe\\_show\\_database\'';
|
||||||
|
$rs = PMA_mysql_query($local_query, $dbh); // Debug: or PMA_mysqlDie('', $local_query, FALSE);
|
||||||
|
$is_safe_show_dbs = ($rs) ? @PMA_mysql_result($rs, 0, 'Value') : FALSE;
|
||||||
|
mysql_free_result($rs);
|
||||||
|
}
|
||||||
|
// ... and if on, try to get the available dbs list
|
||||||
if ($is_safe_show_dbs && strtoupper($is_safe_show_dbs) != 'OFF') {
|
if ($is_safe_show_dbs && strtoupper($is_safe_show_dbs) != 'OFF') {
|
||||||
$uva_alldbs = mysql_list_dbs($userlink);
|
$uva_alldbs = mysql_list_dbs($userlink);
|
||||||
while ($uva_row = PMA_mysql_fetch_array($uva_alldbs)) {
|
while ($uva_row = PMA_mysql_fetch_array($uva_alldbs)) {
|
||||||
$dblist[] = $uva_row[0];
|
$dblist[] = $uva_row[0];
|
||||||
} // end while
|
} // end while
|
||||||
$dblist_cnt = count($dblist);
|
$dblist_cnt = count($dblist);
|
||||||
unset($uva_alldbs);
|
unset($uva_alldbs);
|
||||||
mysql_free_result($rs);
|
|
||||||
} // end if ($is_safe_show_dbs)
|
} // end if ($is_safe_show_dbs)
|
||||||
} //end if (PMA_MYSQL_INT_VERSION)
|
} //end if (PMA_MYSQL_INT_VERSION)
|
||||||
|
|
||||||
@@ -969,7 +974,7 @@ h1 {font-family: sans-serif; font-size: large; font-weight: bold}
|
|||||||
// 2. Allowed database list is empty -> gets the list of all databases
|
// 2. Allowed database list is empty -> gets the list of all databases
|
||||||
// on the server
|
// on the server
|
||||||
else {
|
else {
|
||||||
$dbs = mysql_list_dbs() or PMA_mysqlDie('', 'mysql_list_dbs()', FALSE, $error_url);
|
$dbs = mysql_list_dbs() or PMA_mysqlDie('', 'SHOW DATABASES;', FALSE, $error_url);
|
||||||
$num_dbs = ($dbs) ? @mysql_num_rows($dbs) : 0;
|
$num_dbs = ($dbs) ? @mysql_num_rows($dbs) : 0;
|
||||||
$real_num_dbs = 0;
|
$real_num_dbs = 0;
|
||||||
for ($i = 0; $i < $num_dbs; $i++) {
|
for ($i = 0; $i < $num_dbs; $i++) {
|
||||||
|
Reference in New Issue
Block a user