mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 08:55:15 +02:00
MDL-17094 Allow translators to disable automatic language update during Moodle upgrade.
One needs just add $CFG->skiplangupgrade = true; to their config.php and keep their language pack up-to-date manually. This is intended for lang pack maintainers with CVS access only. This is backpported from MOODLE_19_STABLE admin/index.php
This commit is contained in:
parent
5e71406d93
commit
66439e36ce
@ -232,16 +232,20 @@ function upgrade_db($version, $release) {
|
||||
require_once($CFG->libdir.'/environmentlib.php');
|
||||
print_heading(get_string('environment', 'admin'));
|
||||
if (!check_moodle_environment($release, $environment_results, true)) {
|
||||
print_box_start('generalbox', 'notice'); // MDL-8330
|
||||
print_string('langpackwillbeupdated', 'admin');
|
||||
print_box_end();
|
||||
if (empty($CFG->skiplangupgrade)) {
|
||||
print_box_start('generalbox', 'notice'); // MDL-8330
|
||||
print_string('langpackwillbeupdated', 'admin');
|
||||
print_box_end();
|
||||
}
|
||||
notice_yesno(get_string('environmenterrorupgrade', 'admin'),
|
||||
'index.php?confirmupgrade=1&confirmrelease=1', 'index.php');
|
||||
} else {
|
||||
notify(get_string('environmentok', 'admin'), 'notifysuccess');
|
||||
print_box_start('generalbox', 'notice'); // MDL-8330
|
||||
print_string('langpackwillbeupdated', 'admin');
|
||||
print_box_end();
|
||||
if (empty($CFG->skiplangupgrade)) {
|
||||
print_box_start('generalbox', 'notice'); // MDL-8330
|
||||
print_string('langpackwillbeupdated', 'admin');
|
||||
print_box_end();
|
||||
}
|
||||
echo '<form action="index.php"><div>';
|
||||
echo '<input type="hidden" name="confirmupgrade" value="1" />';
|
||||
echo '<input type="hidden" name="confirmrelease" value="1" />';
|
||||
@ -290,7 +294,9 @@ function upgrade_db($version, $release) {
|
||||
upgrade_log_start();
|
||||
|
||||
/// Upgrade current language pack if we can
|
||||
upgrade_language_pack();
|
||||
if (empty($CFG->skiplangupgrade)) {
|
||||
upgrade_language_pack();
|
||||
}
|
||||
|
||||
print_heading($strdatabasechecking);
|
||||
$DB->set_debug(true);
|
||||
|
Loading…
x
Reference in New Issue
Block a user