Permalink
Browse files

Use a querystring inside of Paginator::link() for creating sort links

  • Loading branch information...
1 parent 1828bb4 commit 15dc71ea2ca2cadf81aea1e82e8020c2e5c19e0f @josegonzalez josegonzalez committed Apr 14, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 View/Helper/ResourceHelper.php
@@ -80,12 +80,12 @@ public function sort($order) {
foreach (Package::$_validShownOrders as $sort => $name) {
if ($sort == $sortField) {
$output[] = $this->Paginator->link($name, array_merge(
- (array) $this->_View->request->query,
+ array('?' => (array) $this->_View->request->query),
compact('sort', 'direction', 'order')
), array('class' => 'active ' . $direction));
} else {
$output[] = $this->Paginator->link($name, array_merge(
- (array) $this->_View->request->query,
+ array('?' => (array) $this->_View->request->query),
array('sort' => $sort, 'direction' => 'desc', 'order' => $order)
));
}

0 comments on commit 15dc71e

Please sign in to comment.