From 2786ff706dbcdfdc548e7f58d1013c13da5ff2d9 Mon Sep 17 00:00:00 2001 From: toyomoyo Date: Thu, 23 Feb 2006 02:56:07 +0000 Subject: [PATCH] fix for 4825 --- admin/langimport.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/admin/langimport.php b/admin/langimport.php index 3929c827ba7..c098ec12ec3 100755 --- a/admin/langimport.php +++ b/admin/langimport.php @@ -70,6 +70,7 @@ break; case INSTALLED: print_string('langpackupdated','admin',$pack); + @unlink($CFG->dataroot.'/cache/languages'); print_continue('langimport.php'); break; default: @@ -134,6 +135,9 @@ print_simple_box_end(); } else if (confirm_sesskey()) { + if ($uninstalllang == 'en_utf8') { + error ('en_utf8 can not be uninstalled!'); + } $dest1 = $CFG->dataroot.'/lang/'.$uninstalllang; $dest2 = $CFG->dirroot.'/lang/'.$uninstalllang; $rm1 = false; @@ -155,6 +159,7 @@ error ('An error has occurred, language pack is not completely uninstalled, please check file permission'); } } + @unlink($CFG->dataroot.'/cache/languages'); break; case UPDATE_ALL_LANG: //1 click update for all updatable language packs @@ -278,7 +283,7 @@ } else { /// fopen failed, we find local copy of list. $availablelangs = get_local_list_of_languages(); } - + if (!$remote) { print_simple_box_start('center','60%'); echo '
'; @@ -302,9 +307,7 @@ echo ''; echo '
'; @@ -348,7 +351,7 @@ } foreach ($availablelangs as $alang) { - if ($clang != "en_utf8") { + if ($alang[0] != "en_utf8") { if ($remote){ if (!is_installed_lang($alang[0], $alang[1])){ //if not already installed echo '';