mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 13:02:07 +02:00
Merge branch 'wip-MDL-37474-m25' of git://github.com/samhemelryk/moodle
This commit is contained in:
commit
ee4cac2b44
10
cache/admin.php
vendored
10
cache/admin.php
vendored
@ -129,7 +129,7 @@ if (!empty($action) && confirm_sesskey()) {
|
||||
}
|
||||
break;
|
||||
case 'editdefinitionmapping' : // Edit definition mappings.
|
||||
$definition = required_param('definition', PARAM_TEXT);
|
||||
$definition = required_param('definition', PARAM_ALPHANUMEXT);
|
||||
$title = get_string('editdefinitionmappings', 'cache', $definition);
|
||||
$mform = new cache_definition_mappings_form($PAGE->url, array('definition' => $definition));
|
||||
if ($mform->is_cancelled()) {
|
||||
@ -167,6 +167,14 @@ if (!empty($action) && confirm_sesskey()) {
|
||||
}
|
||||
break;
|
||||
|
||||
case 'purgedefinition': // Purge a specific definition.
|
||||
$definition = required_param('definition', PARAM_ALPHANUMEXT);
|
||||
list($component, $area) = explode('/', $definition, 2);
|
||||
cache_helper::purge_by_definition($component, $area);
|
||||
redirect($PAGE->url, get_string('purgedefinitionsuccess', 'cache'), 5);
|
||||
break;
|
||||
|
||||
case 'purgestore':
|
||||
case 'purge': // Purge a store cache.
|
||||
$store = required_param('store', PARAM_TEXT);
|
||||
cache_helper::purge_store($store);
|
||||
|
6
cache/locallib.php
vendored
6
cache/locallib.php
vendored
@ -698,6 +698,10 @@ abstract class cache_administration_helper extends cache_helper {
|
||||
array(
|
||||
'text' => get_string('editmappings', 'cache'),
|
||||
'url' => new moodle_url('/cache/admin.php', array('action' => 'editdefinitionmapping', 'sesskey' => sesskey()))
|
||||
),
|
||||
array(
|
||||
'text' => get_string('purge', 'cache'),
|
||||
'url' => new moodle_url('/cache/admin.php', array('action' => 'purgedefinition', 'sesskey' => sesskey()))
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -727,7 +731,7 @@ abstract class cache_administration_helper extends cache_helper {
|
||||
}
|
||||
$actions[] = array(
|
||||
'text' => get_string('purge', 'cache'),
|
||||
'url' => new moodle_url($baseurl, array('action' => 'purge'))
|
||||
'url' => new moodle_url($baseurl, array('action' => 'purgestore'))
|
||||
);
|
||||
}
|
||||
return $actions;
|
||||
|
@ -92,6 +92,7 @@ $string['none'] = 'None';
|
||||
$string['plugin'] = 'Plugin';
|
||||
$string['pluginsummaries'] = 'Installed cache stores';
|
||||
$string['purge'] = 'Purge';
|
||||
$string['purgedefinitionsuccess'] = 'Successfully purged the requested definition.';
|
||||
$string['purgestoresuccess'] = 'Successfully purged the requested store.';
|
||||
$string['requestcount'] = 'Test with {$a} requests';
|
||||
$string['rescandefinitions'] = 'Rescan definitions';
|
||||
|
Loading…
x
Reference in New Issue
Block a user