From: x2000lajoie Date: Tue, 10 Jan 2006 20:07:36 +0000 (+0000) Subject: Correction petit bug X-Git-Tag: xorg/0.9.10~132 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=5b774e9e2e19f1cf9019b7948cd2f6f29012196b;p=platal.git Correction petit bug on avait un lien 141-150 quand il y avait que 140 résultats par exemple git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@208 839d8a87-29fc-0310-9880-83ba4fa771e5 --- diff --git a/include/exalead/exalead.smarty.inc.php b/include/exalead/exalead.smarty.inc.php index 390269c..1648dfd 100644 --- a/include/exalead/exalead.smarty.inc.php +++ b/include/exalead/exalead.smarty.inc.php @@ -171,13 +171,13 @@ function _exa_navigation_barre($params, &$smarty){ if ($current_page*$nb_res_per_page >$nb_res_per_page) $res.="query->context}&_s=".(($current_page-2)*$nb_res_per_page)."\">Précédent "; - for($i = $first_number; $i <= $nb_numero + $first_number-1; $i++){ + for($i = $first_number; $i <= $nb_numero + $first_number; $i++){ $k=$nb_res_per_page*($i-1)+1; $j=$nb_res_per_page*$i; if($i == $current_page){ $res .= "$k-$j "; } - else{ + elseif($k<=$nb_hits){ $res .= "query->context}&_s=".(($i-1)*$nb_res_per_page)."\">$k-$j "; } }