Skip to content

Commit

Permalink
MDL-78346 tool_langimport: Redirect after action to prevent resubmission
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnicols committed May 25, 2023
1 parent ad7a503 commit 68122a9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions admin/tool/langimport/index.php
Expand Up @@ -76,11 +76,12 @@
if (is_array($pack) && count($pack) > 1) {
// Installing multiple languages can take a while - perform it asynchronously in the background.
$controller->schedule_languagepacks_installation($pack);

redirect($PAGE->url);
} else {
// Single language pack to be installed synchronously. It should be reasonably quick and can be used for debugging, too.
core_php_time_limit::raise();
$controller->install_languagepacks($pack);
redirect($PAGE->url);
}
}

Expand Down Expand Up @@ -109,7 +110,7 @@
foreach ($uninstalllang as $ulang) {
$controller->uninstall_language($ulang);
}

redirect($PAGE->url);
}
}

Expand Down

0 comments on commit 68122a9

Please sign in to comment.