From c3d2f621b6fd144d1e038ec06fa60296980fba44 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Cornelius=20Wei=C3=9F?= Date: Tue, 18 Jul 2017 14:33:43 +0200 Subject: [PATCH] month view recurinstances not selectable Change-Id: Iaf0309744a54d9fcca7ec52c8541c4b5186c91d0 Reviewed-on: http://gerrit.tine20.com/customers/5241 Reviewed-by: Cornelius Weiss Tested-by: Cornelius Weiss --- tests/tine20/Calendar/Controller/EventTests.php | 3 ++- tine20/Calendar/Controller/Event.php | 2 +- tine20/Calendar/Model/Rrule.php | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/tine20/Calendar/Controller/EventTests.php b/tests/tine20/Calendar/Controller/EventTests.php index df945f1..cbadc3f 100644 --- a/tests/tine20/Calendar/Controller/EventTests.php +++ b/tests/tine20/Calendar/Controller/EventTests.php @@ -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()); diff --git a/tine20/Calendar/Controller/Event.php b/tine20/Calendar/Controller/Event.php index 65ed415..9445124 100644 --- a/tine20/Calendar/Controller/Event.php +++ b/tine20/Calendar/Controller/Event.php @@ -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]); diff --git a/tine20/Calendar/Model/Rrule.php b/tine20/Calendar/Model/Rrule.php index 1939211..2ac8542 100644 --- a/tine20/Calendar/Model/Rrule.php +++ b/tine20/Calendar/Model/Rrule.php @@ -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) { -- 2.7.4