mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 04:22:07 +02:00
Merge branch 'MDL-75974' of https://github.com/paulholden/moodle
This commit is contained in:
commit
ac11386831
@ -160,6 +160,16 @@ foreach ($langfiles as $lng => $files) {
|
||||
|
||||
cli_heading(get_string('clifiles', 'tool_customlang', $lng));
|
||||
|
||||
// If we intend to check in any changes, we must first check them out.
|
||||
if ($checkin) {
|
||||
cli_writeln(get_string('checkout', 'tool_customlang'));
|
||||
|
||||
$progressbar = new progress_bar();
|
||||
$progressbar->create();
|
||||
|
||||
tool_customlang_utils::checkout($lng, $progressbar);
|
||||
}
|
||||
|
||||
foreach ($files as $file) {
|
||||
// Generate a valid stored_file from this file.
|
||||
$record = (object)[
|
||||
|
@ -89,7 +89,9 @@ class tool_customlang_utils {
|
||||
* @param progress_bar $progressbar optionally, the given progress bar can be updated
|
||||
*/
|
||||
public static function checkout($lang, progress_bar $progressbar = null) {
|
||||
global $DB;
|
||||
global $DB, $CFG;
|
||||
|
||||
require_once("{$CFG->libdir}/adminlib.php");
|
||||
|
||||
// For behat executions we are going to load only a few components in the
|
||||
// language customisation structures. Using the whole "en" langpack is
|
||||
|
Loading…
x
Reference in New Issue
Block a user