Correction petit bug
authorx2000lajoie <x2000lajoie@839d8a87-29fc-0310-9880-83ba4fa771e5>
Tue, 10 Jan 2006 20:07:36 +0000 (20:07 +0000)
committerx2000lajoie <x2000lajoie@839d8a87-29fc-0310-9880-83ba4fa771e5>
Tue, 10 Jan 2006 20:07:36 +0000 (20:07 +0000)
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

include/exalead/exalead.smarty.inc.php

index 390269c..1648dfd 100644 (file)
@@ -171,13 +171,13 @@ function _exa_navigation_barre($params, &$smarty){
   
   if ($current_page*$nb_res_per_page >$nb_res_per_page)
        $res.="<a href=\"?_C={$exalead_data->query->context}&_s=".(($current_page-2)*$nb_res_per_page)."\">Précédent</a>  ";
-  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 .= "<strong>$k-$j</strong> ";
     }
-    else{
+    elseif($k<=$nb_hits){
        $res .= "<a href=\"?_C={$exalead_data->query->context}&_s=".(($i-1)*$nb_res_per_page)."\">$k-$j</a> ";
    }
   }