From: tokul Date: Sun, 29 Jan 2006 10:15:28 +0000 (+0000) Subject: fix i18n date format X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=f1d482ae999183d90b9a81e2d8e26397451799d7;p=squirrelmail.git fix i18n date format fix multiline title field display (remove line feeds when calendar is read) git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@10602 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/plugins/calendar/calendar_data.php b/plugins/calendar/calendar_data.php index 3422f760..3d6fe0af 100644 --- a/plugins/calendar/calendar_data.php +++ b/plugins/calendar/calendar_data.php @@ -76,7 +76,7 @@ function readcalendardata() { while ($fdata = fgetcsv ($fp, 4096, '|')) { $calendardata[$fdata[0]][$fdata[1]] = array( 'length' => $fdata[2], 'priority' => $fdata[3], - 'title' => $fdata[4], + 'title' => str_replace("\n",' ',calendar_readmultiline($fdata[4])), 'message' => calendar_readmultiline($fdata[5]), 'reminder' => $fdata[6] ); } @@ -155,7 +155,7 @@ function delete_event($date, $time) { } /** - * same as delete but not saves calendar + * same as delete but does not save calendar * saving is done inside event_edit.php * @return void * @access private diff --git a/plugins/calendar/day.php b/plugins/calendar/day.php index 58cdcd1a..220341ca 100644 --- a/plugins/calendar/day.php +++ b/plugins/calendar/day.php @@ -119,12 +119,12 @@ function display_events() { } else { $calbar=$calfoo['value']; if ($calbar['length']!=0){ - $elength = '-'.date('H:i',mktime($ehour,$eminute+$calbar['length'],0,1,1,0)); + $elength = '-'.date_intl(_("H:i"),mktime($ehour,$eminute+$calbar['length'],0,1,1,0)); } else { $elength=''; } echo html_tag( 'tr', '', '', $color[$eo] ) . - html_tag( 'td', $ehour . ':' . $eminute . $elength, 'left' ) . + html_tag( 'td', date_intl(_("H:i"),mktime($ehour,$eminute,0,1,1,0)) . $elength, 'left' ) . html_tag( 'td', '', 'left' ) . '['; echo ($calbar['priority']==1) ? "".htmlspecialchars($calbar['title']).'' : diff --git a/plugins/calendar/event_create.php b/plugins/calendar/event_create.php index c7583da9..d40fcbb2 100644 --- a/plugins/calendar/event_create.php +++ b/plugins/calendar/event_create.php @@ -152,11 +152,11 @@ if(!isset($event_text)){ ) . html_tag( 'tr', html_tag( 'td', _("Date:"), 'right', $color[4] ) . "\n" . - html_tag( 'td', $month .'/'.$day.'/'.$year, 'left', $color[4] ) . "\n" + html_tag( 'td', date_intl(_("m/d/Y"),mktime(0,0,0,$month,$day,$year)), 'left', $color[4] ) . "\n" ) . html_tag( 'tr', html_tag( 'td', _("Time:"), 'right', $color[4] ) . "\n" . - html_tag( 'td', $event_hour.':'.$event_minute, 'left', $color[4] ) . "\n" + html_tag( 'td', date_intl(_("H:i"),mktime($event_hour,$event_minute,0,$month,$day,$year)), 'left', $color[4] ) . "\n" ) . html_tag( 'tr', html_tag( 'td', _("Title:"), 'right', $color[4] ) . "\n" . diff --git a/plugins/calendar/event_delete.php b/plugins/calendar/event_delete.php index ee31521e..6e31dd70 100644 --- a/plugins/calendar/event_delete.php +++ b/plugins/calendar/event_delete.php @@ -66,11 +66,11 @@ function confirm_deletion() { ) . html_tag( 'tr', html_tag( 'td', _("Date:"), 'right', $color[4] ) . - html_tag( 'td', $dmonth.'/'.$dday.'/'.$dyear, 'left', $color[4] ) + html_tag( 'td', date_intl(_("m/d/Y"),mktime(0,0,0,$dmonth,$dday,$dyear)), 'left', $color[4] ) ) . html_tag( 'tr', html_tag( 'td', _("Time:"), 'right', $color[4] ) . - html_tag( 'td', $dhour.':'.$dminute, 'left', $color[4] ) + html_tag( 'td', date_intl(_("H:i"),mktime($dhour,$dminute,0,$dmonth,$dday,$dyear)), 'left', $color[4] ) ) . html_tag( 'tr', html_tag( 'td', _("Title:"), 'right', $color[4] ) . diff --git a/plugins/calendar/event_edit.php b/plugins/calendar/event_edit.php index 21623584..97e6ef87 100644 --- a/plugins/calendar/event_edit.php +++ b/plugins/calendar/event_edit.php @@ -162,11 +162,11 @@ function confirm_update() { ) . html_tag( 'tr', html_tag( 'td', _("Date:") , 'right', $color[4] ) ."\n" . - html_tag( 'td', $month.'/'.$day.'/'.$year , 'left', $color[4] ) ."\n" + html_tag( 'td', date_intl(_("m/d/Y"),mktime(0,0,0,$month,$day,$year)), 'left', $color[4] ) ."\n" ) . html_tag( 'tr', html_tag( 'td', _("Time:") , 'right', $color[4] ) ."\n" . - html_tag( 'td', $hour.':'.$minute , 'left', $color[4] ) ."\n" + html_tag( 'td', date_intl(_("H:i"),mktime($hour,$minute,0,$month,$day,$year)) , 'left', $color[4] ) ."\n" ) . html_tag( 'tr', html_tag( 'td', _("Priority:") , 'right', $color[4] ) ."\n" . @@ -186,11 +186,11 @@ function confirm_update() { html_tag( 'tr', html_tag( 'td', _("Date:") , 'right', $color[4] ) ."\n" . - html_tag( 'td', $event_month.'/'.$event_day.'/'.$event_year , 'left', $color[4] ) ."\n" + html_tag( 'td', date_intl(_("m/d/Y"),mktime(0,0,0,$event_month,$event_day,$event_year)), 'left', $color[4] ) ."\n" ) . html_tag( 'tr', html_tag( 'td', _("Time:") , 'right', $color[4] ) ."\n" . - html_tag( 'td', $event_hour.':'.$event_minute , 'left', $color[4] ) ."\n" + html_tag( 'td', date_intl(_("H:i"),mktime($event_hour,$event_minute,0,$event_month,$event_day,$event_year)), 'left', $color[4] ) ."\n" ) . html_tag( 'tr', html_tag( 'td', _("Priority:") , 'right', $color[4] ) ."\n" .