1
0
mirror of https://github.com/nextcloud/ocsms.git synced 2026-08-25 23:21:38 +00:00

prepare contact/phone buffer

This commit is contained in:
Loïc Blot (@U-Exp)
2014-09-30 07:36:49 +02:00
parent edb098fad9
commit addc336d12
+7
View File
@@ -78,6 +78,13 @@ class Application extends App {
public function getContacts() { public function getContacts() {
// Only load contacts if they aren't in the buffer // Only load contacts if they aren't in the buffer
if(count(self::$contacts) == 0) { if(count(self::$contacts) == 0) {
$cm = $this->c['ContactsManager'];
$result = $cm->search('',array('FN'));
foreach ($result as $r) {
if (isset $r["phone"]) {
self::$contacts[$r["phone"]] = $r["FN"];
}
}
} }
} }
} }