Permalink
Browse files

Fixed #3241, Added first_page_in_url option

  • Loading branch information...
1 parent d12b9ba commit 54253738a5532f37c2d24ecfe40584232e71c512 Geert De Deckere committed Sep 16, 2010
Showing with 7 additions and 6 deletions.
  1. +1 −1 classes/kohana/pagination.php
  2. +6 −5 config/pagination.php
View
2 classes/kohana/pagination.php
@@ -187,7 +187,7 @@ public function url($page = 1)
$page = max(1, (int) $page);
// No page number in URLs to first page
- if ($page === 1)
+ if ($page === 1 AND ! $this->config['first_page_in_url'])
{
$page = NULL;
}
View
11 config/pagination.php
@@ -4,11 +4,12 @@
// Application defaults
'default' => array(
- 'current_page' => array('source' => 'query_string', 'key' => 'page'), // source: "query_string" or "route"
- 'total_items' => 0,
- 'items_per_page' => 10,
- 'view' => 'pagination/basic',
- 'auto_hide' => TRUE,
+ 'current_page' => array('source' => 'query_string', 'key' => 'page'), // source: "query_string" or "route"
+ 'total_items' => 0,
+ 'items_per_page' => 10,
+ 'view' => 'pagination/basic',
+ 'auto_hide' => TRUE,
+ 'first_page_in_url' => FALSE,
),
);

0 comments on commit 5425373

Please sign in to comment.