Commit 7d59d8da authored by Petr Škoda's avatar Petr Škoda
Browse files

MDL-34954 allow subplugins to define plugininfo_* class

parent 975311d3
......@@ -98,6 +98,16 @@ class plugin_manager {
global $CFG;
if ($disablecache or is_null($this->pluginsinfo)) {
// Hack: include mod and editor subplugin management classes first,
// the adminlib.php is supposed to contain extra admin settings too.
require_once($CFG->libdir.'/adminlib.php');
foreach(array('mod', 'editor') as $type) {
foreach (get_plugin_list($type) as $dir) {
if (file_exists("$dir/adminlib.php")) {
include_once("$dir/adminlib.php");
}
}
}
$this->pluginsinfo = array();
$plugintypes = get_plugin_types();
$plugintypes = $this->reorder_plugin_types($plugintypes);
......
......@@ -2,6 +2,13 @@ This files describes API changes in /mod/* - activity modules,
information provided here is intended especially for developers.
=== 2.4 ===
new features:
* mod/xxx/adminlib.php may now include 'plugininfo_yoursubplugintype' class definition
used by plugin_manager; it is recommended to store extra admin settings classes in this file
=== 2.3 ===
required changes in code:
......
Supports Markdown
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