From 721ccb80d85b27b19ccfdee306470ddf301b3af0 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Tue, 8 Dec 2009 21:47:49 +0000 Subject: [PATCH] Implement options so link_query() can be limited --- infolog/inc/class.infolog_bo.inc.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/infolog/inc/class.infolog_bo.inc.php b/infolog/inc/class.infolog_bo.inc.php index 5ec3e66836..9c2d95f474 100644 --- a/infolog/inc/class.infolog_bo.inc.php +++ b/infolog/inc/class.infolog_bo.inc.php @@ -924,16 +924,19 @@ class infolog_bo * Is called as hook to participate in the linking * * @param string $pattern pattern to search + * @param array $options Array of options for the search * @return array with info_id - title pairs of the matching entries */ - function link_query( $pattern ) + function link_query( $pattern, Array &$options = array() ) { $query = array( 'search' => $pattern, - 'start' => 0, + 'start' => $options['start'], + 'num_rows' => $options['num_rows'], 'subs' => true, ); $ids = $this->search($query); + $options['total'] = $query['total']; $content = array(); if (is_array($ids)) {