Merge with a003da5ee4f5e63b2b0c5633573833c67fe37e97

skala
Ivan Tcholakov 14 years ago
commit 690380a753
  1. 2
      main/admin/add_users_to_group.php
  2. 2
      main/admin/add_users_to_session.php
  3. 2
      main/admin/calendar.lib.php
  4. 2
      main/admin/dashboard_add_courses_to_user.php
  5. 2
      main/admin/dashboard_add_sessions_to_user.php
  6. 2
      main/admin/dashboard_add_users_to_user.php
  7. 8
      main/admin/ldap_import_students.php
  8. 4
      main/admin/ldap_import_students_to_session.php
  9. 4
      main/admin/ldap_synchro.php
  10. 2
      main/admin/session_add.php
  11. 2
      main/admin/user_list.php
  12. 2
      main/calendar/agenda.inc.php
  13. 2
      main/conference/api.php
  14. 2
      main/inc/lib/access_url_edit_courses_to_url_functions.lib.php
  15. 2
      main/inc/lib/access_url_edit_sessions_to_url_functions.lib.php
  16. 2
      main/inc/lib/access_url_edit_users_to_url_functions.lib.php
  17. 2
      main/inc/lib/add_courses_to_session_functions.lib.php
  18. 2
      main/inc/lib/add_many_session_to_category_functions.lib.php
  19. 2
      main/inc/lib/message.lib.php
  20. 4
      main/newscorm/learnpath.class.php
  21. 4
      main/newscorm/lp_stats.php
  22. 4
      main/newscorm/openoffice_presentation.class.php
  23. 2
      main/newscorm/openoffice_text_document.class.php
  24. 2
      main/social/group_invitation.php

