Removing parameter merging in pagination links, fixes #4312

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6616 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
nate 2008-04-01 03:44:16 +00:00
parent c4f03bf237
commit 80340da3c5
2 changed files with 7 additions and 1 deletions

View file

@ -297,7 +297,7 @@ class PaginatorHelper extends AppHelper {
if (!empty($disabledTitle) && $disabledTitle !== true) {
$title = $disabledTitle;
}
$options = array_merge($options, $disabledOptions);
$options = array_merge($_defaults, (array)$disabledOptions);
} elseif (!$this->{$check}()) {
return null;
}

View file

@ -88,6 +88,12 @@ class PaginatorTest extends UnitTestCase {
$result = $this->Paginator->next('Next', array(), true);
$expected = '<div>Next</div>';
$this->assertEqual($result, $expected);
$this->Paginator->params['paging']['Article']['prevPage'] = false;
$result = $this->Paginator->prev('prev', array('update'=> 'theList', 'indicator'=> 'loading', 'url'=> array('controller' => 'posts')), null, array('class' => 'disabled'));
$expected = '<div class="disabled">prev</div>';
$this->assertEqual($result, $expected);
}
function testSortLinks() {