Skip to content

Commit b67b9ec

Browse files
committed
Merge branch 'empty-array' into next
2 parents 5b2ea9b + 6fa1525 commit b67b9ec

19 files changed

+30
-30
lines changed

accesslist-duplicates.capsman

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414

1515
:global Read;
1616

17-
:local Seen [ :toarray "" ];
18-
:local Shown [ :toarray "" ];
17+
:local Seen ({});
18+
:local Shown ({});
1919

2020
:foreach AccList in=[ /caps-man/access-list/find where mac-address!="00:00:00:00:00:00" ] do={
2121
:local Mac [ /caps-man/access-list/get $AccList mac-address ];

accesslist-duplicates.local

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414

1515
:global Read;
1616

17-
:local Seen [ :toarray "" ];
18-
:local Shown [ :toarray "" ];
17+
:local Seen ({});
18+
:local Shown ({});
1919

2020
:foreach AccList in=[ /interface/wireless/access-list/find where mac-address!="00:00:00:00:00:00" ] do={
2121
:local Mac [ /interface/wireless/access-list/get $AccList mac-address ];

accesslist-duplicates.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515

1616
:global Read;
1717

18-
:local Seen [ :toarray "" ];
19-
:local Shown [ :toarray "" ];
18+
:local Seen ({});
19+
:local Shown ({});
2020

2121
:foreach AccList in=[ /%PATH%/access-list/find where mac-address!="00:00:00:00:00:00" ] do={
2222
:local Mac [ /%PATH%/access-list/get $AccList mac-address ];

backup-email

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ $WaitFullyConnected;
5050
:local FilePath ($0 . "/" . $FileName);
5151
:local BackupFile "none";
5252
:local ConfigFile "none";
53-
:local Attach [ :toarray "" ];
53+
:local Attach ({});
5454

5555
# binary backup
5656
:if ($BackupSendBinary = true) do={

check-health

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@
3535
}
3636

3737
:if ([ :typeof $CheckHealthLast ] != "array") do={
38-
:set CheckHealthLast [ :toarray "" ];
38+
:set CheckHealthLast ({});
3939
}
4040
:if ([ :typeof $CheckHealthTemperatureNotified ] != "array") do={
41-
:set CheckHealthTemperatureNotified [ :toarray "" ];
41+
:set CheckHealthTemperatureNotified ({});
4242
}
4343

4444
$ScriptLock $0;

check-lte-firmware-upgrade

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
:global SentLteFirmwareUpgradeNotification;
1414

1515
:if ([ :typeof $SentLteFirmwareUpgradeNotification ] != "array") do={
16-
:global SentLteFirmwareUpgradeNotification [ :toarray "" ];
16+
:global SentLteFirmwareUpgradeNotification ({});
1717
}
1818

1919
:local CheckInterface do={

daily-psk.capsman

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ $WaitFullyConnected;
5555
($DailyPskSecrets->2->$WeekDay));
5656
}
5757

58-
:local Seen [ :toarray "" ];
58+
:local Seen ({});
5959
:local Date [ /system/clock/get date ];
6060
:local NewPsk [ $GeneratePSK $Date ];
6161

daily-psk.local

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ $WaitFullyConnected;
5555
($DailyPskSecrets->2->$WeekDay));
5656
}
5757

58-
:local Seen [ :toarray "" ];
58+
:local Seen ({});
5959
:local Date [ /system/clock/get date ];
6060
:local NewPsk [ $GeneratePSK $Date ];
6161

daily-psk.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ $WaitFullyConnected;
5656
($DailyPskSecrets->2->$WeekDay));
5757
}
5858

59-
:local Seen [ :toarray "" ];
59+
:local Seen ({});
6060
:local Date [ /system/clock/get date ];
6161
:local NewPsk [ $GeneratePSK $Date ];
6262

global-functions

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@
585585

586586
# prepare NotificationFunctions array
587587
:if ([ :typeof $NotificationFunctions ] != "array") do={
588-
:set NotificationFunctions [ :toarray "" ];
588+
:set NotificationFunctions ({});
589589
}
590590

591591
# send notification via e-mail - expects one array argument
@@ -612,7 +612,7 @@
612612
}
613613

614614
:if ([ :typeof $EmailQueue ] = "nothing") do={
615-
:set EmailQueue [ :toarray "" ];
615+
:set EmailQueue ({});
616616
}
617617
:local Signature [ /system/note/get note ];
618618
:set ($EmailQueue->[ :len $EmailQueue ]) {
@@ -634,7 +634,7 @@
634634
:if ([ :typeof $Source ] != "array") do={
635635
:set Source [ :tostr $1 ];
636636
}
637-
:local Result [ :toarray "" ];
637+
:local Result ({});
638638
:foreach KeyValue in=[ :toarray $Source ] do={
639639
:if ([ :find $KeyValue "=" ]) do={
640640
:set ($Result->[ :pick $KeyValue 0 [ :find $KeyValue "=" ] ]) \
@@ -974,10 +974,10 @@
974974

975975
:global ScriptLockOrder;
976976
:if ([ :typeof $ScriptLockOrder ] = "nothing") do={
977-
:set ScriptLockOrder [ :toarray "" ];
977+
:set ScriptLockOrder ({});
978978
}
979979
:if ([ :typeof ($ScriptLockOrder->$Script) ] = "nothing") do={
980-
:set ($ScriptLockOrder->$Script) [ :toarray "" ];
980+
:set ($ScriptLockOrder->$Script) ({});
981981
}
982982

983983
:local JobCount do={
@@ -1052,7 +1052,7 @@
10521052
}
10531053
}
10541054

1055-
:set ($ScriptLockOrder->$Script) [ :toarray "" ];
1055+
:set ($ScriptLockOrder->$Script) ({});
10561056
}
10571057

10581058
:if ([ :len [ /system/script/find where name=$Script ] ] = 0) do={
@@ -1065,7 +1065,7 @@
10651065

10661066
:if ([ $TicketCount $Script ] >= [ $JobCount $Script ]) do={
10671067
$LogPrintExit2 error $0 ("More tickets than running scripts '" . $Script . "', resetting!") false;
1068-
:set ($ScriptLockOrder->$Script) [ :toarray "" ];
1068+
:set ($ScriptLockOrder->$Script) ({});
10691069
/system/script/job/remove [ find where script=$Script ];
10701070
}
10711071

0 commit comments

Comments
 (0)