MDL-41437 rework plugin_manager caching and version info in blocks and modules
This patch includes: * version column removed from modules table, now using standard config, this allows decimal version for modules * version column removed from block table, now using standard config, this allows decimal version for blocks * module version.php can safely use $plugins instead of module * new plugin_manager bulk caching, this should help with MUC performance when logged in as admin * all missing plugins are now in plugin overview (previously only blocks and modules) * simplified code and improved coding style * reworked plugin_manager unit tests - now using real plugins instead of mocks * unit tests now fail if any plugin does not contain proper version.php file * allow uninstall of deleted filters
This commit is contained in:
@@ -927,17 +927,11 @@ $cache = '.var_export($cache, true).';
|
||||
$plugs = self::fetch_plugins($type, $typedir);
|
||||
}
|
||||
foreach ($plugs as $plug => $fullplug) {
|
||||
if ($type === 'mod') {
|
||||
$module = new stdClass();
|
||||
$module->version = null;
|
||||
include($fullplug.'/version.php');
|
||||
$versions[$type.'_'.$plug] = $module->version;
|
||||
} else {
|
||||
$plugin = new stdClass();
|
||||
$plugin->version = null;
|
||||
@include($fullplug.'/version.php');
|
||||
$versions[$type.'_'.$plug] = $plugin->version;
|
||||
}
|
||||
$plugin = new stdClass();
|
||||
$plugin->version = null;
|
||||
$module = $plugin;
|
||||
@include($fullplug.'/version.php');
|
||||
$versions[$type.'_'.$plug] = $plugin->version;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user