Update upgrade procedure to remove old language files - refs #4467

1.10.x
Yannick Warnier 10 years ago
parent 92c6631785
commit 96a8d5097d
  1. 7
      documentation/installation_guide.html
  2. 75
      main/install/update-files-1.9.0-1.10.0.inc.php

@ -341,6 +341,13 @@ responsible for what would happen to your data without professional supervision)
This is why we *really* recommend you take a full backup of your system before
you upgrade.</em>
<br />
<br />
Also note that Chamilo LMS 1.10 removes some deprecated language files from the
main/lang/ directory. If you have changed language files directly (instead of
using the recommended way of sublanguages), you should take a backup copy of
these changed translations before you upgrade. Sublanguages might also require
som manual work, but the upgrade procedure will not touch sublanguages directly.
<br />
<div class="muted"> NOTE: For very heavy Chamilo databases, some of our official
providers have developed improved migration procedures that use more memory but
process the upgrades up to 20 times faster. If this is the kind of thing you

@ -22,15 +22,88 @@ if (defined('SYSTEM_INSTALLATION')) {
// Delete the "chat" file in all language directories, as variables have been moved to the trad4all file
$langPath = api_get_path(SYS_CODE_PATH).'lang/';
// Only erase files from Chamilo languages (not sublanguages defined by the users)
$officialLanguages = array(
'arabic',
'asturian',
'basque',
'bengali',
'bosnian',
'brazilian',
'bulgarian',
'catalan',
'croatian',
'czech',
'danish',
'dari',
'dutch',
'english',
'esperanto',
'faroese',
'finnish',
'french',
'friulian',
'galician',
'georgian',
'german',
'greek',
'hebrew',
'hindi',
'hungarian',
'indonesian',
'italian',
'japanese',
'korean',
'latvian',
'lithuanian',
'macedonian',
'malay',
'norwegian',
'occitan',
'pashto',
'persian',
'polish',
'portuguese',
'quechua_cusco',
'romanian',
'russian',
'serbian',
'simpl_chinese',
'slovak',
'slovenian',
'somali',
'spanish',
'spanish_latin',
'swahili',
'swedish',
'tagalog',
'thai',
'tibetan',
'trad_chinese',
'turkish',
'ukrainian',
'vietnamese',
'xhosa',
'yoruba',
);
$list = scandir($langPath);
foreach ($list as $entry) {
if (is_dir($langPath.$entry)) {
if (is_dir($langPath.$entry) && in_array($entry, $officialLanguages)) {
unlink($langPath.$entry.'/accessibility.inc.php');
unlink($langPath.$entry.'/chat.inc.php');
unlink($langPath.$entry.'/course_description.inc.php');
unlink($langPath.$entry.'/course_home.inc.php');
unlink($langPath.$entry.'/external_module.inc.php');
unlink($langPath.$entry.'/glossary.inc.php');
unlink($langPath.$entry.'/import.inc.php');
unlink($langPath.$entry.'/md_mix.inc.php');
unlink($langPath.$entry.'/messages.inc.php');
unlink($langPath.$entry.'/myagenda.inc.php');
unlink($langPath.$entry.'/notebook.inc.php');
unlink($langPath.$entry.'/pedaSuggest.inc.php');
unlink($langPath.$entry.'/resourcelinker.inc.php');
unlink($langPath.$entry.'/scormbuilder.inc.php');
unlink($langPath.$entry.'/scormdocument.inc.php');
unlink($langPath.$entry.'/slideshow.inc.php');
}
}

Loading…
Cancel
Save