Index: openacs-4/packages/acs-templating/tcl/paginator-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/paginator-procs.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/acs-templating/tcl/paginator-procs.tcl 8 Jun 2001 01:49:34 -0000 1.4 +++ openacs-4/packages/acs-templating/tcl/paginator-procs.tcl 13 Aug 2002 16:45:49 -0000 1.5 @@ -78,42 +78,42 @@ if { [info exists properties(contextual)] } { - # query contains two columns, one for ID and one for context cue - uplevel 3 "template::query $statement_name __paginator_ids multilist \"$query\"" + # query contains two columns, one for ID and one for context cue + uplevel 3 "set__paginator_ids [db_list_of_lists $statement_name \"$query\"]" - set i 0 - set page_size $properties(pagesize) - set context_ids [list] - - foreach row $ids { + set i 0 + set page_size $properties(pagesize) + set context_ids [list] + + foreach row $ids { - lappend row_ids [lindex $row 0] + lappend row_ids [lindex $row 0] - if { [expr $i % $page_size] == 0 } { - lappend context_ids [lindex $row 1] + if { [expr $i % $page_size] == 0 } { + lappend context_ids [lindex $row 1] + } + incr i } - incr i - } - - set properties(context_ids) $context_ids - cache set $name:$query:context_ids $context_ids $properties(timeout) + + set properties(context_ids) $context_ids + cache set $name:$query:context_ids $context_ids $properties(timeout) - if { [template::util::is_nil row_ids] } { - set row_ids "" - } + if { [template::util::is_nil row_ids] } { + set row_ids "" + } - set properties(row_ids) $row_ids - cache set $name:$query:row_ids $row_ids $properties(timeout) + set properties(row_ids) $row_ids + cache set $name:$query:row_ids $row_ids $properties(timeout) } else { - # no extra column specified for paging by contextual cues - uplevel 3 "template::query $statement_name __paginator_ids onelist \"$query\"" + # no extra column specified for paging by contextual cues + uplevel 3 "set __paginator_ids [db_list $statement_name \"$query\"]" - set properties(row_ids) $ids - cache set $name:$query:row_ids $ids $properties(timeout) + set properties(row_ids) $ids + cache set $name:$query:row_ids $ids $properties(timeout) } } @@ -457,7 +457,7 @@ uplevel 2 " - template::query $statement_name __page_data multirow \"$query\" -eval { + db_multirow __page_data $statement_name \"$query\" { set i \$__page_order(\$row($id_column)) upvar 0 $datasource:\$i __page_sorted_row array set __page_sorted_row \[array get row\]