From 718eb2a59f3384118658fc6e2548c2d3494584fe Mon Sep 17 00:00:00 2001 From: David Mudrak Date: Mon, 26 Mar 2012 12:00:24 +0200 Subject: [PATCH] MDL-20438 small fixes spotted during various testing --- lib/pluginlib.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/pluginlib.php b/lib/pluginlib.php index 172ec5bc960..8923914ed72 100644 --- a/lib/pluginlib.php +++ b/lib/pluginlib.php @@ -997,6 +997,8 @@ class available_update_checker { * @return bool true if autocheck enabled, false if disabled */ protected function cron_autocheck_enabled() { + global $CFG; + if (empty($CFG->updateautocheck)) { return false; } else { @@ -1109,8 +1111,14 @@ class available_update_checker { $plugins = $pluginman->get_plugins(true); foreach ($changes as $component => $componentchanges) { + if (empty($componentchanges)) { + continue; + } $componentupdates = $this->get_update_info($component, array('minmaturity' => $CFG->updateminmaturity, 'notifybuilds' => $CFG->updatenotifybuilds)); + if (empty($componentupdates)) { + continue; + } // notify only about those $componentchanges that are present in $componentupdates // to respect the preferences foreach ($componentchanges as $componentchange) {