MDL-35238 Allow filtering at the Plugins overview page
This commit is contained in:
+10
-2
@@ -32,15 +32,23 @@ require_capability('moodle/site:config', context_system::instance());
|
||||
admin_externalpage_setup('pluginsoverview');
|
||||
|
||||
$fetchremote = optional_param('fetchremote', false, PARAM_BOOL);
|
||||
$updatesonly = optional_param('updatesonly', false, PARAM_BOOL);
|
||||
$contribonly = optional_param('contribonly', false, PARAM_BOOL);
|
||||
|
||||
$pluginman = plugin_manager::instance();
|
||||
$checker = available_update_checker::instance();
|
||||
|
||||
// Filtering options.
|
||||
$options = array(
|
||||
'updatesonly' => $updatesonly,
|
||||
'contribonly' => $contribonly,
|
||||
);
|
||||
|
||||
if ($fetchremote) {
|
||||
require_sesskey();
|
||||
$checker->fetch();
|
||||
redirect($PAGE->url);
|
||||
redirect(new moodle_url($PAGE->url, $options));
|
||||
}
|
||||
|
||||
$output = $PAGE->get_renderer('core', 'admin');
|
||||
echo $output->plugin_management_page($pluginman, $checker);
|
||||
echo $output->plugin_management_page($pluginman, $checker, $options);
|
||||
|
||||
Reference in New Issue
Block a user