|
|
@ -1,5 +1,12 @@ |
|
|
|
<?php |
|
|
|
<?php |
|
|
|
/* For licensing terms, see /license.txt */ |
|
|
|
/* For licensing terms, see /license.txt */ |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Sub language AJAX script to update variables |
|
|
|
|
|
|
|
* @package chamilo.admin.sub_language |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Init |
|
|
|
|
|
|
|
*/ |
|
|
|
$language_file = 'admin'; |
|
|
|
$language_file = 'admin'; |
|
|
|
$this_script = 'sub_language'; |
|
|
|
$this_script = 'sub_language'; |
|
|
|
require_once '../inc/global.inc.php'; |
|
|
|
require_once '../inc/global.inc.php'; |
|
|
@ -10,7 +17,9 @@ api_protect_admin_script(); |
|
|
|
$new_language = Security::remove_XSS($_REQUEST['new_language']); |
|
|
|
$new_language = Security::remove_XSS($_REQUEST['new_language']); |
|
|
|
$language_variable = Security::remove_XSS($_REQUEST['variable_language']); |
|
|
|
$language_variable = Security::remove_XSS($_REQUEST['variable_language']); |
|
|
|
$file_id = intval($_REQUEST['file_id']); |
|
|
|
$file_id = intval($_REQUEST['file_id']); |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Code |
|
|
|
|
|
|
|
*/ |
|
|
|
if (isset($new_language) && isset($language_variable) && isset($file_id)) { |
|
|
|
if (isset($new_language) && isset($language_variable) && isset($file_id)) { |
|
|
|
$file_language = $language_files_to_load[$file_id].'.inc.php'; |
|
|
|
$file_language = $language_files_to_load[$file_id].'.inc.php'; |
|
|
|
$id_language = intval($_REQUEST['id']); |
|
|
|
$id_language = intval($_REQUEST['id']); |
|
|
@ -40,6 +49,7 @@ if (isset($new_language) && isset($language_variable) && isset($file_id)) { |
|
|
|
if (!empty($variables_with_problems)) { |
|
|
|
if (!empty($variables_with_problems)) { |
|
|
|
echo $path_folder.' '.get_lang('IsNotWritable').'<br /> '.api_ucwords(get_lang('ErrorsFound')).': <br />'.$variables_with_problems; |
|
|
|
echo $path_folder.' '.get_lang('IsNotWritable').'<br /> '.api_ucwords(get_lang('ErrorsFound')).': <br />'.$variables_with_problems; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
echo 1; |
|
|
|
echo get_lang('Saved'); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|