Index: openacs-4/packages/bug-tracker/lib/nav-bar.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/lib/nav-bar.tcl,v diff -u -N -r1.13 -r1.14 --- openacs-4/packages/bug-tracker/lib/nav-bar.tcl 9 Apr 2010 20:42:50 -0000 1.13 +++ openacs-4/packages/bug-tracker/lib/nav-bar.tcl 14 Oct 2013 18:14:21 -0000 1.14 @@ -39,7 +39,7 @@ regexp {/([^/]+)/[^/]*$} [ad_conn url] match last_dir -if { [string equal $last_dir "admin"] } { +if {$last_dir eq "admin"} { set url_prefix [ad_conn package_url] } else { set url_prefix "" Index: openacs-4/packages/bug-tracker/lib/pagination.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/lib/pagination.tcl,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/bug-tracker/lib/pagination.tcl 5 Mar 2003 17:39:52 -0000 1.2 +++ openacs-4/packages/bug-tracker/lib/pagination.tcl 14 Oct 2013 18:14:21 -0000 1.3 @@ -27,10 +27,10 @@ } set interval_label [ad_decode $interval_low $row_count "$interval_high" "$interval_low - $interval_high"] - lappend pagination_filter_list [ad_decode [expr 1 + $offset] $interval_low "$interval_label" "$interval_label"] + lappend pagination_filter_list [ad_decode [expr {1 + $offset}] $interval_low "$interval_label" "$interval_label"] - set interval_high [expr $interval_high + $interval_size] - set interval_low [expr $interval_high - [expr $interval_size - 1]] + set interval_high [expr {$interval_high + $interval_size}] + set interval_low [expr {$interval_high - [expr {$interval_size - 1}]}] } set pagination_filter [join $pagination_filter_list " | "] Index: openacs-4/packages/bug-tracker/tcl/bug-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/tcl/bug-procs.tcl,v diff -u -N -r1.30 -r1.31 --- openacs-4/packages/bug-tracker/tcl/bug-procs.tcl 19 Sep 2013 18:13:19 -0000 1.30 +++ openacs-4/packages/bug-tracker/tcl/bug-procs.tcl 14 Oct 2013 18:14:21 -0000 1.31 @@ -68,7 +68,7 @@ # Get state information workflow::case::fsm::get -case_id $case_id -array case -enabled_action_id $enabled_action_id set row(pretty_state) $case(pretty_state) - if { ![empty_string_p $row(resolution)] } { + if { $row(resolution) ne "" } { append row(pretty_state) " ([bug_tracker::resolution_pretty $row(resolution)])" } set row(state_short_name) $case(state_short_name) @@ -100,14 +100,14 @@ @return bug_id The same bug_id passed in, just for convenience. } { - if { ![exists_and_not_null user_agent] && [ad_conn isconnected] } { + if { (![info exists user_agent] || $user_agent eq "") && [ad_conn isconnected] } { set user_agent [ns_set get [ns_conn headers] "User-Agent"] } set comment_content $description set comment_format $desc_format - if { ![exists_and_not_null creation_date] } { + if { (![info exists creation_date] || $creation_date eq "") } { set creation_date [db_string select_sysdate {}] } @@ -176,7 +176,7 @@ content::keyword::item_assign -item_id $bug_id -keyword_id $keyword_id } - if {![empty_string_p $assign_to]} { + if {$assign_to ne ""} { array set assign_array [list resolver $assign_to] @@ -217,7 +217,7 @@ } { upvar $array row - if { ![exists_and_not_null user_id] } { + if { (![info exists user_id] || $user_id eq "") } { set user_id [ad_conn user_id] } @@ -278,7 +278,7 @@ # Update the keywords foreach {category_id category_name} [bug_tracker::category_types] { - if { [exists_and_not_null row($category_id)] } { + if { ([info exists row($category_id)] && $row($category_id) ne "") } { content::keyword::item_assign -item_id $bug_id -keyword_id $row($category_id) } # LARS: @@ -351,7 +351,7 @@ -object_id $bug_id \ -user_id $user_id] - set subscribed_p [expr ![empty_string_p $request_id]] + set subscribed_p [expr {$request_id ne ""}] if { !$subscribed_p } { set url [notification::display::subscribe_url \ @@ -490,7 +490,7 @@ Delete the 'bug' workflow for bug-tracker } { set workflow_id [get_package_workflow_id] - if { ![empty_string_p $workflow_id] } { + if { $workflow_id ne "" } { workflow::delete -workflow_id $workflow_id } } @@ -510,7 +510,7 @@ } { Return the workflow_id for the package (not instance) workflow } { - if { [empty_string_p $package_id] } { + if { $package_id eq "" } { set package_id [ad_conn package_id] } return [db_string get_instance_workflow_id {}] @@ -792,7 +792,7 @@ -workflow_id $workflow_id \ -user_id $user_id \ -admin_p $admin_p] - set state_default_value [lindex [lindex $state_values 0] 1] + set state_default_value [lindex $state_values 0 1] set filters { project_id {} @@ -928,7 +928,7 @@ set bulk_action_export_vars [list [list workflow_id $workflow_id] [list return_url [ad_return_url]]] template::list::create \ - -ulevel [expr $ulevel + 1] \ + -ulevel [expr {$ulevel + 1}] \ -name bugs \ -multirow bugs \ -key bug_id \ Index: openacs-4/packages/bug-tracker/tcl/bug-tracker-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/tcl/bug-tracker-callback-procs.tcl,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/bug-tracker/tcl/bug-tracker-callback-procs.tcl 17 Jun 2010 18:51:45 -0000 1.3 +++ openacs-4/packages/bug-tracker/tcl/bug-tracker-callback-procs.tcl 14 Oct 2013 18:14:22 -0000 1.4 @@ -42,7 +42,7 @@ set package_id [lindex $package_id_list 0] set user_id [party::get_by_email -email $email(from)] - if {[string equal $user_id ""]} { + if {$user_id eq ""} { # spam control return "" } elseif {![permission::permission_p -party_id $user_id -object_id $package_id -privilege create -no_login]} { @@ -67,7 +67,7 @@ if {[llength $components_list] == 0} { set component_id {} } else { - set component_id [lindex [lindex $components_list 0] 1] + set component_id [lindex $components_list 0 1] } set found_in_version {} if {[llength $email(subject)] == 1} { Index: openacs-4/packages/bug-tracker/tcl/bug-tracker-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/tcl/bug-tracker-procs.tcl,v diff -u -N -r1.40 -r1.41 --- openacs-4/packages/bug-tracker/tcl/bug-tracker-procs.tcl 17 Jun 2010 18:51:45 -0000 1.40 +++ openacs-4/packages/bug-tracker/tcl/bug-tracker-procs.tcl 14 Oct 2013 18:14:22 -0000 1.41 @@ -15,7 +15,7 @@ global bt_conn set flag [lindex $args 0] - if { [string index $flag 0] != "-" } { + if { [string index $flag 0] ne "-" } { set var $flag set flag "-get" } else { @@ -181,30 +181,30 @@ } ad_proc bug_tracker::get_project_info { - -package_id + {-package_id ""} } { - if { ![info exists package_id] } { + if { $package_id eq "" } { set package_id [ad_conn package_id] } return [util_memoize [list bug_tracker::get_project_info_internal $package_id]] } ad_proc bug_tracker::get_project_info_flush { - -package_id + {-package_id ""} } { - if { ![info exists package_id] } { + if { $package_id eq "" } { set package_id [ad_conn package_id] } util_memoize_flush [list bug_tracker::get_project_info_internal $package_id] } ad_proc bug_tracker::set_project_name { - -package_id + {-package_id ""} project_name } { - if { ![info exists package_id] } { + if { $package_id eq "" } { set package_id [ad_conn package_id] } @@ -228,7 +228,7 @@ } { Returns whether any bugs exist in a project } { - if { ![exists_and_not_null package_id] } { + if { $package_id eq "" } { set package_id [ad_conn package_id] } @@ -240,7 +240,7 @@ } { Sets bug_exists_p true. Useful for when you add a new bug, so you know that a bug will exist. } { - if { ![exists_and_not_null package_id] } { + if { $package_id eq "" } { set package_id [ad_conn package_id] } @@ -284,10 +284,10 @@ } ad_proc bug_tracker::get_user_prefs { - -package_id + {-package_id ""} -user_id } { - if { ![info exists package_id] } { + if { $package_id eq "" } { set package_id [ad_conn package_id] } @@ -299,10 +299,10 @@ } ad_proc bug_tracker::get_user_prefs_flush { - -package_id + {-package_id ""} -user_id } { - if { ![info exists package_id] } { + if { $package_id eq "" } { set package_id [ad_conn package_id] } @@ -323,7 +323,7 @@ ad_proc bug_tracker::status_get_options { {-package_id ""} } { - if { [empty_string_p $package_id] } { + if { $package_id eq "" } { set package_id [ad_conn package_id] } @@ -557,7 +557,7 @@ ad_proc -private bug_tracker::get_keywords { {-package_id ""} } { - if { ![exists_and_not_null package_id] } { + if { $package_id eq "" } { set package_id [ad_conn package_id] } return [util_memoize [list bug_tracker::get_keywords_not_cached -package_id $package_id]] @@ -566,7 +566,7 @@ ad_proc -private bug_tracker::get_keywords_flush { {-package_id ""} } { - if { ![exists_and_not_null package_id] } { + if { $package_id eq "" } { set package_id [ad_conn package_id] } util_memoize_flush [list bug_tracker::get_keywords_not_cached -package_id $package_id] @@ -589,7 +589,7 @@ } { Set the default keyword for a given type (parent) } { - if { ![exists_and_not_null package_id] } { + if { $package_id eq "" } { set package_id [ad_conn package_id] } @@ -613,7 +613,7 @@ } { Get the default keyword for a given type (parent) } { - if { ![exists_and_not_null package_id] } { + if { $package_id eq "" } { set package_id [ad_conn package_id] } @@ -626,7 +626,7 @@ } { Flush the cache for } { - if { ![exists_and_not_null package_id] } { + if { $package_id eq "" } { set package_id [ad_conn package_id] } @@ -740,7 +740,7 @@ } { Deletes all the keywords in a project } { - if { ![exists_and_not_null package_id] } { + if { $package_id eq "" } { set package_id [ad_conn package_id] } db_exec_plsql keywords_delete {} @@ -762,14 +762,14 @@ -parent_id $root_keyword_id \ -heading $category_type] - if { [empty_string_p $category_type_id] } { + if { $category_type_id eq "" } { set category_type_id [cr::keyword::new \ -parent_id $root_keyword_id \ -heading $category_type] } foreach category $categories { - if { [string equal [string index $category 0] "*"] } { + if {[string index $category 0] eq "*"} { set default_p 1 set category [string range $category 1 end] } else { @@ -780,7 +780,7 @@ -parent_id $category_type_id \ -heading $category] - if { [empty_string_p $category_id] } { + if { $category_id eq "" } { set category_id [cr::keyword::new \ -parent_id $category_type_id \ -heading $category] @@ -817,11 +817,11 @@ ##### ad_proc bug_tracker::version_get_options { - -package_id + {-package_id ""} -include_unknown:boolean -include_undecided:boolean } { - if { ![exists_and_not_null package_id] } { + if { $package_id eq "" } { set package_id [ad_conn package_id] } @@ -868,7 +868,7 @@ } { Is the versions feature turned on? } { - if { ![exists_and_not_null package_id] } { + if { $package_id eq "" } { set package_id [ad_conn package_id] } @@ -895,13 +895,13 @@ {-package_id ""} {-version_id:required} } { - if { [empty_string_p $version_id] } { + if { $version_id eq "" } { return {} } foreach elm [version_get_options -package_id $package_id] { set name [lindex $elm 0] set id [lindex $elm 1] - if { [string equal $id $version_id] } { + if {$id eq $version_id} { return $name } } @@ -947,7 +947,7 @@ {-package_id ""} -include_unknown:boolean } { - if { ![exists_and_not_null package_id] } { + if { $package_id eq "" } { set package_id [ad_conn package_id] } @@ -978,12 +978,12 @@ {-package_id ""} {-component_id:required} } { - if { [empty_string_p $component_id] } { + if { $component_id eq "" } { return {} } foreach elm [components_get_options -package_id $package_id] { set id [lindex $elm 1] - if { [string equal $id $component_id] } { + if {$id eq $component_id} { return [lindex $elm 0] } } @@ -994,11 +994,11 @@ {-package_id ""} {-component_id:required} } { - if { [empty_string_p $component_id] } { + if { $component_id eq "" } { return {} } foreach { id url_name } [components_get_url_names -package_id $package_id] { - if { [string equal $id $component_id] } { + if {$id eq $component_id} { return $url_name } } @@ -1008,7 +1008,7 @@ ad_proc bug_tracker::components_get_url_names { {-package_id ""} } { - if { ![exists_and_not_null package_id] } { + if { $package_id eq "" } { set package_id [ad_conn package_id] } return [util_memoize [list bug_tracker::components_get_url_names_not_cached -package_id $package_id]] @@ -1078,9 +1078,9 @@ ##### ad_proc ::bug_tracker::users_get_options { - -package_id + {-package_id ""} } { - if { ![info exists package_id] } { + if { $package_id eq "" } { set package_id [ad_conn package_id] } @@ -1267,7 +1267,7 @@ } { set patch_file [ns_queryget patch_file] - if { [empty_string_p $patch_file] } { + if { $patch_file eq "" } { # No patch file was uploaded return "" } @@ -1322,7 +1322,7 @@ } { if {![db_0or1row already_there {select 1 from bt_projects where project_id = :project_id} ] } { - if [db_0or1row instance_info { *SQL* } ] { + if {[db_0or1row instance_info { *SQL* } ]} { set folder_id [content::folder::new -name "bug_tracker_$project_id" \ -package_id $project_id \ -parent_id $project_id \ Index: openacs-4/packages/bug-tracker/tcl/bug-tracker-scheduled-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/tcl/bug-tracker-scheduled-procs.tcl,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/bug-tracker/tcl/bug-tracker-scheduled-procs.tcl 15 Jun 2008 19:37:01 -0000 1.2 +++ openacs-4/packages/bug-tracker/tcl/bug-tracker-scheduled-procs.tcl 14 Oct 2013 18:14:22 -0000 1.3 @@ -17,7 +17,7 @@ } { } { set bt_instance [parameter::get -parameter BugTrackerInstance -package_id [ad_acs_kernel_id] -default {}] - if {![empty_string_p $bt_instance]} { + if {$bt_instance ne ""} { array set community_info [site_node::get -url "${bt_instance}/bug-tracker"] set bt_package_id $community_info(package_id) db_foreach open_bug { *SQL* } { @@ -26,11 +26,11 @@ -workflow_short_name [bug_tracker::bug::workflow_short_name]] workflow::case::fsm::get -case_id $case_id -array case set time_to_compare_with [parameter::get -parameter TimeToLive -package_id $bt_package_id -default 0] - if { [string eq $case(state_short_name) "open"] && $time_to_compare_with > 0 && [db_string too_old {} -default 0] } { + if { $case(state_short_name) eq "open" && $time_to_compare_with > 0 && [db_string too_old {} -default 0] } { foreach available_enabled_action_id [workflow::case::get_available_enabled_action_ids -case_id $case_id] { workflow::case::enabled_action_get -enabled_action_id $available_enabled_action_id -array enabled_action workflow::action::get -action_id $enabled_action(action_id) -array available_action - if { [string eq $available_action(short_name) "resolve"] } { + if {$available_action(short_name) eq "resolve"} { set action_id $enabled_action(action_id) array set row [list] foreach field [workflow::action::get_element -action_id $action_id -element edit_fields] { @@ -50,7 +50,7 @@ foreach available_enabled_action_id [workflow::case::get_available_enabled_action_ids -case_id $case_id] { workflow::case::enabled_action_get -enabled_action_id $available_enabled_action_id -array enabled_action workflow::action::get -action_id $enabled_action(action_id) -array available_action - if { [string eq $available_action(short_name) "close"] } { + if {$available_action(short_name) eq "close"} { set action_id $enabled_action(action_id) array set row [list] foreach field [workflow::action::get_element -action_id $action_id -element edit_fields] { Index: openacs-4/packages/bug-tracker/www/bug-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/bug-add.tcl,v diff -u -N -r1.18 -r1.19 --- openacs-4/packages/bug-tracker/www/bug-add.tcl 18 Sep 2013 14:17:02 -0000 1.18 +++ openacs-4/packages/bug-tracker/www/bug-add.tcl 14 Oct 2013 18:14:22 -0000 1.19 @@ -8,7 +8,7 @@ {return_url ""} } -if { [empty_string_p $return_url] } { +if { $return_url eq "" } { set return_url "." } Index: openacs-4/packages/bug-tracker/www/bug.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/bug.tcl,v diff -u -N -r1.40 -r1.41 --- openacs-4/packages/bug-tracker/www/bug.tcl 17 Jun 2010 18:51:45 -0000 1.40 +++ openacs-4/packages/bug-tracker/www/bug.tcl 14 Oct 2013 18:14:22 -0000 1.41 @@ -73,7 +73,7 @@ # Registration required for all actions set action_id "" -if { ![empty_string_p $enabled_action_id] } { +if { $enabled_action_id ne "" } { ns_log Notice "enabled_action if statement" auth::require_login workflow::case::enabled_action_get -enabled_action_id $enabled_action_id -array enabled_action @@ -92,7 +92,7 @@ # Buttons set actions [list] -if { [empty_string_p $enabled_action_id] } { +if { $enabled_action_id eq "" } { ns_log Notice "actions: case_id: $case_id" ns_log Notice "actions: case_id: $case_id get_enabled_actions: [workflow::case::get_available_enabled_action_ids -case_id $case_id]" @@ -119,7 +119,7 @@ # lets you use +var+ for a var to eval on the second round. # cf http://openacs.org/bugtracker/openacs/bug?bug%5fnumber=1099 -if { [empty_string_p $enabled_action_id] } { +if { $enabled_action_id eq "" } { set patch_label [ad_decode $show_patch_status \ "open" "[_ bug-tracker.Open] [bug_tracker::conn Patches] ([_ bug-tracker.show_all])" \ "all" "[_ bug-tracker.All] [bug_tracker::conn Patches] ([_ bug-tracker.show_only_open])" \ @@ -232,13 +232,13 @@ ad_form -extend -name bug -form $filters # Set editable fields -if { ![empty_string_p $enabled_action_id] } { +if { $enabled_action_id ne "" } { foreach field [workflow::action::get_element -action_id $action_id -element edit_fields] { element set_properties bug $field -mode edit } # LARS: Hack! How do we set editing of dynamic fields? - if { [string equal [workflow::action::get_element -action_id $action_id -element short_name] edit] } { + if {[workflow::action::get_element -action_id $action_id -element short_name] eq "edit"} { foreach { category_id category_name } [bug_tracker::category_types] { element set_properties bug $category_id -mode edit } @@ -251,7 +251,7 @@ array set row [list] - if { ![empty_string_p $enabled_action_id] } { + if { $enabled_action_id ne "" } { foreach field [workflow::action::get_element -action_id $action_id -element edit_fields] { set row($field) [element get_value bug $field] } @@ -299,7 +299,7 @@ foreach {category_id category_name} [bug_tracker::category_types] { lappend element_names $category_id set bug($category_id) [cr::keyword::item_get_assigned -item_id $bug(bug_id) -parent_id $category_id] - if {[string compare $bug($category_id) ""] == 0} { + if {$bug($category_id) eq "" } { set bug($category_id) [bug_tracker::get_default_keyword -parent_id $category_id] } } @@ -350,7 +350,7 @@ # check that the element exists if { [info exists bug:$element] && [info exists bug($element)] } { if {[form is_request bug] - || [string equal [element get_property bug $element mode] display] } { + || [string equal [element get_property bug $element mode] "display"] } { if { [string first "#" $bug($element)] == 0 } { element set_value bug $element [lang::util::localize $bug($element)] } else { @@ -361,8 +361,8 @@ } # Add empty option to resolution code - if { ![empty_string_p $enabled_action_id] } { - if { [lsearch [workflow::action::get_element -action_id $action_id -element edit_fields] "resolution"] == -1 } { + if { $enabled_action_id ne "" } { + if {"resolution" ni [workflow::action::get_element -action_id $action_id -element edit_fields]} { element set_properties bug resolution -options [concat {{{} {}}} [element get_property bug resolution options]] } } else { @@ -405,7 +405,7 @@ } # User agent show/hide URLs - if { [empty_string_p $enabled_action_id] } { + if { $enabled_action_id eq "" } { set show_user_agent_url [export_vars -base bug -entire_form -override { { user_agent_p 1 }}] set hide_user_agent_url [export_vars -base bug -entire_form -exclude { user_agent_p }] } @@ -414,13 +414,13 @@ set login_url [ad_get_login_url] # Single-bug notifications - if { [empty_string_p $enabled_action_id] } { + if { $enabled_action_id eq "" } { set notification_link [bug_tracker::bug::get_watch_link -bug_id $bug(bug_id)] } # Filter management - if { [empty_string_p $enabled_action_id] } { + if { $enabled_action_id eq "" } { set filter_bug_numbers [bug_tracker::bug::get_bug_numbers] set filter_bug_index [lsearch -exact $filter_bug_numbers $bug_number] @@ -443,11 +443,11 @@ if { $filter_bug_index > 0 } { set first_bug_number [lindex $filter_bug_numbers 0] set first_url [export_vars -base bug -entire_form -override { { bug_number $first_bug_number } }] - set prev_bug_number [lindex $filter_bug_numbers [expr $filter_bug_index -1]] + set prev_bug_number [lindex $filter_bug_numbers $filter_bug_index-1] set prev_url [export_vars -base bug -entire_form -override { { bug_number $prev_bug_number } }] } - if { $filter_bug_index < [expr [llength $filter_bug_numbers]-1] } { - set next_bug_number [lindex $filter_bug_numbers [expr $filter_bug_index +1]] + if { $filter_bug_index < [expr {[llength $filter_bug_numbers]-1}] } { + set next_bug_number [lindex $filter_bug_numbers $filter_bug_index+1] set next_url [export_vars -base bug -entire_form -override { { bug_number $next_bug_number } }] set last_bug_number [lindex $filter_bug_numbers end] set last_url [export_vars -base bug -entire_form -override { { bug_number $last_bug_number } }] @@ -457,7 +457,7 @@ if { $filter_bug_index != -1 } { - set next_bug_num [expr $filter_bug_index+1] + set next_bug_num [expr {$filter_bug_index+1}] set all_bugs [llength $filter_bug_numbers] multirow append navlinks \ $first_url \ Index: openacs-4/packages/bug-tracker/www/bulk-update-op.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/bulk-update-op.tcl,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/bug-tracker/www/bulk-update-op.tcl 29 May 2008 15:01:08 -0000 1.1 +++ openacs-4/packages/bug-tracker/www/bulk-update-op.tcl 14 Oct 2013 18:14:22 -0000 1.2 @@ -20,7 +20,7 @@ set user_id [auth::require_login] set package_id [ad_conn package_id] -if {![exists_and_not_null return_url]} { +if {(![info exists return_url] || $return_url eq "")} { set return_url "./" } @@ -88,7 +88,7 @@ } else { # assign dummy case id placeholder so that we can # generate assignee widgets when the op is reassign - if {$dummy_case_id == ""} { + if {$dummy_case_id eq ""} { set dummy_case_id $case_id } if {![array exists dummy_bug_info]} { @@ -130,7 +130,7 @@ } } -if { ![string equal $dummy_case_id {}] } { +if { $dummy_case_id ne "" } { workflow::case::role::add_assignee_widgets -case_id $dummy_case_id -form_name bug -role_ids $resolver_role_id } else { ad_form -extend -name bug -form { @@ -188,7 +188,7 @@ if { [form is_request bug] } { foreach field {success_inform_text_stub security_inform_text_stub errors_inform_text_stub} { - if {[string equal [set $field] {}]} { + if {[set $field] eq ""} { element set_properties bug $field -widget hidden } } @@ -198,7 +198,7 @@ set present_fields [workflow::action::get_element -action_id $action_id -element edit_fields] set all_fields {resolution fixed_in_version role_resolver} - if { [lsearch $present_fields "resolution"] == -1 } { + if {"resolution" ni $present_fields} { element set_properties bug resolution -options [concat {{{} {}}} [element get_property bug resolution options]] } @@ -207,7 +207,7 @@ } foreach field $all_fields { - if {[lsearch $present_fields $field] == -1 || [string equal $dummy_case_id {}]} { + if {[lsearch $present_fields $field] == -1 || $dummy_case_id eq ""} { element set_properties bug $field -widget hidden } } 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 -N -r1.8 -r1.9 --- openacs-4/packages/bug-tracker/www/map-patch-to-bugs.tcl 19 Sep 2013 15:37:33 -0000 1.8 +++ openacs-4/packages/bug-tracker/www/map-patch-to-bugs.tcl 14 Oct 2013 18:14:22 -0000 1.9 @@ -22,22 +22,22 @@ bug_tracker::get_pretty_names -array pretty_names -if { [exists_and_not_null cancel] } { +if { ([info exists cancel] && $cancel ne "") } { # The user chose to abort the mapping so redirect without further processing ad_returnredirect $redirect_url ad_script_abort } set write_p [permission::permission_p -object_id $package_id -privilege write] -set user_is_submitter_p [expr $user_id == [bug_tracker::get_patch_submitter -patch_number $patch_number]] +set user_is_submitter_p [expr {$user_id == [bug_tracker::get_patch_submitter -patch_number $patch_number]}] -if { ![expr $user_is_submitter_p || $write_p] } { +if { ![expr {$user_is_submitter_p || $write_p}] } { ad_return_forbidden "[_ bug-tracker.Permission]" "[_ bug-tracker.You_1]" ad_script_abort } -if { [exists_and_not_null bug_number] } { +if { ([info exists bug_number] && $bug_number ne "") } { # Do the mapping foreach one_bug_number $bug_number { set bug_id [db_string get_bug_id_for_number {}] @@ -55,7 +55,7 @@ set context [list "$page_title"] # Build the component filter -if { ![exists_and_not_null component_id] } { +if { (![info exists component_id] || $component_id eq "") } { set component_id [db_string component_id_for_patch {}] } set component_where_clause "" @@ -64,7 +64,7 @@ set Component_name [bug_tracker::conn Component] set Components_name [bug_tracker::conn Components] -if { ![empty_string_p $component_id] } { +if { $component_id ne "" } { set component_name [bug_tracker::component_get_name -component_id $component_id] set component_filter_url "map-patch-to-bugs?[export_vars -url {patch_number component_id return_url offset show_only_open_p interval_size}]" if { $show_all_components_p } { 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 -N -r1.4 -r1.5 --- openacs-4/packages/bug-tracker/www/notifications.tcl 17 Jun 2010 18:51:45 -0000 1.4 +++ openacs-4/packages/bug-tracker/www/notifications.tcl 14 Oct 2013 18:14:22 -0000 1.5 @@ -9,7 +9,7 @@ set package_id [ad_conn package_id] set workflow_id [bug_tracker::bug::get_instance_workflow_id] -if { [exists_and_not_null bug_number] } { +if { ([info exists bug_number] && $bug_number ne "") } { set bug_id [bug_tracker::get_bug_id \ -bug_number $bug_number \ -project_id [ad_conn package_id]] @@ -41,7 +41,7 @@ -workflow_id $workflow_id \ -case_id $case_id] - if { ![empty_string_p $object_id] } { + if { $object_id ne "" } { switch $type { workflow_assignee { set pretty_name [_ bug-tracker.All_2] @@ -66,7 +66,7 @@ -object_id $object_id \ -user_id $user_id] - set subscribed_p [expr ![empty_string_p $request_id]] + set subscribed_p [expr {$request_id ne ""}] if { $subscribed_p } { set url [notification::display::unsubscribe_url -request_id $request_id -url $return_url] @@ -79,7 +79,7 @@ -pretty_name $pretty_name] } - if { ![empty_string_p $url] } { + if { $url ne "" } { multirow append notifications \ $url \ [string totitle $pretty_name] \ Index: openacs-4/packages/bug-tracker/www/patch-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/patch-add.tcl,v diff -u -N -r1.14 -r1.15 --- openacs-4/packages/bug-tracker/www/patch-add.tcl 18 Sep 2013 14:17:03 -0000 1.14 +++ openacs-4/packages/bug-tracker/www/patch-add.tcl 14 Oct 2013 18:14:22 -0000 1.15 @@ -15,8 +15,8 @@ permission::require_permission -object_id [ad_conn package_id] -privilege create -if { [empty_string_p $return_url] } { - if { [exists_and_not_null bug_number] } { +if { $return_url eq "" } { + if { ([info exists bug_number] && $bug_number ne "") } { set return_url "bug?[export_vars { bug_number }]" } else { set return_url "patch-list" @@ -80,7 +80,7 @@ -widget file \ -label "[_ bug-tracker.Patch]" \ -if { [exists_and_not_null bug_number] } { +if { ([info exists bug_number] && $bug_number ne "") } { # Export the bug number element create patch bug_number \ -datatype integer \ @@ -102,7 +102,7 @@ if { [form is_request patch] } { # Form requested - if { [exists_and_not_null bug_number] } { + if { ([info exists bug_number] && $bug_number ne "") } { element set_properties patch bug_number -value $bug_number } @@ -137,7 +137,7 @@ set patch_number [db_string patch_number_for_id {}] # Redirect to the view page for the created patch by default - if { [empty_string_p $return_url] } { + if { $return_url eq "" } { set redirect_url "patch?[export_vars { patch_number }]" } else { set redirect_url $return_url 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 -N -r1.18 -r1.19 --- openacs-4/packages/bug-tracker/www/patch.tcl 19 Sep 2013 15:37:33 -0000 1.18 +++ openacs-4/packages/bug-tracker/www/patch.tcl 14 Oct 2013 18:14:22 -0000 1.19 @@ -28,8 +28,8 @@ set submitter_id [bug_tracker::get_patch_submitter -patch_number $patch_number] -set user_is_submitter_p [expr { ![empty_string_p $submitter_id] && $user_id == $submitter_id }] -set write_or_submitter_p [expr $write_p || $user_is_submitter_p] +set user_is_submitter_p [expr { $submitter_id ne "" && $user_id == $submitter_id }] +set write_or_submitter_p [expr {$write_p || $user_is_submitter_p}] set project_name [bug_tracker::conn project_name] set package_key [ad_conn package_key] set view_patch_url "[ad_conn url]?[export_vars -url { patch_number }]" @@ -39,13 +39,13 @@ set versions_p [bug_tracker::versions_p] # Abort editing and return to view mode if the user hit cancel on the edit form -if { [exists_and_not_null cancel_edit] } { +if { ([info exists cancel_edit] && $cancel_edit ne "") } { ad_returnredirect $view_patch_url ad_script_abort } # If the download link was clicked - return the text content of the patch -if { [exists_and_not_null download] } { +if { ([info exists download] && $download ne "") } { set patch_content [db_string get_patch_content {}] set outputheaders [ns_conn outputheaders] @@ -57,17 +57,17 @@ # Initialize the page mode variable # We are in view mode per default if { ![info exists mode] } { - if { [exists_and_not_null edit] } { + if { ([info exists edit] && $edit ne "") } { set mode edit - } elseif { [exists_and_not_null accept] } { + } elseif { ([info exists accept] && $accept ne "") } { set mode accept - } elseif { [exists_and_not_null refuse] } { + } elseif { ([info exists refuse] && $refuse ne "") } { set mode refuse - } elseif { [exists_and_not_null delete] } { + } elseif { ([info exists delete] && $delete ne "") } { set mode delete - } elseif { [exists_and_not_null reopen] } { + } elseif { ([info exists reopen] && $reopen ne "") } { set mode reopen - } elseif { [exists_and_not_null comment] } { + } elseif { ([info exists comment] && $comment ne "") } { set mode comment } else { set mode view @@ -78,7 +78,7 @@ # And check that the user is permitted to take the chosen action switch -- $mode { edit { - if { ![expr $write_p || $user_is_submitter_p] } { + if { ![expr {$write_p || $user_is_submitter_p}] } { ad_return_forbidden "[_ bug-tracker.Permission]" "[_ bug-tracker.You_2]" ad_script_abort } @@ -98,10 +98,10 @@ } reopen { # User must have write permission to reopen a refused patch - if { [string equal $patch_status "refused"] && !$write_p } { + if { $patch_status eq "refused" && !$write_p } { ad_return_forbidden "[_ bug-tracker.Permission]" "[_ bug-tracker.You_3]" ad_script_abort - } elseif { [string equal $patch_status "deleted"] && !($user_is_submitter_p || $write_p)} { + } elseif { $patch_status eq "deleted" && !($user_is_submitter_p || $write_p)} { ad_return_forbidden "[_ bug-tracker.Permission]" "[_ bug-tracker.You_4]" ad_script_abort } @@ -128,7 +128,7 @@ set field_editable_p($field) 1 } -if { ![string equal $mode "view"] } { +if { $mode ne "view" } { auth::require_login } @@ -160,7 +160,7 @@ -label "[_ bug-tracker.Component]" \ -options [bug_tracker::components_get_options] -if { [string equal $mode "view"] } { +if {$mode eq "view"} { element create patch fixes_bugs \ -datatype text \ -widget inform \ @@ -231,7 +231,7 @@ # In accept mode - give the user the ability to select associated # bugs to be resolved -if { [string equal $mode "accept"] } { +if {$mode eq "accept"} { element create patch resolve_bugs \ -datatype integer \ @@ -241,7 +241,7 @@ -optional } -if { [string equal $mode "edit"] } { +if {$mode eq "edit"} { # Edit mode - display the file upload widget for patch content element create patch patch_file \ -datatype file \ @@ -296,7 +296,7 @@ -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)] - if { [string equal $mode "view"] } { + 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 \]" ""] @@ -319,9 +319,9 @@ 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)] - set deleted_p [string equal $patch(status) deleted] + set deleted_p [string equal $patch(status) "deleted"] - if { ( [string equal $patch(status) open] && ![string equal $mode accept]) || [string equal $patch(status) refused] } { + if { ( $patch(status) eq "open" && $mode ne "accept" ) || $patch(status) eq "refused" } { element set_properties patch applied_to_version -widget hidden } @@ -334,7 +334,7 @@
[bug_tracker::bug_convert_comment_to_html -comment $comment -format $comment_format]
" } - if { [string equal $mode "view"] } { + if {$mode eq "view"} { element set_properties patch description -value $action_html } else { @@ -357,8 +357,8 @@ # Create the buttons # If the user has submitted the patch he gets full write access on the patch - set user_is_submitter_p [expr $patch(submitter_user_id) == [ad_conn user_id]] - if { [string equal $mode "view"] } { + set user_is_submitter_p [expr {$patch(submitter_user_id) == [ad_conn user_id]}] + if {$mode eq "view"} { set button_form_export_vars [export_vars -form { patch_number }] multirow create button name label @@ -398,7 +398,7 @@ } # Check that the user is permitted to change the patch - if { ![string equal $mode "view"] && !$write_p && !$user_is_submitter_p } { + if { $mode ne "view" && !$write_p && !$user_is_submitter_p } { ns_log notice "$patch(submitter_user_id) doesn't have write on object $patch(patch_id)" ad_return_forbidden "[_ bug-tracker.Permission]" "
[_ bug-tracker.You_6] @@ -421,7 +421,7 @@ foreach column $edit_fields { set $column [element get_value patch $column] lappend update_exprs "$column = :$column" - if {[string equal $column summary]} { + if {$column eq "summary"} { set new_title "Patch \#$patch_number: $summary" } } @@ -443,7 +443,7 @@ # Get the contents of any new uploaded patch file set content [bug_tracker::get_uploaded_patch_file_content] - if { ![empty_string_p $content] } { + if { $content ne "" } { lappend update_exprs "content = :content" } } @@ -459,7 +459,7 @@ if { [llength $update_exprs] > 0 } { db_dml update_patch {} } - if {[info exists new_title] && ![empty_string_p $new_title]} { + if {[info exists new_title] && $new_title ne ""} { db_dml update_patch_title {update acs_objects set title = :new_title where object_id = :patch_id} } set action_id [db_nextval "acs_object_id_seq"] @@ -471,7 +471,7 @@ set action $mode db_dml patch_action {} - if { [string equal $mode "accept"] } { + if {$mode eq "accept"} { # Resolve any bugs that the user selected set resolve_bugs [element get_values patch resolve_bugs] Index: openacs-4/packages/bug-tracker/www/related-file-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/related-file-add.tcl,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/bug-tracker/www/related-file-add.tcl 30 May 2008 13:46:05 -0000 1.1 +++ openacs-4/packages/bug-tracker/www/related-file-add.tcl 14 Oct 2013 18:14:22 -0000 1.2 @@ -17,7 +17,7 @@ set package_id [ad_conn package_id] -if {![exists_and_not_null return_url]} { +if {(![info exists return_url] || $return_url eq "")} { set return_url [export_vars -base "bug" {bug_number}] } @@ -48,7 +48,7 @@ set bug_id $bug(bug_id) } -validate { {upload_file - {[exists_and_not_null upload_file]} + {([info exists upload_file] && $upload_file ne "")} "[_ bug-tracker.Related_File_File_required]" } } -after_submit { @@ -74,7 +74,7 @@ foreach available_enabled_action_id [workflow::case::get_available_enabled_action_ids -case_id $case_id] { workflow::case::enabled_action_get -enabled_action_id $available_enabled_action_id -array enabled_action workflow::action::get -action_id $enabled_action(action_id) -array available_action - if { [string eq $available_action(short_name) "comment"] } { + if {$available_action(short_name) eq "comment"} { set action_id $enabled_action(action_id) array set row [list] foreach field [workflow::action::get_element -action_id $action_id -element edit_fields] { Index: openacs-4/packages/bug-tracker/www/related-file-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/related-file-delete.tcl,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/bug-tracker/www/related-file-delete.tcl 8 Mar 2011 19:51:03 -0000 1.2 +++ openacs-4/packages/bug-tracker/www/related-file-delete.tcl 14 Oct 2013 18:14:22 -0000 1.3 @@ -24,7 +24,7 @@ ad_script_abort } -if {![exists_and_not_null return_url]} { +if {(![info exists return_url] || $return_url eq "")} { set return_url [export_vars -base "bug" {bug_number}] } @@ -58,7 +58,7 @@ foreach available_enabled_action_id [workflow::case::get_available_enabled_action_ids -case_id $case_id] { workflow::case::enabled_action_get -enabled_action_id $available_enabled_action_id -array enabled_action workflow::action::get -action_id $enabled_action(action_id) -array available_action - if { [string eq $available_action(short_name) "comment"] } { + if {$available_action(short_name) eq "comment"} { set action_id $enabled_action(action_id) array set row [list] foreach field [workflow::action::get_element -action_id $action_id -element edit_fields] { Index: openacs-4/packages/bug-tracker/www/related-file-download.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/related-file-download.tcl,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/bug-tracker/www/related-file-download.tcl 30 May 2008 13:46:05 -0000 1.1 +++ openacs-4/packages/bug-tracker/www/related-file-download.tcl 14 Oct 2013 18:14:22 -0000 1.2 @@ -17,7 +17,7 @@ } # make sure this object is related to this bug -if {[exists_and_not_null revision_id]} { +if {([info exists revision_id] && $revision_id ne "")} { if { ![db_0or1row get_related_revision {}] } { ad_return_complaint 1 [_ bug-tracker.Related_file_not_found] ad_script_abort Index: openacs-4/packages/bug-tracker/www/related-file-properties.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/related-file-properties.tcl,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/bug-tracker/www/related-file-properties.tcl 30 May 2008 13:46:05 -0000 1.1 +++ openacs-4/packages/bug-tracker/www/related-file-properties.tcl 14 Oct 2013 18:14:22 -0000 1.2 @@ -23,7 +23,7 @@ ad_script_abort } -if {![exists_and_not_null return_url]} { +if {(![info exists return_url] || $return_url eq "")} { set return_url [export_vars -base "bug" {bug_number}] } Index: openacs-4/packages/bug-tracker/www/related-file-update.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/related-file-update.tcl,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/bug-tracker/www/related-file-update.tcl 30 May 2008 13:46:05 -0000 1.1 +++ openacs-4/packages/bug-tracker/www/related-file-update.tcl 14 Oct 2013 18:14:22 -0000 1.2 @@ -30,7 +30,7 @@ ad_script_abort } -if {![exists_and_not_null return_url]} { +if {(![info exists return_url] || $return_url eq "")} { set return_url [export_vars -base "bug" {bug_number}] } @@ -49,7 +49,7 @@ } -on_request { } -validate { {upload_file - {[exists_and_not_null upload_file]} + {([info exists upload_file] && $upload_file ne "")} "[_ bug-tracker.Related_File_File_required]" } } -after_submit { @@ -79,7 +79,7 @@ foreach available_enabled_action_id [workflow::case::get_available_enabled_action_ids -case_id $case_id] { workflow::case::enabled_action_get -enabled_action_id $available_enabled_action_id -array enabled_action workflow::action::get -action_id $enabled_action(action_id) -array available_action - if { [string eq $available_action(short_name) "comment"] } { + if {$available_action(short_name) eq "comment"} { set action_id $enabled_action(action_id) array set row [list] foreach field [workflow::action::get_element -action_id $action_id -element edit_fields] { Index: openacs-4/packages/bug-tracker/www/send-summary-email.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/send-summary-email.tcl,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/bug-tracker/www/send-summary-email.tcl 29 May 2008 15:01:08 -0000 1.1 +++ openacs-4/packages/bug-tracker/www/send-summary-email.tcl 14 Oct 2013 18:14:22 -0000 1.2 @@ -19,7 +19,7 @@ set user_id [auth::require_login] set sender_email [acs_user::get_element -user_id $user_id -element email] -if {![exists_and_not_null return_url]} { +if {(![info exists return_url] || $return_url eq "")} { set return_url "./" } @@ -70,7 +70,7 @@ set p_keyword_id 0 foreach {keyword_id keyword_label} [bug_tracker::category_types -package_id $package_id] { - if {[string equal $keyword_label "[_ bug-tracker.Priority]"]} { + if {$keyword_label eq "[_ bug-tracker.Priority]"} { set p_keyword_id $keyword_id } } @@ -94,7 +94,7 @@ set final_recipient_list [list] foreach one_email [split $recipient_list " "] { set one_email [string trim $one_email] - if {![string equal $one_email {}]} { + if {$one_email ne "" } { lappend final_recipient_list $one_email } } @@ -111,7 +111,7 @@ if { [form is_request bug] } { foreach field {success_inform_text_stub errors_inform_text_stub} { - if {[string equal [set $field] {}]} { + if {[set $field] eq ""} { element set_properties bug $field -widget hidden } } Index: openacs-4/packages/bug-tracker/www/unmap-patch-from-bug.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/unmap-patch-from-bug.tcl,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/bug-tracker/www/unmap-patch-from-bug.tcl 19 Sep 2013 15:37:33 -0000 1.4 +++ openacs-4/packages/bug-tracker/www/unmap-patch-from-bug.tcl 14 Oct 2013 18:14:22 -0000 1.5 @@ -13,9 +13,9 @@ set user_id [ad_conn user_id] set write_p [permission::permission_p -object_id $package_id -privilege write] -set user_is_submitter_p [expr $user_id == [bug_tracker::get_patch_submitter -patch_number $patch_number]] +set user_is_submitter_p [expr {$user_id == [bug_tracker::get_patch_submitter -patch_number $patch_number]}] -if { ![expr $user_is_submitter_p || $write_p] } { +if { ![expr {$user_is_submitter_p || $write_p}] } { ad_return_forbidden "[_ bug-tracker.Permission]" "[_ bug-tracker.You_7]" ad_script_abort } Index: openacs-4/packages/bug-tracker/www/admin/category-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/admin/category-edit.tcl,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/bug-tracker/www/admin/category-edit.tcl 30 May 2011 14:23:14 -0000 1.4 +++ openacs-4/packages/bug-tracker/www/admin/category-edit.tcl 14 Oct 2013 18:14:22 -0000 1.5 @@ -8,7 +8,7 @@ set project_name [bug_tracker::conn project_name] -if { (![info exists keyword_id] && ![info exists parent_id]) || [string equal $type_p "t"] } { +if { (![info exists keyword_id] && ![info exists parent_id]) || $type_p == "t" } { set object_type_name [_ bug-tracker.Category_Type] } else { set object_type_name [_ bug-tracker.Category] @@ -29,7 +29,7 @@ {parent_id:integer(hidden)} {heading:text {label $object_type_name}} } -new_request { - if { ![exists_and_not_null parent_id] } { + if { (![info exists parent_id] || $parent_id eq "") } { set parent_id [bug_tracker::conn project_root_keyword_id] } } -select_query { Index: openacs-4/packages/bug-tracker/www/admin/formwizard.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/admin/formwizard.tcl,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/bug-tracker/www/admin/formwizard.tcl 18 Sep 2002 12:03:59 -0000 1.4 +++ openacs-4/packages/bug-tracker/www/admin/formwizard.tcl 14 Oct 2013 18:14:22 -0000 1.5 @@ -12,7 +12,7 @@ {primary_key "object_id"} } -if {![empty_string_p $table_name] && ![db_0or1row table_name_check { +if {$table_name ne "" && ![db_0or1row table_name_check { select oid from pg_class where lower(relname) = lower(:table_name) }]} { ad_returnredirect "formwizard" @@ -44,7 +44,7 @@ set column_name "" while {[regexp {([A-Za-z_]+) = '([^']+)'(.*)$} $rcsrc match key val rcsrc]} { lappend options [list $val $val] - if {$column_name == ""} { + if {$column_name eq ""} { set column_name $key } elseif {$column_name != $key} { # bail out - this isn't what we think it is @@ -99,7 +99,7 @@ } # If we're using the ATS date widget, look up the format - if {$widget == "date"} { + if {$widget eq "date"} { set format "-format \"$date_format_map($typname)\"" } @@ -122,7 +122,7 @@ # If it's a boolean, add "Yes" and "No" options # Note: this is not necessarily the best UI choice. # Checkbox and radio elements are also available. - if {$typname == "bool"} { + if {$typname eq "bool"} { set options "-options {{Yes t} {No f}}" } @@ -138,7 +138,7 @@ append insert_columns "$attname, " - if {$widget == "date"} { + if {$widget eq "date"} { append get_values " if {!\[empty_string_p \$$element_name\]} { set $element_name \[template::util::date::get_property sql_date \$$element_name\] } else { @@ -165,7 +165,7 @@ # and expanding it. set user_id [ad_conn user_id] - if { [empty_string_p $user_id] || $user_id == 0 } { + if { $user_id eq "" || $user_id == 0 } { set author "formwizard.tcl" } else { set author [db_string author { select first_names || ' ' || last_name || ' (' || email || ')' from cc_users where user_id = :user_id }]