Revision
2830
Author
cimorrison
Date
2014-04-27 10:06:45 +0000 (Sun, 27 Apr 2014)

Log Message

Added a LAST-MODIFIED property to all VEVENTS

Modified Paths

Diff

Modified: mrbs/trunk/web/functions_ical.inc (2829 => 2830)


--- mrbs/trunk/web/functions_ical.inc	2014-04-26 15:44:19 UTC (rev 2829)
+++ mrbs/trunk/web/functions_ical.inc	2014-04-27 10:06:45 UTC (rev 2830)
@@ -842,10 +842,9 @@
   $results[] = "BEGIN:VEVENT";
   $results[] = "UID:" . $data['ical_uid'];  // compulsory
   $results[] = "DTSTAMP:" . gmdate(RFC5545_FORMAT . '\Z');  // compulsory
-  if (!empty($data['last_updated']))
-  {
-    $results[] = "LAST-MODIFIED:" . gmdate(RFC5545_FORMAT . '\Z', $data['last_updated']);
-  }
+  $last_modified = empty($data['last_updated']) ? time() : $data['last_updated'];
+  $results[] = "LAST-MODIFIED:" . gmdate(RFC5545_FORMAT . '\Z', $last_modified);
+  
 
   // Note: we try and write the event times in the format of a local time with
   // a timezone reference (ie RFC 5545 Form #3).   Only if we can't do that do we