Index: openacs-4/packages/bug-tracker/www/patch.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/patch.tcl,v diff -u -r1.33 -r1.34 --- openacs-4/packages/bug-tracker/www/patch.tcl 29 Jun 2018 17:27:18 -0000 1.33 +++ openacs-4/packages/bug-tracker/www/patch.tcl 12 Mar 2019 16:59:09 -0000 1.34 @@ -180,7 +180,7 @@ element create patch component_id \ -datatype text \ - -widget [ad_decode [info exists field_editable_p(component_id)] 1 select inform] \ + -widget [expr {[info exists field_editable_p(component_id)] ? "select" : "inform"}] \ -label "[_ bug-tracker.Component]" \ -options [bug_tracker::components_get_options] @@ -193,7 +193,7 @@ element create patch summary \ -datatype text \ - -widget [ad_decode [info exists field_editable_p(summary)] 1 text inform] \ + -widget [expr {[info exists field_editable_p(summary)] ? "text" : "inform"}] \ -label "[_ bug-tracker.Summary]" \ -html { size 50 } @@ -209,21 +209,21 @@ element create patch generated_from_version \ -datatype text \ - -widget [ad_decode [info exists field_editable_p(generated_from_version)] 1 select inform] \ + -widget [expr {[info exists field_editable_p(generated_from_version)] ? "select" : "inform"}] \ -label "[_ bug-tracker.Generated]" \ -options [bug_tracker::version_get_options -include_unknown] \ -optional element create patch apply_to_version \ -datatype text \ - -widget [ad_decode [info exists field_editable_p(apply_to_version)] 1 select inform] \ + -widget [expr {[info exists field_editable_p(apply_to_version)] ? "select" : "inform"}] \ -label "[_ bug-tracker.Apply_2]" \ -options [bug_tracker::version_get_options -include_undecided] \ -optional element create patch applied_to_version \ -datatype text \ - -widget [ad_decode [info exists field_editable_p(applied_to_version)] 1 select inform] \ + -widget [expr {[info exists field_editable_p(applied_to_version)] ? "select" : "inform"}] \ -label "[_ bug-tracker.Applied]" \ -options [bug_tracker::version_get_options -include_undecided] \ -optional @@ -287,12 +287,12 @@ # The form was requested db_1row patch {} -column_array patch - set patch(generated_from_version_name) [ad_decode $patch(generated_from_version) \ - "" [_ bug-tracker.Unknown] \ - [bug_tracker::version_get_name -version_id $patch(generated_from_version)]] - set patch(apply_to_version_name) [ad_decode $patch(apply_to_version) \ - "" [_ bug-tracker.Undecided] \ - [bug_tracker::version_get_name -version_id $patch(apply_to_version)]] + set patch(generated_from_version_name) [expr {$patch(generated_from_version) eq "" ? + [_ bug-tracker.Unknown] : + [bug_tracker::version_get_name -version_id $patch(generated_from_version)]}] + set patch(apply_to_version_name) [expr {$patch(apply_to_version) eq "" ? + [_ bug-tracker.Undecided] : + [bug_tracker::version_get_name -version_id $patch(apply_to_version)]}] set patch(applied_to_version_name) [bug_tracker::version_get_name -version_id $patch(applied_to_version)] if {$user_id != 0} { @@ -323,29 +323,29 @@ element set_properties patch patch_number_i \ -value $patch(patch_number) element set_properties patch component_id \ - -value [ad_decode [info exists field_editable_p(component_id)] 1 $patch(component_id) $patch(component_name)] + -value [expr {[info exists field_editable_p(component_id)] ? $patch(component_id) : $patch(component_name)}] if {$mode eq "view"} { set bugs_name [bug_tracker::conn bugs] set map_to_bugs [_ bug-tracker.Map] - set map_new_bug_link [ad_decode $write_or_submitter_p "1" "\[ $map_to_bugs \]" ""] + set map_new_bug_link [expr {$write_or_submitter_p ? "\[ $map_to_bugs \]" : ""}] element set_properties patch fixes_bugs \ -value "[bug_tracker::get_bug_links -patch_id $patch(patch_id) -patch_number $patch(patch_number) -write_or_submitter_p $write_or_submitter_p]
$map_new_bug_link" } element set_properties patch summary \ - -value [ad_decode [info exists field_editable_p(summary)] 1 $patch(summary) "$patch(summary)"] + -value [expr {[info exists field_editable_p(summary)] ? $patch(summary) : "$patch(summary)"}] element set_properties patch submitter \ -value " [acs_community_member_link -user_id $patch(submitter_user_id) \ -label "$patch(submitter_first_names) $patch(submitter_last_name)"] $submitter_email_display" element set_properties patch status \ - -value [ad_decode [info exists field_editable_p(status)] 1 $patch(status) [bug_tracker::patch_status_pretty $patch(status)]] + -value [expr {[info exists field_editable_p(status)] ? $patch(status) : [bug_tracker::patch_status_pretty $patch(status)]}] element set_properties patch generated_from_version \ - -value [ad_decode [info exists field_editable_p(generated_from_version)] 1 $patch(generated_from_version) $patch(generated_from_version_name)] + -value [expr {[info exists field_editable_p(generated_from_version)] ? $patch(generated_from_version) : $patch(generated_from_version_name)}] element set_properties patch apply_to_version \ - -value [ad_decode [info exists field_editable_p(apply_to_version)] 1 $patch(apply_to_version) $patch(apply_to_version_name)] + -value [expr {[info exists field_editable_p(apply_to_version)] ? $patch(apply_to_version) : $patch(apply_to_version_name)}] element set_properties patch applied_to_version \ - -value [ad_decode [info exists field_editable_p(applied_to_version)] 1 $patch(applied_to_version) $patch(applied_to_version_name)] + -value [expr {[info exists field_editable_p(applied_to_version)] ? $patch(applied_to_version) : $patch(applied_to_version_name)}] set deleted_p [string equal $patch(status) "deleted"] Index: openacs-4/packages/bug-tracker/www/notifications.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/notifications.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/bug-tracker/www/notifications.tcl 17 Jul 2018 13:32:18 -0000 1.7 +++ openacs-4/packages/bug-tracker/www/notifications.tcl 12 Mar 2019 17:00:18 -0000 1.8 @@ -83,7 +83,7 @@ multirow append notifications \ $url \ [string totitle $pretty_name] \ - [ad_decode $subscribed_p 1 "[_ bug-tracker.Unsubscribe_1]" "[_ bug-tracker.Subscribe_1]"] \ + [expr {$subscribed_p ? "[_ bug-tracker.Unsubscribe_1]" : "[_ bug-tracker.Subscribe_1]"}] \ $subscribed_p } } Index: openacs-4/packages/bug-tracker/www/map-patch-to-bugs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/map-patch-to-bugs.tcl,v diff -u -r1.18 -r1.19 --- openacs-4/packages/bug-tracker/www/map-patch-to-bugs.tcl 12 Mar 2019 17:02:02 -0000 1.18 +++ openacs-4/packages/bug-tracker/www/map-patch-to-bugs.tcl 12 Mar 2019 17:04:30 -0000 1.19 @@ -19,7 +19,7 @@ set package_id [ad_conn package_id] set user_id [ad_conn user_id] -set redirect_url [ad_decode $return_url "" "patch?patch_number=$patch_number" $return_url] +set redirect_url [expr {$return_url ne "" ? $return_url : "patch?patch_number=$patch_number"}] bug_tracker::get_pretty_names -array pretty_names