diff options
Diffstat (limited to 'apps/calendar/lib')
-rw-r--r-- | apps/calendar/lib/calendar.php | 6 | ||||
-rw-r--r-- | apps/calendar/lib/search.php | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/apps/calendar/lib/calendar.php b/apps/calendar/lib/calendar.php index dfd8fe7437b..869b35e2e1b 100644 --- a/apps/calendar/lib/calendar.php +++ b/apps/calendar/lib/calendar.php @@ -44,13 +44,13 @@ 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 $active Only return calendars with this $active state, default(=null) is don't care * @return array */ - public static function allCalendars($uid, $active=false){ + public static function allCalendars($uid, $active=null){ $values = array($uid); $active_where = ''; - if ($active === true){ + if (!is_null($active) && $active){ $active_where = ' AND active = ?'; $values[] = $active; } diff --git a/apps/calendar/lib/search.php b/apps/calendar/lib/search.php index 6526b4223ac..03516b3b70c 100644 --- a/apps/calendar/lib/search.php +++ b/apps/calendar/lib/search.php @@ -1,7 +1,7 @@ <?php class OC_Search_Provider_Calendar extends OC_Search_Provider{ function search($query){ - $calendars = OC_Calendar_Calendar::allCalendars(OCP\USER::getUser(), true); + $calendars = OC_Calendar_Calendar::allCalendars(OCP\USER::getUser(), 1); if(count($calendars)==0 || !OCP\App::isEnabled('calendar')){ //return false; } |