Permalink
Browse files

MDL-17094 Allow translators to disable automatic language update duri…

…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.
  • Loading branch information...
1 parent 0dca436 commit 97928e7e507d156374f0f82a5eed6a275c1f03a8 mudrd8mz committed Oct 31, 2008
Showing with 13 additions and 7 deletions.
  1. +13 −7 admin/index.php
View
@@ -287,16 +287,20 @@
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" />';
@@ -344,7 +348,9 @@
upgrade_log_start();
/// Upgrade current language pack if we can
- upgrade_language_pack();
+ if (empty($CFG->skiplangupgrade)) {
+ upgrade_language_pack();
+ }
print_heading($strdatabasechecking);
$db->debug=true;

0 comments on commit 97928e7

Please sign in to comment.