mirror of
https://github.com/nextcloud/ocsms.git
synced 2026-08-24 06:42:59 +00:00
prepare contact/phone buffer
This commit is contained in:
@@ -77,7 +77,14 @@ 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"];
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user