diff options
author | cash <cash.costello@gmail.com> | 2011-10-29 11:42:05 -0400 |
---|---|---|
committer | cash <cash.costello@gmail.com> | 2011-10-29 11:42:05 -0400 |
commit | f0c096448105b0f88c03221414ded5fb765fe595 (patch) | |
tree | 1d978c9103619dce620a6bc7a981d9f8b3aef180 | |
parent | 3ef53c9c97ec7f8e7022ca357a211531bde983c7 (diff) | |
download | elgg-f0c096448105b0f88c03221414ded5fb765fe595.tar.gz elgg-f0c096448105b0f88c03221414ded5fb765fe595.tar.bz2 |
Refs #3983 merged fix into master
-rw-r--r-- | mod/search/search_hooks.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mod/search/search_hooks.php b/mod/search/search_hooks.php index b302272fb..ab000f6f6 100644 --- a/mod/search/search_hooks.php +++ b/mod/search/search_hooks.php @@ -325,6 +325,8 @@ function search_comments_hook($hook, $type, $value, $params) { $db_prefix = elgg_get_config('dbprefix'); $query = sanitise_string($params['query']); + $limit = sanitise_int($params['limit']); + $offset = sanitise_int($params['offset']); $params['annotation_names'] = array('generic_comment', 'group_topic_post'); $params['joins'] = array( @@ -379,7 +381,7 @@ function search_comments_hook($hook, $type, $value, $params) { AND $a_access $container_and - LIMIT {$params['offset']}, {$params['limit']} + LIMIT $offset, $limit "; $comments = get_data($q); |