Small fixes after static code analysis (#1851)

This commit is contained in:
Thomas Bruederli 2013-05-08 08:55:58 +02:00
parent 2da1cfcbf1
commit 5428c60776
2 changed files with 4 additions and 4 deletions

View file

@ -556,7 +556,7 @@ class database_driver extends calendar_driver
// stop adding events for inifinite recurrence after 20 years
$count = 0;
if (++$count > 999 || (!$recurrence->recurEnd && !$recurrence->recurCount && $next->year > date('Y') + 20))
if (++$count > 999 || (!$recurrence->recurEnd && !$recurrence->recurCount && $next_start->format('Y') > date('Y') + 20))
break;
}
}
@ -632,7 +632,7 @@ class database_driver extends calendar_driver
$update_master = true;
// delete this and all future instances
$fromdate = clone $old['start'];
$fromdate = clone $event['start'];
$fromdate->setTimezone($this->server_timezone);
$query = $this->rc->db->query(
"DELETE FROM " . $this->db_events . "

View file

@ -379,7 +379,7 @@ class kolab_calendar
rcube::raise_error(array(
'code' => 600, 'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
'message' => "Error undeleting the event object $uid from the Kolab server"),
'message' => "Error undeleting the event object $event[id] from the Kolab server"),
true, false);
}
@ -646,7 +646,7 @@ class kolab_calendar
if (is_array($prop)) {
foreach ($prop as $key => $val) {
if (is_numeric($key)) {
$out .= self::_complex2string($val, $fields);
$out .= self::_complex2string($val);
}
else if (!in_array($key, $ignorekeys)) {
$out .= $val . ' ';