Correct string quoting
String quoting was incompatible with PHP 7
This commit is contained in:
parent
594367cbd4
commit
bd257cec9b
|
@ -6,14 +6,14 @@
|
||||||
* and open the template in the editor.
|
* and open the template in the editor.
|
||||||
*/
|
*/
|
||||||
$forminfo =array(
|
$forminfo =array(
|
||||||
array("name"=>"dev_buttons",label=>"Buttons Configuration"),
|
array('name'=>'dev_buttons','label'=>'Buttons Configuration'),
|
||||||
array("name"=>"button",label=>"Buttons ",help=>"help.")
|
array('name'=>'button','label'=>'Buttons','help'=>'help')
|
||||||
);
|
);
|
||||||
//$buttons_type= array("empty","line","service","feature","speeddial");
|
//$buttons_type= array("empty","line","service","feature","speeddial");
|
||||||
// "feature","service" -- Add leter !
|
// "feature","service" -- Add leter !
|
||||||
//$buttons_type= array("empty","line","silent","monitor","speeddial","feature","adv.line");
|
//$buttons_type= array("empty","line","silent","monitor","speeddial","feature","adv.line");
|
||||||
$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->HWextension_db_SccpTableData('SccpExtension');
|
||||||
$lines_list = $this->sipconfigs->get_db_sip_TableData('Device');
|
$lines_list = $this->sipconfigs->get_db_sip_TableData('Device');
|
||||||
|
@ -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->HWextension_db_SccpTableData('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->HWextension_db_SccpTableData('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'];
|
||||||
|
@ -37,19 +37,19 @@ 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->HWextension_db_SccpTableData('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'];
|
||||||
$dev_schema = $this-> getSccpModelInformation('byid', false, "all", array('model' =>$val));
|
$dev_schema = $this-> getSccpModelInformation('byid', false, 'all', array('model' =>$val));
|
||||||
$max_buttons += $dev_schema[0]['buttons'];
|
$max_buttons += $dev_schema[0]['buttons'];
|
||||||
}
|
}
|
||||||
$show_buttons = $max_buttons;
|
$show_buttons = $max_buttons;
|
||||||
}
|
}
|
||||||
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->HWextension_db_SccpTableData('get_sccpdevice_buttons', array('id' => $dev_id));
|
||||||
$show_buttons = $max_buttons;
|
$show_buttons = $max_buttons;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,8 +90,8 @@ if (!empty($_REQUEST['ru_id'])) {
|
||||||
for ($line_id = 0; $line_id <=$max_buttons; $line_id ++) {
|
for ($line_id = 0; $line_id <=$max_buttons; $line_id ++) {
|
||||||
// print_r($db_buttons[$line_id]);
|
// print_r($db_buttons[$line_id]);
|
||||||
$show_form_mode = '';
|
$show_form_mode = '';
|
||||||
$defaul_tv = (empty($db_buttons[$line_id])) ? "empty": $db_buttons[$line_id]['buttontype'];
|
$defaul_tv = (empty($db_buttons[$line_id])) ? 'empty': $db_buttons[$line_id]['buttontype'];
|
||||||
$defaul_btn = (empty($db_buttons[$line_id])) ? "": $db_buttons[$line_id]['name'];
|
$defaul_btn = (empty($db_buttons[$line_id])) ? '': $db_buttons[$line_id]['name'];
|
||||||
$defaul_opt = (empty($db_buttons[$line_id])) ? array(''): explode(',', $db_buttons[$line_id]['options']);
|
$defaul_opt = (empty($db_buttons[$line_id])) ? array(''): explode(',', $db_buttons[$line_id]['options']);
|
||||||
|
|
||||||
$show_form_mode = $defaul_tv;
|
$show_form_mode = $defaul_tv;
|
||||||
|
|
Loading…
Reference in a new issue