6.0.0-beta1
8/12/25

[#704] iCalendar.php cannot parse its own VCALENDAR component
Summary iCalendar.php cannot parse its own VCALENDAR component
Queue Horde Framework Packages
Type Bug
State Resolved
Priority 2. Medium
Owners
Requester ctnpublic-horde (at) yahoo (dot) com
Created 10/16/2004 (7605 days ago)
Due
Updated 10/18/2004 (7603 days ago)
Assigned
Resolved 10/17/2004 (7604 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
10/18/2004 05:24:19 AM Chuck Hagenbuch Comment #4 Reply to this comment
Alright, that should be consistently taken care of now too.
10/17/2004 01:59:45 PM ctnpublic-horde (at) yahoo (dot) com Comment #3 Reply to this comment
In _iCalendar::_exportvData(), whose $result ends with 
'END:VCALENDAR', no _newline. At least that's the one that was giving 
me trouble.
10/17/2004 04:48:12 AM Chuck Hagenbuch Comment #2
State ⇒ Resolved
Reply to this comment
Committed, thanks.



It'd be helpful if you mentioned *where* VCALENDAR is generated that 
doesn't have a trailing \r\n, since everything I'm looking at sure 
seems to.
10/16/2004 04:49:51 AM ctnpublic-horde (at) yahoo (dot) com Comment #1
State ⇒ Unconfirmed
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ iCalendar.php cannot parse its own VCALENDAR component
Queue ⇒ Horde Framework Packages
Reply to this comment
The generated VCALENDAR does not end with \r\n, yet it is expected in 
the itip parsing.



Thing is, this is a very prominent problem as it would prevent 
importing invitations. So am I missing something, in configs or prefs?



In any case, there's a simple fix.

cvs diff -u -r HEAD framework/iCalendar/iCalendar.php

Index: framework/iCalendar/iCalendar.php

===================================================================

RCS file: /repository/framework/iCalendar/iCalendar.php,v

retrieving revision 1.53

diff -u -r1.53 iCalendar.php

--- framework/iCalendar/iCalendar.php   24 Sep 2004 03:34:43 -0000      1.53

+++ framework/iCalendar/iCalendar.php   16 Oct 2004 04:42:28 -0000

@@ -408,7 +408,7 @@

          if ($clear) {

              $this->clear();

          }

-        if (preg_match('/(BEGIN:' . $base . '\r?\n)([\W\w]*)(END:' . 
$base . '\r?\n?)/i', $text, $matches)) {

+        if (preg_match('/(BEGIN:' . $base . '\r?\n?)([\W\w]*)(END:' . 
$base . '\r?\n?)/i', $text, $matches)) {

              $vCal = $matches[2];

          } else {

              // Text isn't enclosed in BEGIN:VCALENDAR




Saved Queries