mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
Merge branch 'w34_MDL-34954_m24_subplugins' of git://github.com/skodak/moodle
This commit is contained in:
commit
d642260cfe
@ -30,8 +30,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
require_once($CFG->libdir.'/filelib.php'); // curl class needed here
|
||||
|
||||
/**
|
||||
* Singleton class providing general plugins management functionality
|
||||
*/
|
||||
@ -100,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);
|
||||
@ -152,6 +160,7 @@ class plugin_manager {
|
||||
foreach ($owners as $component => $ownerdir) {
|
||||
$componentsubplugins = array();
|
||||
if (file_exists($ownerdir . '/db/subplugins.php')) {
|
||||
$subplugins = array();
|
||||
include($ownerdir . '/db/subplugins.php');
|
||||
foreach ($subplugins as $subplugintype => $subplugintyperootdir) {
|
||||
$subplugin = new stdClass();
|
||||
@ -785,6 +794,9 @@ class available_update_checker {
|
||||
* @throws available_update_checker_exception
|
||||
*/
|
||||
protected function get_response() {
|
||||
global $CFG;
|
||||
require_once($CFG->libdir.'/filelib.php');
|
||||
|
||||
$curl = new curl(array('proxy' => true));
|
||||
$response = $curl->post($this->prepare_request_url(), $this->prepare_request_params());
|
||||
$curlinfo = $curl->get_info();
|
||||
@ -961,6 +973,9 @@ class available_update_checker {
|
||||
return;
|
||||
}
|
||||
|
||||
$version = null;
|
||||
$release = null;
|
||||
|
||||
require($CFG->dirroot.'/version.php');
|
||||
$this->currentversion = $version;
|
||||
$this->currentrelease = $release;
|
||||
|
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user