Skip to content

Commit

Permalink
MDL-17094 Allow translators to disable automatic language update duri…
Browse files Browse the repository at this point in the history
…ng 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
  • Loading branch information
mudrd8mz committed Oct 31, 2008
1 parent 5e71406 commit 66439e3
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions lib/adminlib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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" />';
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 66439e3

Please sign in to comment.