month view recurinstances not selectable
authorCornelius Weiß <c.weiss@metaways.de>
Tue, 18 Jul 2017 12:33:43 +0000 (14:33 +0200)
committerCornelius Weiss <c.weiss@metaways.de>
Tue, 18 Jul 2017 15:05:51 +0000 (17:05 +0200)
Change-Id: Iaf0309744a54d9fcca7ec52c8541c4b5186c91d0
Reviewed-on: http://gerrit.tine20.com/customers/5241
Reviewed-by: Cornelius Weiss <c.weiss@metaways.de>
Tested-by: Cornelius Weiss <c.weiss@metaways.de>
tests/tine20/Calendar/Controller/EventTests.php
tine20/Calendar/Controller/Event.php
tine20/Calendar/Model/Rrule.php

index df945f1..cbadc3f 100644 (file)
@@ -88,7 +88,8 @@ class Calendar_Controller_EventTests extends Calendar_TestCase
         $nextOccurance = Calendar_Model_Rrule::computeNextOccurrence($persistentEvent, $exceptions, Tinebase_DateTime::now());
 
         $deepLink = $nextOccurance->getDeepLink();
-        $id = basename($deepLink);
+        preg_match('/fakeid.*$/', $deepLink, $matches);
+        $id = $matches[0];
 
         $recurInstance = $this->_controller->get($id);
         $this->assertTrue($recurInstance->isRecurInstance());
index 65ed415..9445124 100644 (file)
@@ -1641,7 +1641,7 @@ class Calendar_Controller_Event extends Tinebase_Controller_Record_Abstract impl
      */
     public function get($_id, $_containerId = NULL, $_getRelatedData = TRUE, $_getDeleted = FALSE)
     {
-        if (preg_match('/^fakeid(.*):(.*)/', $_id, $matches)) {
+        if (preg_match('/^fakeid(.*)\/(.*)/', $_id, $matches)) {
             $baseEvent = $this->get($matches[1]);
             $exceptions = $this->getRecurExceptions($baseEvent);
             $originalDtStart = new Tinebase_DateTime($matches[2]);
index 1939211..2ac8542 100644 (file)
@@ -526,7 +526,7 @@ class Calendar_Model_Rrule extends Tinebase_Record_Abstract
      */
     protected static function addRecurrence($_recurrence, $_eventSet)
     {
-        $_recurrence->setId('fakeid' . $_recurrence->base_event_id . ':' . $_recurrence->dtstart->getTimeStamp());
+        $_recurrence->setId('fakeid' . $_recurrence->base_event_id . '/' . $_recurrence->dtstart->getTimeStamp());
         
         // adjust alarms
         if ($_recurrence->alarms instanceof Tinebase_Record_RecordSet) {