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 3422f7607179ac43fa8887b3123543c15c6eee62..3d6fe0afb8bddf01119a6325f61dc016abdcff9f 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 58cdcd1abe884222724b80abce24d88c8a1e99b4..220341ca86a3a1a2e4fa5b1da707c3d394e323a1 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 c7583da957e0cda4ec9032f5f14800f618b13878..d40fcbb2e5365d39bf97a4e72006d53ced941262 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 ee31521ec3548c359bce113d3bae932a4e7b59de..6e31dd704d3633e1055f5c4aa953ecb1bffe8ee8 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 216235841a2573c131d8d189784c9b6d5904d0c2..97e6ef87434b562e5d84064b04ce1aa9bd98b6a6 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" .