Index: openacs-4/packages/lars-blogger/www/index.vuh =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/www/index.vuh,v diff -u -r1.4 -r1.4.6.1 --- openacs-4/packages/lars-blogger/www/index.vuh 20 Feb 2004 05:43:02 -0000 1.4 +++ openacs-4/packages/lars-blogger/www/index.vuh 15 Oct 2006 09:00:46 -0000 1.4.6.1 @@ -15,7 +15,24 @@ set summary_context_id [db_string select_user_id $sql] - ns_returnfile 200 text/xml [rss_gen_report_file -summary_context_id $summary_context_id -impl_name pinds_blog_entries] + set datasource [acs_sc_call RssGenerationSubscriber datasource \ + $summary_context_id pinds_blog_entries] + if { [empty_string_p $datasource] } { + ns_log Error "Empty datasource returned from $impl_name for context $summary_context_id in rss_gen_report. Probably because the implementation hasn't been bound." + return + } + set args "" + foreach {name val} $datasource { + regsub -all {[\]\[\{\}""\\$]} $val {\\&} val + append args "-$name \"$val\" " + if { [lsearch [list channel_link channel_title] $name] >= 0 } { + set $name $val + } + } + set xml [apply rss_gen $args] + ns_set put [ns_conn outputheaders] "Content-Disposition" "attachment; filename=\"rss.xml\"" + ReturnHeaders "application/xml" + ns_write $xml } else {