Project

General

Profile

Bug #14672 ยป patch2.txt

Administrator Admin, 2005-04-14 20:46

 
--- class.tslib_pibase.php.org2 2005-04-14 20:00:33.850633088 +0200
+++ class.tslib_pibase.php 2005-04-14 20:39:20.153981224 +0200
@@ -384,11 +384,27 @@
<td nowrap="nowrap"><p>'.$this->pi_getLL('pi_list_browseresults_prev','< Previous',TRUE).'</p></td>';
}
}
- for($a=0;$a<$max;$a++) {
- $links[]='
- <td'.($pointer==$a?$this->pi_classParam('browsebox-SCell'):'').' nowrap="nowrap"><p>'.
- $this->pi_linkTP_keepPIvars(trim($this->pi_getLL('pi_list_browseresults_page','Page',TRUE).' '.($a+1)),array('pointer'=>($a?$a:'')),$this->pi_isOnlyFields($this->pi_isOnlyFields)).
- '</p></td>';
+ // Only display the list of result pages if there if more than one list
+ if ($max > 1) {
+ for ($a=0; $a<$max; $a++) {
+ $currentPageText = trim($this->pi_getLL('pi_list_browseresults_page','Page',TRUE).'&nbsp;'.($a+1));
+
+ // Only create a link if we link to a different page than the current one
+ if ($pointer !== $a) {
+ $classParam = '';
+ $linkToPage = $this->pi_linkTP_keepPIvars($currentPageText, array('pointer'=>($a ? $a : '')), $this->pi_isOnlyFields($this->pi_isOnlyFields));
+ } else {
+ $classParam = 'browsebox-SCell';
+ $linkToPage = $currentPageText;
+ }
+
+ $links[]= '
+ <td'
+ .(!empty($classParam) ? $this->pi_classParam($classParam) : '')
+ .'><p>'
+ .$linkToPage
+ .'</p></td>';
+ }
}
if ($pointer<ceil($count/$results_at_a_time)-1) {
$links[]='
    (1-1/1)