summaryrefslogtreecommitdiff
path: root/utils/modules/news.php
diff options
context:
space:
mode:
Diffstat (limited to 'utils/modules/news.php')
-rw-r--r--utils/modules/news.php19
1 files changed, 11 insertions, 8 deletions
diff --git a/utils/modules/news.php b/utils/modules/news.php
index 4fe8b44..6cab087 100644
--- a/utils/modules/news.php
+++ b/utils/modules/news.php
@@ -282,6 +282,7 @@ class News {
$module = "all";
$number = -1;
+ $single = false;
foreach($params as $param => $value) {
switch($param) {
@@ -293,17 +294,19 @@ class News {
$number = $value;
break;
- case "all":
- default:
- $module = "all";
- $number = -1;
+ case "single":
+ $single = true;
break;
}
}
-
- if($newsid && $this->news[$newsid]) {
- // $str .= $this->show($number, $module);
- $str .= $this->news[$newsid]->show();
+
+ if($single) {
+ if($newsid && $this->news[$newsid]) {
+ // $str .= $this->show($number, $module);
+ $str .= $this->news[$newsid]->show();
+ } else {
+ $str .= "<strong>No such news entry!</strong>\n";
+ }
} else {
$str .= $this->show($number, $module);
}