diff options
author | Thomas Tanghus <thomas@tanghus.net> | 2012-06-21 20:51:23 +0200 |
---|---|---|
committer | Thomas Tanghus <thomas@tanghus.net> | 2012-06-21 20:53:50 +0200 |
commit | d72b85684f6b2dfe2d4103ce6f3d6c604d53c868 (patch) | |
tree | 589fc2f5bfe0820df191afcfdef5b3efe160759e | |
parent | 9045557258c1e4e2c86210ccfcee9d26b7b057ae (diff) | |
download | nextcloud-server-d72b85684f6b2dfe2d4103ce6f3d6c604d53c868.tar.gz nextcloud-server-d72b85684f6b2dfe2d4103ce6f3d6c604d53c868.zip |
Only search for VEVENTs.
-rw-r--r-- | apps/calendar/lib/search.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/calendar/lib/search.php b/apps/calendar/lib/search.php index 03516b3b70c..8b8b0e0c7ee 100644 --- a/apps/calendar/lib/search.php +++ b/apps/calendar/lib/search.php @@ -17,6 +17,9 @@ class OC_Search_Provider_Calendar extends OC_Search_Provider{ foreach($calendars as $calendar){ $objects = OC_Calendar_Object::all($calendar['id']); foreach($objects as $object){ + if($object['objecttype']!='VEVENT') { + continue; + } if(substr_count(strtolower($object['summary']), strtolower($query)) > 0){ $calendardata = OC_VObject::parse($object['calendardata']); $vevent = $calendardata->VEVENT; @@ -37,7 +40,7 @@ class OC_Search_Provider_Calendar extends OC_Search_Provider{ $info = $l->t('Date') . ': ' . $start_dt->format('d.m.y H:i') . ' - ' . $end_dt->format('d.m.y H:i'); } $link = OCP\Util::linkTo('calendar', 'index.php').'?showevent='.urlencode($object['id']); - $results[]=new OC_Search_Result($object['summary'],$info, $link,$l->t('Cal.'));//$name,$text,$link,$type + $results[]=new OC_Search_Result($object['summary'],$info, $link,(string)$l->t('Cal.'));//$name,$text,$link,$type } } } |