Changeset 2139 for trunk/system/libraries/Pagination.php
- Timestamp:
- 02/22/2008 12:40:05 PM (11 months ago)
- Files:
-
- 1 modified
-
trunk/system/libraries/Pagination.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/system/libraries/Pagination.php
r2097 r2139 96 96 $this->items_per_page = (int) max(1, $this->items_per_page); 97 97 $this->total_pages = (int) ceil($this->total_items / $this->items_per_page); 98 $this->current_page = (int) min(max(1, Kohana:: instance()->uri->segment($this->uri_segment)), max(1, $this->total_pages));98 $this->current_page = (int) min(max(1, Kohana::$instance->uri->segment($this->uri_segment)), max(1, $this->total_pages)); 99 99 $this->current_first_item = (int) min((($this->current_page - 1) * $this->items_per_page) + 1, $this->total_items); 100 100 $this->current_last_item = (int) min($this->current_first_item + $this->items_per_page - 1, $this->total_items);
