Merge branch 'm501-86376' of https://github.com/danmarsden/moodle into MOODLE_501_STABLE

This commit is contained in:
Andrew Nicols
2025-10-17 11:04:56 +08:00
+4
View File
@@ -1376,6 +1376,7 @@ $cache = ' . var_export($cache, true) . ';
public static function get_plugin_list_with_file($plugintype, $file, $include = false) {
global $CFG; // Necessary in case it is referenced by included PHP scripts.
$pluginfiles = [];
self::init();
if (isset(self::$filemap[$file])) {
// If the file was supposed to be mapped, then it should have been set in the array.
@@ -1417,6 +1418,7 @@ $cache = ' . var_export($cache, true) . ';
public static function get_component_classes_in_namespace($component = null, $namespace = '') {
$classes = [];
self::init();
// Only look for components if a component name is set or a namespace is set.
if (isset($component) || !empty($namespace)) {
@@ -1825,6 +1827,7 @@ $cache = ' . var_export($cache, true) . ';
* @return bool true if core subsystem.
*/
public static function is_core_subsystem($subsystemname) {
self::init();
return isset(self::$subsystems[$subsystemname]);
}
@@ -1835,6 +1838,7 @@ $cache = ' . var_export($cache, true) . ';
* @return bool true if core API.
*/
public static function is_core_api($apiname) {
self::init();
return isset(self::$apis[$apiname]);
}