Fix possible error on non existant pma db.
This commit is contained in:
@@ -5,6 +5,9 @@ phpMyAdmin - Changelog
|
|||||||
$Id$
|
$Id$
|
||||||
$Source$
|
$Source$
|
||||||
|
|
||||||
|
2004-06-22 Michal Čihař <michal@cihar.com>
|
||||||
|
* libraries/relation.lib.php: Fix possible error on non existant pma db.
|
||||||
|
|
||||||
2004-06-20 Marc Delisle <lem9@users.sourceforge.net>
|
2004-06-20 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
* themes.php: use standard headers. A iso-8859-1 charset was hardcoded
|
* themes.php: use standard headers. A iso-8859-1 charset was hardcoded
|
||||||
in this script, but it's better to use libraries/header_http.inc.php
|
in this script, but it's better to use libraries/header_http.inc.php
|
||||||
|
@@ -31,7 +31,7 @@ error_reporting(E_ALL);
|
|||||||
if ($show_error) {
|
if ($show_error) {
|
||||||
$result = PMA_DBI_query($sql, $dbh, $options);
|
$result = PMA_DBI_query($sql, $dbh, $options);
|
||||||
} else {
|
} else {
|
||||||
$result = PMA_DBI_try_query($sql, $dbh, $options);
|
$result = @PMA_DBI_try_query($sql, $dbh, $options);
|
||||||
} // end if... else...
|
} // end if... else...
|
||||||
PMA_DBI_select_db($db, $dbh);
|
PMA_DBI_select_db($db, $dbh);
|
||||||
|
|
||||||
@@ -106,6 +106,7 @@ function PMA_getRelationsParam($verbose = FALSE)
|
|||||||
$tab_query = 'SHOW TABLES FROM ' . PMA_backquote($cfgRelation['db']);
|
$tab_query = 'SHOW TABLES FROM ' . PMA_backquote($cfgRelation['db']);
|
||||||
$tab_rs = PMA_query_as_cu($tab_query, FALSE, PMA_DBI_QUERY_STORE);
|
$tab_rs = PMA_query_as_cu($tab_query, FALSE, PMA_DBI_QUERY_STORE);
|
||||||
|
|
||||||
|
if ($tab_rs) {
|
||||||
while ($curr_table = @PMA_DBI_fetch_row($tab_rs)) {
|
while ($curr_table = @PMA_DBI_fetch_row($tab_rs)) {
|
||||||
if ($curr_table[0] == $cfg['Server']['bookmarktable']) {
|
if ($curr_table[0] == $cfg['Server']['bookmarktable']) {
|
||||||
$cfgRelation['bookmark'] = $curr_table[0];
|
$cfgRelation['bookmark'] = $curr_table[0];
|
||||||
@@ -123,6 +124,8 @@ function PMA_getRelationsParam($verbose = FALSE)
|
|||||||
$cfgRelation['history'] = $curr_table[0];
|
$cfgRelation['history'] = $curr_table[0];
|
||||||
}
|
}
|
||||||
} // end while
|
} // end while
|
||||||
|
}
|
||||||
|
|
||||||
if (isset($cfgRelation['relation'])) {
|
if (isset($cfgRelation['relation'])) {
|
||||||
$cfgRelation['relwork'] = TRUE;
|
$cfgRelation['relwork'] = TRUE;
|
||||||
if (isset($cfgRelation['table_info'])) {
|
if (isset($cfgRelation['table_info'])) {
|
||||||
|
Reference in New Issue
Block a user