revert auto register sw

This commit is contained in:
Pablo Ferreiro 2022-11-04 17:25:14 +01:00
parent 8f83a27885
commit 79fd699cee
No known key found for this signature in database
GPG key ID: 41FBCE65B779FA24
6 changed files with 38 additions and 1 deletions

View file

@ -34,6 +34,14 @@ class SettingsController {
self::redirect();
}
static public function misc() {
if (isset($_POST['misc-sw'])) {
$sw = $_POST['misc-sw'];
Cookies::set("misc-sw", $sw);
}
self::redirect();
}
static private function redirect() {
$url = Misc::url('/settings');
header("Location: {$url}");

View file

@ -7,6 +7,7 @@ class UrlBuilder {
}
static public function download(string $url, string $username, string $id, bool $watermark): string {
// {path('/download?url=' . urlencode($playAddr) . '&id=' . $id . '&user=' . $uniqueId) . '&watermark=1'}
$down_url = Misc::url('/download?url=' . urlencode($url) . '&id=' . $id . '&user=' . $username);
if ($watermark) $down_url .= '&watermark=1';
return $down_url;