bug #1579701: error listing bookmarks

when dropping a table and no pmadb
This commit is contained in:
Marc Delisle
2006-11-26 10:57:48 +00:00
parent ad129f6a2f
commit f47f4b69e2
2 changed files with 17 additions and 1 deletions

View File

@@ -8,6 +8,8 @@ $HeadURL$
2006-11-26 Marc Delisle <lem9@users.sourceforge.net>
* tbl_structure.php: bug #1602335, browse distinct values
and name containing a quote
* libraries/bookmark.lib.php: bug #1579701: error listing bookmarks
when dropping a table and no pmadb
2006-11-24 Marc Delisle <lem9@users.sourceforge.net>
* tbl_change.php, Documentation.html: users can now toggle the display

View File

@@ -51,6 +51,10 @@ function PMA_listBookmarks($db, $cfgBookmark)
{
global $controllink;
if (empty($cfgBookmark['db']) || empty($cfgBookmark['table'])) {
return '';
}
$query = 'SELECT label, id FROM '. PMA_backquote($cfgBookmark['db']) . '.' . PMA_backquote($cfgBookmark['table'])
. ' WHERE dbase = \'' . PMA_sqlAddslashes($db) . '\''
. ' AND (user = \'' . PMA_sqlAddslashes($cfgBookmark['user']) . '\''
@@ -203,6 +207,16 @@ function PMA_deleteBookmarks($db, $cfgBookmark, $id)
/**
* Bookmark Support
*/
$cfg['Bookmark'] = PMA_getBookmarksParam();
if (! isset($GLOBALS['cfgRelation'])) {
require_once './libraries/relation.lib.php';
$GLOBALS['cfgRelation'] = PMA_getRelationsParam();
}
if ($GLOBALS['cfgRelation']['bookmarkwork']) {
$cfg['Bookmark'] = PMA_getBookmarksParam();
} else {
$cfg['Bookmark'] = array();
}
?>