summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2012-10-31 13:01:54 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2012-10-31 13:01:54 (GMT)
commit06e6c43db027cb6539d5eb417322aff556a5f3a7 (patch)
tree49ab47686cbaaeac0907d52b250869b498eef309
parentb4ced09d2e91a7be0649aa4c7866b4f817fcffbc (diff)
downloadroundcubemail-plugins-kolab-06e6c43db027cb6539d5eb417322aff556a5f3a7.tar.gz
Use the right library function to get the last occurence of a recurrence chain
-rw-r--r--plugins/libkolab/lib/kolab_date_recurrence.php3
1 files changed, 1 insertions, 2 deletions
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');
}