From 7d394a49842c6b074007559e77983e1bc50b674c Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Fri, 1 Aug 2008 20:35:32 +0000 Subject: [PATCH] query was saved urlencoded() in bookmark --- libraries/bookmark.lib.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libraries/bookmark.lib.php b/libraries/bookmark.lib.php index 7c632b071..7d5e28827 100644 --- a/libraries/bookmark.lib.php +++ b/libraries/bookmark.lib.php @@ -126,7 +126,8 @@ function PMA_Bookmark_get($db, $id, $id_field = 'id', $action_bookmark_all = FAL * @uses PMA_Bookmark_getParams() * @global resource the controluser db connection handle * - * @param array the properties of the bookmark to add + * @param array the properties of the bookmark to add; here, + * $fields['query'] is urlencoded * @param boolean whether to make the bookmark available for all users * * @return boolean whether the INSERT succeeds or not @@ -144,7 +145,7 @@ function PMA_Bookmark_save($fields, $all_users = false) } $query = 'INSERT INTO ' . PMA_backquote($cfgBookmark['db']) . '.' . PMA_backquote($cfgBookmark['table']) - . ' (id, dbase, user, query, label) VALUES (NULL, \'' . PMA_sqlAddslashes($fields['dbase']) . '\', \'' . ($all_users ? '' : PMA_sqlAddslashes($fields['user'])) . '\', \'' . PMA_sqlAddslashes($fields['query']) . '\', \'' . PMA_sqlAddslashes($fields['label']) . '\')'; + . ' (id, dbase, user, query, label) VALUES (NULL, \'' . PMA_sqlAddslashes($fields['dbase']) . '\', \'' . ($all_users ? '' : PMA_sqlAddslashes($fields['user'])) . '\', \'' . PMA_sqlAddslashes(urldecode($fields['query'])) . '\', \'' . PMA_sqlAddslashes($fields['label']) . '\')'; return PMA_DBI_query($query, $controllink); } // end of the 'PMA_Bookmark_save()' function