summaryrefslogtreecommitdiffstats
path: root/modules-available/news/page.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2023-11-02 19:08:58 +0100
committerSimon Rettberg2023-11-02 19:08:58 +0100
commitc2d95ffaeaa289752b4c7b6664b6ca112a02e350 (patch)
tree2c29b0157d14198aadbdbc9f8c18ded0bd4dadcd /modules-available/news/page.inc.php
parent[rebootcontrol] Remove API prototype (diff)
downloadslx-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/news/page.inc.php')
-rw-r--r--modules-available/news/page.inc.php19
1 files changed, 7 insertions, 12 deletions
diff --git a/modules-available/news/page.inc.php b/modules-available/news/page.inc.php
index a122d37c..bb74c711 100644
--- a/modules-available/news/page.inc.php
+++ b/modules-available/news/page.inc.php
@@ -201,8 +201,6 @@ class Page_News extends Page
*
* @param int $newsId ID of the news to be shown.
* @param string $pageType type if news id is not given.
- *
- * @return bool true if loading that news worked
*/
private function loadNews($newsId, $pageType)
{
@@ -223,18 +221,15 @@ class Page_News extends Page
]);
}
if ($row === false)
- return false;
+ return;
// fetch the news to be shown
- if ($row !== false) {
- $this->newsId = $row['newsid'];
- $this->newsTitle = $row['title'];
- $this->newsContent = $row['content'];
- $this->newsDateline = (int)$row['dateline'];
- $this->newsExpires = (int)$row['expires'];
- $this->pageType = $row['type'];
- }
- return true;
+ $this->newsId = $row['newsid'];
+ $this->newsTitle = $row['title'];
+ $this->newsContent = $row['content'];
+ $this->newsDateline = (int)$row['dateline'];
+ $this->newsExpires = (int)$row['expires'];
+ $this->pageType = $row['type'];
}
/**