Reverting [6795] as it changes existing behavior

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6796 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
mariano.iglesias 2008-05-10 18:53:15 +00:00
parent df24fff1a2
commit 751a1b7cf7
2 changed files with 4 additions and 7 deletions

View file

@ -311,10 +311,7 @@ class PaginatorHelper extends AppHelper {
if ($this->{$check}()) {
return $this->link($title, $url, array_merge($options, array('escape' => $escape)));
} else {
if ($escape) {
$title = h($title);
}
return sprintf('<span%s>%s</span>', $this->_parseAttributes($options), $title);
return $this->Html->div(null, $title, $options, $escape);
}
}
/**

View file

@ -85,12 +85,12 @@ class PaginatorTest extends UnitTestCase {
$this->Paginator->params['paging']['Article']['nextPage'] = false;
$this->Paginator->params['paging']['Article']['page'] = 1;
$result = $this->Paginator->next('Next', array(), true);
$expected = '<span>Next</span>';
$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 = '<span class="disabled">prev</span>';
$expected = '<div class="disabled">prev</div>';
$this->assertEqual($result, $expected);
}
@ -202,7 +202,7 @@ class PaginatorTest extends UnitTestCase {
'options' => array('page' => 1, 'limit' => 3, 'order' => array('Client.name' => 'DESC'), 'conditions' => array()))
);
$result = $this->Paginator->prev('<< Previous', null, null, array('class' => 'disabled'));
$expected = '<span class="disabled">&lt;&lt; Previous</span>';
$expected = '<div class="disabled">&lt;&lt; Previous</div>';
$this->assertEqual($result, $expected);
$this->Paginator->params['paging']['Client']['page'] = 2;