mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 12:07:23 +08:00
migrate tracker url add scheme
This commit is contained in:
@@ -368,6 +368,9 @@ class Update extends Install
|
|||||||
if (empty($announceUrl)) {
|
if (empty($announceUrl)) {
|
||||||
$announceUrl = get_setting("basic.announce_url");
|
$announceUrl = get_setting("basic.announce_url");
|
||||||
}
|
}
|
||||||
|
if (!str_starts_with($announceUrl, "http")) {
|
||||||
|
$announceUrl = (isHttps() ? "https://" : "http://"). $announceUrl;
|
||||||
|
}
|
||||||
TrackerUrl::query()->create([
|
TrackerUrl::query()->create([
|
||||||
"url" => $announceUrl,
|
"url" => $announceUrl,
|
||||||
"enabled" => 1,
|
"enabled" => 1,
|
||||||
|
|||||||
Reference in New Issue
Block a user