From 19dfe0b1c7fc8339839d3c751d623f36b61fb7cc Mon Sep 17 00:00:00 2001 From: Daniel Kesselberg Date: Wed, 15 Nov 2023 15:40:22 +0100 Subject: [PATCH] feat: make apps updates opt-in by default Signed-off-by: Daniel Kesselberg --- js/script.js | 4 ++-- lib/Controller/ApiController.php | 2 +- templates/settings-admin.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/js/script.js b/js/script.js index ba5ef1e3..74ae1415 100644 --- a/js/script.js +++ b/js/script.js @@ -324,8 +324,8 @@ function updateMonitoringUrl(event) { if ($param.name === 'format_json' && $param.checked) { url.searchParams.set('format', 'json') } - if ($param.name === 'skip_apps' && $param.checked) { - url.searchParams.set('skipApps', 'true') + if ($param.name === 'skip_apps' && !$param.checked) { + url.searchParams.set('skipApps', 'false') } if ($param.name === 'skip_update' && !$param.checked) { url.searchParams.set('skipUpdate', 'false') diff --git a/lib/Controller/ApiController.php b/lib/Controller/ApiController.php index 5c5f3a73..93e2768b 100644 --- a/lib/Controller/ApiController.php +++ b/lib/Controller/ApiController.php @@ -113,7 +113,7 @@ private function checkAuthorized(): bool { * @PublicPage * @BruteForceProtection(action=serverinfo) */ - public function info(bool $skipApps = false, bool $skipUpdate = true): DataResponse { + public function info(bool $skipApps = true, bool $skipUpdate = true): DataResponse { if (!$this->checkAuthorized()) { $response = new DataResponse(['message' => 'Unauthorized']); $response->throttle(); diff --git a/templates/settings-admin.php b/templates/settings-admin.php index 2cd4516d..b4cc7938 100644 --- a/templates/settings-admin.php +++ b/templates/settings-admin.php @@ -425,7 +425,7 @@ function FormatMegabytes(int $byte): string {
- +