Index: openacs-4/packages/workflow/tcl/action-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/workflow/tcl/action-procs.tcl,v diff -u -r1.34 -r1.35 --- openacs-4/packages/workflow/tcl/action-procs.tcl 20 Dec 2004 16:43:28 -0000 1.34 +++ openacs-4/packages/workflow/tcl/action-procs.tcl 17 Sep 2013 19:10:34 -0000 1.35 @@ -192,7 +192,7 @@ } { switch $operation { update - delete { - if { [empty_string_p $action_id] } { + if { $action_id eq "" } { error "You must specify the action_id of the action to $operation." } } @@ -214,11 +214,11 @@ } switch $operation { insert { - if { [empty_string_p $workflow_id] } { + if { $workflow_id eq "" } { error "You must supply workflow_id" } # Default sort_order - if { ![exists_and_not_null row(sort_order)] } { + if { (![info exists row(sort_order)] || $row(sort_order) eq "") } { set row(sort_order) [workflow::default_sort_order \ -workflow_id $workflow_id \ -table_name "workflow_actions"] @@ -229,7 +229,7 @@ } } update - delete { - if { [empty_string_p $workflow_id] } { + if { $workflow_id eq "" } { set workflow_id [workflow::action::get_element \ -action_id $action_id \ -element workflow_id] @@ -246,7 +246,7 @@ if { [info exists row(parent_action_id)] } { error "You cannot supply both parent_action ($row(parent_action)) (takes short_name) and parent_action_id ($row(parent_action_id)) (takes action_id)" } - if { ![empty_string_p $row(parent_action)] } { + if { $row(parent_action) ne "" } { set row(parent_action_id) [workflow::action::get_id \ -workflow_id $workflow_id \ -short_name $row(parent_action)] @@ -259,7 +259,7 @@ # Record if this is an initial action (deprecated) if { [info exists row(initial_action_p)] } { - if { [info exists row(trigger_type)] && ![string equal $row(trigger_type) "user"] } { + if { [info exists row(trigger_type)] && $row(trigger_type) ne "user" } { error "You can't specify both initial_action_p (which is deprecated) and trigger_type (which has replaced it) at the same time. Stick to trigger_type." } if { [template::util::is_true $row(initial_action_p)] } { @@ -292,8 +292,8 @@ # Convert the Tcl value to something we can use in the query switch $attr { short_name { - if { ![exists_and_not_null row(pretty_name)] } { - if { [empty_string_p $row(short_name)] } { + if { (![info exists row(pretty_name)] || $row(pretty_name) eq "") } { + if { $row(short_name) eq "" } { error "You cannot edit with an empty short_name without also setting pretty_name" } else { set row(pretty_name) {} @@ -310,7 +310,7 @@ set $varname [db_boolean [template::util::is_true $row($attr)]] } assigned_role { - if { [empty_string_p $row($attr)] } { + if { $row($attr) eq "" } { set $varname [db_null] } else { # Get role_id by short_name @@ -358,7 +358,7 @@ # Do the insert/update/delete switch $operation { insert { - if { [empty_string_p $action_id] } { + if { $action_id eq "" } { set action_id [db_nextval "workflow_actions_seq"] } @@ -538,7 +538,7 @@ foreach action_id [set __workflow_action_data,${workflow_id}(action_ids)] { array set one_action [set __workflow_action_data,${workflow_id}($action_id)] - if { [string equal $one_action(short_name) $short_name] } { + if {$one_action(short_name) eq $short_name} { return $action_id } } @@ -609,13 +609,13 @@ @author Lars Pind (lars@collaboraid.biz) } { - if { [empty_string_p $action_id] } { - if { [empty_string_p $one_id] } { + if { $action_id eq "" } { + if { $one_id eq "" } { error "You must supply either action_id or one_id" } set action_id $one_id } else { - if { ![empty_string_p $one_id] } { + if { $one_id ne "" } { error "You can only supply either action_id or one_id" } } @@ -644,7 +644,7 @@ set acs_sc_impl_id [workflow::service_contract::get_impl_id -name $name] # Get the sort order - if { ![exists_and_not_null sort_order] } { + if { (![info exists sort_order] || $sort_order eq "") } { set sort_order [db_string select_sort_order {}] } @@ -677,7 +677,7 @@ foreach callback_id $callback_ids { array set one_callback $callbacks($callback_id) - if { [string equal $one_callback(contract_name) $contract_name] } { + if {$one_callback(contract_name) eq $contract_name} { lappend impl_names $one_callback(impl_name) } } @@ -710,7 +710,7 @@ set result [list] foreach action_id [workflow::get_actions -all -workflow_id $workflow_id] { - if { [empty_string_p $ignore_action_id] || ![string equal $ignore_action_id $action_id] } { + if { $ignore_action_id eq "" || $ignore_action_id ne $action_id } { lappend result [workflow::action::get_element -action_id $action_id -element short_name] } } @@ -733,8 +733,8 @@ -workflow_id $workflow_id \ -ignore_action_id $action_id] - if { [empty_string_p $short_name] } { - if { [empty_string_p $pretty_name] } { + if { $short_name eq "" } { + if { $pretty_name eq "" } { error "Cannot have empty pretty_name when short_name is empty" } set short_name [util_text_to_url \ @@ -823,7 +823,7 @@ and (:parent_action_id is null or parent_action_id = :parent_action_id) and (:action_id is null or action_id != :action_id) }] - return [expr !$exists_p] + return [expr {!$exists_p}] } @@ -890,7 +890,7 @@ enabled_states assigned_states enabled_state_ids assigned_state_ids } { - if { [exists_and_not_null $elm] } { + if { ([info exists $elm] && $$elm ne "") } { set row($elm) [set $elm] } } @@ -949,7 +949,7 @@ } { switch $operation { update - delete { - if { [empty_string_p $action_id] } { + if { $action_id eq "" } { error "You must specify the action_id of the action to $operation." } } @@ -969,12 +969,12 @@ } switch $operation { insert { - if { [empty_string_p $workflow_id] } { + if { $workflow_id eq "" } { error "You must supply workflow_id" } } update - delete { - if { [empty_string_p $workflow_id] } { + if { $workflow_id eq "" } { set workflow_id [workflow::action::get_element \ -action_id $action_id \ -element workflow_id] @@ -990,7 +990,7 @@ if { [info exists row(new_state_id)] } { error "You cannot supply both new_state (takes short_name) and new_state_id (takes state_id)" } - if { ![empty_string_p $row(new_state)] } { + if { $row(new_state) ne "" } { set row(new_state_id) [workflow::state::fsm::get_id \ -workflow_id $workflow_id \ -short_name $row(new_state)] @@ -1213,13 +1213,13 @@ @author Peter Marklund @author Lars Pind (lars@collaboraid.biz) } { - if { [empty_string_p $action_id] } { - if { [empty_string_p $one_id] } { + if { $action_id eq "" } { + if { $one_id eq "" } { error "You must supply either action_id or one_id" } set action_id $one_id } else { - if { ![empty_string_p $one_id] } { + if { $one_id ne "" } { error "You can only supply either action_id or one_id" } } @@ -1240,7 +1240,7 @@ @author Lars Pind (lars@collaboraid.biz) } { - if { [empty_string_p $workflow_id] } { + if { $workflow_id eq "" } { set workflow_id [workflow::action::get_element \ -action_id $action_id \ -element workflow_id] @@ -1253,7 +1253,7 @@ and state_id = :state_id } -default {}] - set currently_enabled_p [expr ![empty_string_p $currently_assigned_p]] + set currently_enabled_p [expr {$currently_assigned_p ne ""}] set currently_assigned_p [template::util::is_true $currently_assigned_p] set db_assigned_p [db_boolean $assigned_p] @@ -1349,13 +1349,13 @@ @author Lars Pind (lars@collaboraid.biz) } { - if { [empty_string_p $action_id] } { - if { [empty_string_p $one_id] } { + if { $action_id eq "" } { + if { $one_id eq "" } { error "You must supply either action_id or one_id" } set action_id $one_id } else { - if { ![empty_string_p $one_id] } { + if { $one_id ne "" } { error "You can only supply either action_id or one_id" } } @@ -1396,7 +1396,7 @@ } } - if { ![exists_and_not_null row(description)] } { + if { (![info exists row(description)] || $row(description) eq "") } { array unset row description_mime_type } @@ -1408,7 +1408,7 @@ set spec [list] foreach name [lsort [array names row]] { - if { ![empty_string_p $row($name)] && ![exists_and_equal defaults($name) $row($name)] } { + if { $row($name) ne "" && ![exists_and_equal defaults($name) $row($name)] } { lappend spec $name $row($name) } } @@ -1481,7 +1481,7 @@ array set $action_var_name [set __workflow_action_data,${workflow_id}($action_id)] } - if { [empty_string_p $element] } { + if { $element eq "" } { return [array get $action_var_name] } else { return [set "${action_var_name}($element)"] @@ -1546,7 +1546,7 @@ child_state_ids {} } array set action_array_${action_id} [array get action_row] - if { ![empty_string_p $action_row(parent_action_id)] } { + if { $action_row(parent_action_id) ne "" } { lappend action_array_$action_row(parent_action_id)(child_action_ids) $action_id lappend action_array_$action_row(parent_action_id)(child_actions) $action_row(short_name) } @@ -1563,7 +1563,7 @@ # Get child states foreach state_id [workflow::fsm::get_states -all -workflow_id $workflow_id] { workflow::state::fsm::get -state_id $state_id -array state_array - if { ![empty_string_p $state_array(parent_action_id)] } { + if { $state_array(parent_action_id) ne "" } { lappend action_array_$state_array(parent_action_id)(child_state_ids) $state_id lappend action_array_$state_array(parent_action_id)(child_states) $state_array(short_name) } @@ -1602,7 +1602,7 @@ # Build arrays of enabled and assigned state short names for all actions db_foreach action_enabled_in_states {} { - if { [string equal $assigned_p "t"] } { + if {$assigned_p eq "t"} { lappend action_array_${action_id}(assigned_states) $short_name lappend action_array_${action_id}(assigned_state_ids) $state_id } else { Index: openacs-4/packages/workflow/tcl/case-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/workflow/tcl/case-procs.tcl,v diff -u -r1.47 -r1.48 --- openacs-4/packages/workflow/tcl/case-procs.tcl 17 Sep 2013 14:37:38 -0000 1.47 +++ openacs-4/packages/workflow/tcl/case-procs.tcl 17 Sep 2013 19:10:34 -0000 1.48 @@ -38,7 +38,7 @@ @author Lars Pind (lars@collaboraid.biz) } { db_transaction { - if { ![exists_and_not_null case_id] } { + if { (![info exists case_id] || $case_id eq "") } { set case_id [db_nextval "workflow_cases_seq"] } @@ -79,11 +79,11 @@ @author Lars Pind (lars@collaboraid.biz) } { - if { ![exists_and_not_null user_id] } { + if { (![info exists user_id] || $user_id eq "") } { set user_id [ad_conn user_id] } - if { ![exists_and_not_null package_id] } { + if { (![info exists package_id] || $package_id eq "") } { set package_id [ad_conn package_id] } @@ -97,11 +97,11 @@ array unset row } - if {[empty_string_p $initial_action_id]} { + if {$initial_action_id eq ""} { set initial_action_id [workflow::get_element -workflow_id $workflow_id -element initial_action_id] } - if { [empty_string_p $initial_action_id] } { + if { $initial_action_id eq "" } { # If there is no initial-action, we create one now # TODO: Should we do this here, or throw an error like we used to? # If we change this, we should throw an error instead @@ -133,7 +133,7 @@ workflow::action::fsm::get -action_id $initial_action_id -array initial_action set new_state $initial_action(new_state) - if { [empty_string_p $new_state] } { + if { $new_state eq "" } { error "Initial action with short_name \"$initial_action(short_name)\" does not have any new_state. In order to be an initial state, it must have new_state set." } } @@ -145,7 +145,7 @@ -object_id $object_id] # Assign roles - if { [exists_and_not_null assignment] } { + if { ([info exists assignment] && $assignment ne "") } { array set assignment_array $assignment workflow::case::role::assign -case_id $case_id -array assignment_array } @@ -225,7 +225,7 @@ set enabled_actions [workflow::case::get_enabled_actions -case_id $case_id] } - return [expr [llength $enabled_actions] > 0] + return [expr {[llength $enabled_actions] > 0}] } ad_proc -public workflow::case::get_element { @@ -274,7 +274,7 @@ @author Lars Pind (lars@collaboraid.biz) } { - if { ![exists_and_not_null user_id] } { + if { (![info exists user_id] || $user_id eq "") } { set user_id [ad_conn user_id] } return [util_memoize [list workflow::case::get_user_roles_not_cached $case_id $user_id] \ @@ -345,7 +345,7 @@ Used internally by the workflow API only. Goes to the database to get the enabled actions for the case. } { - if { [empty_string_p $trigger_type] } { + if { $trigger_type eq "" } { return [db_list select_enabled_actions { select ena.enabled_action_id from workflow_case_enabled_actions ena @@ -379,7 +379,7 @@ @see workflow::case::get_available_enabled_action_ids } { - if { ![exists_and_not_null user_id] } { + if { (![info exists user_id] || $user_id eq "") } { set user_id [ad_conn user_id] } @@ -408,7 +408,7 @@ @author Lars Pind (lars@collaboraid.biz) } { - if { ![exists_and_not_null user_id] } { + if { (![info exists user_id] || $user_id eq "") } { set user_id [ad_conn user_id] } @@ -490,9 +490,9 @@ set activity_entry_list [get_activity_log_info_not_cached -case_id $case_id] set start_index 0 - if { ![empty_string_p $max_n_actions] && [llength $activity_entry_list] > $max_n_actions} { + if { $max_n_actions ne "" && [llength $activity_entry_list] > $max_n_actions} { # Only return the last max_n_actions actions - set start_index [expr [llength $activity_entry_list] - $max_n_actions] + set start_index [expr {[llength $activity_entry_list] - $max_n_actions}] } set log_html {} @@ -517,7 +517,7 @@ append log_html $__adp_output } - if { ![empty_string_p $action_id] } { + if { $action_id ne "" } { set action_pretty_past_tense [lang::util::localize [workflow::action::get_element -action_id $action_id -element pretty_past_tense]] # sets first_names, last_name, email @@ -562,7 +562,7 @@ set entry_text "$creation_date_pretty $action_pretty_past_tense [ad_decode $log_title "" "" "$log_title "]by $user_first_names $user_last_name ($user_email)" - if { ![empty_string_p $comment] } { + if { $comment ne "" } { append entry_text ":\n\n [join [split [ad_html_text_convert -from $comment_mime_type -to "text/plain" -maxlen 66 -- $comment] "\n"] "\n "]" } @@ -631,11 +631,11 @@ set entries [list] template::multirow -local foreach entries { - if { ![empty_string_p $key] } { + if { $key ne "" } { lappend data_arraylist $key $value } - if { $counter == $rowcount || ![string equal $last_entry_id [set "entries:[expr $counter + 1](entry_id)"]] } { + if { $counter == $rowcount || $last_entry_id ne [set "entries:[expr {$counter + 1}](entry_id)"] } { set log_title_elements [list] foreach impl_name $impl_names { @@ -644,7 +644,7 @@ -operation "GetTitle" \ -impl $impl_name \ -call_args [list $case_id $object_id $action_id $entry_id $data_arraylist]] - if { ![empty_string_p $result] } { + if { $result ne "" } { lappend log_title_elements $result } } @@ -681,13 +681,13 @@ } { switch $type { workflow_case { - if { ![exists_and_not_null case_id] } { + if { (![info exists case_id] || $case_id eq "") } { return {} } return [workflow::case::get_element -case_id $case_id -element object_id] } default { - if { ![exists_and_not_null workflow_id] } { + if { (![info exists workflow_id] || $workflow_id eq "") } { return {} } return [workflow::get_element -workflow_id $workflow_id -element object_id] @@ -717,11 +717,11 @@ -workflow_id $workflow_id \ -case_id $case_id] - if { [empty_string_p $object_id] } { + if { $object_id eq "" } { return {} } - if { ![exists_and_not_null return_url] } { + if { (![info exists return_url] || $return_url eq "") } { set return_url [ad_return_url] } @@ -763,9 +763,9 @@ -case_id $case_id \ -return_url $return_url] - if { ![empty_string_p $url] } { + if { $url ne "" } { set title "Subscribe to $pretty($type)" - if { ![empty_string_p $label] } { + if { $label ne "" } { set row_label $label } else { set row_label $title @@ -1070,7 +1070,7 @@ -impl $impl_name \ -call_args [list $case_id $object_id $role_id]] - if { ![empty_string_p $subquery] } { + if { $subquery ne "" } { # Return after the first non-empty list break } @@ -1122,7 +1122,7 @@ } { set workflow_id [workflow::case::get_element -case_id $case_id -element workflow_id] - if { [empty_string_p $role_ids] } { + if { $role_ids eq "" } { set role_ids [workflow::get_roles -workflow_id $workflow_id] } @@ -1160,12 +1160,12 @@ if { [uplevel info exists $form_name:$element] } { # Set normal value - if { [uplevel template::form is_request $form_name] || [string equal [uplevel [list element get_property $form_name $element mode]] "display"] } { + if { [uplevel template::form is_request $form_name] || [uplevel [list element get_property $form_name $element mode]] eq "display" } { uplevel [list element set_value $form_name $element $cur_assignee(party_id)] } # Set display value - if { [empty_string_p $cur_assignee(party_id)] } { + if { $cur_assignee(party_id) eq "" } { set display_value "None" } else { set display_value [acs_community_member_link \ @@ -1175,7 +1175,7 @@ append display_value " ($cur_assignee(email))" } else { append display_value " ([string replace $cur_assignee(email) \ - [expr [string first "@" $cur_assignee(email)]+3] end "..."])" + [expr {[string first "@" $cur_assignee(email)]+3}] end "..."])" } } @@ -1313,7 +1313,7 @@ set assignees [workflow::case::role::get_assignees -case_id $case_id -role_id $role_id] foreach assignee $assignees { array set elm $assignee - if { [exists_and_not_null elm(party_id)] } { + if { ([info exists elm(party_id)] && $elm(party_id) ne "") } { callback workflow::case::role::after_unassign \ -case_id $case_id \ -party_id $elm(party_id) @@ -1411,8 +1411,8 @@ # Select the info into the upvar'ed Tcl Array upvar $array row - if { ![empty_string_p $action_id] } { - if { ![empty_string_p $enabled_action_id] } { + if { $action_id ne "" } { + if { $enabled_action_id ne "" } { error "You cannot specify both action_id and enabled_action_id. enabled_action_id is preferred." } set enabled_action_id [workflow::case::action::get_enabled_action_id \ @@ -1421,7 +1421,7 @@ -any_parent] } - if { [empty_string_p $enabled_action_id] } { + if { $enabled_action_id eq "" } { array set row [util_memoize [list workflow::case::fsm::get_info_not_cached $case_id $parent_enabled_action_id] \ [workflow::case::cache_timeout]] set row(entry_id) {} @@ -1459,7 +1459,7 @@ @author Peter Marklund } { - if { [empty_string_p $parent_enabled_action_id] } { + if { $parent_enabled_action_id eq "" } { db_1row select_case_info_null_parent_id {} -column_array row } else { db_1row select_case_info {} -column_array row @@ -1497,7 +1497,7 @@ if { $all_p } { return [db_list_of_lists select_state_info {}] } else { - if { [empty_string_p $parent_enabled_action_id] } { + if { $parent_enabled_action_id eq "" } { return [db_string null_parent { select current_state from workflow_case_fsm @@ -1543,11 +1543,11 @@ @author Lars Pind (lars@collaboraid.biz) } { - if { ![exists_and_not_null user_id] } { + if { (![info exists user_id] || $user_id eq "") } { set user_id [ad_conn user_id] } - if { ![empty_string_p $enabled_action_id] } { + if { $enabled_action_id ne "" } { ns_log notice "#### workflow::case::enabled_action_get -enabled_action_id $enabled_action_id -array enabled_action" workflow::case::enabled_action_get -enabled_action_id $enabled_action_id -array enabled_action set case_id $enabled_action(case_id) @@ -1635,11 +1635,11 @@ @author Lars Pind (lars@collaboraid.biz) } { # Always permit the no-op - if { [empty_string_p $action_id] && [empty_string_p $enabled_action_id] } { + if { $action_id eq "" && $enabled_action_id eq "" } { return 1 } - if { ![empty_string_p $enabled_action_id] } { + if { $enabled_action_id ne "" } { workflow::case::enabled_action_get -enabled_action_id $enabled_action_id -array enabled_action set case_id $enabled_action(case_id) set action_id $enabled_action(action_id) @@ -1682,7 +1682,7 @@ and completed_p = 'f' }] } else { - if { [empty_string_p $parent_enabled_action_id] } { + if { $parent_enabled_action_id eq "" } { set result [db_list select_enabled_action_id { select enabled_action_id from workflow_case_enabled_actions @@ -1783,7 +1783,7 @@ set user_email $latest_action(user_email) set latest_action_chunk [_ workflow.notification_email_latest_action_chunk] - if { ![empty_string_p $latest_action(comment)] } { + if { $latest_action(comment) ne "" } { append latest_action_chunk ":\n\n [join [split [ad_html_text_convert -from $latest_action(comment_mime_type) -to "text/plain" -maxlen 66 -- $latest_action(comment)] "\n"] "\n "]" } @@ -1796,7 +1796,7 @@ # We only use the first callback set impl_name [lindex $impl_names 0] - if { ![empty_string_p $impl_name] } { + if { $impl_name ne "" } { set notification_info [acs_sc::invoke \ -contract $contract_name \ -operation "GetNotificationInfo" \ @@ -1813,7 +1813,7 @@ set object_details_list [lindex $notification_info 2] set object_notification_tag [lindex $notification_info 3] - if { [empty_string_p $object_one_line] } { + if { $object_one_line eq "" } { # Default: Case #$case_id: acs_object__name(case.object_id) set object_id $case(object_id) @@ -1843,8 +1843,8 @@ # Output notification info set object_details_lines [list] foreach { label value } $object_details_list { - if { ![empty_string_p $label] } { - lappend object_details_lines "$label[string repeat " " [expr $max_label_len - [string length $label]]] : $value" + if { $label ne "" } { + lappend object_details_lines "$label[string repeat " " [expr {$max_label_len - [string length $label]}]] : $value" } else { lappend object_details_lines "[string repeat " " $max_label_len] $value" } @@ -1927,7 +1927,7 @@ -workflow_id $case(workflow_id) \ -case_id $case_id] - if { ![empty_string_p $object_id] && ($type eq "workflow" || ![empty_string_p $subset($type)] || $type eq "workflow_case")} { + if { $object_id ne "" && ($type eq "workflow" || $subset($type) ne "" || $type eq "workflow_case")} { set notified_list [concat $notified_list [notification::new \ -type_id [notification::type::get_type_id -short_name $type] \ -object_id $object_id \ @@ -2006,28 +2006,28 @@ @author Lars Pind (lars@collaboraid.biz) } { - if { ![exists_and_not_null user_id] } { + if { (![info exists user_id] || $user_id eq "") } { if { ![ad_conn isconnected] } { set user_id 0 } else { set user_id [ad_conn user_id] } } - if { ![exists_and_not_null package_id] } { + if { (![info exists package_id] || $package_id eq "") } { if { ![ad_conn isconnected] } { set package_id {} } else { set package_id [ad_conn package_id] } } - if { [empty_string_p $case_id] || [empty_string_p $action_id] } { - if { [empty_string_p $enabled_action_id] } { + if { $case_id eq "" || $action_id eq "" } { + if { $enabled_action_id eq "" } { error "You must supply either case_id and action_id, or enabled_action_id" } } - if { [empty_string_p $enabled_action_id] } { + if { $enabled_action_id eq "" } { if { $initial_p } { set enabled_action_id {} } else { @@ -2038,12 +2038,12 @@ -any_parent \ -case_id $case_id \ -action_id $action_id] - if { [empty_string_p $enabled_action_id] } { + if { $enabled_action_id eq "" } { error "This action is not enabled at this time." } } } - if { ![empty_string_p $enabled_action_id] } { + if { $enabled_action_id ne "" } { workflow::case::enabled_action_get -enabled_action_id $enabled_action_id -array enabled_action set case_id $enabled_action(case_id) set action_id $enabled_action(action_id) @@ -2059,20 +2059,20 @@ } } - if { [empty_string_p $comment] } { + if { $comment eq "" } { # single-space comment set comment { } } # We can't have empty comment_mime_type, default to text/plain - if { [empty_string_p $comment_mime_type] } { + if { $comment_mime_type eq "" } { set comment_mime_type "text/plain" } ns_log notice "case::execute start = [set start [clock clicks -milliseconds]]" db_transaction { # Double-click protection - if { ![empty_string_p $entry_id] } { + if { $entry_id ne "" } { if { [db_string log_entry_exists_p {}] } { return $entry_id } @@ -2087,7 +2087,7 @@ -parent_enabled_action_id $parent_enabled_action_id ns_log notice "case::execute two = [expr {[set two [clock clicks -milliseconds]] - $start}]" # Mark the action completed - if { ![empty_string_p $enabled_action_id] } { + if { $enabled_action_id ne "" } { workflow::case::action::complete \ -enabled_action_id $enabled_action_id \ -user_id $user_id @@ -2114,7 +2114,7 @@ -entry_id $entry_id ns_log notice "case::execute five = [expr {[set five [clock clicks -milliseconds]] - $three}]" # Scan for enabled actions - if { [string equal $parent_trigger_type "workflow"] } { + if {$parent_trigger_type eq "workflow"} { workflow::case::state_changed_handler \ -case_id $case_id \ -parent_enabled_action_id $parent_enabled_action_id \ @@ -2132,7 +2132,7 @@ } ns_log notice "case::execute seven = [expr {[set seven [clock clicks -milliseconds]] - $six}]" # If there's a parent, alert the parent - if { ![empty_string_p $parent_enabled_action_id] } { + if { $parent_enabled_action_id ne "" } { workflow::case::child_state_changed_handler \ -parent_enabled_action_id $parent_enabled_action_id \ -user_id $user_id @@ -2193,7 +2193,7 @@ #---------------------------------------------------------------------- # 2. Get the rows in workflow_case_enabled_actions #---------------------------------------------------------------------- - if { [empty_string_p $parent_enabled_action_id] } { + if { $parent_enabled_action_id eq "" } { set db_rows [db_list_of_lists select_previously_enabled_actions_null_parent {}] } else { set db_rows [db_list_of_lists select_previously_enabled_actions {}] @@ -2320,7 +2320,7 @@ db_transaction { set enabled_action_id [db_nextval "workflow_case_enbl_act_seq"] - if { ![string equal $action(trigger_type) "user"] } { + if { $action(trigger_type) ne "user" } { # Action can only be assigned if it has trigger_type user # But its children can be assigned, so we keep the original assigned_p variable set db_assigned_p f @@ -2332,7 +2332,7 @@ db_dml insert_enabled {} # Insert assignees - if { [exists_and_not_null assignees] } { + if { ([info exists assignees] && $assignees ne "") } { foreach party_id $assignees { db_dml insert_assignee { insert into workflow_case_action_assignees (enabled_action_id, party_id) @@ -2351,12 +2351,12 @@ and trigger_type = 'init' } -default {}] - if { [empty_string_p $child_init_id] } { + if { $child_init_id eq "" } { error "Child workflow for action $action(pretty_name) doesn't have an action with trigger_type = 'init', or it has more than one." } workflow::action::fsm::get -action_id $child_init_id -array initial_action - if { [empty_string_p $initial_action(new_state)] } { + if { $initial_action(new_state) eq "" } { error "Initial action with short_name \"$initial_action(short_name)\" does not have any new_state. In order to be an initial state, it must have new_state set." } @@ -2520,13 +2520,13 @@ db_transaction { - if { [empty_string_p $case_id] || [empty_string_p $action_id] } { - if { [empty_string_p $enabled_action_id] } { + if { $case_id eq "" || $action_id eq "" } { + if { $enabled_action_id eq "" } { error "You must supply either case_id and action_id, or enabled_action_id" } } - if { [empty_string_p $enabled_action_id] } { + if { $enabled_action_id eq "" } { if { $initial_p } { set enabled_action_p {} # We rely on parent_enabled_action_id being set by the caller here @@ -2539,7 +2539,7 @@ } } - if { ![empty_string_p $enabled_action_id] } { + if { $enabled_action_id ne "" } { workflow::case::enabled_action_get -enabled_action_id $enabled_action_id -array enabled_action # Even if these are provided, we overide them with the DB call set case_id $enabled_action(case_id) @@ -2552,10 +2552,10 @@ set new_state_id $action(new_state_id) # Actually change the state, if any state change - if { ![empty_string_p $new_state_id] } { + if { $new_state_id ne "" } { # Delete any existing state with this parent_enabled_action_id - if { [empty_string_p $parent_enabled_action_id] } { + if { $parent_enabled_action_id eq "" } { db_dml delete_fsm_state { delete from workflow_case_fsm Index: openacs-4/packages/workflow/tcl/deputy-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/workflow/tcl/deputy-procs.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/workflow/tcl/deputy-procs.tcl 21 Dec 2004 14:30:00 -0000 1.1 +++ openacs-4/packages/workflow/tcl/deputy-procs.tcl 17 Sep 2013 19:10:34 -0000 1.2 @@ -26,7 +26,7 @@ @author Peter Marklund } { - if { [empty_string_p $user_id] } { + if { $user_id eq "" } { set user_id [ad_conn user_id] } Index: openacs-4/packages/workflow/tcl/graph-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/workflow/tcl/graph-procs.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/workflow/tcl/graph-procs.tcl 4 Jan 2007 09:06:53 -0000 1.2 +++ openacs-4/packages/workflow/tcl/graph-procs.tcl 17 Sep 2013 19:10:34 -0000 1.3 @@ -28,7 +28,7 @@ set path [acs_package_root_dir workflow] append path /www/admin/graph - if {![empty_string_p $options_array_name]} { + if {$options_array_name ne ""} { upvar $options_array_name options } @@ -46,19 +46,19 @@ #exchange some defaults for more descriptive values - if {[string equal $options(subject_term) ""]} { + if {$options(subject_term) eq ""} { set options(subject_term) "subject" set options(subject_term_pl) "subjects" } - if {[empty_string_p $filename]} { + if {$filename eq ""} { set filename workflow_$workflow_id } set current_state "" set previous_state "" - if {![empty_string_p $highlight]} { + if {$highlight ne ""} { set current_state [lindex $highlight 0] set previous_state [lreplace $highlight 0 0] } @@ -106,14 +106,14 @@ foreach action_id $actions { workflow::action::get -action_id $action_id -array "action_info" - if {![empty_string_p $action_info(new_state)]} { - if {![empty_string_p $action_info(assigned_states)]} { + if {$action_info(new_state) ne ""} { + if {$action_info(assigned_states) ne ""} { foreach x $action_info(assigned_state_ids) { append dot " state_$x -> state_$action_info(new_state_id) \[label=\"$action_info(pretty_name)\"\];\n" } } - if {![empty_string_p $action_info(enabled_states)]} { + if {$action_info(enabled_states) ne ""} { foreach x $action_info(enabled_state_ids) { append dot " state_$x -> state_$action_info(new_state_id) \[label=\"$action_info(pretty_name)\"\];\n" } Index: openacs-4/packages/workflow/tcl/role-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/workflow/tcl/role-procs.tcl,v diff -u -r1.23 -r1.24 --- openacs-4/packages/workflow/tcl/role-procs.tcl 13 Apr 2007 20:42:10 -0000 1.23 +++ openacs-4/packages/workflow/tcl/role-procs.tcl 17 Sep 2013 19:10:34 -0000 1.24 @@ -95,7 +95,7 @@ } { switch $operation { update - delete { - if { [empty_string_p $role_id] } { + if { $role_id eq "" } { error "You must specify the role_id of the role to $operation." } } @@ -117,11 +117,11 @@ } switch $operation { insert { - if { [empty_string_p $workflow_id] } { + if { $workflow_id eq "" } { error "You must supply workflow_id" } # Default sort_order - if { ![exists_and_not_null row(sort_order)] } { + if { (![info exists row(sort_order)] || $row(sort_order) eq "") } { set row(sort_order) [workflow::default_sort_order \ -workflow_id $workflow_id \ -table_name "workflow_roles"] @@ -132,7 +132,7 @@ } } update { - if { [empty_string_p $workflow_id] } { + if { $workflow_id eq "" } { set workflow_id [workflow::role::get_element \ -role_id $role_id \ -element workflow_id] @@ -156,8 +156,8 @@ # Convert the Tcl value to something we can use in the query switch $attr { short_name { - if { ![exists_and_not_null row(pretty_name)] } { - if { [empty_string_p $row(short_name)] } { + if { (![info exists row(pretty_name)] || $row(pretty_name) eq "") } { + if { $row(short_name) eq "" } { error "You cannot $operation with an empty short_name without also setting pretty_name" } else { set row(pretty_name) {} @@ -204,7 +204,7 @@ # Do the insert/update/delete switch $operation { insert { - if { [empty_string_p $role_id] } { + if { $role_id eq "" } { set role_id [db_nextval "workflow_roles_seq"] } @@ -324,7 +324,7 @@ foreach role_id $role_data(role_ids) { array set one_role $role_data($role_id) - if { [string equal $one_role(short_name) $short_name] } { + if {$one_role(short_name) eq $short_name} { return $one_role(role_id) } } @@ -390,13 +390,13 @@ @author Lars Pind (lars@collaboraid.biz) } { - if { [empty_string_p $role_id] } { - if { [empty_string_p $one_id] } { + if { $role_id eq "" } { + if { $one_id eq "" } { error "You must supply either role_id or one_id" } set role_id $one_id } else { - if { ![empty_string_p $one_id] } { + if { $one_id ne "" } { error "You can only supply either role_id or one_id" } } @@ -469,13 +469,13 @@ @author Lars Pind (lars@collaboraid.biz) } { - if { [empty_string_p $role_id] } { - if { [empty_string_p $one_id] } { + if { $role_id eq "" } { + if { $one_id eq "" } { error "You must supply either role_id or one_id" } set role_id $one_id } else { - if { ![empty_string_p $one_id] } { + if { $one_id ne "" } { error "You can only supply either role_id or one_id" } } @@ -494,7 +494,7 @@ set spec {} foreach name [lsort [array names row]] { - if { ![empty_string_p $row($name)] } { + if { $row($name) ne "" } { lappend spec $name $row($name) } } @@ -542,7 +542,7 @@ set acs_sc_impl_id [workflow::service_contract::get_impl_id -name $name] # Get the sort order - if { ![exists_and_not_null sort_order] } { + if { (![info exists sort_order] || $sort_order eq "") } { set sort_order [db_string select_sort_order {}] } @@ -677,7 +677,7 @@ set result [list] foreach role_id [workflow::get_roles -all -workflow_id $workflow_id] { - if { [empty_string_p $ignore_role_id] || ![string equal $ignore_role_id $role_id] } { + if { $ignore_role_id eq "" || $ignore_role_id ne $role_id } { lappend result [workflow::role::get_element -role_id $role_id -element short_name] } } @@ -700,8 +700,8 @@ -workflow_id $workflow_id \ -ignore_role_id $role_id] - if { [empty_string_p $short_name] } { - if { [empty_string_p $pretty_name] } { + if { $short_name eq "" } { + if { $pretty_name eq "" } { error "Cannot have empty pretty_name when short_name is empty" } set short_name [util_text_to_url \ @@ -842,7 +842,7 @@ lappend role_ids [get_id -short_name $role -workflow_id $workflow_id] } - if { [empty_string_p $role_ids] } { + if { $role_ids eq "" } { set role_ids [workflow::get_roles -workflow_id $workflow_id] } Index: openacs-4/packages/workflow/tcl/state-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/workflow/tcl/state-procs.tcl,v diff -u -r1.16 -r1.17 --- openacs-4/packages/workflow/tcl/state-procs.tcl 27 Jan 2004 10:32:34 -0000 1.16 +++ openacs-4/packages/workflow/tcl/state-procs.tcl 17 Sep 2013 19:10:34 -0000 1.17 @@ -112,7 +112,7 @@ } { switch $operation { update - delete { - if { [empty_string_p $state_id] } { + if { $state_id eq "" } { error "You must specify the state_id of the state to $operation." } } @@ -134,11 +134,11 @@ } switch $operation { insert { - if { [empty_string_p $workflow_id] } { + if { $workflow_id eq "" } { error "You must supply workflow_id" } # Default sort_order - if { ![exists_and_not_null row(sort_order)] } { + if { (![info exists row(sort_order)] || $row(sort_order) eq "") } { set row(sort_order) [workflow::default_sort_order \ -workflow_id $workflow_id \ -table_name "workflow_fsm_states"] @@ -149,7 +149,7 @@ } } update { - if { [empty_string_p $workflow_id] } { + if { $workflow_id eq "" } { set workflow_id [workflow::state::fsm::get_element \ -state_id $state_id \ -element workflow_id] @@ -166,7 +166,7 @@ if { [info exists row(parent_action_id)] } { error "You cannot supply both parent_action (takes short_name) and parent_action_id (takes action_id)" } - if { ![empty_string_p $row(parent_action)] } { + if { $row(parent_action) ne "" } { set row(parent_action_id) [workflow::action::get_id \ -workflow_id $workflow_id \ -short_name $row(parent_action)] @@ -190,8 +190,8 @@ # Convert the Tcl value to something we can use in the query switch $attr { short_name { - if { ![exists_and_not_null row(pretty_name)] } { - if { [empty_string_p $row(short_name)] } { + if { (![info exists row(pretty_name)] || $row(pretty_name) eq "") } { + if { $row(short_name) eq "" } { error "You cannot edit with an empty short_name without also setting pretty_name" } else { set row(pretty_name) {} @@ -279,7 +279,7 @@ # Do the insert/update/delete switch $operation { insert { - if { [empty_string_p $state_id] } { + if { $state_id eq "" } { set state_id [db_nextval "workflow_fsm_states_seq"] } @@ -376,7 +376,7 @@ set result [list] foreach state_id [workflow::fsm::get_states -all -workflow_id $workflow_id] { - if { [empty_string_p $ignore_state_id] || ![string equal $ignore_state_id $state_id] } { + if { $ignore_state_id eq "" || $ignore_state_id ne $state_id } { lappend result [workflow::state::fsm::get_element -state_id $state_id -element short_name] } } @@ -399,8 +399,8 @@ -workflow_id $workflow_id \ -ignore_state_id $state_id] - if { [empty_string_p $short_name] } { - if { [empty_string_p $pretty_name] } { + if { $short_name eq "" } { + if { $pretty_name eq "" } { error "Cannot have empty pretty_name when short_name is empty" } set short_name [util_text_to_url \ @@ -454,13 +454,13 @@ @author Lars Pind (lars@collaboraid.biz) } { - if { [empty_string_p $state_id] } { - if { [empty_string_p $one_id] } { + if { $state_id eq "" } { + if { $one_id eq "" } { error "You must supply either state_id or one_id" } set state_id $one_id } else { - if { ![empty_string_p $one_id] } { + if { $one_id ne "" } { error "You can only supply either state_id or one_id" } } @@ -514,7 +514,7 @@ and (:parent_action_id is null or parent_action_id = :parent_action_id) and (:state_id is null or state_id != :state_id) }] - return [expr !$exists_p] + return [expr {!$exists_p}] } @@ -611,13 +611,13 @@ @author Lars Pind (lars@collaboraid.biz) } { - if { [empty_string_p $state_id] } { - if { [empty_string_p $one_id] } { + if { $state_id eq "" } { + if { $one_id eq "" } { error "You must supply either state_id or one_id" } set state_id $one_id } else { - if { ![empty_string_p $one_id] } { + if { $one_id ne "" } { error "You can only supply either state_id or one_id" } } @@ -638,7 +638,7 @@ set spec {} foreach name [lsort [array names row]] { - if { ![empty_string_p $row($name)] } { + if { $row($name) ne "" } { lappend spec $name $row($name) } } @@ -776,14 +776,14 @@ } # Store as a child of parent NOTE: Not needed any longer - if { ![empty_string_p $parent_action_id] } { + if { $parent_action_id ne "" } { lappend action_info(${parent_action_id},child_action_ids) $action_id } # Mark enabled in all states that have the same parent as the action if { $action_info(${action_id},always_enabled_p) } { foreach state_id $state_ids { - if { [string equal $parent_action_id [set state_array_${state_id}(parent_action_id)]] } { + if {$parent_action_id eq [set state_array_${state_id}(parent_action_id)]} { set assigned_p_${state_id}($action_id) 0 } } Index: openacs-4/packages/workflow/tcl/workflow-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/workflow/tcl/workflow-procs.tcl,v diff -u -r1.28 -r1.29 --- openacs-4/packages/workflow/tcl/workflow-procs.tcl 25 Jun 2008 22:36:56 -0000 1.28 +++ openacs-4/packages/workflow/tcl/workflow-procs.tcl 17 Sep 2013 19:10:34 -0000 1.29 @@ -108,7 +108,7 @@ } { switch $operation { update - delete { - if { [empty_string_p $workflow_id] } { + if { $workflow_id eq "" } { error "You must specify the workflow_id of the workflow to $operation." } } @@ -217,8 +217,8 @@ # Convert the Tcl value to something we can use in the query switch $attr { short_name { - if { ![exists_and_not_null row(pretty_name)] } { - if { [empty_string_p $row(short_name)] } { + if { (![info exists row(pretty_name)] || $row(pretty_name) eq "") } { + if { $row(short_name) eq "" } { error "You cannot $operation with an empty short_name without also setting pretty_name" } else { set row(pretty_name) {} @@ -249,7 +249,7 @@ } } creation_user - creation_ip - context_id { - if { ![string equal $operation insert] } { + if { $operation ne "insert" } { error "Cannot update creation_user, creation_ip, context_id" } } @@ -486,7 +486,7 @@ where package_key = :package_key and object_id = :object_id } { - if { [empty_string_p $ignore_workflow_id] || ![string equal $ignore_workflow_id $workflow_id] } { + if { $ignore_workflow_id eq "" || $ignore_workflow_id ne $workflow_id } { lappend result $short_name } } @@ -512,8 +512,8 @@ -object_id $object_id \ -ignore_workflow_id $workflow_id] - if { [empty_string_p $short_name] } { - if { [empty_string_p $pretty_name] } { + if { $short_name eq "" } { + if { $pretty_name eq "" } { error "Cannot have empty pretty_name when short_name is empty" } set short_name [util_text_to_url \ @@ -569,15 +569,15 @@ array unset row initial_action array unset row initial_action_id - if { ![exists_and_not_null row(description)] } { + if { (![info exists row(description)] || $row(description) eq "") } { array unset row description_mime_type } set spec [list] # Output sorted, and with no empty elements foreach name [lsort [array names row]] { - if { ![empty_string_p $row($name)] } { + if { $row($name) ne "" } { lappend spec $name $row($name) } } @@ -625,7 +625,7 @@ @author Lars Pind (lars@collaboraid.biz) @see workflow::new } { - if { ![empty_string_p $array] } { + if { $array ne "" } { upvar 1 $array row set array row } @@ -688,10 +688,10 @@ array set workflow_array [lindex $spec 1] # Override workflow attributes from the array - if { ![empty_string_p $array] } { + if { $array ne "" } { upvar 1 $array row foreach name [array names row] { - if { [string equal $name short_name] } { + if {$name eq "short_name"} { set short_name $row($name) } else { set workflow_array($name) $row($name) @@ -746,7 +746,7 @@ # Override stuff in the spec with stuff provided as an argument here foreach var { short_name package_key object_id } { - if { ![empty_string_p [set $var]] || ![exists_and_not_null workflow($var)] } { + if { ![empty_string_p [set $var]] || (![info exists workflow($var)] || $workflow($var) eq "") } { set workflow($var) [set $var] } } @@ -872,8 +872,8 @@ Private proc not to be used by applications, use workflow::get_id instead. } { - if { [empty_string_p $package_key] } { - if { [empty_string_p $object_id] } { + if { $package_key eq "" } { + if { $object_id eq "" } { if { [ad_conn isconnected] } { set package_key [ad_conn package_key] set query_name select_workflow_id_by_package_key @@ -884,7 +884,7 @@ set query_name select_workflow_id_by_object_id } } else { - if { [empty_string_p $object_id] } { + if { $object_id eq "" } { set query_name select_workflow_id_by_package_key } else { error "You must supply only one of either package_key or object_id" @@ -940,7 +940,7 @@ } { set max_sort_order [db_string max_sort_order {} -default 0] - return [expr $max_sort_order + 1] + return [expr {$max_sort_order + 1}] } ad_proc -private workflow::callback_insert { @@ -963,7 +963,7 @@ set acs_sc_impl_id [workflow::service_contract::get_impl_id -name $name] # Get the sort order - if { ![exists_and_not_null sort_order] } { + if { (![info exists sort_order] || $sort_order eq "") } { set sort_order [db_string select_sort_order {}] } @@ -1040,7 +1040,7 @@ @author Lars Pind (lars@collaboraid.biz) @see workflow::new } { - if { ![empty_string_p $array] } { + if { $array ne "" } { upvar 1 $array row set array row } @@ -1079,7 +1079,7 @@ @author Lars Pind (lars@collaboraid.biz) @see workflow::new } { - if { ![empty_string_p $array] } { + if { $array ne "" } { upvar 1 $array row set array row } @@ -1158,7 +1158,7 @@ {-array {}} {-internal:boolean} } { - if { ![empty_string_p $array] } { + if { $array ne "" } { upvar 1 $array row set array row } Index: openacs-4/packages/workflow/tcl/workflow-tree-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/workflow/tcl/workflow-tree-procs.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/workflow/tcl/workflow-tree-procs.tcl 4 Jan 2007 09:06:53 -0000 1.2 +++ openacs-4/packages/workflow/tcl/workflow-tree-procs.tcl 17 Sep 2013 19:10:35 -0000 1.3 @@ -89,7 +89,7 @@ upvar ${multirow}_tree_sorter_sort_stack stack set top [llength $stack] - set newtop [expr $level - 1] + set newtop [expr {$level - 1}] # Pop from the top of the stack and the sort-key if necessary if {$newtop < $top && $newtop >= 0} { @@ -203,7 +203,7 @@ set sort_key [format $sort_key_format [lindex $row $sort_by] $parent_id] # Find parent in stack - set pos_in_stack [expr [lsearch $object_id_stack $parent_id] + 1] + set pos_in_stack [expr {[lsearch $object_id_stack $parent_id] + 1}] # Clear anything after parent from the stack if {$pos_in_stack < [llength $object_id_stack]} { Index: openacs-4/packages/workflow/tcl/test/workflow-test-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/workflow/tcl/test/workflow-test-procs.tcl,v diff -u -r1.16 -r1.17 --- openacs-4/packages/workflow/tcl/test/workflow-test-procs.tcl 23 Jan 2004 11:02:28 -0000 1.16 +++ openacs-4/packages/workflow/tcl/test/workflow-test-procs.tcl 17 Sep 2013 19:10:35 -0000 1.17 @@ -102,7 +102,7 @@ } if { [info exists expect_user_actions] } { - if { [empty_string_p $user_id] } { + if { $user_id eq "" } { set user_id [workflow::test::admin_owner_id] } set user_actions [workflow::test::action_short_names \ @@ -125,7 +125,7 @@ } { Make assertions about user actions. } { - if { [empty_string_p $user_id] } { + if { $user_id eq "" } { set user_id [workflow::test::admin_owner_id] } set user_actions [workflow::test::action_short_names \ @@ -280,7 +280,7 @@ # Single element list return [string equal [lindex $list1 0] [lindex $list2 0]] - } elseif { [expr $len1 % 2] == 0 } { + } elseif { ($len1 % 2)== 0 } { # List, treat as array-list @@ -530,7 +530,7 @@ workflow::role::get -role_id $role_id -array role aa_true "checking that role names of workflow can be fetched with workflow::get_roles and workflow::role::get" \ - [expr [lsearch -exact $expect_role_names $role(short_name)] != -1] + [expr {[lsearch -exact $expect_role_names $role(short_name)] != -1}] } @@ -540,7 +540,7 @@ workflow::action::get -action_id $action_id -array action aa_true "checking retrieval of action names with workflow::get_actions and workflow::get" \ - [expr [lsearch -exact $expect_action_names $action(short_name)] != -1] + [expr {[lsearch -exact $expect_action_names $action(short_name)] != -1}] } Index: openacs-4/packages/workflow/www/admin/action-ae.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/workflow/www/admin/action-ae.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/workflow/www/admin/action-ae.tcl 26 Oct 2011 01:11:55 -0000 1.5 +++ openacs-4/packages/workflow/www/admin/action-ae.tcl 17 Sep 2013 19:10:35 -0000 1.6 @@ -74,7 +74,7 @@ set callback_list [list] foreach callback_name [split $callbacks "\n"] { set callback_name [string trim $callback_name] - if {![empty_string_p $callback_name]} { + if {$callback_name ne ""} { lappend callback_list $callback_name } } @@ -118,7 +118,7 @@ set callback_list [list] foreach callback_name [split $callbacks "\n"] { set callback_name [string trim $callback_name] - if {![empty_string_p $callback_name]} { + if {$callback_name ne ""} { lappend callback_list $callback_name } } Index: openacs-4/packages/workflow/www/admin/delete-confirm.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/workflow/www/admin/delete-confirm.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/workflow/www/admin/delete-confirm.tcl 26 Oct 2011 01:11:55 -0000 1.3 +++ openacs-4/packages/workflow/www/admin/delete-confirm.tcl 17 Sep 2013 19:10:35 -0000 1.4 @@ -26,7 +26,7 @@ {cancel:text(submit) {label {Cancel}}} } -on_submit { - if {![empty_string_p $ok]} { + if {$ok ne ""} { switch $type { role { workflow::role::edit \ Index: openacs-4/packages/workflow/www/admin/role-ae.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/workflow/www/admin/role-ae.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/workflow/www/admin/role-ae.tcl 26 Oct 2011 01:11:55 -0000 1.3 +++ openacs-4/packages/workflow/www/admin/role-ae.tcl 17 Sep 2013 19:10:35 -0000 1.4 @@ -30,7 +30,7 @@ set callback_list [list] foreach callback_name [split $callbacks "\n"] { set callback_name [string trim $callback_name] - if {![empty_string_p $callback_name]} { + if {$callback_name ne ""} { lappend callback_list $callback_name } } @@ -50,7 +50,7 @@ set callback_list [list] foreach callback_name [split $callbacks "\n"] { set callback_name [string trim $callback_name] - if {![empty_string_p $callback_name]} { + if {$callback_name ne ""} { lappend callback_list $callback_name } } Index: openacs-4/packages/workflow/www/admin/workflow-ae.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/workflow/www/admin/workflow-ae.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/workflow/www/admin/workflow-ae.tcl 26 Oct 2011 01:11:55 -0000 1.3 +++ openacs-4/packages/workflow/www/admin/workflow-ae.tcl 17 Sep 2013 19:10:35 -0000 1.4 @@ -30,7 +30,7 @@ set new_lines "" for {set i 0} {$i < [string length $name]} {incr i} { - if {[string index $name $i] == " "} { + if {[string index $name $i] eq " "} { append new_lines " " } else { break; @@ -62,7 +62,7 @@ set callback_list [list] foreach callback_name [split $callbacks "\n"] { set callback_name [string trim $callback_name] - if {![empty_string_p $callback_name]} { + if {$callback_name ne ""} { lappend callback_list $callback_name } } @@ -92,7 +92,7 @@ set callback_list [list] foreach callback_name [split $callbacks "\n"] { set callback_name [string trim $callback_name] - if {![empty_string_p $callback_name]} { + if {$callback_name ne ""} { lappend callback_list $callback_name } } Index: openacs-4/packages/workflow/www/admin/workflow-clone.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/workflow/www/admin/workflow-clone.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/workflow/www/admin/workflow-clone.tcl 26 Oct 2011 01:11:55 -0000 1.3 +++ openacs-4/packages/workflow/www/admin/workflow-clone.tcl 17 Sep 2013 19:10:35 -0000 1.4 @@ -32,7 +32,7 @@ set new_lines "" for {set i 0} {$i < [string length $name]} {incr i} { - if {[string index $name $i] == " "} { + if {[string index $name $i] eq " "} { append new_lines " " } else { break; Index: openacs-4/packages/workflow/www/admin/workflow-meta-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/workflow/www/admin/workflow-meta-edit.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/workflow/www/admin/workflow-meta-edit.tcl 26 Oct 2011 01:11:55 -0000 1.3 +++ openacs-4/packages/workflow/www/admin/workflow-meta-edit.tcl 17 Sep 2013 19:10:35 -0000 1.4 @@ -28,7 +28,7 @@ set callback_list [list] foreach callback_name [split $callbacks "\n"] { set callback_name [string trim $callback_name] - if {![empty_string_p $callback_name]} { + if {$callback_name ne ""} { lappend callback_list $callback_name } } @@ -60,7 +60,7 @@ set callback_list [list] foreach callback_name [split $callbacks "\n"] { set callback_name [string trim $callback_name] - if {![empty_string_p $callback_name]} { + if {$callback_name ne ""} { lappend callback_list $callback_name } }