mirror of
https://github.com/flarum/core.git
synced 2025-05-19 13:51:41 +02:00
Get rid of total count from UserSearcher
Same reasoning as 64e6b7d26cdd0d0aab2e73e0b1d6e5dd5fc9b114
This commit is contained in:
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…
x
Reference in New Issue
Block a user