mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 14:41:29 +01:00
Implement options so link_query() can be limited
This commit is contained in:
parent
08b7ab173e
commit
721ccb80d8
@ -924,16 +924,19 @@ class infolog_bo
|
|||||||
* Is called as hook to participate in the linking
|
* Is called as hook to participate in the linking
|
||||||
*
|
*
|
||||||
* @param string $pattern pattern to search
|
* @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
|
* @return array with info_id - title pairs of the matching entries
|
||||||
*/
|
*/
|
||||||
function link_query( $pattern )
|
function link_query( $pattern, Array &$options = array() )
|
||||||
{
|
{
|
||||||
$query = array(
|
$query = array(
|
||||||
'search' => $pattern,
|
'search' => $pattern,
|
||||||
'start' => 0,
|
'start' => $options['start'],
|
||||||
|
'num_rows' => $options['num_rows'],
|
||||||
'subs' => true,
|
'subs' => true,
|
||||||
);
|
);
|
||||||
$ids = $this->search($query);
|
$ids = $this->search($query);
|
||||||
|
$options['total'] = $query['total'];
|
||||||
$content = array();
|
$content = array();
|
||||||
if (is_array($ids))
|
if (is_array($ids))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user