Skip to content

Commit

Permalink
Fixed #3241, Added first_page_in_url option
Browse files Browse the repository at this point in the history
  • Loading branch information
Geert De Deckere committed Sep 16, 2010
1 parent d12b9ba commit 5425373
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion classes/kohana/pagination.php
Expand Up @@ -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;
}
Expand Down
11 changes: 6 additions & 5 deletions config/pagination.php
Expand Up @@ -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.