Cleanup code.
This commit is contained in:
parent
27ab6daeb0
commit
96a3e28c2e
|
@ -2,17 +2,10 @@
|
||||||
class OC_Search_Provider_Contacts extends OC_Search_Provider{
|
class OC_Search_Provider_Contacts extends OC_Search_Provider{
|
||||||
function search($query){
|
function search($query){
|
||||||
$addressbooks = OC_Contacts_Addressbook::all(OCP\USER::getUser(), 1);
|
$addressbooks = OC_Contacts_Addressbook::all(OCP\USER::getUser(), 1);
|
||||||
// if(count($calendars)==0 || !OCP\App::isEnabled('contacts')){
|
if(count($addressbooks)==0 || !OCP\App::isEnabled('contacts')){
|
||||||
// //return false;
|
return array();
|
||||||
// }
|
|
||||||
// NOTE: Does the following do anything
|
|
||||||
$results=array();
|
|
||||||
$searchquery=array();
|
|
||||||
if(substr_count($query, ' ') > 0){
|
|
||||||
$searchquery = explode(' ', $query);
|
|
||||||
}else{
|
|
||||||
$searchquery[] = $query;
|
|
||||||
}
|
}
|
||||||
|
$results=array();
|
||||||
$l = new OC_l10n('contacts');
|
$l = new OC_l10n('contacts');
|
||||||
foreach($addressbooks as $addressbook){
|
foreach($addressbooks as $addressbook){
|
||||||
$vcards = OC_Contacts_VCard::all($addressbook['id']);
|
$vcards = OC_Contacts_VCard::all($addressbook['id']);
|
||||||
|
|
Loading…
Reference in New Issue