Alignment fix
[squirrelmail.git] / plugins / calendar / calendar_data.php
index 3422f7607179ac43fa8887b3123543c15c6eee62..d1feb75f95475bbedc579923439020b1dcd9c7e7 100644 (file)
@@ -3,7 +3,7 @@
 /**
  * functions to operate on calendar data files.
  *
- * @copyright © 2002-2006 The SquirrelMail Project Team
+ * @copyright 2002-2012 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package plugins
@@ -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] );
             }
@@ -116,7 +116,7 @@ function writecalendardata() {
 
                 $calstr = "$calfoo[key]|$calbar[key]|$calfoobar[length]|$calfoobar[priority]|$calfoobar[title]|$calfoobar[message]|$calfoobar[reminder]\n";
                 if(sq_fwrite($fp, $calstr, 4096) === FALSE) {
-                    error_box(_("Could not write calendar file %s", "$username.$year.cal.tmp"), $color);
+                    error_box(_("Could not write calendar file %s", "$username.$year.cal.tmp"));
                 }
             }
 
@@ -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
@@ -181,5 +181,3 @@ function update_event($date, $time) {
         fclose ($fp);
     }
 }
-
-?>
\ No newline at end of file