[LON-CAPA-cvs] cvs: loncom /interface lonsearchcat.pm

www lon-capa-cvs@mail.lon-capa.org
Tue, 29 Nov 2005 20:37:10 -0000


www		Tue Nov 29 15:37:10 2005 EDT

  Modified files:              
    /loncom/interface	lonsearchcat.pm 
  Log:
  Bug #4487: sorted searches returned one too few results per page
  
  
Index: loncom/interface/lonsearchcat.pm
diff -u loncom/interface/lonsearchcat.pm:1.248 loncom/interface/lonsearchcat.pm:1.249
--- loncom/interface/lonsearchcat.pm:1.248	Tue Nov 29 15:25:44 2005
+++ loncom/interface/lonsearchcat.pm	Tue Nov 29 15:37:06 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Search Catalog
 #
-# $Id: lonsearchcat.pm,v 1.248 2005/11/29 20:25:44 www Exp $
+# $Id: lonsearchcat.pm,v 1.249 2005/11/29 20:37:06 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2790,7 +2790,7 @@
         exists($sort_fields{$env{'form.sortfield'}})) {
         $sort_command = $env{'form.sortfield'}.' IS NOT NULL '.
             'ORDER BY '.$env{'form.sortfield'}.' '.$order.
-            '  LIMIT '.($min-1).','.($max-$min);
+            '  LIMIT '.($min-1).','.($max-$min+1);
     }
     my @Results = &Apache::lonmysql::get_rows($table,$sort_command);
     ##