Skip to content
Snippets Groups Projects
Commit fc5d8300 authored by Demian Katz's avatar Demian Katz
Browse files

Fixed filtering by list.

parent 9d5944f2
Branches
Tags
No related merge requests found
...@@ -146,10 +146,10 @@ class Results extends BaseResults ...@@ -146,10 +146,10 @@ class Results extends BaseResults
// How many results were there? // How many results were there?
$resource = new ResourceTable(); $resource = new ResourceTable();
$userId = is_null($list) ? $this->user->id : $list->user_id;
$listId = is_null($list) ? null : $list->id;
$rawResults = $resource->getFavorites( $rawResults = $resource->getFavorites(
is_null($list) ? $this->user->id : $list->user_id, $userId, $listId, $this->getTagFilters(), $this->getSort()
isset($list->id) ? $list->id : null,
$this->getTagFilters(), $this->getSort()
); );
$this->resultTotal = count($rawResults); $this->resultTotal = count($rawResults);
...@@ -157,9 +157,7 @@ class Results extends BaseResults ...@@ -157,9 +157,7 @@ class Results extends BaseResults
$limit = $this->getLimit(); $limit = $this->getLimit();
if ($this->resultTotal > $limit) { if ($this->resultTotal > $limit) {
$rawResults = $resource->getFavorites( $rawResults = $resource->getFavorites(
is_null($list) ? $this->user->id : $list->user_id, $userId, $listId, $this->getTagFilters(), $this->getSort(),
isset($list->id) ? $list->id : null,
$this->getTagFilters(), $this->getSort(),
$this->getStartRecord() - 1, $limit $this->getStartRecord() - 1, $limit
); );
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment