From b3abbc4b544cd8b3369924261dae948c1f860246 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Fri, 8 Nov 2002 13:19:12 +0000 Subject: Patch by Natrak: - Modules and themes now use the same functions to find and administer files. - Modules can now be placed in sub-directories. - Theme descriptions can no longer be edited. This will be handled by Dries' theme_conf patch. - Update required to keep old modules enabled. --- includes/module.inc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'includes') diff --git a/includes/module.inc b/includes/module.inc index 7a248d236..d5a07080f 100644 --- a/includes/module.inc +++ b/includes/module.inc @@ -3,6 +3,7 @@ // initialize modules: function module_init() { + // Note: changing this also requires changing system_admin() @ modules/system.module. require_once "modules/user.module"; require_once "modules/system.module"; require_once "modules/watchdog.module"; @@ -47,9 +48,9 @@ function module_list() { $list = array("drupal" => "drupal", "system" => "system", "user" => "user", "watchdog" => "watchdog"); $result = db_query("SELECT name, filename FROM system WHERE type = 'module' AND status = '1' ORDER BY name"); while ($module = db_fetch_object($result)) { - if (file_exists("modules/$module->filename")) { + if (file_exists($module->filename)) { $list[$module->name] = $module->name; - include_once "modules/$module->filename"; + include_once $module->filename; } } asort($list); -- cgit v1.2.3