summaryrefslogtreecommitdiffstats
path: root/system/libraries/Pagination.php
diff options
context:
space:
mode:
authoradmin <devnull@localhost>2006-10-08 09:21:12 +0200
committeradmin <devnull@localhost>2006-10-08 09:21:12 +0200
commit10c3f41cbe5bd3bb66fd106cc9fb171ffcc7364b (patch)
tree7477d21d33dd07221425685756561c3bbd386217 /system/libraries/Pagination.php
parent86d4e993d9ea21f28124b80f3d0c161aea681cb6 (diff)
Diffstat (limited to 'system/libraries/Pagination.php')
-rw-r--r--system/libraries/Pagination.php21
1 files changed, 13 insertions, 8 deletions
diff --git a/system/libraries/Pagination.php b/system/libraries/Pagination.php
index efbe6c27f..b29571eee 100644
--- a/system/libraries/Pagination.php
+++ b/system/libraries/Pagination.php
@@ -105,16 +105,21 @@ class CI_Pagination {
{
return '';
}
-
+
// Calculate the total number of pages
- $num_pages = intval($this->total_rows / $this->per_page);
+ $num_pages = ceil($this->total_rows / $this->per_page);
+
+ /*
+ // Calculate the total number of pages
+ $num_pages = intval($this->total_rows / $this->per_page);
+
+ // Use modulus to see if our division has a remainder. If so, add one to our page number.
+ if ($this->total_rows % $this->per_page)
+ {
+ $num_pages++;
+ }
+ */
- // Use modulus to see if our division has a remainder.If so, add one to our page number.
- if ($this->total_rows % $this->per_page)
- {
- $num_pages++;
- }
-
// Is there only one page? Hm... nothing more to do here then.
if ($num_pages == 1)
{