"fixed not working caching to avoid multiple reads of same event from database

(condition !$date stoped caching for all non-repeating events)"
This commit is contained in:
Ralf Becker 2010-04-14 08:49:49 +00:00
parent e5c782ca8e
commit 9e8a74b92e

View File

@ -779,7 +779,7 @@ class calendar_bo
{
if (is_array($ids) || !isset(self::$cached_event['id']) || self::$cached_event['id'] != $ids ||
self::$cached_event_date_format != $date_format ||
self::$cached_event['recur_type'] != MCAL_RECUR_NONE && !is_null($date) && self::$cached_event_date != $date || (!$date || self::$cached_event['start'] < $date))
self::$cached_event['recur_type'] != MCAL_RECUR_NONE && self::$cached_event_date != $date)
{
$events = $this->so->read($ids,$date ? $this->date2ts($date,true) : 0);
@ -802,7 +802,7 @@ class calendar_bo
}
else
{
$return =& self::$cached_event;
$return = self::$cached_event;
}
}
if ($this->debug && ($this->debug > 1 || $this->debug == 'read'))