Index: openacs-4/packages/xowiki/tcl/syndicate-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/syndicate-procs.tcl,v diff -u -N -r1.51.2.2 -r1.51.2.3 --- openacs-4/packages/xowiki/tcl/syndicate-procs.tcl 6 Mar 2019 17:55:34 -0000 1.51.2.2 +++ openacs-4/packages/xowiki/tcl/syndicate-procs.tcl 31 Mar 2019 11:18:00 -0000 1.51.2.3 @@ -39,7 +39,7 @@ reporting order is descending by date. The title of the feed is taken from the title, the description is taken from the description field of the folder object. - + @param maxentries maximum number of entries retrieved @param days report entries changed in specified last days @param name_filter include only pages matching the provided regular expression (postgres) @@ -48,7 +48,7 @@ RSS instproc css_link {} { if {${:css} ne ""} { # - # firefox 2.0 appears to overwrite the style info, so one has to use such ugly tricks: + # Firefox 2.0 appears to overwrite the style info, so one has to use such ugly tricks: # http://www.blingblog.info/2006/10/30/firefox-big-browser/ # when we want to use custom style sheets # @@ -86,24 +86,24 @@ [:tag pubDate $pubdate ] \n\ \n } - + RSS instproc tail {} { return "\n\n\n" } - + RSS instproc limit {} { if {[info exists :maxentries] && ${:maxentries} ne ""} { return ${:maxentries} - } + } return "" } RSS instproc extra_where_clause {} { set extra_where_clause "" if {${:name_filter} ne ""} { append extra_where_clause " and ci.name ~ E'${:name_filter}' " - } + } if {${:days} ne ""} { append extra_where_clause "and " \ [::xo::dc since_interval_condition p.publish_date "${:days} days"] @@ -119,7 +119,7 @@ } if {[llength $form_items] == 0} { - # In case, we have no form_items to select on, let the query fail + # In case, we have no form_items to select on, let the query fail # without causing a SQL error. set form_items [list -1] } @@ -139,8 +139,8 @@ } set :link ${:siteurl}[lindex [site_node::get_url_from_object_id -object_id ${:package_id}] 0] - - set :base_table xowiki_pagex + + set :base_table xowiki_pagex set extra_where_clause [:extra_where_clause] if {${:base_table} ne "xowiki_pagex"} { @@ -182,7 +182,7 @@ } Class create Podcast -superclass RSS -parameter { - {subtitle ""} + {subtitle ""} {description ""} {summary ""} {author ""} @@ -207,8 +207,8 @@ } Podcast instproc item { - -author -title -subtitle -description - -link -guid -pubdate + -author -title -subtitle -description + -link -guid -pubdate -mime_type -duration -keywords} { append result \n \ [:tag title $title] \n\ @@ -232,7 +232,7 @@ if {${:subtitle} eq ""} {set :subtitle ${:title}} set :link ${:siteurl}[lindex [site_node::get_url_from_object_id -object_id ${:package_id}] 0] - + set content [:head] set sql [::xo::dc select \ -vars * \ @@ -243,7 +243,7 @@ and ci.publish_status <> 'production' [:extra_where_clause]" \ -orderby "p.pub_date asc" \ -limit [:limit]] - + ::xo::dc foreach get_pages $sql { if {$content_type ne "::xowiki::PodcastItem"} continue if {${:title} eq ""} {set :title $name} @@ -256,11 +256,11 @@ -guid $link -pubdate $pub_date -duration $duration \ -keywords $keywords] } - + append content [:tail] return $content } - + Class create Timeline -superclass XMLSyndication \ -parameter {user_id {limit 1000}} @@ -280,13 +280,13 @@ -vars "ci.name, ci.parent_id, o.creation_user, cr.publish_date, o2.creation_date, \ cr.item_id, cr.title" \ -from "cr_items ci, cr_revisions cr, acs_objects o, acs_objects o2" \ - -where "cr.item_id = ci.item_id and o.object_id = cr.revision_id - and o2.object_id = cr.item_id - and ci.parent_id in ([join $folder_ids ,]) and o.creation_user is not null + -where "cr.item_id = ci.item_id and o.object_id = cr.revision_id + and o2.object_id = cr.item_id + and ci.parent_id in ([join $folder_ids ,]) and o.creation_user is not null $where_clause" \ -orderby "revision_id desc" \ -limit $limit] - + ::xo::dc foreach timeline-get_pages $sql { set publish_date [::xo::db::tcl_date $publish_date tz] set creation_date [::xo::db::tcl_date $creation_date tz] @@ -310,7 +310,7 @@ } # The following loop tries to distinguis between create and modify by age. - # This does not work in cases, where we get just a limited amount + # This does not work in cases, where we get just a limited amount # or restricted entries # if {$limit eq ""} { # foreach i [lreverse [items children]] { @@ -365,20 +365,20 @@ namespace eval ::xowiki { # This is the class representing an RSS client Class create RSS-client -parameter url - + # Constructor for a given URI RSS-client instproc init {} { set XML [:load] if {$XML ne ""} { :parse $XML } } - + RSS-client instproc load { } { set request [util::http::get -url [:url]] set status [dict get $request status] set data [expr {[dict exists $request page] ? [dict get $request page] : ""}] - + #:msg "statuscode = [$r set status_code], content_type=[$r set content_type]" #set f [open /tmp/feed w]; fconfigure $f -translation binary; puts $f [$r set data]; close $f # if {[$r exists status] && [$r set status] eq "canceled"} { @@ -388,7 +388,7 @@ set :errorMessage "$status - $data" } return $data - # the following does not appear to be necessary due to changes in http-client-procs. + # the following does not appear to be necessary due to changes in http-client-procs. #set charset utf-8 #regexp {^<\?xml\s+version\s*=\s*\S+\s+encoding\s*=\s*[\"'](\S+)[\"']} $xml _ charset #ns_log notice "charse=$charset,xml=$xml" @@ -431,7 +431,7 @@ itemPubDate {*[local-name()='pubDate']/text()} itemDesc {*[local-name()='description']/text()} } - + } default { set :errorMessage "Unsupported RSS schema [RSS-client getRSSVersion $doc]" @@ -497,7 +497,7 @@ return "" } } - + RSS-client proc node_text {node xpath} { set n [$node selectNode $xpath] if {$n ne ""} { @@ -550,7 +550,7 @@ RSS-client::channel instproc imgTitle {} { return [::xowiki::RSS-client node_text [:root] [:xpath imgTitle]] } - + # get the image width RSS-client::channel instproc imgWidth {} { return [::xowiki::RSS-client node_text [:root] [:xpath imgWidth]] @@ -559,11 +559,11 @@ RSS-client::channel instproc imgHeight {} { return [::xowiki::RSS-client node_text [:root] [:xpath imgHeight]] } - + } -::xo::library source_dependent +::xo::library source_dependent # # Local variables: