Index: lang.php =================================================================== RCS file: /cvsroot/moodle/moodle/admin/lang.php,v retrieving revision 1.70 diff -c -r1.70 lang.php *** lang.php 21 Sep 2006 08:28:25 -0000 1.70 --- lang.php 7 Nov 2006 12:22:15 -0000 *************** *** 4,9 **** --- 4,12 ---- * * CHANGES * + * 2006/11/07 mudrd8mz + * Fixed bug MDL-7361. Thanks to Dan Poltawski for the patch proposal. + * * 2006/06/08 mudrd8mz * 1) Fixed bug 5745 reported by Harry Smith so now can edit en_utf8_local pack * 2) More notification messages included *************** *** 133,145 **** // Get a list of all the root files in the English directory $enlangdir = "$CFG->dirroot/lang/en_utf8"; if ($currentlang == 'en_utf8') { $langdir = $enlangdir; } else { ! $langdir = "$CFG->dataroot/lang/$currentlang"; } ! $locallangdir = "$CFG->dataroot/lang/{$currentlang}_local"; if (! $stringfiles = get_directory_list($enlangdir, "", false)) { error("Could not find English language pack!"); --- 136,149 ---- // Get a list of all the root files in the English directory + $langbase = $CFG->dataroot . '/lang'; $enlangdir = "$CFG->dirroot/lang/en_utf8"; if ($currentlang == 'en_utf8') { $langdir = $enlangdir; } else { ! $langdir = "$langbase/$currentlang"; } ! $locallangdir = "$langbase/{$currentlang}_local"; if (! $stringfiles = get_directory_list($enlangdir, "", false)) { error("Could not find English language pack!"); *************** *** 256,261 **** --- 260,273 ---- } else if ($mode == "compare") { + if (!file_exists($langbase) ){ + if (!lang_make_directory($langbase) ){ + error('ERROR: Could not create base lang directory ' . $langbase); + } else { + echo '