From f952077b62632104c975abc432911d8d6f558d99 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Fri, 17 Oct 2003 18:38:56 +0000 Subject: [PATCH] bug 824958 bookmarks not configured --- ChangeLog | 2 ++ libraries/bookmark.lib.php3 | 5 +++++ tbl_query_box.php3 | 9 ++++++++- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 8c08d67e9..baf56a89c 100755 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,8 @@ $Source$ 2003-10-17 Marc Delisle * browse_foreigners.php3: bug 825473: PMA_jsFormat() needed on alert() + * tbl_query_box.php3, libraries/bookmark.lib.php3: + bug 824958: bookmarks not configured 2003-10-16 Michal Cihar * libraries/zip.lib.php3: Calculate offset progressively (patch #824122). diff --git a/libraries/bookmark.lib.php3 b/libraries/bookmark.lib.php3 index d35d9831b..efe34fa31 100644 --- a/libraries/bookmark.lib.php3 +++ b/libraries/bookmark.lib.php3 @@ -91,6 +91,11 @@ if (!defined('PMA_BOOKMARK_LIB_INCLUDED')) { */ function PMA_queryBookmarks($db, $cfgBookmark, $id, $id_field = 'id') { + + if (empty($cfgBookmark['db']) || empty($cfgBookmark['table'])) { + return ''; + } + $query = 'SELECT query FROM ' . PMA_backquote($cfgBookmark['db']) . '.' . PMA_backquote($cfgBookmark['table']) . ' WHERE dbase = \'' . PMA_sqlAddslashes($db) . '\'' . ' AND (user = \'' . PMA_sqlAddslashes($cfgBookmark['user']) . '\'' diff --git a/tbl_query_box.php3 b/tbl_query_box.php3 index dc8b11c92..82a5e676b 100755 --- a/tbl_query_box.php3 +++ b/tbl_query_box.php3 @@ -346,7 +346,14 @@ if (!isset($is_inside_querywindow) || (isset($is_inside_querywindow) && $is_insi