mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
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:
parent
c4f03bf237
commit
80340da3c5
2 changed files with 7 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue