From: Chris W. <la...@us...> - 2005-02-28 04:29:15
|
Update of /cvsroot/openinteract/OpenInteract2/pkg/full_text/OpenInteract2/Action In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23124/OpenInteract2/Action Modified Files: SiteSearch.pm Log Message: don't display the bottom search results menu if there are just a few records to show Index: SiteSearch.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/full_text/OpenInteract2/Action/SiteSearch.pm,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** SiteSearch.pm 5 Dec 2004 08:51:22 -0000 1.16 --- SiteSearch.pm 28 Feb 2005 04:29:04 -0000 1.17 *************** *** 114,131 **** }); ! # This sets 'min' and 'max' properties $results->set_page_boundaries( $current_page, $hits_per_page ); ! $log->is_info && ! $log->info( "Set page boundaries: ", $results->min, ! " - ", $results->max ); $params{search_iterator} = $results->retrieve({ return_type => 'iterator' }); ! $params{total_hits} = $results->num_records; ! $params{total_pages} = $results->find_total_page_count; ! $params{current_page} = $current_page; ! $params{results} = $results; } else { ! $params{total_hits} = 0; $params{total_pages} = 0; } --- 114,137 ---- }); ! # This sets 'min' and 'max' properties... $results->set_page_boundaries( $current_page, $hits_per_page ); ! ! my ( $min, $max ) = ( $results->min, $results->max ); ! $log->is_info && $log->info( "Page boundaries: $min-$max" ); ! $max = ( $results->num_records > $max ) ! ? $max : $results->num_records + 1; ! $log->is_info && $log->info( "Record boundaries: $min-$max" ); $params{search_iterator} = $results->retrieve({ return_type => 'iterator' }); ! $params{total_hits} = $results->num_records; ! $params{total_pages} = $results->find_total_page_count; ! $params{current_page} = $current_page; ! $params{results} = $results; ! $params{lower_bound} = $min; ! $params{upper_bound} = $max; ! $params{hits_on_page} = $max - $min; } else { ! $params{total_hits} = 0; $params{total_pages} = 0; } |