File tree 1 file changed +19
-14
lines changed
1 file changed +19
-14
lines changed Original file line number Diff line number Diff line change @@ -15,10 +15,10 @@ if {[info exists sid] && [check_session $sid]} {
15
15
set pairs [split $input &]
16
16
foreach pair $pairs {
17
17
if {0 != [regexp "^program_id=(.*)$" $pair dummy val]} {
18
- set programn_id $val
18
+ set program_id $val
19
19
continue
20
20
}
21
- if {0 != [regexp "^active_id =(.*)$" $pair dummy val]} {
21
+ if {0 != [regexp "^active =(.*)$" $pair dummy val]} {
22
22
set active $val
23
23
continue
24
24
}
@@ -29,21 +29,26 @@ if {[info exists sid] && [check_session $sid]} {
29
29
}
30
30
}
31
31
32
- array set res [rega_script "
33
- if ($program_id > 0) { object obj = dom.GetObject($program_id );
34
- if (obj && obj.IsTypeOf(OT_PROGRAM)) {
35
- if (($active == false) || ($active == true)){
36
- obj.Active($active );
37
- }
38
- if (($visible == false) || ($visible == true)){
39
- obj.Visible($visible );
40
- }
41
- Write(obj);
32
+ array set res [rega_script {
33
+ integer prgId = } $program_id {;
34
+ string active = " } $active {" ;
35
+ string visible = " } $visible {" ;
36
+ if (prgId > 0) {
37
+ object obj = dom.GetObject(prgId);
38
+ if (obj && obj.IsTypeOf(OT_PROGRAM)) {
39
+ if ((active == " false" ) || (active == " true" )){
40
+ obj.Active(active);
42
41
}
43
- }" ]
42
+ if ((visible == " false" ) || (visible == " true" )){
43
+ obj.Visible(visible);
44
+ }
45
+ Write(obj);
46
+ }
47
+ }
48
+ }]
44
49
45
50
if { $res(STDOUT) != " " } {
46
- puts -nonewline " <actions program_id=\" $program_id \" active=\" $active \" visible=\" $visible \" />"
51
+ puts -nonewline " <actions program_id=\" $res(prgId) \" active=\" $res( active) \" visible=\" $res( visible) \" />"
47
52
} else {
48
53
puts -nonewline {<not_found/>}
49
54
}
You can’t perform that action at this time.
0 commit comments