Index: openacs-4/packages/news-aggregator/tcl/aggregator-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news-aggregator/tcl/aggregator-procs-postgresql.xql,v diff -u -r1.5 -r1.6 --- openacs-4/packages/news-aggregator/tcl/aggregator-procs-postgresql.xql 18 Jul 2018 16:36:38 -0000 1.5 +++ openacs-4/packages/news-aggregator/tcl/aggregator-procs-postgresql.xql 18 Jul 2018 17:04:31 -0000 1.6 @@ -45,23 +45,6 @@ - - - select - email, - person__name(party_id) as person_name, - to_char(o.creation_date, 'Dy, DD Mon YYYY HH24:MI:SS TZ') as creation_date, - to_char(o.creation_date, 'Dy, DD Mon YYYY HH24:MI:SS TZ') as modified_date - from - na_aggregators a, - parties p, - acs_objects o - where - a.aggregator_id = o.object_id and a.maintainer_id = p.party_id - and a.aggregator_id = :aggregator_id - - - select Index: openacs-4/packages/news-aggregator/tcl/aggregator-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news-aggregator/tcl/aggregator-procs.tcl,v diff -u -r1.14 -r1.15 --- openacs-4/packages/news-aggregator/tcl/aggregator-procs.tcl 18 Jul 2018 16:41:49 -0000 1.14 +++ openacs-4/packages/news-aggregator/tcl/aggregator-procs.tcl 18 Jul 2018 17:04:31 -0000 1.15 @@ -182,19 +182,27 @@ $doc_node setAttribute "version" "1.1" # Create the xml processing instruction - set pi [$doc createProcessingInstruction "xml" {version="1.0"}] set root [$doc_node selectNode /] - $root insertBefore $pi $doc_node # Create a generator comment - set comment [$doc createComment " eenerated by the [ad_system_name] news aggregator. [ad_url] "] + set comment [$doc createComment " Generated by the [ad_system_name] news aggregator. [ad_url] "] $root insertBefore $comment $doc_node # Fetch the aggregator information - if { ![db_0or1row maintainer ""] } { - return "" + if { ![db_0or1row maintainer { + select to_char(o.creation_date, 'Dy, DD Mon YYYY HH24:MI:SS TZ') as creation_date, + a.maintainer_id + from acs_objects o, na_aggregators a + where o.object_id = a.aggregator_id + and a.aggregator_id = :aggregator_id + }] } { + return } + set email [party::email -party_id $maintainer_id] + set person_name [person::name -person_id $maintainer_id] + set modified_date $creation_date + # Create the header set head_node [$doc createElement head] $doc_node appendChild $head_node @@ -234,7 +242,15 @@ $body_node appendChild $node } - return [$doc asXML] + # apisano 2018-07-18: at least on tDOM 0.8.3, adding the xml + # processing instruction via the api returns an error. Newer tDOM + # versions allow to specify a flag saying whether we want this to + # be included when doing asXML, but we cannot assume one will use + # the latest tDOM and therefore, in order to behave like the + # original author wanted, we append the declaration manually. + set xml {} + append xml \n [$doc asXML] + return $xml } ad_proc -private news_aggregator::aggregator::purge {