aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);