Skip to content

Commit f5fa1ab

Browse files
author
Chris Burke
committed
Update next/prev links to respect disable title and escape options
1 parent 361789c commit f5fa1ab

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

View/Helper/BoostCakePaginatorHelper.php

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,14 @@ public function prev($title = null, $options = array(), $disabledTitle = null, $
9191
}
9292
unset($options['disabled']);
9393

94-
return parent::prev($title, $options, $this->link($title), array_merge($options, array(
94+
if (empty($disabledTitle)) {
95+
$disabledTitle = $title;
96+
}
97+
$disabledTitle = $this->link($disabledTitle, array(), array(
98+
'escape' => Hash::get($disabledOptions, 'escape')
99+
));
100+
101+
return parent::prev($title, $options, $disabledTitle, array_merge($options, array(
95102
'escape' => false,
96103
'class' => $disabled,
97104
)));
@@ -118,7 +125,14 @@ public function next($title = null, $options = array(), $disabledTitle = null, $
118125
}
119126
unset($options['disabled']);
120127

121-
return parent::next($title, $options, $this->link($title), array_merge($options, array(
128+
if (empty($disabledTitle)) {
129+
$disabledTitle = $title;
130+
}
131+
$disabledTitle = $this->link($disabledTitle, array(), array(
132+
'escape' => Hash::get($disabledOptions, 'escape')
133+
));
134+
135+
return parent::next($title, $options, $disabledTitle, array_merge($options, array(
122136
'escape' => false,
123137
'class' => $disabled,
124138
)));

0 commit comments

Comments
 (0)