summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/modules.php25
1 files changed, 10 insertions, 15 deletions
diff --git a/utils/modules.php b/utils/modules.php
index 0b72f08..a2051b3 100644
--- a/utils/modules.php
+++ b/utils/modules.php
@@ -4,23 +4,18 @@ $modules = array();
function getModuleList()
{
+ global $MODULES_DIR;
+
$mlist = array();
- array_push($mlist, "config");
- array_push($mlist, "discography");
- array_push($mlist, "events");
- array_push($mlist, "gallery");
- array_push($mlist, "guestbook");
- array_push($mlist, "icons");
- array_push($mlist, "links");
- array_push($mlist, "members");
- array_push($mlist, "news");
- array_push($mlist, "pages");
- array_push($mlist, "downloads");
- array_push($mlist, "newsletter");
- array_push($mlist, "pressrelease");
- array_push($mlist, "user");
- array_push($mlist, "users");
+ $d = opendir($MODULES_DIR);
+ while(false !== ($f = readdir($d))) {
+ if($f == '.' || $f == '..') continue;
+ array_push($mlist, basename($f, ".php"));
+ }
+ closedir($d);
+
+ sort($mlist);
return $mlist;
}