Index: openacs-4/packages/contacts/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/www/index.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/contacts/www/index.tcl 7 Jun 2005 18:55:37 -0000 1.5 +++ openacs-4/packages/contacts/www/index.tcl 10 Jun 2005 09:23:27 -0000 1.6 @@ -85,7 +85,7 @@ } } } elseif { $query_type == "search" } { - lappend search_clause [contact::search::where_clauses -and -search_id $search_id -party_id "parties.party_id" -revision_id "revision_id"] + lappend search_clause [contact::search::where_clause -and -search_id $search_id -party_id "parties.party_id" -revision_id "revision_id"] } @@ -214,12 +214,15 @@ } } +# At least with openacs 5.1.5 list paginator does not use limit and offset commands. +# this will likely be fixed in a future version, but until that is done we do not +# need the overhead of the search clause in the multirow since the pagination proc +# returns a list of valid party_ids the meet the search clause parameters. This +# should increase the speed with which this query can be run db_multirow -unclobber contacts contacts_select {} +set contacts_total_count [contact::search::results_count -search_id $query_id -query $query] -# TOTAL COUNT CODE -set contacts_total_count [db_string contacts_total_count {}] - if { [exists_and_not_null query] && [template::multirow size contacts] == 1 } { if { $query_type == "group" } { set query_name [db_string get_it { select group_name from groups where group_id = :group_id }]