mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-05-05 16:50:12 +00:00
Fixed api query total not taking filters into account
This commit is contained in:
parent
8fb1f7c361
commit
a17b82bdde
2 changed files with 5 additions and 2 deletions
app
|
@ -36,6 +36,8 @@ class ListingResponseBuilder
|
||||||
*/
|
*/
|
||||||
public function toResponse()
|
public function toResponse()
|
||||||
{
|
{
|
||||||
|
$this->applyFiltering($this->query);
|
||||||
|
|
||||||
$total = $this->query->count();
|
$total = $this->query->count();
|
||||||
$data = $this->fetchData();
|
$data = $this->fetchData();
|
||||||
|
|
||||||
|
@ -52,7 +54,6 @@ class ListingResponseBuilder
|
||||||
{
|
{
|
||||||
$this->applyCountAndOffset($this->query);
|
$this->applyCountAndOffset($this->query);
|
||||||
$this->applySorting($this->query);
|
$this->applySorting($this->query);
|
||||||
$this->applyFiltering($this->query);
|
|
||||||
|
|
||||||
return $this->query->get($this->fields);
|
return $this->query->get($this->fields);
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,9 @@ return [
|
||||||
'enabled' => true,
|
'enabled' => true,
|
||||||
'binary' => file_exists(base_path('wkhtmltopdf')) ? base_path('wkhtmltopdf') : env('WKHTMLTOPDF', false),
|
'binary' => file_exists(base_path('wkhtmltopdf')) ? base_path('wkhtmltopdf') : env('WKHTMLTOPDF', false),
|
||||||
'timeout' => false,
|
'timeout' => false,
|
||||||
'options' => [],
|
'options' => [
|
||||||
|
'outline' => true
|
||||||
|
],
|
||||||
'env' => [],
|
'env' => [],
|
||||||
],
|
],
|
||||||
'image' => [
|
'image' => [
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue