Skip to content

Commit

Permalink
if only one ise_id is supplied in statechange.cgi, new value will not be
Browse files Browse the repository at this point in the history
splitted by "," chars anymore. This should allow to set states of single
ise ids which require "," characters. This refs #25.
  • Loading branch information
jens-maus committed Oct 18, 2023
1 parent de9eae2 commit e8b748a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion xmlapi/statechange.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,15 @@ if {[info exists sid] && [check_session $sid]} {

} else {

set rec_new_value [split $new_value "\,"]
set rec_ise_id [split $ise_id "\,"]

# only split new_value in case we have more ise_id
if { [llength $rec_ise_id] > 1 } {
set rec_new_value [split $new_value "\,"]
} else {
set rec_new_value [list $new_value]
}

for {set x 0} {$x<[llength $rec_ise_id]} {incr x} {

array set res [rega_script "Write(dom.GetObject([lindex $rec_ise_id $x]).State('[lindex $rec_new_value $x]'));"]
Expand Down

0 comments on commit e8b748a

Please sign in to comment.