MDL-20438 warn the admin that we are just showing available updates

This warning is displayed so that folks do not expect any sort of
auto-update ala Wordpress (yet).
This commit is contained in:
David Mudrak
2012-03-30 11:05:42 +02:00
parent 18e55c294d
commit 5344ddd116
4 changed files with 28 additions and 1 deletions
+17
View File
@@ -298,6 +298,23 @@ class plugin_manager {
return true;
}
/**
* Checks if there are some plugins with a known available update
*
* @return bool true if there is at least one available update
*/
public function some_plugins_updatable() {
foreach ($this->get_plugins() as $type => $plugins) {
foreach ($plugins as $plugin) {
if ($plugin->available_updates()) {
return true;
}
}
}
return false;
}
/**
* Defines a list of all plugins that were originally shipped in the standard Moodle distribution,
* but are not anymore and are deleted during upgrades.