From 0afe47aace537ad2521470d1d836b7cfa253efed Mon Sep 17 00:00:00 2001 From: Budi Khoirudin Date: Thu, 2 Feb 2012 12:03:00 +0700 Subject: [PATCH] Fixing Missing 'currentClass' paramater Array in paginatorHelper --- lib/Cake/View/Helper/PaginatorHelper.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/lib/Cake/View/Helper/PaginatorHelper.php b/lib/Cake/View/Helper/PaginatorHelper.php index 7d654faf9cd..8b8806327fc 100644 --- a/lib/Cake/View/Helper/PaginatorHelper.php +++ b/lib/Cake/View/Helper/PaginatorHelper.php @@ -656,7 +656,7 @@ public function numbers($options = array()) { $defaults = array( 'tag' => 'span', 'before' => null, 'after' => null, 'model' => $this->defaultModel(), 'class' => null, - 'modulus' => '8', 'separator' => ' | ', 'first' => null, 'last' => null, 'ellipsis' => '...', + 'modulus' => '8', 'separator' => ' | ', 'first' => null, 'last' => null, 'ellipsis' => '...', 'currentClass' => 'current' ); $options += $defaults; @@ -670,7 +670,7 @@ public function numbers($options = array()) { extract($options); unset($options['tag'], $options['before'], $options['after'], $options['model'], $options['modulus'], $options['separator'], $options['first'], $options['last'], - $options['ellipsis'], $options['class'] + $options['ellipsis'], $options['class'], $options['currentClass'] ); $out = ''; @@ -704,10 +704,13 @@ public function numbers($options = array()) { . $separator; } - $currentClass = 'current'; - if ($class) { - $currentClass .= ' ' . $class; - } + if (!$currentClass) { + $currentClass = 'current'; + + if ($class) { + $currentClass .= ' ' . $class; + } + } $out .= $this->Html->tag($tag, $params['page'], array('class' => $currentClass)); if ($i != $params['pageCount']) { $out .= $separator;