mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-06-24 18:48:37 +02:00
global-functions: $ParseKeyValueStore: key without value for boolean true
This commit is contained in:
parent
5b03ae4fa2
commit
2aaea7c58e
1 changed files with 6 additions and 2 deletions
|
@ -431,8 +431,12 @@
|
|||
}
|
||||
:local Result [ :toarray "" ];
|
||||
:foreach KeyValue in=[ :toarray $Source ] do={
|
||||
:set KeyValue [ :toarray [ $CharacterReplace $KeyValue "=" "," ] ];
|
||||
:set ($Result->($KeyValue->0)) ($KeyValue->1);
|
||||
:if ([ :find $KeyValue "=" ]) do={
|
||||
:set KeyValue [ :toarray [ $CharacterReplace $KeyValue "=" "," ] ];
|
||||
:set ($Result->($KeyValue->0)) ($KeyValue->1);
|
||||
} else={
|
||||
:set ($Result->$KeyValue) true;
|
||||
}
|
||||
}
|
||||
:return $Result;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue