diff options
author | Simon Rettberg | 2023-11-02 19:08:58 +0100 |
---|---|---|
committer | Simon Rettberg | 2023-11-02 19:08:58 +0100 |
commit | c2d95ffaeaa289752b4c7b6664b6ca112a02e350 (patch) | |
tree | 2c29b0157d14198aadbdbc9f8c18ded0bd4dadcd /modules-available/dozmod | |
parent | [rebootcontrol] Remove API prototype (diff) | |
download | slx-admin-c2d95ffaeaa289752b4c7b6664b6ca112a02e350.tar.gz slx-admin-c2d95ffaeaa289752b4c7b6664b6ca112a02e350.tar.xz slx-admin-c2d95ffaeaa289752b4c7b6664b6ca112a02e350.zip |
Roundup of issues reported by PHPStorm
Mostly redundant checks, logic errors, dead code, etc.
Diffstat (limited to 'modules-available/dozmod')
-rw-r--r-- | modules-available/dozmod/api.inc.php | 6 | ||||
-rw-r--r-- | modules-available/dozmod/page.inc.php | 2 |
2 files changed, 1 insertions, 7 deletions
diff --git a/modules-available/dozmod/api.inc.php b/modules-available/dozmod/api.inc.php index 17298bb7..90e663aa 100644 --- a/modules-available/dozmod/api.inc.php +++ b/modules-available/dozmod/api.inc.php @@ -327,18 +327,14 @@ $location_ids = Location::getLocationRootChain($location_ids); if ($resource === 'list') { outputLectureXmlForLocation($location_ids); // Won't return on success... - fatalDozmodUnreachable(); - } elseif ($resource === 'imagemeta') { $image = readImageParam(); outputResource($image, $resource); - fatalDozmodUnreachable(); - } else { $lecture = readLectureParam($location_ids); outputResource($lecture, $resource); - fatalDozmodUnreachable(); } +fatalDozmodUnreachable(); Header('HTTP/1.1 400 Bad Request'); die("I don't know how to give you that resource"); diff --git a/modules-available/dozmod/page.inc.php b/modules-available/dozmod/page.inc.php index a38c9d9d..bf2a6fa4 100644 --- a/modules-available/dozmod/page.inc.php +++ b/modules-available/dozmod/page.inc.php @@ -78,7 +78,6 @@ class Page_DozMod extends Page /* different pages for different sections */ if ($this->haveSubPage !== false) { SubPage::doRender(); - return; } } @@ -90,7 +89,6 @@ class Page_DozMod extends Page if ($this->haveSubPage !== false) { SubPage::doAjax(); - return; } } |