summaryrefslogtreecommitdiff
path: root/includes/module.inc
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2006-01-08 12:49:51 +0000
committerDries Buytaert <dries@buytaert.net>2006-01-08 12:49:51 +0000
commit7f87b19eeb3af1d6afb4dbca771e261cc49b8caa (patch)
tree87887d263d34b37bed369bb3efe280c78ac11ce4 /includes/module.inc
parent7f083e0c2fe9075a2950f198345a1a8cc2ac80b4 (diff)
downloadbrdo-7f87b19eeb3af1d6afb4dbca771e261cc49b8caa.tar.gz
brdo-7f87b19eeb3af1d6afb4dbca771e261cc49b8caa.tar.bz2
- Patch #42886 by chx: critical feature: allow modules to be reordered.
Diffstat (limited to 'includes/module.inc')
-rw-r--r--includes/module.inc5
1 files changed, 2 insertions, 3 deletions
diff --git a/includes/module.inc b/includes/module.inc
index f4f590772..e4956999f 100644
--- a/includes/module.inc
+++ b/includes/module.inc
@@ -50,10 +50,10 @@ function module_list($refresh = FALSE, $bootstrap = TRUE) {
if (!$list) {
$list = array('filter' => 'filter', 'system' => 'system', 'user' => 'user', 'watchdog' => 'watchdog');
if ($bootstrap) {
- $result = db_query("SELECT name, filename, throttle, bootstrap FROM {system} WHERE type = 'module' AND status = 1 AND bootstrap = 1");
+ $result = db_query("SELECT name, filename, throttle, bootstrap FROM {system} WHERE type = 'module' AND status = 1 AND bootstrap = 1 ORDER BY weight ASC, filename ASC");
}
else {
- $result = db_query("SELECT name, filename, throttle, bootstrap FROM {system} WHERE type = 'module' AND status = 1");
+ $result = db_query("SELECT name, filename, throttle, bootstrap FROM {system} WHERE type = 'module' AND status = 1 ORDER BY weight ASC, filename ASC");
}
while ($module = db_fetch_object($result)) {
if (file_exists($module->filename)) {
@@ -67,7 +67,6 @@ function module_list($refresh = FALSE, $bootstrap = TRUE) {
}
}
}
- asort($list);
}
return $list;
}