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

index 623c88edee2ba8fde829ddf5b37089ba452ca423..c515ef1e03df87c24dce9df6d6940199be39e2fd 100644 (file)
@@ -17,9 +17,9 @@
 :global GlobalFuncReady false;
 
 # Git commit id & info, expected configuration version
-:global CommitId "main/525/c4b07c8b";
+:global CommitId "main/526/05798b56";
 :global CommitTAG "unknown";
-:global CommitInfo "Autocommit in repo: ros.vados.ru, generated by owner: root, in 08:00:03 04.05.2026.";
+:global CommitInfo "Autocommit in repo: ros.vados.ru, generated by owner: root, in 08:05:03 04.05.2026.";
 
 # The variables are received right here.
 :global GlobalConfVersion 138;
 
 # fetch huge data to file, read in chunks
 :set FetchHuge do={
-  :local ScriptName [ :tostr $1 ];
+  :local FetchScript [ :tostr $1 ];
   :local Url        [ :tostr $2 ];
   :local CheckCert  [ :tostr $3 ];
 
 
   :set CheckCert [ $IfThenElse ($CheckCert = "false") "no" "yes-without-crl" ];
 
-  :local DirName ("tmpfs/" . [ $CleanName $ScriptName ]);
+  :local DirName ("tmpfs/" . [ $CleanName $FetchScript ]);
   :if ([ $MkDir $DirName ] = false) do={
     $LogPrint error $0 ("Failed creating directory!");
     :return false;
   :local FileName ($DirName . "/" . [ $CleanName $0 ] . "-" . [ $GetRandom20CharAlNum ]);
   :onerror Err {
     /tool/fetch check-certificate=$CheckCert $Url dst-path=$FileName \
-      http-header-field=({ [ $FetchUserAgentStr $ScriptName ] }) as-value;
+      http-header-field=({ [ $FetchUserAgentStr $FetchScript ] }) as-value;
   } do={
     :if ([ $WaitForFile $FileName 500ms ] = true) do={
       $RmFile $FileName;
 
 # read parts of a large file
 :set FetchLargeFiles do={
-  :local ScriptName [:tostr $1];
+  :local FetchLargeScript [:tostr $1];
   :local fetchUrl [:tostr $2];
   :local CheckCert [:tostr $3];
   :local fetchMode [:tostr $4];
   #:set fetchMode [ $IfThenElse ($fetchMode != "false") [:tostr ("mode=" . $fetchMode)] ];
   #:set fetchMethod [$IfThenElse ($fetchMethod != "false") [:tostr ("http-method=\"" . $fetchMethod . "\"") ]];
   
-  :local DirName ("tmpfs/" . [ $CleanName $ScriptName ]);
+  :local DirName ("tmpfs/" . [ $CleanName $FetchLargeScript ]);
   :if ([ $MkDir $DirName ] = false) do={
     $LogPrint error $0 ("Failed creating directory!");
     :return false;
   }
   :local FileName ($DirName . "/" . [ $CleanName $0 ] . "-" . [ $GetRandom20CharAlNum ]);
-  #/tool/fetch check-certificate=$CheckCert $Url dst-path=$FileName http-header-field=({ [ $FetchUserAgentStr $ScriptName ] }) as-value;
+  #/tool/fetch check-certificate=$CheckCert $Url dst-path=$FileName http-header-field=({ [ $FetchUserAgentStr $FetchLargeScript ] }) as-value;
   #:log warning ("\$fUrl =" . $2 . ({[ $fMode ]}));
     :onerror Err {
       :set FetchString ("/tool/fetch " . \
       [$IfThenElse ([$fetchMethod] != "false") ("http-method=\"" . $fetchMethod . "\" ")] . \
       "check-certificate=" . $CheckCert . " url=(\"" . $fetchUrl . "\") " . \
       [$IfThenElse ([$fetchMode] != "false") ("mode=" . $fetchMode . " ")] . \
-      http-header-field=({ [ $FetchUserAgentStr $ScriptName ] }) as-value);
+      http-header-field=({ [ $FetchUserAgentStr $FetchLargeScript ] }) as-value);
       :log warning ("\$FetchSring = " . $FetchString);
       :put [$FetchString];
-    #:put [/tool/fetch $fetchMode check-certificate=$CheckCert url=($fetchUrl) dst-path=($FileName) http-header-field=({ [ $FetchUserAgentStr $ScriptName ] }) as-value];
+    #:put [/tool/fetch $fetchMode check-certificate=$CheckCert url=($fetchUrl) dst-path=($FileName) http-header-field=({ [ $FetchUserAgentStr $FetchLargeScript ] }) as-value];
   } do={
     :if ([ $WaitForFile $FileName 500ms ] = true) do={
       $RmFile $FileName;