diff --git a/main/calendar/agenda.inc.php b/main/calendar/agenda.inc.php index 238a4ed295..84c1c4c1d4 100644 --- a/main/calendar/agenda.inc.php +++ b/main/calendar/agenda.inc.php @@ -1,4 +1,4 @@ -\n\t\t". - ucfirst(format_locale_date("%B %Y",strtotime($myrow["start_date"]))). + api_ucfirst(format_locale_date("%B %Y",strtotime($myrow["start_date"]))). "\n\t\n"; } @@ -2118,15 +2118,15 @@ function display_agenda_items() --------------------------------------------------*/ echo ""; echo "\t\t".get_lang("StartTimeWindow").": "; - echo ucfirst(format_locale_date($dateFormatLong,strtotime($myrow["start_date"])))."   "; - echo ucfirst(strftime($timeNoSecFormat,strtotime($myrow["start_date"]))).""; + echo api_ucfirst(format_locale_date($dateFormatLong,strtotime($myrow["start_date"])))."   "; + echo api_ucfirst(strftime($timeNoSecFormat,strtotime($myrow["start_date"]))).""; echo "\n"; echo "\t\t"; if ($myrow["end_date"]<>"0000-00-00 00:00:00") { echo get_lang("EndTimeWindow").": "; - echo ucfirst(format_locale_date($dateFormatLong,strtotime($myrow["end_date"])))."   "; - echo ucfirst(strftime($timeNoSecFormat,strtotime($myrow["end_date"]))).""; + echo api_ucfirst(format_locale_date($dateFormatLong,strtotime($myrow["end_date"])))."   "; + echo api_ucfirst(strftime($timeNoSecFormat,strtotime($myrow["end_date"]))).""; } echo "\n"; @@ -2148,7 +2148,7 @@ function display_agenda_items() echo ''; echo Display::return_icon('edit.gif', get_lang('ModifyCalendarItem')).""; - echo " "; + echo " "; echo Display::return_icon('delete.gif', get_lang('Delete')).""; echo ''; @@ -2213,7 +2213,7 @@ function display_agenda_items() echo ' "> '.$user_filename.' '; echo ''.$attachment_list['comment'].''; if (api_is_allowed_to_edit()) { - echo '  '.Display::return_icon('delete.gif',get_lang('Delete')).'
'; + echo '  '.Display::return_icon('delete.gif',get_lang('Delete')).'
'; } } @@ -2254,7 +2254,7 @@ function display_agenda_items() if(!empty($event_list)) { - $event_list=substr($event_list,0,-1); + $event_list=api_substr($event_list,0,-1); } else { @@ -2410,12 +2410,12 @@ function display_one_agenda_item($agenda_id) --------------------------------------------------*/ echo "\t\n"; echo "\t\t".get_lang("StartTime").": "; - echo ucfirst(format_locale_date($dateFormatLong,strtotime($myrow["start_date"])))."   "; - echo ucfirst(strftime($timeNoSecFormat,strtotime($myrow["start_date"]))).""; + echo api_ucfirst(format_locale_date($dateFormatLong,strtotime($myrow["start_date"])))."   "; + echo api_ucfirst(strftime($timeNoSecFormat,strtotime($myrow["start_date"]))).""; echo "\n"; echo "\t\t".get_lang("EndTime").": "; - echo ucfirst(format_locale_date($dateFormatLong,strtotime($myrow["end_date"])))."   "; - echo ucfirst(strftime($timeNoSecFormat,strtotime($myrow["end_date"]))).""; + echo api_ucfirst(format_locale_date($dateFormatLong,strtotime($myrow["end_date"])))."   "; + echo api_ucfirst(strftime($timeNoSecFormat,strtotime($myrow["end_date"]))).""; echo "\n"; /*-------------------------------------------------- @@ -2431,7 +2431,7 @@ function display_one_agenda_item($agenda_id) $mylink = api_get_self()."?".api_get_cidreq()."&origin=".Security::remove_XSS($_GET['origin'])."&id=".$myrow['id']; echo "", Display::return_icon('edit.gif', get_lang('ModifyCalendarItem')), "", - "", + "", Display::return_icon('delete.gif', get_lang('Delete')),""; if ($myrow['visibility']==1) { $image_visibility="visible"; @@ -3462,7 +3462,7 @@ function get_day_agendaitems($courses_dbs, $month, $year, $day) if ($setting_agenda_link == 'coursecode') { $title=$array_course_info['title']; - $agenda_link = substr($title, 0, 14); + $agenda_link = api_substr($title, 0, 14); } else { @@ -3580,7 +3580,7 @@ function get_week_agendaitems($courses_dbs, $month, $year, $week = '') if ($setting_agenda_link == 'coursecode') { $title=$array_course_info['title']; - $agenda_link = substr($title, 0, 14); + $agenda_link = api_substr($title, 0, 14); } else { @@ -4650,9 +4650,9 @@ function agenda_import_ical($course_info,$file) $ve = $ical->getComponent(0); //print_r($ve); $ttitle = $ve->getProperty('summary'); - $title = mb_convert_encoding($ttitle,$charset,'UTF-8'); + $title = api_convert_encoding($ttitle,$charset,'UTF-8'); $tdesc = $ve->getProperty('description'); - $desc = mb_convert_encoding($tdesc,$charset,'UTF-8'); + $desc = api_convert_encoding($tdesc,$charset,'UTF-8'); $ts = $ve->getProperty('dtstart'); $start_date = $ts['year'].'-'.$ts['month'].'-'.$ts['day'].' '.$ts['hour'].':'.$ts['min'].':'.$ts['sec']; $ts = $ve->getProperty('dtend'); diff --git a/main/calendar/ical_export.php b/main/calendar/ical_export.php index a43566987d..313fbf0ec0 100644 --- a/main/calendar/ical_export.php +++ b/main/calendar/ical_export.php @@ -66,7 +66,7 @@ if(!empty($_GET['id']) && $_GET['id']==strval(intval($_GET['id']))) case 'personal': require_once (api_get_path(SYS_CODE_PATH).'calendar/myagenda.inc.php'); $ai = get_personal_agenda_item($_GET['id']); - $vevent->setProperty( 'summary', mb_convert_encoding($ai['title'],'UTF-8',$charset)); + $vevent->setProperty( 'summary', api_convert_encoding($ai['title'],'UTF-8',$charset)); if(empty($ai['date'])){header('location:'.$_SERVER['HTTP_REFERER']);} list($y,$m,$d,$h,$M,$s) = preg_split('/[\s:-]/',$ai['date']); $vevent->setProperty('dtstart',array('year'=>$y,'month'=>$m,'day'=>$d,'hour'=>$h,'min'=>$M,'sec'=>$s)); @@ -81,7 +81,7 @@ if(!empty($_GET['id']) && $_GET['id']==strval(intval($_GET['id']))) } $vevent->setProperty('dtend',array('year'=>$y2,'month'=>$m2,'day'=>$d2,'hour'=>$h2,'min'=>$M2,'sec'=>$s2)); //$vevent->setProperty( 'LOCATION', get_lang('Unknown') ); // property name - case independent - $vevent->setProperty( 'description', mb_convert_encoding($ai['text'],'UTF-8',$charset)); + $vevent->setProperty( 'description', api_convert_encoding($ai['text'],'UTF-8',$charset)); //$vevent->setProperty( 'comment', 'This is a comment' ); $user = api_get_user_info($ai['user']); $vevent->setProperty('organizer',$user['mail']); @@ -96,7 +96,7 @@ if(!empty($_GET['id']) && $_GET['id']==strval(intval($_GET['id']))) $TABLE_ITEM_PROPERTY = Database::get_course_table(TABLE_ITEM_PROPERTY); require_once (api_get_path(SYS_CODE_PATH).'calendar/agenda.inc.php'); $ai = get_agenda_item($_GET['id']); - $vevent->setProperty( 'summary', mb_convert_encoding($ai['title'],'UTF-8',$charset)); + $vevent->setProperty( 'summary', api_convert_encoding($ai['title'],'UTF-8',$charset)); if(empty($ai['start_date'])){header('location:'.$_SERVER['HTTP_REFERER']);} list($y,$m,$d,$h,$M,$s) = preg_split('/[\s:-]/',$ai['start_date']); $vevent->setProperty('dtstart',array('year'=>$y,'month'=>$m,'day'=>$d,'hour'=>$h,'min'=>$M,'sec'=>$s)); @@ -110,7 +110,7 @@ if(!empty($_GET['id']) && $_GET['id']==strval(intval($_GET['id']))) list($y2,$m2,$d2,$h2,$M2,$s2) = preg_split('/[\s:-]/',$ai['end_date']); } $vevent->setProperty('dtend',array('year'=>$y2,'month'=>$m2,'day'=>$d2,'hour'=>$h2,'min'=>$M2,'sec'=>$s2)); - $vevent->setProperty( 'description', mb_convert_encoding($ai['content'],'UTF-8',$charset)); + $vevent->setProperty( 'description', api_convert_encoding($ai['content'],'UTF-8',$charset)); //$vevent->setProperty( 'comment', 'This is a comment' ); $user = api_get_user_info($ai['user']); $vevent->setProperty('organizer',$user['mail']); @@ -140,4 +140,4 @@ else header('location:'.$_SERVER['HTTP_REFERER']); die(); } -?> \ No newline at end of file +?> diff --git a/main/calendar/myagenda.inc.php b/main/calendar/myagenda.inc.php index 09116fd35f..d6b2c58f2e 100644 --- a/main/calendar/myagenda.inc.php +++ b/main/calendar/myagenda.inc.php @@ -139,7 +139,7 @@ function get_myagendaitems($courses_dbs, $month, $year) if ($setting_agenda_link == 'coursecode') { $title=$array_course_info['title']; - $agenda_link = substr($title, 0, 14); + $agenda_link = api_substr($title, 0, 14); } else { @@ -748,7 +748,7 @@ function show_personal_agenda() // adding an internal anchor echo ""; echo date("d", strtotime($myrow["date"]))." ".$MonthsLong[date("n", strtotime($myrow["date"])) - 1]." ".date("Y", strtotime($myrow["date"]))." "; - echo ucfirst(strftime(get_lang("timeNoSecFormat"), strtotime($myrow["date"]))); + echo api_ucfirst(strftime(get_lang("timeNoSecFormat"), strtotime($myrow["date"]))); echo ""; echo ''; echo ''.Display::return_icon($export_icon_high, get_lang('ExportiCalConfidential')).''; @@ -778,7 +778,7 @@ function show_personal_agenda() --------------------------------------------------*/ echo "\t\n\t\t"; echo "".Display::return_icon('edit.gif', get_lang('Edit')).""; - echo "".Display::return_icon('delete.gif', get_lang('Delete')).""; + echo "".Display::return_icon('delete.gif', get_lang('Delete')).""; echo ""; } } diff --git a/main/calendar/myagenda.php b/main/calendar/myagenda.php index b9c581c53a..829507759a 100644 --- a/main/calendar/myagenda.php +++ b/main/calendar/myagenda.php @@ -1,4 +1,4 @@ -
- +


@@ -60,15 +60,15 @@ while($row=Database::fetch_array($result)) echo get_lang('StartTime').' : '; - echo ucfirst(format_locale_date($dateFormatLong,strtotime($row["start_date"])))."   "; - echo ucfirst(strftime($timeNoSecFormat,strtotime($row["start_date"]))).""; + echo api_ucfirst(format_locale_date($dateFormatLong,strtotime($row["start_date"])))."   "; + echo api_ucfirst(strftime($timeNoSecFormat,strtotime($row["start_date"]))).""; echo '
'; echo get_lang('EndTime').' : '; - echo ucfirst(format_locale_date($dateFormatLong,strtotime($row["end_date"])))."   "; - echo ucfirst(strftime($timeNoSecFormat,strtotime($row["end_date"]))).""; + echo api_ucfirst(format_locale_date($dateFormatLong,strtotime($row["end_date"])))."   "; + echo api_ucfirst(strftime($timeNoSecFormat,strtotime($row["end_date"]))).""; echo '

'; @@ -78,7 +78,7 @@ while($row=Database::fetch_array($result))

- +