Skip to content

Commit

Permalink
MDL-61875 core_privacy: update the core_component_list in the manager
Browse files Browse the repository at this point in the history
  • Loading branch information
snake committed Apr 10, 2018
1 parent 5749f8a commit 6e6ba82
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions privacy/classes/manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -298,22 +298,9 @@ protected function component_is_core_provider($component) {
* @return array the array of frankenstyle component names.
*/
protected function get_component_list() {
$components = [];
// Get all plugins.
$plugintypes = \core_component::get_plugin_types();
foreach ($plugintypes as $plugintype => $typedir) {
$plugins = \core_component::get_plugin_list($plugintype);
foreach ($plugins as $pluginname => $plugindir) {
$components[] = $plugintype . '_' . $pluginname;
}
}
// Get all subsystems.
foreach (\core_component::get_core_subsystems() as $name => $path) {
if (isset($path)) {
$components[] = 'core_' . $name;
}
}
return $components;
return array_keys(array_reduce(\core_component::get_component_list(), function($carry, $item) {
return array_merge($carry, $item);
}, []));
}

/**
Expand Down

0 comments on commit 6e6ba82

Please sign in to comment.