--- /tmp/calendar/program/backend/caldav.php	2011-03-27 23:11:14.000000000 +0200
+++ program/backend/caldav.php	2011-03-28 23:28:06.568819891 +0200
@@ -24,22 +24,8 @@
   private $user = null;
   private $collection = null;
   private $vevent = null;
-  private $new_vevent = <<<_EOF
-BEGIN:VCALENDAR\r
-VERSION:2.0\r
-PRODID:-//roundcube.net//RoundCube CalDAV Client//EN\r
-BEGIN:VEVENT\r
-__ICAL__END:VEVENT\r
-END:VCALENDAR
-_EOF;
-  private $move_vevent = <<<_EOF
-BEGIN:VCALENDAR\r
-VERSION:2.0\r
-PRODID:-//roundcube.net//RoundCube CalDAV Client//EN\r
-BEGIN:VEVENT\r
-__ICAL__END:VEVENT\r
-END:VCALENDAR
-_EOF;
+  private $new_vevent;
+  private $move_vevent;
 
   /**
    * @param object rcmail   The RoundCube instance.
@@ -62,6 +48,22 @@
	"$server/$user" . $this->collection,$user, $pass,
	$calendar /* is ignored currently */);
     $this->cal->setUserAgent('RoundCube');
+    $this->new_vevent = <<<_EOF
+BEGIN:VCALENDAR\r
+VERSION:2.0\r
+PRODID:-//roundcube.net//RoundCube CalDAV Client//EN\r
+BEGIN:VEVENT\r
+__ICAL__END:VEVENT\r
+END:VCALENDAR
+_EOF;
+    $this->move_vevent = <<<_EOF
+BEGIN:VCALENDAR\r
+VERSION:2.0\r
+PRODID:-//roundcube.net//RoundCube CalDAV Client//EN\r
+BEGIN:VEVENT\r
+__ICAL__END:VEVENT\r
+END:VCALENDAR
+_EOF;
   }
   
   public function newEvent($start, $end, $summary, $description, $location, $categories, $allDay) {

