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

Commit

Permalink
fix infinite loop in master
Browse files Browse the repository at this point in the history
  • Loading branch information
georgehrke committed Sep 2, 2014
1 parent 4e3ccef commit b5aefcc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/calendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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'];
Expand Down

0 comments on commit b5aefcc

Please sign in to comment.