diff options
author | Thomas Tanghus <thomas@tanghus.net> | 2012-07-17 01:35:35 +0200 |
---|---|---|
committer | Thomas Tanghus <thomas@tanghus.net> | 2012-07-17 01:35:35 +0200 |
commit | 4de66880edb59e9169d8b3c3c5d2238214a8bfc1 (patch) | |
tree | bc9e73f98f58c31f9c2d666469a9674a54078574 /apps/contacts/ajax | |
parent | f128b96ac0e0bf659ae818e6b6d190b3fbbe18f7 (diff) | |
download | nextcloud-server-4de66880edb59e9169d8b3c3c5d2238214a8bfc1.tar.gz nextcloud-server-4de66880edb59e9169d8b3c3c5d2238214a8bfc1.zip |
If a contact wasn't loaded in the list you coulcn't access it from search result. Fixes oc-1264.
Diffstat (limited to 'apps/contacts/ajax')
-rw-r--r-- | apps/contacts/ajax/contactdetails.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/contacts/ajax/contactdetails.php b/apps/contacts/ajax/contactdetails.php index b697b1a8e5b..d438f708b46 100644 --- a/apps/contacts/ajax/contactdetails.php +++ b/apps/contacts/ajax/contactdetails.php @@ -30,6 +30,7 @@ $id = isset($_GET['id'])?$_GET['id']:null; if(is_null($id)) { bailOut(OC_Contacts_App::$l10n->t('Missing ID')); } +$card = OC_Contacts_VCard::find($id); $vcard = OC_Contacts_App::getContactVCard( $id ); if(is_null($vcard)) { bailOut(OC_Contacts_App::$l10n->t('Error parsing VCard for ID: "'.$id.'"')); @@ -50,5 +51,7 @@ if(isset($details['PHOTO'])) { $details['PHOTO'] = false; } $details['id'] = $id; +$details['displayname'] = $card['fullname']; +$details['addressbookid'] = $card['addressbookid']; OC_Contacts_App::setLastModifiedHeader($vcard); OCP\JSON::success(array('data' => $details)); |