Commit d5f071f8 authored by webchick's avatar webchick
Browse files

#625744 by boombatower: Fixed discovery logic of multiple module copies.

parent 28f8c5e8
......@@ -77,7 +77,7 @@ class ModuleUnitTest extends DrupalWebTestCase {
*/
protected function assertModuleList(Array $expected_values, $condition) {
$expected_values = array_combine($expected_values, $expected_values);
$this->assertIdentical($expected_values, module_list(), t('@condition: module_list() returns correct results', array('@condition' => $condition)));
$this->assertEqual($expected_values, module_list(), t('@condition: module_list() returns correct results', array('@condition' => $condition)));
ksort($expected_values);
$this->assertIdentical($expected_values, module_list(FALSE, FALSE, TRUE), t('@condition: module_list() returns correctly sorted results', array('@condition' => $condition)));
}
......
......@@ -1978,7 +1978,7 @@ function system_get_files_database(&$files, $type) {
if (isset($files[$file->name]) && is_object($files[$file->name])) {
$file->uri = $file->filename;
foreach ($file as $key => $value) {
if (!isset($files[$file->name]->key)) {
if (!isset($files[$file->name]->$key)) {
$files[$file->name]->$key = $value;
}
}
......@@ -2122,6 +2122,10 @@ function _system_rebuild_module_data() {
// Read info files for each module.
foreach ($modules as $key => $module) {
// The module system uses the key 'filename' instead of 'uri' so copy the
// value so it will be used by the modules system.
$modules[$key]->filename = $module->uri;
// Look for the info file.
$module->info = drupal_parse_info_file(dirname($module->uri) . '/' . $module->name . '.info');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment