Prerelease 11.10.2017
fix bug on empty device table
This commit is contained in:
parent
d1e4d340c4
commit
8a8dd33e0d
|
@ -783,10 +783,11 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
break;
|
break;
|
||||||
case "getPhoneGrid":
|
case "getPhoneGrid":
|
||||||
$result = $this->get_db_SccpTableData('SccpDevice');
|
$result = $this->get_db_SccpTableData('SccpDevice');
|
||||||
|
$staus = $this->sccp_get_active_devise();
|
||||||
if (empty($result)) {
|
if (empty($result)) {
|
||||||
$result = array();
|
$result = array();
|
||||||
} else {
|
} else {
|
||||||
$staus = $this->sccp_get_active_devise();
|
// $staus = $this->sccp_get_active_devise();
|
||||||
foreach ($result as &$dev_id) {
|
foreach ($result as &$dev_id) {
|
||||||
$id_name = $dev_id['name'];
|
$id_name = $dev_id['name'];
|
||||||
if (!empty($staus[$id_name])) {
|
if (!empty($staus[$id_name])) {
|
||||||
|
@ -801,6 +802,8 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
$dev_id['address'] = '- -';
|
$dev_id['address'] = '- -';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if (!empty($staus)) {
|
||||||
// Array ( [name] => SEP0004F2EDCBFD [mac] => SEP0004F2EDCBFD [type] => 7937 [button] => line,7818,default )
|
// Array ( [name] => SEP0004F2EDCBFD [mac] => SEP0004F2EDCBFD [type] => 7937 [button] => line,7818,default )
|
||||||
foreach ($staus as $dev_ids) {
|
foreach ($staus as $dev_ids) {
|
||||||
$id_name = $dev_ids['name'];
|
$id_name = $dev_ids['name'];
|
||||||
|
|
Loading…
Reference in a new issue