Limit link search to 1000 results

This commit is contained in:
Nathan Gray 2014-09-08 19:15:01 +00:00
parent 806165d947
commit ff327c30fe

View File

@ -95,6 +95,7 @@ class etemplate_widget_link extends etemplate_widget
*/
public static function ajax_link_search($app, $type, $pattern, $options=array()) {
$options['type'] = $type ? $type : $options['type'];
if(!$options['num_rows']) $options['num_rows'] = 1000;
$links = egw_link::query($app, $pattern, $options);
$links = array_combine(array_map(create_function('$k', 'return (string)" ".$k;'), array_keys($links)), $links);
$response = egw_json_response::get();