From: <pdo...@us...> - 2022-06-20 17:15:13
|
Revision: 14975 http://sourceforge.net/p/squirrelmail/code/14975 Author: pdontthink Date: 2022-06-20 17:15:09 +0000 (Mon, 20 Jun 2022) Log Message: ----------- Backport fix from DEVEL Modified Paths: -------------- branches/SM-1_4-STABLE/squirrelmail/plugins/calendar/calendar_data.php Modified: branches/SM-1_4-STABLE/squirrelmail/plugins/calendar/calendar_data.php =================================================================== --- branches/SM-1_4-STABLE/squirrelmail/plugins/calendar/calendar_data.php 2022-06-20 06:06:50 UTC (rev 14974) +++ branches/SM-1_4-STABLE/squirrelmail/plugins/calendar/calendar_data.php 2022-06-20 17:15:09 UTC (rev 14975) @@ -104,22 +104,20 @@ $filename = getHashedFile($username, $data_dir, "$username.$year.cal"); $fp = fopen ($filetmp,"w"); if ($fp) { - while ( $calfoo = each ($calendardata)) { - while ( $calbar = each ($calfoo['value'])) { - $calfoobar = $calendardata[$calfoo['key']][$calbar['key']]; - array_walk($calfoobar,'calendar_encodedata'); + foreach ( $calendardata as $datetime => $events ) { + foreach ( $events as $time_of_day => $event ) { + array_walk($event,'calendar_encodedata'); /** * Make sure that reminder field is set. Calendar forms don't implement it, * but it is still used for calendar data. Backwards compatibility. */ - if (!isset($calfoobar['reminder'])) $calfoobar['reminder']=''; + if (!isset($event['reminder'])) $event['reminder']=''; - $calstr = "$calfoo[key]|$calbar[key]|$calfoobar[length]|$calfoobar[priority]|$calfoobar[title]|$calfoobar[message]|$calfoobar[reminder]\n"; + $calstr = "$datetime|$time_of_day|$event[length]|$event[priority]|$event[title]|$event[message]|$event[reminder]\n"; if(sq_fwrite($fp, $calstr, 4096) === FALSE) { error_box(_("Could not write calendar file %s", "$username.$year.cal.tmp"), $color); } } - } fclose ($fp); @unlink($filename); @@ -182,4 +180,4 @@ } } -?> \ No newline at end of file +?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |