Simplify method name
This commit is contained in:
parent
0e36336033
commit
852156878d
|
@ -69,8 +69,6 @@
|
||||||
* + dir "templates"
|
* + dir "templates"
|
||||||
* + dir "firmware"
|
* + dir "firmware"
|
||||||
* + dir "locales"
|
* + dir "locales"
|
||||||
* + Create Simple User Interface
|
|
||||||
* + sccpsimple.xml
|
|
||||||
* + Add error information on the server information page (critical display error - the system can not work correctly)
|
* + Add error information on the server information page (critical display error - the system can not work correctly)
|
||||||
* - Add Warning Information on Server Info Page
|
* - Add Warning Information on Server Info Page
|
||||||
* - ADD Reload Line
|
* - ADD Reload Line
|
||||||
|
@ -380,7 +378,7 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
'monitor' => array('name' => 'Record Calls', 'value' => '')
|
'monitor' => array('name' => 'Record Calls', 'value' => '')
|
||||||
);
|
);
|
||||||
|
|
||||||
// $lines_list = $this->dbinterface->HWextension_db_SccpTableData('SccpExtension');
|
// $lines_list = $this->dbinterface->getSccpDeviceTableData('SccpExtension');
|
||||||
$max_btn = ((!empty($get_settings['buttonscount']) ? $get_settings['buttonscount'] : 100));
|
$max_btn = ((!empty($get_settings['buttonscount']) ? $get_settings['buttonscount'] : 100));
|
||||||
$last_btn = $max_btn;
|
$last_btn = $max_btn;
|
||||||
for ($it = $max_btn; $it >= 0; $it--) {
|
for ($it = $max_btn; $it >= 0; $it--) {
|
||||||
|
@ -425,7 +423,7 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
case 'monitor':
|
case 'monitor':
|
||||||
$btn_t = 'speeddial';
|
$btn_t = 'speeddial';
|
||||||
$btn_opt = (string) $get_settings['button' . $it . '_line'];
|
$btn_opt = (string) $get_settings['button' . $it . '_line'];
|
||||||
$db_res = $this->dbinterface->HWextension_db_SccpTableData('SccpExtension', array('name' => $btn_opt));
|
$db_res = $this->dbinterface->getSccpDeviceTableData('SccpExtension', array('name' => $btn_opt));
|
||||||
$btn_n = $db_res[0]['label'];
|
$btn_n = $db_res[0]['label'];
|
||||||
$btn_opt .= ',' . $btn_opt . $this->hint_context['default'];
|
$btn_opt .= ',' . $btn_opt . $this->hint_context['default'];
|
||||||
break;
|
break;
|
||||||
|
@ -496,7 +494,7 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
$save_settings = array();
|
$save_settings = array();
|
||||||
$save_codec = array();
|
$save_codec = array();
|
||||||
$name_dev = '';
|
$name_dev = '';
|
||||||
$db_field = $this->dbinterface->HWextension_db_SccpTableData("get_columns_sccpdevice");
|
$db_field = $this->dbinterface->getSccpDeviceTableData("get_columns_sccpdevice");
|
||||||
$hw_id = (empty($get_settings['sccp_deviceid'])) ? 'new' : $get_settings['sccp_deviceid'];
|
$hw_id = (empty($get_settings['sccp_deviceid'])) ? 'new' : $get_settings['sccp_deviceid'];
|
||||||
$hw_type = (empty($get_settings['sccp_device_typeid'])) ? 'sccpdevice' : $get_settings['sccp_device_typeid'];
|
$hw_type = (empty($get_settings['sccp_device_typeid'])) ? 'sccpdevice' : $get_settings['sccp_device_typeid'];
|
||||||
$update_hw = ($hw_id == 'new') ? 'add' : 'clear'; // Possible values are delete, replace, add, clear.
|
$update_hw = ($hw_id == 'new') ? 'add' : 'clear'; // Possible values are delete, replace, add, clear.
|
||||||
|
@ -623,7 +621,7 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
$save_buttons = array();
|
$save_buttons = array();
|
||||||
$save_settings = array();
|
$save_settings = array();
|
||||||
$name_dev = '';
|
$name_dev = '';
|
||||||
$db_field = $this->dbinterface->HWextension_db_SccpTableData("get_columns_sccpuser");
|
$db_field = $this->dbinterface->getSccpDeviceTableData("get_columns_sccpuser");
|
||||||
$hw_prefix = 'SEP';
|
$hw_prefix = 'SEP';
|
||||||
$name_dev = $get_settings[$hdr_prefix . 'id'];
|
$name_dev = $get_settings[$hdr_prefix . 'id'];
|
||||||
$save_buttons = $this->getPhoneButtons($get_settings, $name_dev, 'sccpline');
|
$save_buttons = $this->getPhoneButtons($get_settings, $name_dev, 'sccpline');
|
||||||
|
@ -977,13 +975,13 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
if (!empty($hw_list)) {
|
if (!empty($hw_list)) {
|
||||||
$buton_list = array();
|
$buton_list = array();
|
||||||
foreach ($hw_list as $value) {
|
foreach ($hw_list as $value) {
|
||||||
$buton_tmp = $this->dbinterface->HWextension_db_SccpTableData("get_sccpdevice_buttons", array('buttontype' => 'speeddial', 'id' => $value['name']));
|
$buton_tmp = $this->dbinterface->getSccpDeviceTableData("get_sccpdevice_buttons", array('buttontype' => 'speeddial', 'id' => $value['name']));
|
||||||
if (!empty($buton_tmp)) {
|
if (!empty($buton_tmp)) {
|
||||||
$buton_list = array_merge($buton_list, $buton_tmp);
|
$buton_list = array_merge($buton_list, $buton_tmp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$buton_list = $this->dbinterface->HWextension_db_SccpTableData("get_sccpdevice_buttons", array('buttontype' => 'speeddial'));
|
$buton_list = $this->dbinterface->getSccpDeviceTableData("get_sccpdevice_buttons", array('buttontype' => 'speeddial'));
|
||||||
}
|
}
|
||||||
if (empty($buton_list)) {
|
if (empty($buton_list)) {
|
||||||
return array('Response' => ' 0 buttons found ', 'data' => '');
|
return array('Response' => ' 0 buttons found ', 'data' => '');
|
||||||
|
@ -1062,13 +1060,13 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
$data_value = array();
|
$data_value = array();
|
||||||
$dev_line_data = null;
|
$dev_line_data = null;
|
||||||
|
|
||||||
$dev_config = $this->dbinterface->HWextension_db_SccpTableData("get_sccpdevice_byid", array('id' => $dev_id));
|
$dev_config = $this->dbinterface->getSccpDeviceTableData("get_sccpdevice_byid", array('id' => $dev_id));
|
||||||
// Support Cisco Sip Device
|
// Support Cisco Sip Device
|
||||||
if (!empty($dev_config['type'])) {
|
if (!empty($dev_config['type'])) {
|
||||||
if (strpos($dev_config['type'], 'sip') !== false) {
|
if (strpos($dev_config['type'], 'sip') !== false) {
|
||||||
$sccp_native = false;
|
$sccp_native = false;
|
||||||
$tmp_bind = $this->sipconfigs->getSipConfig();
|
$tmp_bind = $this->sipconfigs->getSipConfig();
|
||||||
$dev_ext_config = $this->dbinterface->HWextension_db_SccpTableData("SccpDevice", array('name' => $dev_id, 'fields' => 'sip_ext'));
|
$dev_ext_config = $this->dbinterface->getSccpDeviceTableData("SccpDevice", array('name' => $dev_id, 'fields' => 'sip_ext'));
|
||||||
$data_value = array_merge($data_value, $dev_ext_config);
|
$data_value = array_merge($data_value, $dev_ext_config);
|
||||||
$data_tmp = explode(';', $dev_ext_config['sip_lines']);
|
$data_tmp = explode(';', $dev_ext_config['sip_lines']);
|
||||||
$data_value['sbind'] = array();
|
$data_value['sbind'] = array();
|
||||||
|
@ -1344,7 +1342,7 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update info from sccp_db
|
// Update info from sccp_db
|
||||||
$tmp_data = $this->dbinterface->HWextension_db_SccpTableData('SccpExtension');
|
$tmp_data = $this->dbinterface->getSccpDeviceTableData('SccpExtension');
|
||||||
foreach ($tmp_data as $value) {
|
foreach ($tmp_data as $value) {
|
||||||
$name_l = $value['name'];
|
$name_l = $value['name'];
|
||||||
if (!empty($res[$name_l . $default_hint])) {
|
if (!empty($res[$name_l . $default_hint])) {
|
||||||
|
|
|
@ -32,7 +32,7 @@ class dbinterface
|
||||||
public function get_db_SccpTableByID($dataid, $data = array(), $indexField = '')
|
public function get_db_SccpTableByID($dataid, $data = array(), $indexField = '')
|
||||||
{
|
{
|
||||||
$result = array();
|
$result = array();
|
||||||
$raw = $this->HWextension_db_SccpTableData($dataid, $data);
|
$raw = $this->getSccpDeviceTableData($dataid, $data);
|
||||||
if (empty($raw) || empty($indexField)) {
|
if (empty($raw) || empty($indexField)) {
|
||||||
return $raw;
|
return $raw;
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,7 @@ class dbinterface
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function HWextension_db_SccpTableData($dataid, $data = array())
|
public function getSccpDeviceTableData($dataid, $data = array())
|
||||||
{
|
{
|
||||||
// $stmt is a single row fetch, $stmts is a fetchAll.
|
// $stmt is a single row fetch, $stmts is a fetchAll.
|
||||||
$dbh = \FreePBX::Database();
|
$dbh = \FreePBX::Database();
|
||||||
|
|
|
@ -417,7 +417,7 @@ class xmlinterface
|
||||||
'phoneServices' => 'null', 'certHash' => 'null', 'deviceProtocol' => 'SIP',
|
'phoneServices' => 'null', 'certHash' => 'null', 'deviceProtocol' => 'SIP',
|
||||||
'deviceSecurityMode' => '1');
|
'deviceSecurityMode' => '1');
|
||||||
|
|
||||||
// $var_hw_config = $this->dbinterface->HWextension_db_SccpTableData("get_sccpdevice_byid", array('id' => $dev_id));
|
// $var_hw_config = $this->dbinterface->getSccpDeviceTableData("get_sccpdevice_byid", array('id' => $dev_id));
|
||||||
|
|
||||||
if (empty($dev_config)) {
|
if (empty($dev_config)) {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -114,7 +114,7 @@ trait ajaxHelper {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$this->deleteSccpDeviceXML('all');
|
$this->deleteSccpDeviceXML('all');
|
||||||
$models = $this->dbinterface->HWextension_db_SccpTableData("SccpDevice");
|
$models = $this->dbinterface->getSccpDeviceTableData("SccpDevice");
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->createDefaultSccpXml(); // Default XML
|
$this->createDefaultSccpXml(); // Default XML
|
||||||
|
@ -289,7 +289,7 @@ trait ajaxHelper {
|
||||||
return $result;
|
return $result;
|
||||||
break;
|
break;
|
||||||
case 'getExtensionGrid':
|
case 'getExtensionGrid':
|
||||||
$result = $this->dbinterface->HWextension_db_SccpTableData('SccpExtension');
|
$result = $this->dbinterface->getSccpDeviceTableData('SccpExtension');
|
||||||
if (empty($result)) {
|
if (empty($result)) {
|
||||||
return array();
|
return array();
|
||||||
}
|
}
|
||||||
|
@ -300,7 +300,7 @@ trait ajaxHelper {
|
||||||
$cmd_type = !empty($request['type']) ? $request['type'] : '';
|
$cmd_type = !empty($request['type']) ? $request['type'] : '';
|
||||||
|
|
||||||
// Find all devices defined in the database
|
// Find all devices defined in the database
|
||||||
$dbDevices = $this->dbinterface->HWextension_db_SccpTableData('SccpDevice', array('type' => $cmd_type));
|
$dbDevices = $this->dbinterface->getSccpDeviceTableData('SccpDevice', array('type' => $cmd_type));
|
||||||
// Return if only interested in SIP devices
|
// Return if only interested in SIP devices
|
||||||
if ($cmd_type == 'cisco-sip') {
|
if ($cmd_type == 'cisco-sip') {
|
||||||
return $dbDevices; //this may be empty
|
return $dbDevices; //this may be empty
|
||||||
|
|
|
@ -72,7 +72,7 @@ trait helperfunctions {
|
||||||
private function getTableDefaults($table, $trim_underscore = true) {
|
private function getTableDefaults($table, $trim_underscore = true) {
|
||||||
$def_val = array();
|
$def_val = array();
|
||||||
// TODO: This is ugly and overkill - needs to be cleaned up in dbinterface
|
// TODO: This is ugly and overkill - needs to be cleaned up in dbinterface
|
||||||
$sccpTableDesc = $this->dbinterface->HWextension_db_SccpTableData("get_columns_{$table}");
|
$sccpTableDesc = $this->dbinterface->getSccpDeviceTableData("get_columns_{$table}");
|
||||||
|
|
||||||
foreach ($sccpTableDesc as $data) {
|
foreach ($sccpTableDesc as $data) {
|
||||||
$key = (string) $data['Field'];
|
$key = (string) $data['Field'];
|
||||||
|
@ -90,7 +90,7 @@ trait helperfunctions {
|
||||||
|
|
||||||
private function getTableEnums($table, $trim_underscore = true) {
|
private function getTableEnums($table, $trim_underscore = true) {
|
||||||
$enumFields = array();
|
$enumFields = array();
|
||||||
$sccpTableDesc = $this->dbinterface->HWextension_db_SccpTableData("get_columns_{$table}");
|
$sccpTableDesc = $this->dbinterface->getSccpDeviceTableData("get_columns_{$table}");
|
||||||
|
|
||||||
foreach ($sccpTableDesc as $data) {
|
foreach ($sccpTableDesc as $data) {
|
||||||
$key = (string) $data['Field'];
|
$key = (string) $data['Field'];
|
||||||
|
|
|
@ -19,7 +19,7 @@ if (!empty($_REQUEST['new_id'])) {
|
||||||
$dev_id = $_REQUEST['new_id'];
|
$dev_id = $_REQUEST['new_id'];
|
||||||
|
|
||||||
// Get device defaults from db
|
// Get device defaults from db
|
||||||
$sccpDeviceDesc = $this->dbinterface->HWextension_db_SccpTableData('get_columns_sccpdevice');
|
$sccpDeviceDesc = $this->dbinterface->getSccpDeviceTableData('get_columns_sccpdevice');
|
||||||
|
|
||||||
foreach ($sccpDeviceDesc as $data) {
|
foreach ($sccpDeviceDesc as $data) {
|
||||||
$key = (string) $data['Field'];
|
$key = (string) $data['Field'];
|
||||||
|
@ -43,7 +43,7 @@ if (!empty($_REQUEST['id'])) {
|
||||||
// Editing an existing Device. Overwrite any defaults that are already set for this device.
|
// Editing an existing Device. Overwrite any defaults that are already set for this device.
|
||||||
$dev_id = $_REQUEST['id'];
|
$dev_id = $_REQUEST['id'];
|
||||||
$dev_new = $dev_id;
|
$dev_new = $dev_id;
|
||||||
$db_res = $this->dbinterface->HWextension_db_SccpTableData('get_sccpdevice_byid', array("id" => $dev_id));
|
$db_res = $this->dbinterface->getSccpDeviceTableData('get_sccpdevice_byid', array("id" => $dev_id));
|
||||||
foreach ($db_res as $key => $val) {
|
foreach ($db_res as $key => $val) {
|
||||||
if (!empty($val)) {
|
if (!empty($val)) {
|
||||||
switch ($key) {
|
switch ($key) {
|
||||||
|
|
|
@ -11,7 +11,7 @@ $dev_new = null;
|
||||||
if (!empty($_REQUEST['ru_id'])) {
|
if (!empty($_REQUEST['ru_id'])) {
|
||||||
$dev_id = $_REQUEST['ru_id'];
|
$dev_id = $_REQUEST['ru_id'];
|
||||||
$def_val['id'] = array("keyword" => 'id', "data" => $dev_id, "seq" => "99");
|
$def_val['id'] = array("keyword" => 'id', "data" => $dev_id, "seq" => "99");
|
||||||
$db_res = $this->dbinterface->HWextension_db_SccpTableData('get_sccpuser', array("id" => $dev_id));
|
$db_res = $this->dbinterface->getSccpDeviceTableData('get_sccpuser', array("id" => $dev_id));
|
||||||
if (!empty($db_res)) {
|
if (!empty($db_res)) {
|
||||||
foreach ($db_res as $key => $val) {
|
foreach ($db_res as $key => $val) {
|
||||||
if (!empty($val)) {
|
if (!empty($val)) {
|
||||||
|
|
|
@ -29,7 +29,7 @@ if (!empty($_REQUEST['new_id'])) {
|
||||||
if (!empty($_REQUEST['id'])) {
|
if (!empty($_REQUEST['id'])) {
|
||||||
$dev_id = $_REQUEST['id'];
|
$dev_id = $_REQUEST['id'];
|
||||||
$dev_new = $dev_id;
|
$dev_new = $dev_id;
|
||||||
$db_res = $this->dbinterface->HWextension_db_SccpTableData('get_sccpdevice_byid', array("id" => $dev_id));
|
$db_res = $this->dbinterface->getSccpDeviceTableData('get_sccpdevice_byid', array("id" => $dev_id));
|
||||||
foreach ($db_res as $key => $val) {
|
foreach ($db_res as $key => $val) {
|
||||||
if (!empty($val)) {
|
if (!empty($val)) {
|
||||||
switch ($key) {
|
switch ($key) {
|
||||||
|
@ -70,14 +70,14 @@ if (!empty($_REQUEST['id'])) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//print_r($db_res);
|
//print_r($db_res);
|
||||||
|
|
||||||
if (!empty($device_warning)) {
|
if (!empty($device_warning)) {
|
||||||
?>
|
?>
|
||||||
<div class="fpbx-container container-fluid">
|
<div class="fpbx-container container-fluid">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h2 style="border:2px solid Tomato;color:Tomato;" >Warning in the SCCP Device</h2>
|
<h2 style="border:2px solid Tomato;color:Tomato;" >Warning in the SCCP Device</h2>
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<?php
|
<?php
|
||||||
foreach ($device_warning as $key => $value) {
|
foreach ($device_warning as $key => $value) {
|
||||||
echo '<h3>'.$key.'</h3>';
|
echo '<h3>'.$key.'</h3>';
|
||||||
|
@ -101,7 +101,7 @@ if (!empty($device_warning)) {
|
||||||
<input type="hidden" name="category" value="adddevice_form">
|
<input type="hidden" name="category" value="adddevice_form">
|
||||||
<input type="hidden" name="Submit" value="Submit">
|
<input type="hidden" name="Submit" value="Submit">
|
||||||
<input type="hidden" name="sccp_device_typeid" value="sipdevice">
|
<input type="hidden" name="sccp_device_typeid" value="sipdevice">
|
||||||
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if (empty($dev_new)) {
|
if (empty($dev_new)) {
|
||||||
|
@ -121,5 +121,5 @@ if (!empty($device_warning)) {
|
||||||
// echo $this->showGroup('sccp_hw_dev_pickup', 1, 'sccp_hw', $def_val);
|
// echo $this->showGroup('sccp_hw_dev_pickup', 1, 'sccp_hw', $def_val);
|
||||||
// echo $this->showGroup('sccp_hw_dev_conference', 1, 'sccp_hw', $def_val);
|
// echo $this->showGroup('sccp_hw_dev_conference', 1, 'sccp_hw', $def_val);
|
||||||
// echo $this->showGroup('sccp_hw_dev_network', 1, 'sccp_hw', $def_val);
|
// echo $this->showGroup('sccp_hw_dev_network', 1, 'sccp_hw', $def_val);
|
||||||
?>
|
?>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -19,8 +19,8 @@ $feature_list= array('parkinglot'=>'Park Slots','monitor'=> "Record Calls",'dev
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$lines_list = $this->dbinterface->HWextension_db_SccpTableData('SccpExtension');
|
$lines_list = $this->dbinterface->getSccpDeviceTableData('SccpExtension');
|
||||||
//$hint_list = $this->dbinterface->HWextension_db_SccpTableData('SccpExtension');
|
//$hint_list = $this->dbinterface->getSccpDeviceTableData('SccpExtension');
|
||||||
$hint_list = $this->getHintInformation(true, array('context'=>'park-hints')) ;
|
$hint_list = $this->getHintInformation(true, array('context'=>'park-hints')) ;
|
||||||
|
|
||||||
// print_r($hint_list);
|
// print_r($hint_list);
|
||||||
|
@ -30,8 +30,8 @@ $show_buttons =1;
|
||||||
//print_r($hint_list);
|
//print_r($hint_list);
|
||||||
if (!empty($_REQUEST['id'])) {
|
if (!empty($_REQUEST['id'])) {
|
||||||
$dev_id = $_REQUEST['id'];
|
$dev_id = $_REQUEST['id'];
|
||||||
$db_buttons = $this->dbinterface->HWextension_db_SccpTableData('get_sccpdevice_buttons', array("id" => $dev_id));
|
$db_buttons = $this->dbinterface->getSccpDeviceTableData('get_sccpdevice_buttons', array("id" => $dev_id));
|
||||||
$db_device = $this->dbinterface->HWextension_db_SccpTableData('get_sccpdevice_byid', array("id" => $dev_id));
|
$db_device = $this->dbinterface->getSccpDeviceTableData('get_sccpdevice_byid', array("id" => $dev_id));
|
||||||
$max_buttons = $db_device['buttons'];
|
$max_buttons = $db_device['buttons'];
|
||||||
if (!empty($db_device['addon_buttons'])) {
|
if (!empty($db_device['addon_buttons'])) {
|
||||||
$max_buttons += $db_device['addon_buttons'];
|
$max_buttons += $db_device['addon_buttons'];
|
||||||
|
@ -41,7 +41,7 @@ if (!empty($_REQUEST['id'])) {
|
||||||
if (!empty($_REQUEST['new_id'])) {
|
if (!empty($_REQUEST['new_id'])) {
|
||||||
$val = $_REQUEST['type'];
|
$val = $_REQUEST['type'];
|
||||||
$dev_schema = $this-> getSccpModelInformation('byid', false, "all", array('model' =>$val));
|
$dev_schema = $this-> getSccpModelInformation('byid', false, "all", array('model' =>$val));
|
||||||
// $db_device = $this->dbinterface->HWextension_db_SccpTableData('get_sccpdevice_byid', array("id" => $val));
|
// $db_device = $this->dbinterface->getSccpDeviceTableData('get_sccpdevice_byid', array("id" => $val));
|
||||||
$max_buttons = $dev_schema[0]['buttons'];
|
$max_buttons = $dev_schema[0]['buttons'];
|
||||||
if (!empty($_REQUEST['addon'])) {
|
if (!empty($_REQUEST['addon'])) {
|
||||||
$val = $_REQUEST['addon'];
|
$val = $_REQUEST['addon'];
|
||||||
|
@ -52,7 +52,7 @@ if (!empty($_REQUEST['new_id'])) {
|
||||||
}
|
}
|
||||||
if (!empty($_REQUEST['ru_id'])) {
|
if (!empty($_REQUEST['ru_id'])) {
|
||||||
$dev_id = $_REQUEST['ru_id'];
|
$dev_id = $_REQUEST['ru_id'];
|
||||||
$db_buttons = $this->dbinterface->HWextension_db_SccpTableData('get_sccpdevice_buttons', array("id" => $dev_id));
|
$db_buttons = $this->dbinterface->getSccpDeviceTableData('get_sccpdevice_buttons', array("id" => $dev_id));
|
||||||
$show_buttons = $max_buttons;
|
$show_buttons = $max_buttons;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,9 +15,9 @@ $forminfo =array(
|
||||||
$buttons_type= array('empty','line','speeddial');
|
$buttons_type= array('empty','line','speeddial');
|
||||||
$feature_list= array('parkinglot'=>'Park Slots','monitor'=> 'Record Calls','devstate'=> 'Change Status');
|
$feature_list= array('parkinglot'=>'Park Slots','monitor'=> 'Record Calls','devstate'=> 'Change Status');
|
||||||
|
|
||||||
//$lines_list = $this->dbinterface->HWextension_db_SccpTableData('SccpExtension');
|
//$lines_list = $this->dbinterface->getSccpDeviceTableData('SccpExtension');
|
||||||
$lines_list = $this->sipconfigs->get_db_sip_TableData('Device');
|
$lines_list = $this->sipconfigs->get_db_sip_TableData('Device');
|
||||||
//$hint_list = $this->dbinterface->HWextension_db_SccpTableData('SccpExtension');
|
//$hint_list = $this->dbinterface->getSccpDeviceTableData('SccpExtension');
|
||||||
$hint_list = $this->getHintInformation(true, array('context'=>'park-hints')) ;
|
$hint_list = $this->getHintInformation(true, array('context'=>'park-hints')) ;
|
||||||
|
|
||||||
// print_r($lines_list);
|
// print_r($lines_list);
|
||||||
|
@ -27,8 +27,8 @@ $show_buttons =1;
|
||||||
//print_r($hint_list);
|
//print_r($hint_list);
|
||||||
if (!empty($_REQUEST['id'])) {
|
if (!empty($_REQUEST['id'])) {
|
||||||
$dev_id = $_REQUEST['id'];
|
$dev_id = $_REQUEST['id'];
|
||||||
$db_buttons = $this->dbinterface->HWextension_db_SccpTableData('get_sccpdevice_buttons', array('id' => $dev_id));
|
$db_buttons = $this->dbinterface->getSccpDeviceTableData('get_sccpdevice_buttons', array('id' => $dev_id));
|
||||||
$db_device = $this->dbinterface->HWextension_db_SccpTableData('get_sccpdevice_byid', array('id' => $dev_id));
|
$db_device = $this->dbinterface->getSccpDeviceTableData('get_sccpdevice_byid', array('id' => $dev_id));
|
||||||
$max_buttons = $db_device['buttons'];
|
$max_buttons = $db_device['buttons'];
|
||||||
if (!empty($db_device['addon_buttons'])) {
|
if (!empty($db_device['addon_buttons'])) {
|
||||||
$max_buttons += $db_device['addon_buttons'];
|
$max_buttons += $db_device['addon_buttons'];
|
||||||
|
@ -38,7 +38,7 @@ if (!empty($_REQUEST['id'])) {
|
||||||
if (!empty($_REQUEST['new_id'])) {
|
if (!empty($_REQUEST['new_id'])) {
|
||||||
$val = $_REQUEST['type'];
|
$val = $_REQUEST['type'];
|
||||||
$dev_schema = $this-> getSccpModelInformation('byid', false, 'all', array('model' =>$val));
|
$dev_schema = $this-> getSccpModelInformation('byid', false, 'all', array('model' =>$val));
|
||||||
// $db_device = $this->dbinterface->HWextension_db_SccpTableData('get_sccpdevice_byid', array("id" => $val));
|
// $db_device = $this->dbinterface->getSccpDeviceTableData('get_sccpdevice_byid', array("id" => $val));
|
||||||
$max_buttons = $dev_schema[0]['buttons'];
|
$max_buttons = $dev_schema[0]['buttons'];
|
||||||
if (!empty($_REQUEST['addon'])) {
|
if (!empty($_REQUEST['addon'])) {
|
||||||
$val = $_REQUEST['addon'];
|
$val = $_REQUEST['addon'];
|
||||||
|
@ -49,7 +49,7 @@ if (!empty($_REQUEST['new_id'])) {
|
||||||
}
|
}
|
||||||
if (!empty($_REQUEST['ru_id'])) {
|
if (!empty($_REQUEST['ru_id'])) {
|
||||||
$dev_id = $_REQUEST['ru_id'];
|
$dev_id = $_REQUEST['ru_id'];
|
||||||
$db_buttons = $this->dbinterface->HWextension_db_SccpTableData('get_sccpdevice_buttons', array('id' => $dev_id));
|
$db_buttons = $this->dbinterface->getSccpDeviceTableData('get_sccpdevice_buttons', array('id' => $dev_id));
|
||||||
$show_buttons = $max_buttons;
|
$show_buttons = $max_buttons;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -649,19 +649,19 @@ foreach ($items as $child) {
|
||||||
}
|
}
|
||||||
if ($child['type'] == 'SDM') {
|
if ($child['type'] == 'SDM') {
|
||||||
if (empty($model_list)) {
|
if (empty($model_list)) {
|
||||||
$model_list = \FreePBX::Sccp_manager()->dbinterface->HWextension_db_SccpTableData("HWDevice");
|
$model_list = \FreePBX::Sccp_manager()->dbinterface->getSccpDeviceTableData("HWDevice");
|
||||||
}
|
}
|
||||||
$select_opt= $model_list;
|
$select_opt= $model_list;
|
||||||
}
|
}
|
||||||
if ($child['type'] == 'SDMS') {
|
if ($child['type'] == 'SDMS') {
|
||||||
if (empty($model_list)) {
|
if (empty($model_list)) {
|
||||||
$model_list = \FreePBX::Sccp_manager()->dbinterface->HWextension_db_SccpTableData("HWSipDevice");
|
$model_list = \FreePBX::Sccp_manager()->dbinterface->getSccpDeviceTableData("HWSipDevice");
|
||||||
}
|
}
|
||||||
$select_opt= $model_list;
|
$select_opt= $model_list;
|
||||||
}
|
}
|
||||||
if ($child['type'] == 'SDE') {
|
if ($child['type'] == 'SDE') {
|
||||||
if (empty($extension_list)) {
|
if (empty($extension_list)) {
|
||||||
$extension_list = \FreePBX::Sccp_manager()->dbinterface->HWextension_db_SccpTableData("HWextension");
|
$extension_list = \FreePBX::Sccp_manager()->dbinterface->getSccpDeviceTableData("HWextension");
|
||||||
$extension_list[]=array( 'model' => 'NONE', 'vendor' => 'CISCO', 'dns' => '0');
|
$extension_list[]=array( 'model' => 'NONE', 'vendor' => 'CISCO', 'dns' => '0');
|
||||||
foreach ($extension_list as &$data) {
|
foreach ($extension_list as &$data) {
|
||||||
$d_name = explode(';', $data['model']);
|
$d_name = explode(';', $data['model']);
|
||||||
|
@ -677,7 +677,7 @@ foreach ($items as $child) {
|
||||||
}
|
}
|
||||||
if ($child['type'] == 'SDD') {
|
if ($child['type'] == 'SDD') {
|
||||||
if (empty($device_list)) {
|
if (empty($device_list)) {
|
||||||
$device_list = \FreePBX::Sccp_manager()->dbinterface->HWextension_db_SccpTableData("SccpDevice");
|
$device_list = \FreePBX::Sccp_manager()->dbinterface->getSccpDeviceTableData("SccpDevice");
|
||||||
$device_list[]=array('name' => 'NONE', 'description' => 'No Device');
|
$device_list[]=array('name' => 'NONE', 'description' => 'No Device');
|
||||||
}
|
}
|
||||||
$select_opt = $device_list;
|
$select_opt = $device_list;
|
||||||
|
|
|
@ -16,7 +16,7 @@ $sccp_disalow = $sccp_disalow_def;
|
||||||
|
|
||||||
if (!empty($_REQUEST['id'])) {
|
if (!empty($_REQUEST['id'])) {
|
||||||
$dev_id = $_REQUEST['id'];
|
$dev_id = $_REQUEST['id'];
|
||||||
$db_res = $this->dbinterface->HWextension_db_SccpTableData('get_sccpdevice_byid', array("id" => $dev_id));
|
$db_res = $this->dbinterface->getSccpDeviceTableData('get_sccpdevice_byid', array("id" => $dev_id));
|
||||||
if (!empty($db_res['allow'])) {
|
if (!empty($db_res['allow'])) {
|
||||||
$i = 1;
|
$i = 1;
|
||||||
foreach (explode(';', $db_res['allow']) as $c) {
|
foreach (explode(';', $db_res['allow']) as $c) {
|
||||||
|
|
Loading…
Reference in a new issue