summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authordeva <deva>2010-03-01 10:34:29 +0000
committerdeva <deva>2010-03-01 10:34:29 +0000
commitc4d41eb35d1a7bee8ba6c3047ba129d2cefd04f9 (patch)
treee304652245172b1113b2f7e9fd6538e256ab1e3e /utils
parent9dabadd163343a821d1d10b1c177e97d323f8428 (diff)
Only load php files as modules. Ignore other files (and folders).
Diffstat (limited to 'utils')
-rw-r--r--utils/modules.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/utils/modules.php b/utils/modules.php
index a2051b3..c363e6d 100644
--- a/utils/modules.php
+++ b/utils/modules.php
@@ -10,7 +10,8 @@ function getModuleList()
$d = opendir($MODULES_DIR);
while(false !== ($f = readdir($d))) {
- if($f == '.' || $f == '..') continue;
+ if(is_dir($f)) continue;
+ if(substr($f, strlen($f) - 4, 4) != ".php") continue;
array_push($mlist, basename($f, ".php"));
}
closedir($d);