diff options
author | Simon Rettberg | 2024-10-22 17:10:35 +0200 |
---|---|---|
committer | Simon Rettberg | 2024-10-22 17:10:35 +0200 |
commit | a773dd2afd36ba97b36c4a3b1983129ad7e59491 (patch) | |
tree | 04d44f5eb5d2fe7fa20eccd9c981168f0a4e8f0b | |
parent | [minilinux] Don't hide delete button if all files are missing (diff) | |
download | slx-admin-a773dd2afd36ba97b36c4a3b1983129ad7e59491.tar.gz slx-admin-a773dd2afd36ba97b36c4a3b1983129ad7e59491.tar.xz slx-admin-a773dd2afd36ba97b36c4a3b1983129ad7e59491.zip |
[minilinux] Cleanup/Modernize
-rw-r--r-- | modules-available/minilinux/page.inc.php | 12 |
1 files 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) { |