mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 00:54:50 +01:00
limit number of returned rows on link query by default to 100
This commit is contained in:
parent
db29014538
commit
ed657aa533
@ -769,6 +769,11 @@ class Link extends Link\Storage
|
||||
return $apps;
|
||||
}
|
||||
|
||||
/**
|
||||
* Default number of returned rows for Link::query()
|
||||
*/
|
||||
const DEFAULT_NUM_ROWS = 100;
|
||||
|
||||
/**
|
||||
* Searches for a $pattern in the entries of $app
|
||||
*
|
||||
@ -790,6 +795,8 @@ class Link extends Link\Storage
|
||||
echo "<p>Link::query('$app','$pattern') => '$method'</p>\n";
|
||||
echo "Options: "; _debug_array($options);
|
||||
}
|
||||
// limit number of returned rows by default to 100, if no limit is set
|
||||
if (!isset($options['num_rows'])) $options['num_rows'] = self::DEFAULT_NUM_ROWS;
|
||||
|
||||
$result = self::exec($method, array($pattern, &$options));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user