From b5aefcc2c6847e01cd80d5b56360705c9812ab72 Mon Sep 17 00:00:00 2001 From: Georg Ehrke Date: Tue, 2 Sep 2014 15:03:25 +0200 Subject: [PATCH] fix infinite loop in master --- lib/calendar.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/calendar.php b/lib/calendar.php index e1e5863b1..6d7446f43 100644 --- a/lib/calendar.php +++ b/lib/calendar.php @@ -33,9 +33,10 @@ class OC_Calendar_Calendar{ * @brief Returns the list of calendars for a specific user. * @param string $uid User ID * @param boolean $active Only return calendars with this $active state, default(=false) is don't care + * @param boolean $createIfNecessary create calendars if no exist yet * @return array */ - public static function allCalendars($uid, $active=false) { + public static function allCalendars($uid, $active=false, $createIfNecessary=true) { $values = array($uid); $active_where = ''; if (!is_null($active) && $active) { @@ -117,7 +118,7 @@ public static function find($id) { * @return insertid */ public static function addCalendar($userid,$name,$components='VEVENT,VTODO,VJOURNAL',$timezone=null,$order=0,$color=null) { - $all = self::allCalendars($userid); + $all = self::allCalendars($userid, false, false); $uris = array(); foreach($all as $i) { $uris[] = $i['uri'];