aboutsummaryrefslogtreecommitdiff
path: root/mod/search/search_hooks.php
diff options
context:
space:
mode:
authorcash <cash.costello@gmail.com>2011-10-29 11:42:05 -0400
committercash <cash.costello@gmail.com>2011-10-29 11:42:05 -0400
commitf0c096448105b0f88c03221414ded5fb765fe595 (patch)
tree1d978c9103619dce620a6bc7a981d9f8b3aef180 /mod/search/search_hooks.php
parent3ef53c9c97ec7f8e7022ca357a211531bde983c7 (diff)
downloadelgg-f0c096448105b0f88c03221414ded5fb765fe595.tar.gz
elgg-f0c096448105b0f88c03221414ded5fb765fe595.tar.bz2
Refs #3983 merged fix into master
Diffstat (limited to 'mod/search/search_hooks.php')
-rw-r--r--mod/search/search_hooks.php4
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);