summaryrefslogtreecommitdiffstats
path: root/apps/calendar/lib
diff options
context:
space:
mode:
authorThomas Tanghus <thomas@tanghus.net>2012-06-15 01:51:26 +0200
committerThomas Tanghus <thomas@tanghus.net>2012-06-15 01:51:26 +0200
commitad32c203002cbf2c02457084e40c216d06afd7f2 (patch)
tree8f5f3ad871dda24e25d15e7c5aad4763acbf9ebe /apps/calendar/lib
parent6d43e6565e77ecdd891ba2a96dca5ae0611b5622 (diff)
downloadnextcloud-server-ad32c203002cbf2c02457084e40c216d06afd7f2.tar.gz
nextcloud-server-ad32c203002cbf2c02457084e40c216d06afd7f2.zip
Agree on argument type (cleaned this time).
Diffstat (limited to 'apps/calendar/lib')
-rw-r--r--apps/calendar/lib/calendar.php6
-rw-r--r--apps/calendar/lib/search.php2
2 files changed, 4 insertions, 4 deletions
diff --git a/apps/calendar/lib/calendar.php b/apps/calendar/lib/calendar.php
index 869b35e2e1b..cde020293d4 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(=null) is don't care
+ * @param boolean $active Only return calendars with this $active state, default(=false) is don't care
* @return array
*/
- public static function allCalendars($uid, $active=null){
+ public static function allCalendars($uid, $active=false){
$values = array($uid);
$active_where = '';
- if (!is_null($active) && $active){
+ if ($active){
$active_where = ' AND active = ?';
$values[] = $active;
}
diff --git a/apps/calendar/lib/search.php b/apps/calendar/lib/search.php
index 03516b3b70c..6526b4223ac 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(), 1);
+ $calendars = OC_Calendar_Calendar::allCalendars(OCP\USER::getUser(), true);
if(count($calendars)==0 || !OCP\App::isEnabled('calendar')){
//return false;
}