Fix performance issue in kolab_calendar::get_event() (#1411)

This commit is contained in:
Aleksander Machniak 2012-12-05 12:05:24 +01:00
parent f0ef421c00
commit 56928b74eb

View file

@ -177,7 +177,7 @@ class kolab_calendar
// event not found, maybe a recurring instance is requested
if (!$this->events[$id]) {
$master_id = preg_replace('/-\d+$/', '', $id);
if ($record = $this->storage->get_object($master_id))
if ($master_id != $id && ($record = $this->storage->get_object($master_id)))
$this->events[$master_id] = $this->_to_rcube_event($record);
if (($master = $this->events[$master_id]) && $master['recurrence']) {