mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 12:32:08 +02:00
MDL-76362 h5p: Use string as default lang param
This commit is contained in:
parent
e76b1bcd5e
commit
6ae3f79c1e
@ -58,8 +58,8 @@ switch ($action) {
|
||||
$minor = optional_param('minorVersion', 0, PARAM_INT);
|
||||
|
||||
// Normalise Moodle language using underscore, as opposed to H5P which uses dash.
|
||||
$language = optional_param('default-language', null, PARAM_RAW);
|
||||
$language = clean_param(str_replace('-', '_', $language ?? ''), PARAM_LANG);
|
||||
$language = optional_param('default-language', '', PARAM_RAW);
|
||||
$language = clean_param(str_replace('-', '_', $language), PARAM_LANG);
|
||||
|
||||
if (!empty($name)) {
|
||||
$editor->ajax->action(H5PEditorEndpoints::SINGLE_LIBRARY, $name,
|
||||
|
Loading…
x
Reference in New Issue
Block a user