MDL-49329 admin: Fix checking for available updates

This was a regression of my recent improvement of rendering the "Check
for updates" button. There is now unified parameter ?fetchupdates=1 that
can be used on either admin/index.php or admin/plugins.php, so that we
can use a common UI widget for both locations (without the need to pass
the URL explicitly).
This commit is contained in:
David Mudrák 2015-10-10 00:24:59 +02:00
parent b0fc789878
commit aa1d100c2d
3 changed files with 4 additions and 4 deletions

View file

@ -28,7 +28,7 @@ require_once(dirname(dirname(__FILE__)) . '/config.php');
require_once($CFG->libdir . '/adminlib.php');
require_once($CFG->libdir . '/filelib.php');
$fetchremote = optional_param('fetchremote', false, PARAM_BOOL); // Check for available plugins updates.
$fetchupdates = optional_param('fetchupdates', false, PARAM_BOOL); // Check for available plugins updates.
$updatesonly = optional_param('updatesonly', false, PARAM_BOOL); // Show updateable plugins only.
$contribonly = optional_param('contribonly', false, PARAM_BOOL); // Show additional plugins only.
$uninstall = optional_param('uninstall', '', PARAM_COMPONENT); // Uninstall the plugin.
@ -207,7 +207,7 @@ $output = $PAGE->get_renderer('core', 'admin');
$checker = \core\update\checker::instance();
if ($fetchremote) {
if ($fetchupdates) {
require_sesskey();
$checker->fetch();
redirect($PAGE->url);