mirror of
https://github.com/nerzhul/ocsms.git
synced 2025-06-11 18:06:29 +00:00
prepare contact/phone buffer
This commit is contained in:
parent
edb098fad9
commit
addc336d12
@ -78,6 +78,13 @@ class Application extends App {
|
||||
public function getContacts() {
|
||||
// Only load contacts if they aren't in the buffer
|
||||
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"];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user