Index: includes/module.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/module.inc,v retrieving revision 1.197 diff -u -p -r1.197 module.inc --- includes/module.inc 28 Jul 2010 01:46:59 -0000 1.197 +++ includes/module.inc 19 Aug 2010 12:50:26 -0000 @@ -72,7 +72,8 @@ function module_list($refresh = FALSE, $ $list = system_list('bootstrap'); } else { - $list = system_list('module_enabled'); + $list = array_keys(system_list('module_enabled')); + $list = array_combine($list, $list); } } } @@ -97,8 +98,8 @@ function module_list($refresh = FALSE, $ * * @return * An associative array of modules or themes, keyed by name, and having the - * respective database row as value. For $type 'module_enabled' and - * 'bootstrap', the array values equal the keys. + * respective database row as value. For $type 'bootstrap', the array values + * equal the keys. * * @see module_list() * @see list_themes() @@ -145,9 +146,9 @@ function system_list($type) { // consistent with the one used in module_implements(). $result = db_query("SELECT * FROM {system} ORDER BY weight ASC, name ASC"); foreach ($result as $record) { + // Build a list of all enabled modules. if ($record->type == 'module' && $record->status) { - // Build a list of all enabled modules. - $lists['module_enabled'][$record->name] = $record->name; + $lists['module_enabled'][$record->name] = $record; } // Build a list of themes. if ($record->type == 'theme') {