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.php32
1 files changed, 25 insertions, 7 deletions
diff --git a/utils/modules/news.php b/utils/modules/news.php
index 75cb748..4d00b24 100644
--- a/utils/modules/news.php
+++ b/utils/modules/news.php
@@ -272,14 +272,32 @@ class News {
public function run($params)
{
- global $show;
+ $str = "";
+
+ $module = "all";
+ $number = -1;
+
+ foreach($params as $param => $value) {
+ switch($param) {
+ case "show":
+ $module = $value;
+ break;
+
+ case "number":
+ $number = $value;
+ break;
+
+ case "all":
+ default:
+ $module = "all";
+ $number = -1;
+ break;
+ }
+ }
- switch($params) {
- default:
- if($show == "all") return $this->show(-1, "all");
- else return $this->show(3, "main");
- break;
- }
+ $str .= $this->show($number, $module);
+
+ return $str;
}
public function show($number, $category)