aboutsummaryrefslogtreecommitdiffstats
path: root/apps/calendar/lib
diff options
context:
space:
mode:
authorThomas Tanghus <thomas@tanghus.net>2012-06-15 00:53:13 +0200
committerThomas Tanghus <thomas@tanghus.net>2012-06-15 00:53:13 +0200
commit6d43e6565e77ecdd891ba2a96dca5ae0611b5622 (patch)
tree8ad83c3559efa6646005f97d4d9deebcc951b974 /apps/calendar/lib
parent0f6b1be0e6f0cc6ff97c97190c7da67f5fee0294 (diff)
downloadnextcloud-server-6d43e6565e77ecdd891ba2a96dca5ae0611b5622.tar.gz
nextcloud-server-6d43e6565e77ecdd891ba2a96dca5ae0611b5622.zip
Revert "Agree on argument type."
This reverts commit 0f6b1be0e6f0cc6ff97c97190c7da67f5fee0294.
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 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;
}