summaryrefslogtreecommitdiffstats
path: root/apps/contacts/lib
diff options
context:
space:
mode:
authorThomas Tanghus <thomas@tanghus.net>2012-06-14 22:44:54 +0200
committerThomas Tanghus <thomas@tanghus.net>2012-06-14 23:05:31 +0200
commit96a3e28c2e744dbdd07bd96e40fb2f7813fb3894 (patch)
tree2d9221036a8d6989e2e7448c2c609c672d4973f6 /apps/contacts/lib
parent27ab6daeb00770039911c2e135fb24804ed2d31b (diff)
downloadnextcloud-server-96a3e28c2e744dbdd07bd96e40fb2f7813fb3894.tar.gz
nextcloud-server-96a3e28c2e744dbdd07bd96e40fb2f7813fb3894.zip
Cleanup code.
Diffstat (limited to 'apps/contacts/lib')
-rw-r--r--apps/contacts/lib/search.php13
1 files changed, 3 insertions, 10 deletions
diff --git a/apps/contacts/lib/search.php b/apps/contacts/lib/search.php
index 144138a7c2c..19330fa9be1 100644
--- a/apps/contacts/lib/search.php
+++ b/apps/contacts/lib/search.php
@@ -2,17 +2,10 @@
class OC_Search_Provider_Contacts extends OC_Search_Provider{
function search($query){
$addressbooks = OC_Contacts_Addressbook::all(OCP\USER::getUser(), 1);
-// if(count($calendars)==0 || !OCP\App::isEnabled('contacts')){
-// //return false;
-// }
- // NOTE: Does the following do anything
- $results=array();
- $searchquery=array();
- if(substr_count($query, ' ') > 0){
- $searchquery = explode(' ', $query);
- }else{
- $searchquery[] = $query;
+ if(count($addressbooks)==0 || !OCP\App::isEnabled('contacts')){
+ return array();
}
+ $results=array();
$l = new OC_l10n('contacts');
foreach($addressbooks as $addressbook){
$vcards = OC_Contacts_VCard::all($addressbook['id']);