Ver código fonte

Update Models\PM\Model

Update pagination.
Visman 4 anos atrás
pai
commit
e626ab7ad9
1 arquivos alterados com 10 adições e 16 exclusões
  1. 10 16
      app/Models/PM/Model.php

+ 10 - 16
app/Models/PM/Model.php

@@ -412,22 +412,16 @@ class Model extends ParentModel
      */
     protected function getpagination(): array
     {
-        if (
-            $this->page < 1
-            && 1 === $this->numPages
-        ) {
-            return [];
-        } else {
-            return $this->c->Func->paginate(
-                $this->numPages,
-                $this->page,
-                'PMAction',
-                [
-                    'second' => $this->second,
-                    'action' => $this->area,
-                ]
-            );
-        }
+        return $this->c->Func->paginate(
+            $this->numPages,
+            $this->page,
+            'PMAction',
+            [
+                'second' => $this->second,
+                'action' => $this->area,
+                'page'   => 'more1', // нестандарная переменная для page
+            ]
+        );
     }
 
     /**