diff options
author | Tom Needham <tom@owncloud.com> | 2012-12-16 22:29:00 +0000 |
---|---|---|
committer | Tom Needham <tom@owncloud.com> | 2012-12-16 22:29:00 +0000 |
commit | 3c98f36121c10f703904d63cd531b7bbf6ee9454 (patch) | |
tree | c12c9f737e036cec5f1b235214902473b6b418d5 /lib/public | |
parent | 39b51997756ebb233be10ca5a8ced0d6c60d0dac (diff) | |
parent | 811b571cb3da8494797ed70c5b967067cc2a1b5b (diff) | |
download | nextcloud-server-3c98f36121c10f703904d63cd531b7bbf6ee9454.tar.gz nextcloud-server-3c98f36121c10f703904d63cd531b7bbf6ee9454.zip |
Merge branch 'master' into ocs_api
Diffstat (limited to 'lib/public')
-rw-r--r-- | lib/public/contacts.php | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/lib/public/contacts.php b/lib/public/contacts.php index 4cf57ed8ff2..88d812e735a 100644 --- a/lib/public/contacts.php +++ b/lib/public/contacts.php @@ -54,29 +54,30 @@ namespace OCP { * Example: * Following function shows how to search for contacts for the name and the email address. * - * public static function getMatchingRecipient($term) { - * // The API is not active -> nothing to do + * public static function getMatchingRecipient($term) { + * // The API is not active -> nothing to do * if (!\OCP\Contacts::isEnabled()) { - * return array(); + * return array(); * } * * $result = \OCP\Contacts::search($term, array('FN', 'EMAIL')); * $receivers = array(); * foreach ($result as $r) { - * $id = $r['id']; - * $fn = $r['FN']; - * $email = $r['EMAIL']; - * if (!is_array($email)) { - * $email = array($email); - * } + * $id = $r['id']; + * $fn = $r['FN']; + * $email = $r['EMAIL']; + * if (!is_array($email)) { + * $email = array($email); + * } * - * // loop through all email addresses of this contact - * foreach ($email as $e) { - * $displayName = $fn . " <$e>"; - * $receivers[] = array('id' => $id, - * 'label' => $displayName, - * 'value' => $displayName); - * } + * // loop through all email addresses of this contact + * foreach ($email as $e) { + * $displayName = $fn . " <$e>"; + * $receivers[] = array( + * 'id' => $id, + * 'label' => $displayName, + * 'value' => $displayName); + * } * } * * return $receivers; |