migrate tracker url add scheme

This commit is contained in:
xiaomlove
2025-06-22 20:16:40 +07:00
parent 8b76b83953
commit fe6977cb93

View File

@@ -368,6 +368,9 @@ class Update extends Install
if (empty($announceUrl)) {
$announceUrl = get_setting("basic.announce_url");
}
if (!str_starts_with($announceUrl, "http")) {
$announceUrl = (isHttps() ? "https://" : "http://"). $announceUrl;
}
TrackerUrl::query()->create([
"url" => $announceUrl,
"enabled" => 1,