Index: openacs-4/packages/acs-mail-lite/www/doc/incoming-email-legacy-notes.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-mail-lite/www/doc/incoming-email-legacy-notes.adp,v diff -u -r1.4.2.2 -r1.4.2.3 --- openacs-4/packages/acs-mail-lite/www/doc/incoming-email-legacy-notes.adp 19 Jul 2019 09:00:32 -0000 1.4.2.2 +++ openacs-4/packages/acs-mail-lite/www/doc/incoming-email-legacy-notes.adp 21 Nov 2019 19:08:47 -0000 1.4.2.3 @@ -241,7 +241,7 @@ template::util::list_of_lists_to_array $email(bodies) email_body - if {[exists_and_not_null email_body(text/html)]} { + if {[info exists email_body(text/html)] && $email_body(text/html) ne ""} { set body $email_body(text/html) @@ -426,7 +426,7 @@ # make the bodies an array template::util::list_of_lists_to_array $email(bodies) email_body - if {[exists_and_not_null email_body(text/html)]} { + if {[info exists email_body(text/html)] && $email_body(text/html) ne ""} { set body $email_body(text/html) } else { set body $email_body(text/plain) Index: openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl,v diff -u -r1.189.2.35 -r1.189.2.36 --- openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 20 Nov 2019 14:06:41 -0000 1.189.2.35 +++ openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 21 Nov 2019 19:08:47 -0000 1.189.2.36 @@ -1191,12 +1191,17 @@ ns_log Notice $message } -ad_proc -public exists_and_not_null { varname } { +ad_proc -deprecated exists_and_not_null { varname } { Returns 1 if the variable name exists in the caller's environment and is not the empty string. Note you should enter the variable name, and not the variable value (varname not $varname which will pass variable varnames value into this function). + + DEPRECATED: the value provided by this proc is arguable, as it can + be replaced by a plain tcl oneliner. + + @see plain tcl idioms } { upvar 1 $varname var return [expr { [info exists var] && $var ne "" }] Index: openacs-4/packages/acs-templating/tcl/list-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/list-procs.tcl,v diff -u -r1.94.2.4 -r1.94.2.5 --- openacs-4/packages/acs-templating/tcl/list-procs.tcl 20 Nov 2019 14:06:41 -0000 1.94.2.4 +++ openacs-4/packages/acs-templating/tcl/list-procs.tcl 21 Nov 2019 19:08:47 -0000 1.94.2.5 @@ -547,10 +547,10 @@ -ulevel [expr {$ulevel + 1}] # Make group_by information available to templates - if { [exists_and_not_null list_properties(filter,groupby)] } { + if { [info exists list_properties(filter,groupby)] && $list_properties(filter,groupby) ne "" } { set list_properties(groupby) $list_properties(filter,groupby) } - if { [exists_and_not_null list_properties(filter_label,groupby)] } { + if { [info exists list_properties(filter_label,groupby)] && $list_properties(filter_label,groupby) ne "" } { set list_properties(groupby_label) $list_properties(filter_label,groupby) } @@ -1239,7 +1239,7 @@ # display_eval, link_url_eval foreach __eval_property { display link_url } { - if { [exists_and_not_null element_properties(${__eval_property}_eval)] } { + if { [info exists element_properties(${__eval_property}_eval)] && $element_properties(${__eval_property}_eval) ne "" } { # Set the display col to the name of the new, dynamic column set element_properties(${__eval_property}_col) "$element_properties(name)___$__eval_property" @@ -1285,7 +1285,7 @@ # display_eval, link_url_eval foreach __eval_property { display link_url } { - if { [exists_and_not_null __element_properties(${__eval_property}_eval)] } { + if { [info exists element_properties(${__eval_property}_eval)] && $element_properties(${__eval_property}_eval) ne "" } { set $__element_properties(${__eval_property}_col) [subst $__element_properties(${__eval_property}_eval)] } } Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/OacsFs/popups/insert-ilink.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/OacsFs/popups/insert-ilink.xql,v diff -u -r1.1 -r1.1.18.1 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/OacsFs/popups/insert-ilink.xql 11 Nov 2005 20:32:47 -0000 1.1 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/OacsFs/popups/insert-ilink.xql 21 Nov 2019 19:08:47 -0000 1.1.18.1 @@ -27,13 +27,13 @@ lro.lr_object_id from lr_objects_developers_view lro - [expr {[exists_and_not_null cs]?" ,lr_concept__all_objects lrc":""}] + [expr {[info exists cs] && $cs ne "" ? " ,lr_concept__all_objects lrc" : ""}] where lro.community_id = :c and lro.restype = :restype and lro.is_active = :is_active - [expr {[exists_and_not_null q]?"and (lower(lro.lr_title) like '%' || :q || '%' or lower(lro.shortname) like '%' || :q || '%')":"" }] - [expr {[exists_and_not_null cs]?" and lrc.lr_object_id = lro.lr_object_id and lrc.lr_concept_id = :cs":""}] + [expr {[info exists q] && $q ne "" ? "and (lower(lro.lr_title) like '%' || :q || '%' or lower(lro.shortname) like '%' || :q || '%')":"" }] + [expr {[info exists cs] && $cs ne "" ? " and lrc.lr_object_id = lro.lr_object_id and lrc.lr_concept_id = :cs":""}] [template::list::filter_where_clauses -and -name "resource_list"] order by lro.lr_title