Index: openacs-4/packages/contacts/lib/contacts.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/lib/contacts.tcl,v diff -u -N -r1.55 -r1.56 --- openacs-4/packages/contacts/lib/contacts.tcl 6 Apr 2006 03:19:51 -0000 1.55 +++ openacs-4/packages/contacts/lib/contacts.tcl 7 Apr 2006 06:56:03 -0000 1.56 @@ -467,11 +467,17 @@ set select_query [template::list::page_get_ids -name "contacts"] } + if { $format == "csv" } { + set extend_format "text" + } else { + set extend_format "html" + } contacts::multirow \ -extend $extended_columns \ -multirow contacts \ - -select_query $select_query + -select_query $select_query \ + -format $extend_format list::write_output -name contacts @@ -495,13 +501,18 @@ } # set select_query "select p[ad_conn user_id].party_id from parties p[ad_conn user_id]" + if { $format == "csv" } { + set extend_format "text" + } else { + set extend_format "html" + } + contacts::multirow \ -extend $extended_columns \ -multirow contacts \ - -select_query $select_query - + -select_query $select_query \ + -format $extend_format - template::list::create \ -html {width 100%} \ -name "report" \ Index: openacs-4/packages/contacts/tcl/contacts-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/tcl/contacts-procs.tcl,v diff -u -N -r1.76 -r1.77 --- openacs-4/packages/contacts/tcl/contacts-procs.tcl 3 Apr 2006 18:26:05 -0000 1.76 +++ openacs-4/packages/contacts/tcl/contacts-procs.tcl 7 Apr 2006 06:56:04 -0000 1.77 @@ -111,6 +111,7 @@ {-multirow} {-select_query} {-party_id_column "party_id"} + {-format "html"} } { This procedure extends a contacts multirow by the type.key pairs specified as a list as the extend param. The supplied select query will return a list of @@ -120,10 +121,13 @@ this procedure then takes that list of lists and matches values with parties and extends the multirow provided with those values } { + if { $format ne "text" } { + set format "html" + } foreach id $extend { set ${id}__list "" regexp {^(.*?)__(.*)$} $id match type key - set results [callback contacts::multirow::extend -type $type -key $key -select_query $select_query] + set results [callback contacts::multirow::extend -type $type -key $key -select_query $select_query -format $format] foreach result $results { if { $result ne "" } { array set "${id}__array" $result