]> git.agnieray.net Git - galette.git/commitdiff
Fix pagination; closes #1732
authorJohan Cwiklinski <johan@x-tnd.be>
Tue, 24 Oct 2023 09:21:07 +0000 (11:21 +0200)
committerJohan Cwiklinski <johan@x-tnd.be>
Wed, 25 Oct 2023 06:01:32 +0000 (08:01 +0200)
galette/lib/Galette/Core/History.php
galette/lib/Galette/Core/MailingHistory.php
galette/lib/Galette/Repository/Contributions.php
galette/lib/Galette/Repository/Members.php
galette/lib/Galette/Repository/SavedSearches.php
galette/lib/Galette/Repository/Transactions.php

index 98ea34c3824107b6df3fa562e6b3685f61adbbeb..4448a597629a8a4c70bbb240342e45908e30d1ff 100644 (file)
@@ -384,9 +384,7 @@ class History
 
             $k = $this->getPk();
             $this->count = $result->$k;
-            if ($this->count > 0) {
-                $this->filters->setCounter($this->count);
-            }
+            $this->filters->setCounter($this->count);
         } catch (Throwable $e) {
             Analog::log(
                 'Cannot count history | ' . $e->getMessage(),
index 413fdbc35b8c3ced010eda790e0f9963cd001caa..d31a13d473aada48e7dfefb121e67126ace32db9 100644 (file)
@@ -275,9 +275,7 @@ class MailingHistory extends History
 
             $k = self::PK;
             $this->count = $result->$k;
-            if ($this->count > 0) {
-                $this->filters->setCounter($this->count);
-            }
+            $this->filters->setCounter($this->count);
         } catch (Throwable $e) {
             Analog::log(
                 'Cannot count history | ' . $e->getMessage(),
index 2f90ee98e51257caddb55836c244f02c86c0e9f2..47d64b06616f9c76ac316384660854cba189e5ff 100644 (file)
@@ -242,10 +242,7 @@ class Contributions
 
             $k = self::PK;
             $this->count = $result->$k;
-
-            if ($this->count > 0) {
-                $this->filters->setCounter($this->count);
-            }
+            $this->filters->setCounter($this->count);
         } catch (Throwable $e) {
             Analog::log(
                 'Cannot count contributions | ' . $e->getMessage(),
index 58f4b7a422d86f90106159fe7dce1214b0d02e5a..825f112a79ad1e29eeb06996f50094f459ded44d 100644 (file)
@@ -888,7 +888,7 @@ class Members
             $results = $zdb->execute($countSelect);
 
             $this->count = (int)$results->current()->count;
-            if (isset($this->filters) && $this->count > 0) {
+            if (isset($this->filters)) {
                 $this->filters->setCounter($this->count);
             }
         } catch (Throwable $e) {
index e3ccf66d146e598a38ef97df649ebf24dfd217da..b271ea754ea71983e1e67c47f713a391556de024 100644 (file)
@@ -191,10 +191,7 @@ class SavedSearches
 
             $k = self::PK;
             $this->count = $result->$k;
-
-            if ($this->count > 0) {
-                $this->filters->setCounter($this->count);
-            }
+            $this->filters->setCounter($this->count);
         } catch (Throwable $e) {
             Analog::log(
                 'Cannot count saved searches | ' . $e->getMessage(),
index cdc3abb9a1b64a0ec3500412c52f05cfa13bae35..4da31b5e9ab035bf09ae06dfc659647b9d227c4c 100644 (file)
@@ -196,9 +196,7 @@ class Transactions
 
             $k = self::PK;
             $this->count = $result->$k;
-            if ($this->count > 0) {
-                $this->filters->setCounter($this->count);
-            }
+            $this->filters->setCounter($this->count);
         } catch (Throwable $e) {
             Analog::log(
                 'Cannot count transactions | ' . $e->getMessage(),