Bug fix: do not display too many numbers when not necessary
authorJean-Marc Coic <jean-marc.coic@m4x.org>
Mon, 28 Mar 2005 17:17:30 +0000 (17:17 +0000)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Thu, 26 Jun 2008 21:28:21 +0000 (23:28 +0200)
git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-522

include/exalead/exalead.smarty.inc.php

index 8456092..ac926b3 100644 (file)
@@ -142,7 +142,7 @@ function _exa_navigation_barre($params, &$smarty){
   }
   else
     $nb_res_per_page = 10;//10 results per page
-  if(!empty($params['max_results'])){
+  if(!empty($params['max_results']) && ((int) $params['max_results'] < $exalead_data->nhits)){
     $nb_hits = (int) $params['max_results'];
   }
   else{