From 9f1749c00f0c9e364d6ea47a90d6d5025216072c Mon Sep 17 00:00:00 2001 From: akira Date: Sat, 31 Dec 2011 16:30:37 +0800 Subject: [PATCH] kohana v3 unset the controller action and directory from _params array, use Route::process_uri to catch them all --- classes/kohana/pagination.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/classes/kohana/pagination.php b/classes/kohana/pagination.php index 669f9c1..fc09579 100644 --- a/classes/kohana/pagination.php +++ b/classes/kohana/pagination.php @@ -90,13 +90,17 @@ public function __construct(array $config = array(), Request $request = NULL) $request = Request::current(); } + //kohana v3 unset the controller action & directory from _params array + //use Request::process_uri to catch them all + $route_uri = Request::process_uri($request->uri()); + $this->_request = $request; // Assign default Route - $this->_route = $request->route(); + $this->_route = $route_uri['route']; // Assign default route params - $this->_route_params = $request->param(); + $this->_route_params = $route_uri['params']; // Pagination setup $this->setup($config);