Skip to content

Commit

Permalink
Use own method instead.
Browse files Browse the repository at this point in the history
  • Loading branch information
euromark committed Sep 21, 2014
1 parent 1f8c083 commit afb36ee
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions src/View/Helper/PaginatorHelper.php
Expand Up @@ -85,6 +85,15 @@ class PaginatorHelper extends Helper {
public function __construct(View $View, array $config = array()) {
parent::__construct($View, $config);

$this->setUpUrl();
}

/**
* Merges passed args with URL options.
*
* @return void
*/
public function setUpUrl() {
$this->config(
'options.url',
array_merge($this->request->params['pass'], $this->request->query)
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/View/Helper/PaginatorHelperTest.php
Expand Up @@ -739,7 +739,7 @@ public function testPassedArgsMergingWithUrlOptions() {

$this->Paginator->request->params['pass'] = array(2);
$this->Paginator->request->query = array('page' => 1, 'foo' => 'bar', 'x' => 'y');
$this->Paginator->__construct($this->View);
$this->Paginator->setUpUrl();

$result = $this->Paginator->sort('title');
$expected = array(
Expand Down

0 comments on commit afb36ee

Please sign in to comment.