Branch 'dev/libcalendaring' - plugins/libkolab

Thomas Brüderli bruederli at kolabsys.com
Thu Nov 1 16:02:53 CET 2012


 plugins/libkolab/lib/kolab_date_recurrence.php |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 06e6c43db027cb6539d5eb417322aff556a5f3a7
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date:   Wed Oct 31 14:01:54 2012 +0100

    Use the right library function to get the last occurence of a recurrence chain

diff --git a/plugins/libkolab/lib/kolab_date_recurrence.php b/plugins/libkolab/lib/kolab_date_recurrence.php
index 2e883d0..0df96e0 100644
--- a/plugins/libkolab/lib/kolab_date_recurrence.php
+++ b/plugins/libkolab/lib/kolab_date_recurrence.php
@@ -104,8 +104,7 @@ class kolab_date_recurrence
     public function end($limit = 'now +1 year')
     {
         $limit_dt = new DateTime($limit);
-        $cstart = kolab_format::get_datetime($this->start);
-        if ($this->engine && ($cend = $this->engine->getOccurenceEndDate($cstart)) && ($end_dt = kolab_format::php_datetime(new cDateTime($cend))) && $end_dt < $limit_dt) {
+        if ($this->engine && ($cend = $this->engine->getLastOccurrence()) && ($end_dt = kolab_format::php_datetime(new cDateTime($cend))) && $end_dt < $limit_dt) {
             return $end_dt->format('U');
         }
 





More information about the commits mailing list