|
585 | 585 |
|
586 | 586 | # prepare NotificationFunctions array |
587 | 587 | :if ([ :typeof $NotificationFunctions ] != "array") do={ |
588 | | - :set NotificationFunctions [ :toarray "" ]; |
| 588 | + :set NotificationFunctions ({}); |
589 | 589 | } |
590 | 590 |
|
591 | 591 | # send notification via e-mail - expects one array argument |
|
612 | 612 | } |
613 | 613 |
|
614 | 614 | :if ([ :typeof $EmailQueue ] = "nothing") do={ |
615 | | - :set EmailQueue [ :toarray "" ]; |
| 615 | + :set EmailQueue ({}); |
616 | 616 | } |
617 | 617 | :local Signature [ /system/note/get note ]; |
618 | 618 | :set ($EmailQueue->[ :len $EmailQueue ]) { |
|
634 | 634 | :if ([ :typeof $Source ] != "array") do={ |
635 | 635 | :set Source [ :tostr $1 ]; |
636 | 636 | } |
637 | | - :local Result [ :toarray "" ]; |
| 637 | + :local Result ({}); |
638 | 638 | :foreach KeyValue in=[ :toarray $Source ] do={ |
639 | 639 | :if ([ :find $KeyValue "=" ]) do={ |
640 | 640 | :set ($Result->[ :pick $KeyValue 0 [ :find $KeyValue "=" ] ]) \ |
|
974 | 974 |
|
975 | 975 | :global ScriptLockOrder; |
976 | 976 | :if ([ :typeof $ScriptLockOrder ] = "nothing") do={ |
977 | | - :set ScriptLockOrder [ :toarray "" ]; |
| 977 | + :set ScriptLockOrder ({}); |
978 | 978 | } |
979 | 979 | :if ([ :typeof ($ScriptLockOrder->$Script) ] = "nothing") do={ |
980 | | - :set ($ScriptLockOrder->$Script) [ :toarray "" ]; |
| 980 | + :set ($ScriptLockOrder->$Script) ({}); |
981 | 981 | } |
982 | 982 |
|
983 | 983 | :local JobCount do={ |
|
1052 | 1052 | } |
1053 | 1053 | } |
1054 | 1054 |
|
1055 | | - :set ($ScriptLockOrder->$Script) [ :toarray "" ]; |
| 1055 | + :set ($ScriptLockOrder->$Script) ({}); |
1056 | 1056 | } |
1057 | 1057 |
|
1058 | 1058 | :if ([ :len [ /system/script/find where name=$Script ] ] = 0) do={ |
|
1065 | 1065 |
|
1066 | 1066 | :if ([ $TicketCount $Script ] >= [ $JobCount $Script ]) do={ |
1067 | 1067 | $LogPrintExit2 error $0 ("More tickets than running scripts '" . $Script . "', resetting!") false; |
1068 | | - :set ($ScriptLockOrder->$Script) [ :toarray "" ]; |
| 1068 | + :set ($ScriptLockOrder->$Script) ({}); |
1069 | 1069 | /system/script/job/remove [ find where script=$Script ]; |
1070 | 1070 | } |
1071 | 1071 |
|
|
0 commit comments