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.35 -r1.36 --- openacs-4/packages/workflow/tcl/action-procs.tcl 17 Sep 2013 19:10:34 -0000 1.35 +++ openacs-4/packages/workflow/tcl/action-procs.tcl 14 Oct 2013 17:59:52 -0000 1.36 @@ -747,7 +747,7 @@ regsub -all {[- ]} $short_name {_} short_name regsub -all {[^a-zA-Z_0-9]} $short_name {} short_name - if { [lsearch -exact $existing_short_names $short_name] != -1 } { + if {$short_name in $existing_short_names} { error "Action with short_name '$short_name' already exists in this workflow." } } @@ -1602,7 +1602,7 @@ # Build arrays of enabled and assigned state short names for all actions db_foreach action_enabled_in_states {} { - if {$assigned_p eq "t"} { + if {$assigned_p == "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.48 -r1.49 --- openacs-4/packages/workflow/tcl/case-procs.tcl 17 Sep 2013 19:10:34 -0000 1.48 +++ openacs-4/packages/workflow/tcl/case-procs.tcl 14 Oct 2013 17:59:52 -0000 1.49 @@ -2428,7 +2428,7 @@ workflow::case::enabled_action_get -enabled_action_id $enabled_action_id -array enabled_action workflow::action::get -action_id $enabled_action(action_id) -array action - if { [lsearch -exact { parallel dynamic } $enabled_action(parent_trigger_type)] != -1 } { + if {$enabled_action(parent_trigger_type) in { parallel dynamic }} { db_dml completed_p { update workflow_case_enabled_actions set completed_p = 't' 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.24 -r1.25 --- openacs-4/packages/workflow/tcl/role-procs.tcl 17 Sep 2013 19:10:34 -0000 1.24 +++ openacs-4/packages/workflow/tcl/role-procs.tcl 14 Oct 2013 17:59:52 -0000 1.25 @@ -714,7 +714,7 @@ regsub -all {[- ]} $short_name {_} short_name regsub -all {[^a-zA-Z_0-9]} $short_name {} short_name - if { [lsearch -exact $existing_short_names $short_name] != -1 } { + if {$short_name in $existing_short_names} { error "Role with short_name '$short_name' already exists in this workflow." } } 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.17 -r1.18 --- openacs-4/packages/workflow/tcl/state-procs.tcl 17 Sep 2013 19:10:34 -0000 1.17 +++ openacs-4/packages/workflow/tcl/state-procs.tcl 14 Oct 2013 17:59:52 -0000 1.18 @@ -413,7 +413,7 @@ regsub -all {[- ]} $short_name {_} short_name regsub -all {[^a-zA-Z_0-9]} $short_name {} short_name - if { [lsearch -exact $existing_short_names $short_name] != -1 } { + if {$short_name in $existing_short_names} { error "State with short_name '$short_name' already exists in this workflow." } } 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.29 -r1.30 --- openacs-4/packages/workflow/tcl/workflow-procs.tcl 17 Sep 2013 19:10:34 -0000 1.29 +++ openacs-4/packages/workflow/tcl/workflow-procs.tcl 14 Oct 2013 17:59:52 -0000 1.30 @@ -526,7 +526,7 @@ regsub -all {[- ]} $short_name {_} short_name regsub -all {[^a-zA-Z_0-9]} $short_name {} short_name - if { [lsearch -exact $existing_short_names $short_name] != -1 } { + if {$short_name in $existing_short_names} { error "Workflow with short_name '$short_name' already exists for this package_key and object_id." } } 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.17 -r1.18 --- openacs-4/packages/workflow/tcl/test/workflow-test-procs.tcl 17 Sep 2013 19:10:35 -0000 1.17 +++ openacs-4/packages/workflow/tcl/test/workflow-test-procs.tcl 14 Oct 2013 17:59:52 -0000 1.18 @@ -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 {$role(short_name) in $expect_role_names}] } @@ -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 {$action(short_name) in $expect_action_names}] }