aboutsummaryrefslogtreecommitdiffstats
path: root/global-functions.rsc
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2024-03-29 11:09:22 +0100
committerGravatar Christian Hesse <mail@eworm.de>2024-03-29 11:11:17 +0100
commit4df1468e2569dfc1603876e24a9be933dc8cf8f2 (patch)
treebd394e0e9f782c813632178c4aa5ff94cdafbf44 /global-functions.rsc
parentbbdc9c65f50d2d290e4cd15a8c49ec0cb36a347d (diff)
global-functions: rename $FetchUserAgent -> $FetchUserAgentStr
... to make sure the function does not clash with the variable we had before, as this causes issue with news and changes notification.
Diffstat (limited to 'global-functions.rsc')
-rw-r--r--global-functions.rsc14
1 files changed, 7 insertions, 7 deletions
diff --git a/global-functions.rsc b/global-functions.rsc
index 17ccda8..1e98019 100644
--- a/global-functions.rsc
+++ b/global-functions.rsc
@@ -32,7 +32,7 @@
:global DownloadPackage;
:global EitherOr;
:global EscapeForRegEx;
-:global FetchUserAgent;
+:global FetchUserAgentStr;
:global FormatLine;
:global FormatMultiLines;
:global GetMacVendor;
@@ -137,7 +137,7 @@
:global CertificateNameByCN;
:global CleanName;
- :global FetchUserAgent;
+ :global FetchUserAgentStr;
:global LogPrint;
:global WaitForFile;
@@ -145,7 +145,7 @@
"CommonName \"" . $CommonName . "\".");
:do {
:local FileName ([ $CleanName $CommonName ] . ".pem");
- /tool/fetch check-certificate=yes-without-crl http-header-field=({ [ $FetchUserAgent $0 ] }) \
+ /tool/fetch check-certificate=yes-without-crl http-header-field=({ [ $FetchUserAgentStr $0 ] }) \
($ScriptUpdatesBaseUrl . "certs/" . $FileName . $ScriptUpdatesUrlSuffix) \
dst-path=$FileName as-value;
$WaitForFile $FileName;
@@ -391,7 +391,7 @@
}
# generate user agent string for fetch
-:set FetchUserAgent do={
+:set FetchUserAgentStr do={
:local Caller [ :tostr $1 ];
:local Resource [ /system/resource/get ];
@@ -993,7 +993,7 @@
:global CertificateAvailable;
:global EitherOr;
- :global FetchUserAgent;
+ :global FetchUserAgentStr;
:global Grep;
:global IfThenElse;
:global LogPrint;
@@ -1039,7 +1039,7 @@
:local Url ($BaseUrl . $ScriptVal->"name" . ".rsc" . $UrlSuffix);
$LogPrint debug $0 ("Fetching script '" . $ScriptVal->"name" . "' from url: " . $Url);
:local Result [ /tool/fetch check-certificate=yes-without-crl \
- http-header-field=({ [ $FetchUserAgent $0 ] }) $Url output=user as-value ];
+ http-header-field=({ [ $FetchUserAgentStr $0 ] }) $Url output=user as-value ];
:if ($Result->"status" = "finished") do={
:set SourceNew ($Result->"data");
}
@@ -1122,7 +1122,7 @@
:local Url ($ScriptUpdatesBaseUrl . "news-and-changes.rsc" . $ScriptUpdatesUrlSuffix);
$LogPrint debug $0 ("Fetching news, changes and migration: " . $Url);
:local Result [ /tool/fetch check-certificate=yes-without-crl \
- http-header-field=({ [ $FetchUserAgent $0 ] }) $Url output=user as-value ];
+ http-header-field=({ [ $FetchUserAgentStr $0 ] }) $Url output=user as-value ];
:if ($Result->"status" = "finished") do={
:set ChangeLogCode ($Result->"data");
}