MDL-48210 updates checker: Improve cron notifications processing
These are cosmetic improvements spotted while working on the issue. 1. Do not waste time if there are no changes to notify about. 2. Fix the legacy plugin manager's get_plugins() call.
This commit is contained in:
@@ -634,9 +634,13 @@ class checker {
|
||||
protected function cron_notifications(array $changes) {
|
||||
global $CFG;
|
||||
|
||||
if (empty($changes)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$notifications = array();
|
||||
$pluginman = \core_plugin_manager::instance();
|
||||
$plugins = $pluginman->get_plugins(true);
|
||||
$plugins = $pluginman->get_plugins();
|
||||
|
||||
foreach ($changes as $component => $componentchanges) {
|
||||
if (empty($componentchanges)) {
|
||||
@@ -696,6 +700,7 @@ class checker {
|
||||
global $CFG;
|
||||
|
||||
if (empty($notifications)) {
|
||||
$this->cron_mtrace('nothing to notify about. ', '');
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user