@ -106,7 +106,7 @@ function search_users($needle,$type,$relation_type) {
if (!empty($needle) && !empty($type)) {
// xajax send utf8 datas... datas in db can be non-utf8 datas
$charset = api_get_setting('platform_charset');
$charset = api_get_system_encoding();
$needle = Database::escape_string($needle);
$needle = api_convert_encoding($needle, $charset, 'utf-8');
$user_anonymous=api_get_anonymous_id();

@ -80,7 +80,7 @@ function search_users($needle,$type)
if (!empty($needle) && !empty($type)) {
// xajax send utf8 datas... datas in db can be non-utf8 datas
$charset = api_get_setting('platform_charset');
$charset = api_get_system_encoding();
$needle = Database::escape_string($needle);
$needle = api_convert_encoding($needle, $charset, 'utf-8');
$user_anonymous=api_get_anonymous_id();

@ -3062,7 +3062,7 @@ function agenda_add_repeat_item($course_info,$orig_id,$type,$end,$orig_dest)
function agenda_import_ical($course_info,$file) {
require_once api_get_path(LIBRARY_PATH).'fileUpload.lib.php';
$charset = api_get_setting('platform_charset');
$charset = api_get_system_encoding();
$filepath = api_get_path(SYS_ARCHIVE_PATH).$file['name'];
if(!@move_uploaded_file($file['tmp_name'],$filepath))
{

@ -73,7 +73,7 @@ function search_courses($needle,$type) {
$return = '';
if(!empty($needle) && !empty($type)) {
// xajax send utf8 datas... datas in db can be non-utf8 datas
$charset = api_get_setting('platform_charset');
$charset = api_get_system_encoding();
$needle = api_convert_encoding($needle, $charset, 'utf-8');
$assigned_courses_to_hrm = CourseManager::get_courses_followed_by_drh($user_id);

@ -72,7 +72,7 @@ function search_sessions($needle,$type) {
$return = '';
if(!empty($needle) && !empty($type)) {
// xajax send utf8 datas... datas in db can be non-utf8 datas
$charset = api_get_setting('platform_charset');
$charset = api_get_system_encoding();
$needle = api_convert_encoding($needle, $charset, 'utf-8');
$assigned_sessions_to_hrm = SessionManager::get_sessions_followed_by_drh($user_id);
$assigned_sessions_id = array_keys($assigned_sessions_to_hrm);

@ -71,7 +71,7 @@ function search_users($needle,$type) {
$return = '';
if(!empty($needle) && !empty($type)) {
// xajax send utf8 datas... datas in db can be non-utf8 datas
$charset = api_get_setting('platform_charset');
$charset = api_get_system_encoding();
$needle = api_convert_encoding($needle, $charset, 'utf-8');
$assigned_users_to_hrm = UserManager::get_users_followed_by_drh($user_id);

@ -109,7 +109,7 @@ elseif ($annee <> "" && $composante == "" && $etape == "") // form 2 annee != 0;
for($i = 0; $i < $info['count']; $i ++)
{
//presupose LDAP server is UTF-8
$composante[$info[$i]['ou'][0]] = api_utf8_decode($info[$i]['description'][0], api_get_setting('platform_charset'));
$composante[$info[$i]['ou'][0]] = api_utf8_decode($info[$i]['description'][0], api_get_system_encoding());
}
$oucompotab3=$composante;
@ -189,7 +189,7 @@ elseif ($annee <> "" && $composante <> "" && $etape == "") // form3 :annee!=0com
if ($ouetapetab[$key] != $tempcomp) {
$etape = $ouetapetab2[$key];
$tempcomp = '"'.$ouetapetab[$key].'"';
$tempcomp = api_utf8_decode($tempcomp, api_get_setting('platform_charset'));
$tempcomp = api_utf8_decode($tempcomp, api_get_system_encoding());
$annee = str_word_count($etape, 1);
echo '<option value="'.$etape.'">'.$tempcomp.'</option>';
@ -255,8 +255,8 @@ elseif (!empty($annee) && !empty($course) && empty($_POST['confirmed']))
$info = ldap_get_entries($ds, $sr);
for ($key = 0; $key < $info["count"]; $key ++) {
$nom_form[] = $info[$key]["sn"][0];//api_utf8_decode($info[$key]["sn"][0], api_get_setting('platform_charset'));
$prenom_form[] = $info[$key]["givenname"][0];//api_utf8_decode($info[$key]["givenname"][0], api_get_setting('platform_charset'));
$nom_form[] = $info[$key]["sn"][0];//api_utf8_decode($info[$key]["sn"][0], api_get_system_encoding());
$prenom_form[] = $info[$key]["givenname"][0];//api_utf8_decode($info[$key]["givenname"][0], api_get_system_encoding());
$email_form[] = $info[$key]["mail"][0];
// Get uid from dn
//$dn_array=ldap_explode_dn($info[$key]["dn"],1);

@ -130,8 +130,8 @@ elseif (!empty($annee) && !empty($id_session) && empty($_POST['confirmed']))
$info = ldap_get_entries($ds, $sr);
for ($key = 0; $key < $info["count"]; $key ++) {
$nom_form[] = $info[$key]["sn"][0];//api_utf8_decode($info[$key]["sn"][0], api_get_setting('platform_charset'));
$prenom_form[] = $info[$key]["givenname"][0];//api_utf8_decode($info[$key]["givenname"][0], api_get_setting('platform_charset'));
$nom_form[] = $info[$key]["sn"][0];//api_utf8_decode($info[$key]["sn"][0], api_get_system_encoding());
$prenom_form[] = $info[$key]["givenname"][0];//api_utf8_decode($info[$key]["givenname"][0], api_get_system_encoding());
$email_form[] = $info[$key]["mail"][0];
// Get uid from dn
//$dn_array=ldap_explode_dn($info[$key]["dn"],1);

@ -109,8 +109,8 @@ foreach($Sessions as $session){
echo "<pre>";
print_r($info[$key]);
echo "</pre>";
$lastname = api_utf8_decode($info[$key]["sn"][0], api_get_setting('platform_charset'));
$firstname = api_utf8_decode($info[$key]["givenname"][0], api_get_setting('platform_charset'));
$lastname = api_utf8_decode($info[$key]["sn"][0], api_get_system_encoding());
$firstname = api_utf8_decode($info[$key]["givenname"][0], api_get_system_encoding());
$email = $info[$key]["mail"][0];
// Get uid from dn
$dn_array=ldap_explode_dn($info[$key]["dn"],1);

@ -45,7 +45,7 @@ function search_coachs($needle) {
if(!empty($needle)) {
// xajax send utf8 datas... datas in db can be non-utf8 datas
$charset = api_get_setting('platform_charset');
$charset = api_get_system_encoding();
$needle = api_convert_encoding($needle, $charset, 'utf-8');
$order_clause = api_sort_by_first_name() ? ' ORDER BY firstname, lastname, username' : ' ORDER BY lastname, firstname, username';

@ -148,7 +148,7 @@ function courses_of_user($arg) {
{
$newContent .= '- '.get_lang('None').' -<br />';
}
$newContent = api_convert_encoding($newContent,'utf-8',api_get_setting('platform_charset'));
$newContent = api_convert_encoding($newContent,'utf-8',api_get_system_encoding());
// Instantiate the xajaxResponse object
$objResponse = new xajaxResponse();

@ -4614,7 +4614,7 @@ function agenda_add_repeat_item($course_info,$orig_id,$type,$end,$orig_dest,$fil
*/
function agenda_import_ical($course_info,$file) {
require_once api_get_path(LIBRARY_PATH).'fileUpload.lib.php';
$charset = api_get_setting('platform_charset');
$charset = api_get_system_encoding();
$filepath = api_get_path(SYS_ARCHIVE_PATH).$file['name'];
if(!@move_uploaded_file($file['tmp_name'],$filepath)) {
error_log('Problem moving uploaded file: '.$file['error'].' in '.__FILE__.' line '.__LINE__);

@ -177,7 +177,7 @@ else if ($action == "service")
api_strlen($files[$k]['title']) > 32 ?
api_substr($files[$k]['title'],0, 32)."..." :
$files[$k]['title'],
'utf-8',api_get_setting('platform_charset'));
'utf-8',api_get_system_encoding());
// removing '<', '>' and '_'
$files[$k]['title'] = str_replace(array('<','>','_'),' ', $files[$k]['title']);
}

@ -24,7 +24,7 @@ class Accessurleditcoursestourl {
if(!empty($needle)) {
// xajax send utf8 datas... datas in db can be non-utf8 datas
$charset = api_get_setting('platform_charset');
$charset = api_get_system_encoding();
$needle = api_convert_encoding($needle, $charset, 'utf-8');
$needle = Database::escape_string($needle);
// search courses where username or firstname or lastname begins likes $needle

@ -24,7 +24,7 @@ class Accessurleditsessionstourl {
if(!empty($needle)) {
// xajax send utf8 datas... datas in db can be non-utf8 datas
$charset = api_get_setting('platform_charset');
$charset = api_get_system_encoding();
$needle = api_convert_encoding($needle, $charset, 'utf-8');
$needle = Database::escape_string($needle);
// search sessiones where username or firstname or lastname begins likes $needle

@ -25,7 +25,7 @@ class Accessurledituserstourl{
if(!empty($needle)) {
// xajax send utf8 datas... datas in db can be non-utf8 datas
$charset = api_get_setting('platform_charset');
$charset = api_get_system_encoding();
$needle = api_convert_encoding($needle, $charset, 'utf-8');
$needle = Database::escape_string($needle);
// search users where username or firstname or lastname begins likes $needle

@ -14,7 +14,7 @@ class AddCourseToSession {
$return = '';
if(!empty($needle) && !empty($type)) {
// xajax send utf8 datas... datas in db can be non-utf8 datas
$charset = api_get_setting('platform_charset');
$charset = api_get_system_encoding();
$needle = api_convert_encoding($needle, $charset, 'utf-8');
$cond_course_code = '';

@ -11,7 +11,7 @@ class AddManySessionToCategoryFunctions {
$return = '';
if(!empty($needle) && !empty($type)) {
// xajax send utf8 datas... datas in db can be non-utf8 datas
$charset = api_get_setting('platform_charset');
$charset = api_get_system_encoding();
$needle = api_convert_encoding($needle, $charset, 'utf-8');
$needle = Database::escape_string($needle);

@ -1095,7 +1095,7 @@ class MessageManager
function inbox_display() {
global $charset;
// $charset = api_get_setting('platform_charset');
// $charset = api_get_system_encoding();
$table_message = Database::get_main_table(TABLE_MESSAGE);
$request=api_is_xml_http_request();
if ($_SESSION['social_exist']===true) {

@ -2360,7 +2360,7 @@ class learnpath {
*/
public function get_iv_interactions_array($lp_iv_id = 0) {
$charset = api_get_setting('platform_charset');
$charset = api_get_system_encoding();
$list = array ();
$table = Database :: get_course_table(TABLE_LP_IV_INTERACTION);
@ -2585,7 +2585,7 @@ class learnpath {
$is_allowed_to_edit = api_is_allowed_to_edit(null, true);
$charset = api_get_setting('platform_charset');
$charset = api_get_system_encoding();
$display_action_links_with_icons = false;
if ($this->debug > 0) {

@ -37,7 +37,7 @@ if ($origin != 'tracking') {
if (!empty ($stats_charset)) {
$lp_charset = $stats_charset;
} else {
$lp_charset = api_get_setting('platform_charset');
$lp_charset = api_get_system_encoding();
}
$charset = $lp_charset;
//$w = $tablewidth -20;
@ -61,7 +61,7 @@ if ($origin != 'tracking') {
}
// The Chamilo interface's encoding
$dokeos_charset = api_get_setting('platform_charset');
$dokeos_charset = api_get_system_encoding();
$output = '';
// if display in fullscreen required.
if (!empty($_GET['fs']) && strcmp($_GET['fs'], 'true') == 0) {

@ -198,8 +198,8 @@ class OpenofficePresentation extends OpenofficeDocument {
list($slide_name,$file_name) = explode('||',$file); // '||' is used as separator between slide name (with accents) and file name (without accents).
$slide_name = api_htmlentities($slide_name, ENT_COMPAT, $this->original_charset);
$slide_name = str_replace('&rsquo;', '\'', $slide_name);
$slide_name = api_convert_encoding($slide_name, api_get_setting('platform_charset'), $this->original_charset);
$slide_name = api_html_entity_decode($slide_name, ENT_COMPAT, api_get_setting('platform_charset'));
$slide_name = api_convert_encoding($slide_name, api_get_system_encoding(), $this->original_charset);
$slide_name = api_html_entity_decode($slide_name, ENT_COMPAT, api_get_system_encoding());
$did = add_document($_course, $this->created_dir.'/'.urlencode($file_name), 'file', filesize($this->base_work_dir.$this->created_dir.'/'.$file_name), $slide_name);
if ($did)

@ -53,7 +53,7 @@ class OpenOfficeTextDocument extends OpenofficeDocument {
// The file is utf8 encoded and it seems to make problems with special quotes.
// then we htmlentities that, we replace these quotes and html_entity_decode that in good charset.
$charset = api_get_setting('platform_charset');
$charset = api_get_system_encoding();
$content = api_htmlentities($content, ENT_COMPAT, $this->original_charset);
$content = str_replace('&rsquo;', '\'', $content);
$content = api_convert_encoding($content, $charset, $this->original_charset);

@ -86,7 +86,7 @@ function search_users($needle,$type) {
if (!empty($needle) && !empty($type)) {
// xajax send utf8 datas... datas in db can be non-utf8 datas
$charset = api_get_setting('platform_charset');
$charset = api_get_system_encoding();
$needle = Database::escape_string($needle);
$needle = api_convert_encoding($needle, $charset, 'utf-8');
$user_anonymous=api_get_anonymous_id();

Loading…
Cancel
Save