Skip to content
This repository was archived by the owner on Oct 31, 2018. It is now read-only.

Commit b5aefcc

Browse files
committed
fix infinite loop in master
1 parent 4e3ccef commit b5aefcc

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

lib/calendar.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,10 @@ class OC_Calendar_Calendar{
3333
* @brief Returns the list of calendars for a specific user.
3434
* @param string $uid User ID
3535
* @param boolean $active Only return calendars with this $active state, default(=false) is don't care
36+
* @param boolean $createIfNecessary create calendars if no exist yet
3637
* @return array
3738
*/
38-
public static function allCalendars($uid, $active=false) {
39+
public static function allCalendars($uid, $active=false, $createIfNecessary=true) {
3940
$values = array($uid);
4041
$active_where = '';
4142
if (!is_null($active) && $active) {
@@ -117,7 +118,7 @@ public static function find($id) {
117118
* @return insertid
118119
*/
119120
public static function addCalendar($userid,$name,$components='VEVENT,VTODO,VJOURNAL',$timezone=null,$order=0,$color=null) {
120-
$all = self::allCalendars($userid);
121+
$all = self::allCalendars($userid, false, false);
121122
$uris = array();
122123
foreach($all as $i) {
123124
$uris[] = $i['uri'];

0 commit comments

Comments
 (0)