Permalink
Browse files

Merge pull request #17 from zmszaman/3.2/develop

Route URL generation
  • Loading branch information...
shadowhand committed Dec 20, 2011
2 parents 91cf490 + b4c795f commit 9bb1fba3d98065f1fd67b6a9868104c25836684f
Showing with 10 additions and 1 deletion.
  1. +10 −1 classes/kohana/pagination.php
@@ -210,7 +210,16 @@ public function url($page = 1)
return URL::site($this->request->uri()).URL::query(array($this->config['current_page']['key'] => $page));
case 'route':
- return URL::site($this->request->uri(array($this->config['current_page']['key'] => $page))).URL::query();
+ return URL::site(
+ $this->request->route()->uri(
+ array(
+ $this->config['current_page']['key'] => $page,
+ 'controller' => Request::current()->controller(),
+ 'action' => Request::current()->action(),
+ 'directory' => Request::current()->directory(),
+ ) + Request::current()->param()
+ )
+ ) . URL::query();
}
return '#';

0 comments on commit 9bb1fba

Please sign in to comment.