From c0b133c02e057b6506726b794ba4582bf18ed663 Mon Sep 17 00:00:00 2001 From: kenjis Date: Fri, 22 Apr 2011 19:58:43 +0900 Subject: default value of $total_rows in Pagination class should be number. And fix User Guide Pagination Class's Example which uses string to number variable. --- system/libraries/Pagination.php | 2 +- user_guide/libraries/pagination.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/system/libraries/Pagination.php b/system/libraries/Pagination.php index 1113f862f..cc62e660b 100644 --- a/system/libraries/Pagination.php +++ b/system/libraries/Pagination.php @@ -30,7 +30,7 @@ class CI_Pagination { var $prefix = ''; // A custom prefix added to the path. var $suffix = ''; // A custom suffix added to the path. - var $total_rows = ''; // Total number of items (database results) + var $total_rows = 0; // Total number of items (database results) var $per_page = 10; // Max number of items you want shown per page var $num_links = 2; // Number of "digit" links to show before/after the currently viewed page var $cur_page = 0; // The current page being viewed diff --git a/user_guide/libraries/pagination.html b/user_guide/libraries/pagination.html index e86ec13cc..3c366a69f 100644 --- a/user_guide/libraries/pagination.html +++ b/user_guide/libraries/pagination.html @@ -71,8 +71,8 @@ Pagination Class $this->load->library('pagination');

$config['base_url'] = 'http://example.com/index.php/test/page/';
-$config['total_rows'] = '200';
-$config['per_page'] = '20'; +$config['total_rows'] = 200;
+$config['per_page'] = 20;

$this->pagination->initialize($config); -- cgit v1.2.3-24-g4f1b