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 -N -r1.15 -r1.16 --- openacs-4/packages/news-aggregator/tcl/aggregator-procs.tcl 18 Jul 2018 17:04:31 -0000 1.15 +++ openacs-4/packages/news-aggregator/tcl/aggregator-procs.tcl 2 Apr 2019 10:54:02 -0000 1.16 @@ -133,8 +133,8 @@ } # 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 + # processing instruction via the API returns an error. Newer tDOM + # versions allow one 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. @@ -196,7 +196,7 @@ where o.object_id = a.aggregator_id and a.aggregator_id = :aggregator_id }] } { - return + return } set email [party::email -party_id $maintainer_id] @@ -207,44 +207,44 @@ set head_node [$doc createElement head] $doc_node appendChild $head_node set headers [list \ - [list title "mySubscriptions"] \ - [list dateCreated $creation_date] \ - [list dateModified $modified_date] \ - [list ownerName $person_name] \ - [list ownerEmail $email] \ - [list expansionState ""] \ - [list vertScrollState "1"] \ - [list windowTop 295] \ - [list windowLeft 319] \ - [list windowBottom 495] \ - [list windowRight 704]] + [list title "mySubscriptions"] \ + [list dateCreated $creation_date] \ + [list dateModified $modified_date] \ + [list ownerName $person_name] \ + [list ownerEmail $email] \ + [list expansionState ""] \ + [list vertScrollState "1"] \ + [list windowTop 295] \ + [list windowLeft 319] \ + [list windowBottom 495] \ + [list windowRight 704]] foreach header $headers { set node [$doc createElement [lindex $header 0]] - set text_node [$doc createTextNode [lindex $header 1]] - $node appendChild $text_node - $head_node appendChild $node + set text_node [$doc createTextNode [lindex $header 1]] + $node appendChild $text_node + $head_node appendChild $node } set body_node [$doc createElement "body"] $doc_node appendChild $body_node db_foreach subscriptions "" { set node [$doc createElement "outline"] - $node setAttribute text $title - $node setAttribute description $description - $node setAttribute htmlUrl $link - $node setAttribute language "unknown" - $node setAttribute title $title - $node setAttribute type "rss" - $node setAttribute version "RSS" - $node setAttribute xmlUrl $feed_url + $node setAttribute text $title + $node setAttribute description $description + $node setAttribute htmlUrl $link + $node setAttribute language "unknown" + $node setAttribute title $title + $node setAttribute type "rss" + $node setAttribute version "RSS" + $node setAttribute xmlUrl $feed_url - $body_node appendChild $node + $body_node appendChild $node } # 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 + # processing instruction via the API returns an error. Newer tDOM + # versions allow one 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. @@ -272,26 +272,26 @@ }] set max_purges [parameter::get -parameter "max_purges"] if { $purge_count > $max_purges } { - db_dml purge_all_purges { + db_dml purge_all_purges { delete from na_purges - where aggregator_id = :aggregator_id + where aggregator_id = :aggregator_id } - # The aggregator's bottom is set to the argument - # top because aggregator_bottom is actually the - # highest-numbered item to be displayed. Yes, it - # is confusing. - set aggregator_bottom $top - db_dml aggregator_purge { - update na_aggregators - set aggregator_bottom = :aggregator_bottom - where aggregator_id = :aggregator_id + # The aggregator's bottom is set to the argument + # top because aggregator_bottom is actually the + # highest-numbered item to be displayed. Yes, it + # is confusing. + set aggregator_bottom $top + db_dml aggregator_purge { + update na_aggregators + set aggregator_bottom = :aggregator_bottom + where aggregator_id = :aggregator_id } - return + return } set purge_id [db_nextval na_purges_seq] - db_dml insert_purge { + db_dml insert_purge { insert into na_purges (purge_id, top, bottom, aggregator_id, purge_date) values @@ -315,7 +315,7 @@ where user_id = :user_id } if { ![db_resultrows] } { - db_dml create_pref { + db_dml create_pref { insert into na_user_preferences (user_id, default_aggregator) values @@ -345,11 +345,11 @@ where object_type = 'na_aggregator' and creation_user = :user_id } -default 0] - if { $aggregator_id != 0 } { - news_aggregator::aggregator::set_user_default \ + if { $aggregator_id != 0 } { + news_aggregator::aggregator::set_user_default \ -user_id $user_id \ -aggregator_id $aggregator_id - } + } } return $aggregator_id @@ -444,3 +444,9 @@ } { return [db_list_of_lists select_aggregator_options {}] } + +# Local variables: +# mode: tcl +# tcl-indent-level: 4 +# indent-tabs-mode: nil +# End: Index: openacs-4/packages/news-aggregator/tcl/news-aggregator-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news-aggregator/tcl/news-aggregator-procs.tcl,v diff -u -N -r1.11 -r1.12 --- openacs-4/packages/news-aggregator/tcl/news-aggregator-procs.tcl 18 Jul 2018 14:11:36 -0000 1.11 +++ openacs-4/packages/news-aggregator/tcl/news-aggregator-procs.tcl 2 Apr 2019 10:54:02 -0000 1.12 @@ -40,3 +40,8 @@ return $to_return } +# Local variables: +# mode: tcl +# tcl-indent-level: 4 +# indent-tabs-mode: nil +# End: Index: openacs-4/packages/news-aggregator/tcl/opml-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news-aggregator/tcl/opml-procs.tcl,v diff -u -N -r1.5 -r1.6 --- openacs-4/packages/news-aggregator/tcl/opml-procs.tcl 9 May 2018 15:33:33 -0000 1.5 +++ openacs-4/packages/news-aggregator/tcl/opml-procs.tcl 2 Apr 2019 10:54:02 -0000 1.6 @@ -75,3 +75,9 @@ return [array get opml] } + +# Local variables: +# mode: tcl +# tcl-indent-level: 4 +# indent-tabs-mode: nil +# End: Index: openacs-4/packages/news-aggregator/tcl/weblog-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news-aggregator/tcl/weblog-procs.tcl,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/news-aggregator/tcl/weblog-procs.tcl 12 Jul 2018 09:05:41 -0000 1.3 +++ openacs-4/packages/news-aggregator/tcl/weblog-procs.tcl 2 Apr 2019 10:54:02 -0000 1.4 @@ -1,6 +1,6 @@ ad_library { Procs to manage aggregators. - + @author Simon Carstensen (simon@bcuni.net) @author Guan Yang (guan@unicast.org) @creation-date 2003-07-09 @@ -29,7 +29,7 @@ set user_id [ad_conn user_id] } if { $ip eq ""} { - set ip [ns_conn peeraddr] + set ip [ns_conn peeraddr] } set weblog_id [db_string new_weblog {}] @@ -44,7 +44,7 @@ -base_url:required } { Edit weblog. - + @author Simon Carstensen (simon@bcuni.net) @creation-date 2003-07-14 } { @@ -57,10 +57,10 @@ } { Attempt to validate the specified base URL against the specified blog type. - + @author Guan Yang (guan@unicast.org) @creation-date 2003-12-15 - + @return 1 if the base URL successfully validates, or 0 if it does not appear to be valid, or if the blog type could not be found. @@ -75,24 +75,24 @@ Validates a Movable Type base URL. } { set valid_p 1 - + if { ![util_url_valid_p $base_url] } { # Not a valid URL at all return 0 } - + # MT base urls will start with http or https if { ![regexp {^https?://} $base_url] } { return 0 } - + # At some point we expect to see "app?" or "mt.cgi?" # Is this too strict? if { ![regexp {/app\?__mode=[a-z]+&blog_id=(\d+)} $base_url match blog_id] && ![regexp {/mt.cgi\?__mode=[a-z]+&blog_id=(\d+)} $base_url match blog_id] } { return 0 } - + return 1 } @@ -104,20 +104,20 @@ } { Returns the post URL for a Movable Type weblog. Will barf bigtime if the URL is not valid. - + @author Guan Yang (guan@unicast.org) @creation-date 2003-12-15 } { if { ![news_aggregator::weblog::impl::movabletype_validate_url \ -base_url $base_url] } { return "" } - + if { [regexp {^(.+/app\?)__mode=[a-z]+&blog_id=(\d+)} $base_url match first_part blog_id] || [regexp {^(.+/mt.cgi\?)__mode=[a-z]+&blog_id=(\d+)} $base_url match first_part blog_id] } { # do nothing } - + set post_url $first_part append post_url [export_vars -url [list \ [list "is_bm" 1] \ @@ -129,7 +129,7 @@ [list "link_href" $link] \ [list "text" $text]]] - + return $post_url } @@ -148,10 +148,10 @@ @creation-date 2003-12-15 } { return [news_aggregator::weblog::impl::${blog_type}_get_post_url \ - -base_url $base_url \ - -title $title \ - -link $link \ - -text $text] + -base_url $base_url \ + -title $title \ + -link $link \ + -text $text] } ad_proc -public news_aggregator::weblog::options { @@ -171,11 +171,16 @@ } { return { {"Select Blog Type" {}} - {"Blogger" blogger} - {"Manila" manila} + {"Blogger" blogger} + {"Manila" manila} {"Movable Type" movabletype} {"Radio Userland" radio} {"TypePad" typepad} } } +# Local variables: +# mode: tcl +# tcl-indent-level: 4 +# indent-tabs-mode: nil +# End: Index: openacs-4/packages/news-aggregator/www/aggregator.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news-aggregator/www/aggregator.tcl,v diff -u -N -r1.6 -r1.7 --- openacs-4/packages/news-aggregator/www/aggregator.tcl 7 Apr 2018 19:25:21 -0000 1.6 +++ openacs-4/packages/news-aggregator/www/aggregator.tcl 2 Apr 2019 10:54:02 -0000 1.7 @@ -12,8 +12,8 @@ if { ![parameter::get -package_id $package_id -parameter PerUserAggregatorsP -default 0] } { # May this user create her own aggregator? permission::require_permission \ - -object_id $package_id \ - -privilege write + -object_id $package_id \ + -privilege write } set page_title "Create aggregator" @@ -33,7 +33,7 @@ {public_p:text(radio) {label "Public?"} {options {{"Yes" t} {"No" f}}} - {help_text "A public aggregator is intended to be used by a group of people and will not have a Purge button. Instead, the most recent 100 items will be displayed."} + {help_text "A public aggregator is intended to be used by a group of people and will not have a Purge button. Instead, the most recent 100 items will be displayed."} } {return_url:text(hidden) {value $return_url} @@ -44,7 +44,7 @@ -aggregator_name $aggregator_name \ -description $description \ -public_p $public_p - + if { $return_url ne "" } { ad_returnredirect $return_url } else { @@ -57,11 +57,17 @@ -aggregator_name $aggregator_name \ -description $description \ -public_p $public_p] - + if { $return_url ne "" } { ad_returnredirect $return_url } else { ad_returnredirect "[ad_conn package_url]$new_aggregator_id" } ad_script_abort } + +# Local variables: +# mode: tcl +# tcl-indent-level: 4 +# indent-tabs-mode: nil +# End: Index: openacs-4/packages/news-aggregator/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news-aggregator/www/index.tcl,v diff -u -N -r1.21 -r1.22 --- openacs-4/packages/news-aggregator/www/index.tcl 2 Apr 2019 08:42:21 -0000 1.21 +++ openacs-4/packages/news-aggregator/www/index.tcl 2 Apr 2019 10:54:02 -0000 1.22 @@ -96,9 +96,9 @@ if { $enable_purge_p || !$public_p || $purge_p } { set purges [db_list_of_lists purges { select top, bottom - from na_purges - where aggregator_id = :aggregator_id - order by top desc, bottom desc + from na_purges + where aggregator_id = :aggregator_id + order by top desc, bottom desc }] set saved_items [db_list saved_items { select item_id Index: openacs-4/packages/news-aggregator/www/opml-import.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news-aggregator/www/opml-import.tcl,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/news-aggregator/www/opml-import.tcl 1 Mar 2005 00:01:39 -0000 1.2 +++ openacs-4/packages/news-aggregator/www/opml-import.tcl 2 Apr 2019 10:54:02 -0000 1.3 @@ -1,6 +1,6 @@ ad_page_contract { Page to load a file or URL with OPML for import. - + @author Guan Yang (guan@unicast.org) @creation-date 2003-07-18 @cvs-id $Id$ @@ -20,10 +20,16 @@ ad_form -name opml -action opml-import-2 -form { {url:text,optional - {label "URL"} - {help_text "The URL of an OPML file in mySubscriptions format."} - {html {size 50}}} + {label "URL"} + {help_text "The URL of an OPML file in mySubscriptions format."} + {html {size 50}}} {opml_file:file,optional - {label "File"} - {help_text "This feature is not currently implemented."}} -} \ No newline at end of file + {label "File"} + {help_text "This feature is not currently implemented."}} +} + +# Local variables: +# mode: tcl +# tcl-indent-level: 4 +# indent-tabs-mode: nil +# End: Index: openacs-4/packages/news-aggregator/www/settings.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news-aggregator/www/settings.tcl,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/news-aggregator/www/settings.tcl 7 Apr 2018 16:58:52 -0000 1.3 +++ openacs-4/packages/news-aggregator/www/settings.tcl 2 Apr 2019 10:54:02 -0000 1.4 @@ -31,7 +31,7 @@ -aggregator_id $default_aggregator_id ad_returnredirect settings - ad_script_abort + ad_script_abort } set return_url settings @@ -47,18 +47,18 @@ label {} display_template { Edit this aggregator } - } + } aggregator_name { label "Name" display_template { @aggregators.aggregator_name@ (default) - + } link_url_eval {} link_html { title "" } @@ -70,17 +70,17 @@ label {} display_template { Delete this aggregator } } } -db_multirow -extend { - url - edit_url - delete_url - delete_onclick +db_multirow -extend { + url + edit_url + delete_url + delete_onclick default_p } aggregators select_aggregators {} { if {$public_p == "t"} { @@ -111,18 +111,18 @@ label {} display_template { Edit this weblog } - } + } weblog_name { label "Name" } delete { label {} display_template { Delete this weblog } } @@ -140,3 +140,9 @@ set delete_url [export_vars -base weblog-delete {weblog_id}] set delete_onclick "return confirm('Are you sure you want to delete this weblog?');" } + +# Local variables: +# mode: tcl +# tcl-indent-level: 4 +# indent-tabs-mode: nil +# End: Index: openacs-4/packages/news-aggregator/www/subscriptions.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news-aggregator/www/subscriptions.tcl,v diff -u -N -r1.14 -r1.15 --- openacs-4/packages/news-aggregator/www/subscriptions.tcl 19 Jul 2018 17:11:07 -0000 1.14 +++ openacs-4/packages/news-aggregator/www/subscriptions.tcl 2 Apr 2019 10:54:02 -0000 1.15 @@ -162,3 +162,9 @@ ad_returnredirect -message "You have been subscribed to $title." subscriptions ad_script_abort } + +# Local variables: +# mode: tcl +# tcl-indent-level: 4 +# indent-tabs-mode: nil +# End: