mirror of
https://github.com/flarum/framework.git
synced 2024-11-28 20:16:08 +08:00
parent
11b740c768
commit
b7617fa5d3
|
@ -6,13 +6,10 @@ class UserSearchResults
|
|||
|
||||
protected $areMoreResults;
|
||||
|
||||
protected $total;
|
||||
|
||||
public function __construct($users, $areMoreResults, $total)
|
||||
public function __construct($users, $areMoreResults)
|
||||
{
|
||||
$this->users = $users;
|
||||
$this->areMoreResults = $areMoreResults;
|
||||
$this->total = $total;
|
||||
}
|
||||
|
||||
public function getUsers()
|
||||
|
@ -20,11 +17,6 @@ class UserSearchResults
|
|||
return $this->users;
|
||||
}
|
||||
|
||||
public function getTotal()
|
||||
{
|
||||
return $this->total;
|
||||
}
|
||||
|
||||
public function areMoreResults()
|
||||
{
|
||||
return $this->areMoreResults;
|
||||
|
|
|
@ -50,8 +50,6 @@ class UserSearcher implements SearcherInterface
|
|||
|
||||
$this->gambits->apply($criteria->query, $this);
|
||||
|
||||
$total = $this->query->count();
|
||||
|
||||
$sort = $criteria->sort ?: $this->defaultSort;
|
||||
|
||||
foreach ($sort as $field => $order) {
|
||||
|
@ -81,6 +79,6 @@ class UserSearcher implements SearcherInterface
|
|||
|
||||
$users->load($load);
|
||||
|
||||
return new UserSearchResults($users, $areMoreResults, $total);
|
||||
return new UserSearchResults($users, $areMoreResults);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user