Index: openacs-4/packages/rss-support/tcl/rss-generation-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/tcl/rss-generation-procs.tcl,v diff -u -r1.17 -r1.17.6.1 --- openacs-4/packages/rss-support/tcl/rss-generation-procs.tcl 18 May 2009 14:42:27 -0000 1.17 +++ openacs-4/packages/rss-support/tcl/rss-generation-procs.tcl 27 Aug 2013 11:25:28 -0000 1.17.6.1 @@ -33,17 +33,17 @@ set rss "" - if {[empty_string_p $channel_title]} { + if {$channel_title eq ""} { error "argument channel_title not provided" } - if {[empty_string_p $channel_link]} { + if {$channel_link eq ""} { error "argument channel_link not provided" } - if {[empty_string_p $channel_description]} { + if {$channel_description eq ""} { error "argument channel_description not provided" } - if { [empty_string_p $channel_lastBuildDate] } { + if { $channel_lastBuildDate eq "" } { set now_ansi [clock format [clock seconds] -format "%Y-%m-%d %H:%M:%S"] set now_ansi [lc_time_tz_convert -from [lang::system::timezone] -to "Etc/GMT" -time_value $now_ansi] set channel_lastBuildDate "[clock format [clock scan $now_ansi] -format "%a, %d %b %Y %H:%M:%S"] GMT" @@ -58,11 +58,11 @@ append rss {OpenACS 5.0} \n append rss "[ad_quotehtml $channel_lastBuildDate]" \n - if { ![empty_string_p $channel_pubDate] } { + if { $channel_pubDate ne "" } { append rss "[ad_quotehtml $channel_pubDate]" \n } - if {[empty_string_p $image]} { + if {$image eq ""} { set base images/openacs_logo_rss.gif set url [ad_url][rss_package_url]$base set title $channel_title @@ -110,19 +110,19 @@ append rss "[ad_quotehtml $iarray(link)]" \n append rss {} [ad_quotehtml $iarray(link)] {} \n - if { [exists_and_not_null iarray(description) ]} { + if { ([info exists iarray(description)] && $iarray(description) ne "")} { append rss "[ad_quotehtml $iarray(description)]" \n } - if { [exists_and_not_null iarray(timestamp)] } { + if { ([info exists iarray(timestamp)] && $iarray(timestamp) ne "") } { append rss "[ad_quotehtml $iarray(timestamp)]" \n } - if { [exists_and_not_null iarray(category)] } { + if { ([info exists iarray(category)] && $iarray(category) ne "") } { append rss "[ad_quotehtml $iarray(category)]" \n } - if { [exists_and_not_null iarray(enclosure_url)] && [exists_and_not_null iarray(enclosure_length)] && [exists_and_not_null iarray(enclosure_type)] } { + if { ([info exists iarray(enclosure_url)] && $iarray(enclosure_url) ne "") && ([info exists iarray(enclosure_length)] && $iarray(enclosure_length) ne "") && ([info exists iarray(enclosure_type)] && $iarray(enclosure_type) ne "") } { append rss "" } append rss {} \n @@ -153,13 +153,13 @@ set rss "" - if {[empty_string_p $channel_title]} { + if {$channel_title eq ""} { error "argument channel_title not provided" } - if {[empty_string_p $channel_link]} { + if {$channel_link eq ""} { error "argument channel_link not provided" } - if {[empty_string_p $channel_description]} { + if {$channel_description eq ""} { error "argument channel_description not provided" } @@ -184,32 +184,32 @@ append rss [ad_quotehtml $channel_description] append rss "\n" - if {[empty_string_p $channel_pubDate]} { + if {$channel_pubDate eq ""} { append rss "$channel_date\n" } else { append rss "[ad_quotehtml $channel_pubDate]\n" } - if {![empty_string_p $channel_copyright]} { + if {$channel_copyright ne ""} { append rss "" append rss [ad_quotehtml $channel_copyright] append rss "\n" } - if {![empty_string_p $channel_managingEditor]} { + if {$channel_managingEditor ne ""} { append rss "" append rss [ad_quotehtml $channel_managingEditor] append rss "\n" } - if {![empty_string_p $channel_webMaster]} { + if {$channel_webMaster ne ""} { append rss "" append rss [ad_quotehtml $channel_webMaster] append rss "\n" } - if {[empty_string_p $image]} { + if {$image eq ""} { set base images/openacs_logo_rss.gif set url [ad_url][rss_package_url]$base set title $channel_title @@ -310,13 +310,13 @@ set rss "" - if {[empty_string_p $channel_title]} { + if {$channel_title eq ""} { error "argument channel_title not provided" } - if {[empty_string_p $channel_link]} { + if {$channel_link eq ""} { error "argument channel_link not provided" } - if {[empty_string_p $channel_description]} { + if {$channel_description eq ""} { error "argument channel_description not provided" } @@ -339,37 +339,37 @@ append rss [ad_quotehtml $channel_language] append rss "\n" - if {![empty_string_p $channel_copyright]} { + if {$channel_copyright ne ""} { append rss "" append rss [ad_quotehtml $channel_copyright] append rss "\n" } - if {![empty_string_p $channel_managingEditor]} { + if {$channel_managingEditor ne ""} { append rss "" append rss [ad_quotehtml $channel_managingEditor] append rss "\n" } - if {![empty_string_p $channel_webMaster]} { + if {$channel_webMaster ne ""} { append rss "" append rss [ad_quotehtml $channel_webMaster] append rss "\n" } - if {![empty_string_p $channel_rating]} { + if {$channel_rating ne ""} { append rss "" append rss [ad_quotehtml $channel_rating] append rss "\n" } - if {![empty_string_p $channel_pubDate]} { + if {$channel_pubDate ne ""} { append rss "" append rss [ad_quotehtml $channel_pubDate] append rss "\n" } - if {![empty_string_p $channel_lastBuildDate]} { + if {$channel_lastBuildDate ne ""} { append rss "" append rss [ad_quotehtml $channel_lastBuildDate] append rss "\n" @@ -379,19 +379,19 @@ append rss "http://backend.userland.com/stories/rss091" append rss "\n" - if {![empty_string_p $channel_skipDays]} { + if {$channel_skipDays ne ""} { append rss "" append rss [ad_quotehtml $channel_skipDays] append rss "\n" } - if {![empty_string_p $channel_skipHours]} { + if {$channel_skipHours ne ""} { append rss "" append rss [ad_quotehtml $channel_skipHours] append rss "\n" } - if {[empty_string_p $image]} { + if {$image eq ""} { set base images/openacs_logo_rss.gif set url [ad_url][rss_package_url]$base set title $channel_title Index: openacs-4/packages/rss-support/tcl/rss-generation-service-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/tcl/rss-generation-service-procs.tcl,v diff -u -r1.20.2.1 -r1.20.2.2 --- openacs-4/packages/rss-support/tcl/rss-generation-service-procs.tcl 26 Aug 2013 07:57:14 -0000 1.20.2.1 +++ openacs-4/packages/rss-support/tcl/rss-generation-service-procs.tcl 27 Aug 2013 11:25:28 -0000 1.20.2.2 @@ -39,7 +39,7 @@ set datasource [acs_sc::invoke -contract RssGenerationSubscriber -operation datasource -call_args $summary_context_id -impl $impl_name] - if { [empty_string_p $datasource] } { + if { $datasource eq "" } { 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 } @@ -65,12 +65,12 @@ # subscriptions table. set extra_sql "" foreach col [list channel_title channel_link] { - if [info exists $col] { + if {[info exists $col]} { append extra_sql ", $col = :$col" } } - set last_ttb [expr [clock seconds] - $start] + set last_ttb [expr {[clock seconds] - $start}] db_dml update_timestamp {} } @@ -84,7 +84,7 @@ set running_path "" foreach dir [split $path /] { append running_path ${dir}/ - if ![file exists $running_path] { + if {![file exists $running_path]} { file mkdir $running_path } } @@ -99,9 +99,9 @@ ns_log Debug "rss_gen_bind: binding impl $impl_id for contract $contract_id" # Don't ask me why, but bind variables don't appear to work # in this nested db operation. - if [catch { + if {[catch { db_exec_plsql bind_impl {} - } errMsg] { + } errMsg]} { ns_log Warning "rss_gen_bind: error binding impl $impl_id for contract $contract_id: $errMsg" } } @@ -119,7 +119,7 @@ } { if {!([info exists summary_context_id] && \ [info exists impl_name])} { - if ![info exists subscr_id] { + if {![info exists subscr_id]} { error "rss_gen_report_dir needs either subscr_id or impl_id+summary_context_id" } else { db_1row subscr_context_and_impl {} @@ -128,7 +128,7 @@ set report_dir [acs_root_dir]/[ad_parameter -package_id [rss_package_id] RssGenOutputDirectory rss-support rss]/$impl_name/${summary_context_id} - if $assert_p { + if {$assert_p} { rss_assert_dir $report_dir } @@ -149,14 +149,14 @@ } { if {!([info exists summary_context_id] && \ [info exists impl_name])} { - if ![info exists subscr_id] { + if {![info exists subscr_id]} { error "rss_gen_report_file needs either subscr_id or impl_id+summary_context_id" } else { db_1row subscr_context_and_impl {} } } - if $assert_p { + if {$assert_p} { set report_dir [rss_gen_report_dir \ -summary_context_id $summary_context_id \ -impl_name $impl_name \ Index: openacs-4/packages/rss-support/tcl/rss-support-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/tcl/rss-support-procs.tcl,v diff -u -r1.2 -r1.2.14.1 --- openacs-4/packages/rss-support/tcl/rss-support-procs.tcl 24 Feb 2005 13:33:25 -0000 1.2 +++ openacs-4/packages/rss-support/tcl/rss-support-procs.tcl 27 Aug 2013 11:25:28 -0000 1.2.14.1 @@ -61,10 +61,10 @@ [list p_creation_ip $creation_ip] \ [list p_context_id $context_id] ] - if {[exists_and_not_null creation_date]} { + if {([info exists creation_date] && $creation_date ne "")} { lappend var_list [list creation_date $creation_date] } - if {[exists_and_not_null lastbuild]} { + if {([info exists lastbuild] && $lastbuild ne "")} { lappend var_list [list p_lastbuild $lastbuild] } Index: openacs-4/packages/rss-support/tcl/rss-utilities-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/tcl/rss-utilities-procs.tcl,v diff -u -r1.4 -r1.4.20.1 --- openacs-4/packages/rss-support/tcl/rss-utilities-procs.tcl 17 May 2003 11:22:12 -0000 1.4 +++ openacs-4/packages/rss-support/tcl/rss-utilities-procs.tcl 27 Aug 2013 11:25:28 -0000 1.4.20.1 @@ -16,7 +16,7 @@ # Returns 0 otherwise. } { - if ![db_0or1row get_package_id {}] { + if {![db_0or1row get_package_id {}]} { return 0 } else { return $package_id @@ -52,7 +52,7 @@ } { set url "" - if [db_0or1row first_node_id {}] { + if {[db_0or1row first_node_id {}]} { db_foreach url_parts {} { append url ${name} } Index: openacs-4/packages/rss-support/www/delete-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/www/delete-2.tcl,v diff -u -r1.3 -r1.3.2.1 --- openacs-4/packages/rss-support/www/delete-2.tcl 30 Mar 2013 19:07:24 -0000 1.3 +++ openacs-4/packages/rss-support/www/delete-2.tcl 27 Aug 2013 11:25:28 -0000 1.3.2.1 @@ -8,7 +8,7 @@ ad_require_permission $subscr_id admin -if [info exists delete_file_p] { +if {[info exists delete_file_p]} { file delete [rss_gen_report_file -subscr_id $subscr_id] } Index: openacs-4/packages/rss-support/www/delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/www/delete.tcl,v diff -u -r1.5 -r1.5.20.1 --- openacs-4/packages/rss-support/www/delete.tcl 17 May 2003 11:23:29 -0000 1.5 +++ openacs-4/packages/rss-support/www/delete.tcl 27 Aug 2013 11:25:28 -0000 1.5.20.1 @@ -9,7 +9,7 @@ db_1row subscr_info {} -if [string equal $channel_title ""] { +if {$channel_title eq ""} { set channel_title "Summary Context $summary_context_id" } Index: openacs-4/packages/rss-support/www/subscr-ae-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/www/subscr-ae-2.tcl,v diff -u -r1.4 -r1.4.20.1 --- openacs-4/packages/rss-support/www/subscr-ae-2.tcl 17 May 2003 11:23:29 -0000 1.4 +++ openacs-4/packages/rss-support/www/subscr-ae-2.tcl 27 Aug 2013 11:25:28 -0000 1.4.20.1 @@ -11,16 +11,16 @@ } switch $timeout_units { - m { set timeout [expr $timeout * 60] } - h { set timeout [expr $timeout * 3600] } - d { set timeout [expr $timeout * 86400] } + m { set timeout [expr {$timeout * 60}] } + h { set timeout [expr {$timeout * 3600}] } + d { set timeout [expr {$timeout * 86400}] } } -if [db_0or1row subscr_exists_p { +if {[db_0or1row subscr_exists_p { select 1 from acs_objects where object_id = :subscr_id -}] { +}]} { # Subscription exists ad_require_permission $subscr_id admin db_dml update_subscr {} Index: openacs-4/packages/rss-support/www/subscr-ae.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/www/subscr-ae.tcl,v diff -u -r1.7.20.2 -r1.7.20.3 --- openacs-4/packages/rss-support/www/subscr-ae.tcl 27 Aug 2013 11:20:39 -0000 1.7.20.2 +++ openacs-4/packages/rss-support/www/subscr-ae.tcl 27 Aug 2013 11:25:28 -0000 1.7.20.3 @@ -34,7 +34,7 @@ db_0or1row subscr_id_from_impl_and_context {} } -if [info exists subscr_id] { +if {[info exists subscr_id]} { set action edit set pretty_action Edit ad_require_permission $subscr_id admin @@ -48,15 +48,15 @@ } # Validate the impl_id and get its name -if ![db_0or1row get_impl_name_and_count {}] { +if {![db_0or1row get_impl_name_and_count {}]} { ad_return_error "No implementation found for this id." "We were unable to process your request. Please contact this site's technical team for assistance." } -if { ![info exists channel_title] || [string equal $channel_title ""] || [string equal $channel_link ""] } { - if !$meta { - if [string equal $channel_title ""] { +if { ![info exists channel_title] || $channel_title eq "" || $channel_link eq "" } { + if {!$meta} { + if {$channel_title eq ""} { set channel_title "Summary Context $summary_context_id" } } else { Index: openacs-4/packages/rss-support/www/subscrs-include.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/www/subscrs-include.tcl,v diff -u -r1.5 -r1.5.14.1 --- openacs-4/packages/rss-support/www/subscrs-include.tcl 23 Feb 2005 12:33:22 -0000 1.5 +++ openacs-4/packages/rss-support/www/subscrs-include.tcl 27 Aug 2013 11:25:28 -0000 1.5.14.1 @@ -1,18 +1,18 @@ -if [info exists user_id] { +if {[info exists user_id]} { set maybe_restrict_to_user "and creation_user = :user_id" } else { set maybe_restrict_to_user "" } db_multirow -extend { lastbuild_pretty } subscrs get_subscrs {} { - if {![empty_string_p $lastbuild_ansi]} { + if {$lastbuild_ansi ne ""} { set lastbuild_ansi [lc_time_system_to_conn $lastbuild_ansi] set lastbuild_pretty [lc_time_fmt $lastbuild_ansi "%x %X"] } else { set lastbuild_pretty "never built" } - if [string equal $channel_title ""] { + if {$channel_title eq ""} { set channel_title "Subscription #$subscr_id" } }