diff options
author | nikrou <nikrou@piwigo.org> | 2009-11-04 20:51:56 +0000 |
---|---|---|
committer | nikrou <nikrou@piwigo.org> | 2009-11-04 20:51:56 +0000 |
commit | bf79a365b5d8c4a81c8655d27ea7ac318808c575 (patch) | |
tree | 6f6285ce4b21d622a848fdc880a5ca5566d6d337 | |
parent | 9a86950ebd665a8529a1c253ce2cf637d8d095a9 (diff) |
bug 1220 : merge from trunk
fix regression when search by author or keyword contains quote
git-svn-id: http://piwigo.org/svn/branches/2.0@4183 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | comments.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/comments.php b/comments.php index 3380cedfa..48cb77a46 100644 --- a/comments.php +++ b/comments.php @@ -187,8 +187,8 @@ $template->set_filenames(array('comments'=>'comments.tpl')); $template->assign( array( 'F_ACTION'=>PHPWG_ROOT_PATH.'comments.php', - 'F_KEYWORD'=> @htmlspecialchars($_GET['keyword'], ENT_QUOTES, 'utf-8'), - 'F_AUTHOR'=> @htmlspecialchars($_GET['author'], ENT_QUOTES, 'utf-8'), + 'F_KEYWORD'=> @htmlspecialchars(stripslashes($_GET['keyword'], ENT_QUOTES, 'utf-8')), + 'F_AUTHOR'=> @htmlspecialchars(stripslashes($_GET['author'], ENT_QUOTES, 'utf-8')), ) ); @@ -257,7 +257,7 @@ else } $query = ' -SELECT COUNT(DISTINCT(id)) +SELECT COUNT(DISTINCT(com.id)) FROM '.IMAGE_CATEGORY_TABLE.' AS ic INNER JOIN '.COMMENTS_TABLE.' AS com ON ic.image_id = com.image_id |