From a773dd2afd36ba97b36c4a3b1983129ad7e59491 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 22 Oct 2024 17:10:35 +0200 Subject: [minilinux] Cleanup/Modernize --- modules-available/minilinux/page.inc.php | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/modules-available/minilinux/page.inc.php b/modules-available/minilinux/page.inc.php index bf66f750..9b9cf74a 100644 --- a/modules-available/minilinux/page.inc.php +++ b/modules-available/minilinux/page.inc.php @@ -267,11 +267,7 @@ class Page_MiniLinux extends Page private function deleteVersion() { User::assertPermission('delete'); - $versionid = Request::post('version', false, 'string'); - if ($versionid === false) { - Message::addError('main.parameter-missing', 'versionid'); - return; - } + $versionid = Request::post('version', Request::REQUIRED, 'string'); $version = Database::queryFirst('SELECT versionid FROM minilinux_version WHERE versionid = :versionid', ['versionid' => $versionid]); if ($version === false) { @@ -311,11 +307,7 @@ class Page_MiniLinux extends Page private function setDefault() { User::assertPermission('update'); - $versionid = Request::post('version', false, 'string'); - if ($versionid === false) { - Message::addError('main.parameter-missing', 'versionid'); - return; - } + $versionid = Request::post('version', Request::REQUIRED, 'string'); $version = Database::queryFirst('SELECT versionid FROM minilinux_version WHERE versionid = :versionid', ['versionid' => $versionid]); if ($version === false) { -- cgit v1.2.3-55-g7522