Skip to content
Permalink
Browse files

Fix incomplete patch 61dd109

  • Loading branch information...
ADmad committed Oct 14, 2012
1 parent 7ea3ee4 commit 56a0eb04b799bd01b8c9d32698fef1725785ee7f
@@ -1690,6 +1690,16 @@ public function testNumbers() {
);
$this->assertTags($result, $expected);
$result = $this->Paginator->numbers(array('modulus' => 3, 'currentTag' => 'span', 'tag' => 'li'));
$expected = array(
array('li' => array('class' => 'current')), array('span' => array()), '1', '/span', '/li',
' | ',
array('li' => array()), array('a' => array('href' => '/index/page:2')), '2', '/a', '/li',
' | ',
array('li' => array()), array('a' => array('href' => '/index/page:3')), '3', '/a', '/li',
);
$this->assertTags($result, $expected);
$this->Paginator->request->params['paging'] = array(
'Client' => array(
'page' => 2,
@@ -753,7 +753,11 @@ public function numbers($options = array()) {
if ($class) {
$currentClass .= ' ' . $class;
}
$out .= $this->Html->tag($tag, $i, array('class' => $currentClass));
if ($currentTag) {
$out .= $this->Html->tag($tag, $this->Html->tag($currentTag, $i), array('class' => $currentClass));
} else {
$out .= $this->Html->tag($tag, $i, array('class' => $currentClass));
}
} else {
$out .= $this->Html->tag($tag, $this->link($i, array('page' => $i), $options), compact('class'));
}

0 comments on commit 56a0eb0

Please sign in to comment.
You can’t perform that action at this time.