From 9a36124b9e879fa71a96859c16edcf7f0bc806d5 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 21 Jul 2011 06:37:10 -0700 Subject: [PATCH] Refactoring Paginator. --- system/paginator.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/system/paginator.php b/system/paginator.php index 7989615e..c73b936c 100644 --- a/system/paginator.php +++ b/system/paginator.php @@ -51,15 +51,15 @@ public function __construct($results, $total, $per_page) $this->results = $results; $this->total = $total; - // Validate and set the current page. If the given page is greater than the last page, the - // current page will be set to the last page. If the given page is not an integer or is less - // than 1, the current page will be set to 1. $this->page = static::page($this->last_page()); } /** * Get the current page from the request query string. * + * The page will be validated and adjusted if it is less than 1 or + * greater than the last page number. + * * @param int $last_page * @return int */