MDL-42525 improve performance of plugin listing

This commit is contained in:
Petr Škoda
2013-11-01 10:36:04 +01:00
parent 5386f0bbfe
commit 2384d33136
+3 -3
View File
@@ -604,9 +604,9 @@ class core_plugin_manager {
*/
public function get_plugin_info($component) {
list($type, $name) = core_component::normalize_component($component);
$plugins = $this->get_plugins();
if (isset($plugins[$type][$name])) {
return $plugins[$type][$name];
$plugins = $this->get_plugins_of_type($type);
if (isset($plugins[$name])) {
return $plugins[$name];
} else {
return null;
}