fix i18n date format
authortokul <tokul@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sun, 29 Jan 2006 10:15:28 +0000 (10:15 +0000)
committertokul <tokul@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sun, 29 Jan 2006 10:15:28 +0000 (10:15 +0000)
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

plugins/calendar/calendar_data.php
plugins/calendar/day.php
plugins/calendar/event_create.php
plugins/calendar/event_delete.php
plugins/calendar/event_edit.php

index 3422f76..3d6fe0a 100644 (file)
@@ -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
index 58cdcd1..220341c 100644 (file)
@@ -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) ? 
                                 "<font color=\"$color[1]\">".htmlspecialchars($calbar['title']).'</font>' : 
index c7583da..d40fcbb 100644 (file)
@@ -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" .
index ee31521..6e31dd7 100644 (file)
@@ -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] ) .
index 2162358..97e6ef8 100644 (file)
@@ -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" .