From b1ea199b5a28b4a30969f1316fdded8e012b2d66 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Thu, 14 Apr 2011 16:20:31 +0200 Subject: [PATCH] Allowing to use the same iso code when creating a new sub language --- main/admin/sub_language.class.php | 10 ++++------ main/admin/sub_language.php | 1 + main/admin/sub_language_add.php | 3 ++- main/admin/sub_language_ajax.inc.php | 7 +++---- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/main/admin/sub_language.class.php b/main/admin/sub_language.class.php index c3cd7a385b..5b9623d92d 100755 --- a/main/admin/sub_language.class.php +++ b/main/admin/sub_language.class.php @@ -91,7 +91,7 @@ class SubLanguageManager { $var = trim($var); $val = trim($val); $res_list[$var] = $val; } - return $res_list; + return $res_list; } /** @@ -99,11 +99,9 @@ class SubLanguageManager { * @param String The chamilo path file (/var/www/chamilo/main/lang/spanish/gradebook.inc.php) * @return bool */ - public static function add_file_in_language_directory ($system_path_file) { - $return_value = false; - if (file_exists($system_path_file) && is_writable($system_path_file)) { - $return_value = file_put_contents($system_path_file,'$value_info) { - //echo $path_folder.' '.$value_info.' '.$key_value; $result_array[$key_value] = SubLanguageManager::write_data_in_file($path_folder, $value_info, $key_value); } $variables_with_problems = '';