1
0
mirror of https://github.com/nextcloud/ocsms.git synced 2026-08-12 00:42:59 +00:00

Little fix for contact load, but this isn't working yet

This commit is contained in:
Loic Blot
2014-09-30 18:54:30 +00:00
parent b17cf11020
commit b75a8b3547
2 changed files with 4 additions and 3 deletions
+3 -2
View File
@@ -82,11 +82,12 @@ class Application extends App {
public function getContacts() {
// Only load contacts if they aren't in the buffer
if(count(self::$contacts) == 0) {
self::$contacts = array();
$cm = $this->c['ContactsManager'];
$result = $cm->search('',array('FN'));
foreach ($result as $r) {
if (isset ($r["phone"])) {
self::$contacts[$r["phone"]] = $r["FN"];
if (isset ($r["TEL"])) {
self::$contacts[$r["TEL"]] = $r["FN"];
}
}
}