MDL-20438 small fixes spotted during various testing

This commit is contained in:
David Mudrak 2012-03-26 12:00:24 +02:00
parent 4442cc8036
commit 718eb2a59f

View File

@ -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) {