mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
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:
parent
b0fc789878
commit
aa1d100c2d
@ -103,7 +103,7 @@ $confirmrelease = optional_param('confirmrelease', 0, PARAM_BOOL); // Core relea
|
||||
$confirmplugins = optional_param('confirmplugincheck', 0, PARAM_BOOL); // Plugins check page confirmed?
|
||||
$showallplugins = optional_param('showallplugins', 0, PARAM_BOOL); // Show all plugins on the plugins check page?
|
||||
$agreelicense = optional_param('agreelicense', 0, PARAM_BOOL); // GPL license confirmed for installation?
|
||||
$fetchupdates = optional_param('fetchremote', 0, PARAM_BOOL); // Should check for available updates?
|
||||
$fetchupdates = optional_param('fetchupdates', 0, PARAM_BOOL); // Should check for available updates?
|
||||
$newaddonreq = optional_param('installaddonrequest', null, PARAM_RAW); // Plugin installation requested at moodle.org/plugins.
|
||||
$upgradekeyhash = optional_param('upgradekeyhash', null, PARAM_ALPHANUM); // Hash of provided upgrade key.
|
||||
$installdep = optional_param('installdep', null, PARAM_COMPONENT); // Install given missing dependency (required plugin).
|
||||
|
@ -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);
|
||||
|
@ -346,7 +346,7 @@ class core_admin_renderer extends plugin_renderer_base {
|
||||
if ($checker->enabled()) {
|
||||
$output .= $this->container_start('checkforupdates');
|
||||
$output .= $this->single_button(
|
||||
new moodle_url($reloadurl, array('fetchremote' => 1)),
|
||||
new moodle_url($reloadurl, array('fetchupdates' => 1)),
|
||||
get_string('checkforupdates', 'core_plugin')
|
||||
);
|
||||
if ($timefetched = $checker->get_last_timefetched()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user