]> Git [git.vados.ru] :: Repos - Mikrotiks/ros.vados.ru.git/commitdiff
Autocommit in repo: ros.vados.ru, generated by owner: root, in 19:50:03 04.05.2026.
authorvados-dev <192440777+vados-dev@users.noreply.github.com>
Mon, 4 May 2026 16:50:03 +0000 (19:50 +0300)
committervados-dev <192440777+vados-dev@users.noreply.github.com>
Mon, 4 May 2026 16:50:03 +0000 (19:50 +0300)
html/AM-GlobalFunc.rsc

index ebfdedd845da4bd7e8e534905afead136751566c..6190df3df37677008ba0cff602d44e2daf8f657f 100644 (file)
@@ -17,9 +17,9 @@
 :global GlobalFuncReady false;
 
 # Git commit id & info, expected configuration version
-:global CommitId "main/589/c05c3863";
+:global CommitId "main/590/de49a53c";
 :global CommitTAG "unknown";
-:global CommitInfo "Autocommit in repo: ros.vados.ru, generated by owner: root, in 19:45:02 04.05.2026.";
+:global CommitInfo "Autocommit in repo: ros.vados.ru, generated by owner: root, in 19:50:03 04.05.2026.";
 
 # The variables are received right here.
 :global GlobalConfVersion 140;
 :set CleanFilePath do={
   :local Path [ :tostr $1 ];
   :global CharacterReplace;
-  :while ($Path ~ "//") do={
-    :set $Path [ $CharacterReplace $Path "//" "/" ];
-  }
-  :if ([ :pick $Path 0 ] = "/") do={
-    :set Path [ :pick $Path 1 [ :len $Path ] ];
-  }
-  :if ([ :pick $Path ([ :len $Path ] - 1) ] = "/") do={
-    :set Path [ :pick $Path 0 ([ :len $Path ] - 1) ];
-  }
+  :while ($Path ~ "//") do={ :set $Path [ $CharacterReplace $Path "//" "/" ]; }
+  :if ([ :pick $Path 0 ] = "/") do={ :set Path [ :pick $Path 1 [ :len $Path ] ]; }
+  :if ([ :pick $Path ([ :len $Path ] - 1) ] = "/") do={ :set Path [ :pick $Path 0 ([ :len $Path ] - 1) ]; }
   :return $Path;
 }
 
   :return ($Return . $String);
 }
 
-:set CleanFilePath do={
-  :local Path [ :tostr $1 ];
-  :global CharacterReplace;
-  :while ($Path ~ "//") do={ :set $Path [ $CharacterReplace $Path "//" "/" ]; }
-  :if ([ :pick $Path 0 ] = "/") do={ :set Path [ :pick $Path 1 [ :len $Path ] ]; }
-  :if ([ :pick $Path ([ :len $Path ] - 1) ] = "/") do={ :set Path [ :pick $Path 0 ([ :len $Path ] - 1) ]; }
-  :return $Path;
-}
-
-:set CleanName do={
-  :local Input [ :tostr $1 ];
-  :local Return "";
-  :for I from=0 to=([ :len $Input ] - 1) do={
-    :local Char [ :pick $Input $I ];
-    :if ([ :typeof [ find "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" $Char ] ] = "nil") do={
-      :do { :if ([ :len $Return ] = 0) do={ :error true; } }
-        :if ([ :pick $Return ([ :len $Return ] - 1) ] = "-") do={ :error true; }
-        :set Char "-";
-      } on-error={
-        :set Char "";
-      }
-    }
-    :set Return ($Return . $Char);
-  }
-  :return $Return;
-}
-
 :set IfThenElse do={
   :if ([ :tostr $1 ] = "true" || [ :tobool $1 ] = true) do={:return $2};
   :return $3;