mirror of
https://github.com/nerzhul/ocsms.git
synced 2025-06-12 18:36:32 +00:00
prepare contact/phone buffer
This commit is contained in:
parent
edb098fad9
commit
addc336d12
@ -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"];
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user