]> BookStack Code Mirror - bookstack/commitdiff
Fixed api query total not taking filters into account
authorDan Brown <redacted>
Sat, 25 Apr 2020 20:37:52 +0000 (21:37 +0100)
committerDan Brown <redacted>
Sat, 25 Apr 2020 20:37:52 +0000 (21:37 +0100)
app/Api/ListingResponseBuilder.php
app/Config/snappy.php

index 942c5d27026a47fc9514a0317faa7bae0d0a2505..5245a5d907e8229d3330443448f013c3243c958f 100644 (file)
@@ -36,6 +36,8 @@ class ListingResponseBuilder
      */
     public function toResponse()
     {
      */
     public function toResponse()
     {
+        $this->applyFiltering($this->query);
+
         $total = $this->query->count();
         $data = $this->fetchData();
 
         $total = $this->query->count();
         $data = $this->fetchData();
 
@@ -52,7 +54,6 @@ class ListingResponseBuilder
     {
         $this->applyCountAndOffset($this->query);
         $this->applySorting($this->query);
     {
         $this->applyCountAndOffset($this->query);
         $this->applySorting($this->query);
-        $this->applyFiltering($this->query);
 
         return $this->query->get($this->fields);
     }
 
         return $this->query->get($this->fields);
     }
index 60c26ffd531d2477b9c236c067388f274368bc9b..f347eda23349264d1b3d4118afadbedde0a5990a 100644 (file)
@@ -13,7 +13,9 @@ return [
         'enabled' => true,
         'binary'  => file_exists(base_path('wkhtmltopdf')) ? base_path('wkhtmltopdf') : env('WKHTMLTOPDF', false),
         'timeout' => false,
         'enabled' => true,
         'binary'  => file_exists(base_path('wkhtmltopdf')) ? base_path('wkhtmltopdf') : env('WKHTMLTOPDF', false),
         'timeout' => false,
-        'options' => [],
+        'options' => [
+            'outline' => true
+        ],
         'env'     => [],
     ],
     'image' => [
         'env'     => [],
     ],
     'image' => [