diff --git a/module/search/model.php b/module/search/model.php index 5fb8555fad..442883203c 100644 --- a/module/search/model.php +++ b/module/search/model.php @@ -266,7 +266,7 @@ class searchModel extends model if($hasUser) { - $users = $this->loadModel('user')->getPairs('realname|noclosed', $appendUsers); + $users = $this->loadModel('user')->getPairs('realname|noclosed', $appendUsers, $this->config->maxCount); $users['$@me'] = $this->lang->search->me; } if($hasProduct) $products = array('' => '') + $this->loadModel('product')->getPairs('', $this->session->project); diff --git a/module/user/control.php b/module/user/control.php index 3ee1712a98..a9f281c40f 100644 --- a/module/user/control.php +++ b/module/user/control.php @@ -1253,6 +1253,7 @@ class user extends control $limit = $this->get->limit; $index = 0; $newUsers = array(); + if(empty($search)) return array(); foreach($users as $account => $realname) { if($index >= $limit) break;