diff --git a/Sccp_manager.class.php b/Sccp_manager.class.php
index e3ab66d..e338ab9 100644
--- a/Sccp_manager.class.php
+++ b/Sccp_manager.class.php
@@ -30,6 +30,7 @@
* + Change internal use Field to _Field (new feature in chan_sccp (added for Sccp_manager))
* + Delete phone XML
* + Change Installer ?? (test )
+ * - Bootstrap encodeURI(row['type']) ???????
* + SRST Config
* - Failover config
* + Auto Addons!
@@ -764,15 +765,17 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
$id_name = $dev_ids['name'];
if (empty($dev_ids['news'])) {
$dev_data = $this->srvinterface->sccp_getdevice_info($id_name);
+ if (!empty($dev_data['SCCP_Vendor']['model_id'])) {
// $dev_data = $this->sccp_getdevice_info($id_name);
- $dev_addon= $dev_data['SCCP_Vendor']['model_addon'];
- if (empty($dev_addon)) {
- $dev_addon = null;
+ $dev_addon= $dev_data['SCCP_Vendor']['model_addon'];
+ if (empty($dev_addon)) {
+ $dev_addon = null;
+ }
+ $dev_schema = $this-> getSccp_model_information('byciscoid', false, "all", array('model' =>$dev_data['SCCP_Vendor']['model_id']));
+ $result[] = array('name' => $id_name, 'mac' => $id_name, 'button' => '---', 'type' => $dev_schema[0]['model'], 'new_hw' => 'Y',
+ 'description' => '*NEW* '.$dev_ids['descr'], 'status' => '*NEW* '.$dev_ids['status'], 'address' => $dev_ids['address'],
+ 'addon' => $dev_addon);
}
- $dev_schema = $this-> getSccp_model_information('byciscoid', false, "all", array('model' =>$dev_data['SCCP_Vendor']['model_id']));
- $result[] = array('name' => $id_name, 'mac' => $id_name, 'button' => '---', 'type' => $dev_schema[0]['model'], 'new_hw' => 'Y',
- 'description' => '*NEW* '.$dev_ids['descr'], 'status' => '*NEW* '.$dev_ids['status'], 'address' => $dev_ids['address'],
- 'addon' => $dev_addon);
}
}
@@ -878,7 +881,7 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
$lines_list = $this->dbinterface->get_db_SccpTableData('SccpExtension');
$max_btn = ((!empty($get_settings['butonscount']) ? $get_settings['butonscount'] : 100));
$last_btn = $max_btn;
- for ($it = $max_btn; $it >0; $it--) {
+ for ($it = $max_btn; $it >=0; $it--) {
if (!empty($get_settings['button' . $it . '_type'])) {
$last_btn = $it;
$btn_t = $get_settings['button' . $it . '_type'];
@@ -950,12 +953,17 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
break;
case 'line':
case 'silent':
- $btn_n = (string) $get_settings['button' . $it . '_line'];
- if ($it > 0) {
- if ($btn_t == 'silent') {
- $btn_n .= '!silent';
- $btn_t = 'line';
+ if (isset($get_settings['button' . $it . '_line'])) {
+ $btn_n = (string) $get_settings['button' . $it . '_line'];
+ if ($it > 0) {
+ if ($btn_t == 'silent') {
+ $btn_n .= '!silent';
+ $btn_t = 'line';
+ }
}
+ } else {
+ $btn_t = 'empty';
+ $btn_n = '';
}
break;
case 'empty':
diff --git a/Sccp_manager.inc/dbinterface.class.php b/Sccp_manager.inc/dbinterface.class.php
index 89c62f7..affd81a 100644
--- a/Sccp_manager.inc/dbinterface.class.php
+++ b/Sccp_manager.inc/dbinterface.class.php
@@ -93,7 +93,7 @@ class dbinterface {
if (!empty($filter)) {
if (!empty($filter['model'])) {
if (strpos($filter['model'],'loadInformation')) {
- $sql = "SELECT " . $sel_inf . " FROM sccpdevmodel WHERE (`loadinformationid` =" . $filter['model'] . ") ORDER BY model ";
+ $sql = "SELECT " . $sel_inf . " FROM sccpdevmodel WHERE (`loadinformationid` ='" . $filter['model'] . "') ORDER BY model ";
} else {
$sql = "SELECT " . $sel_inf . " FROM sccpdevmodel WHERE (`loadinformationid` ='loadInformation" . $filter['model'] . "') ORDER BY model ";
}
@@ -107,7 +107,7 @@ class dbinterface {
case "byid":
if (!empty($filter)) {
if (!empty($filter['model'])) {
- $sql = "SELECT " . $sel_inf . " FROM sccpdevmodel WHERE (`model` =" . $filter['model'] . ") ORDER BY model ";
+ $sql = "SELECT " . $sel_inf . " FROM sccpdevmodel WHERE (`model` ='" . $filter['model'] . "') ORDER BY model ";
} else {
// $sql = "SELECT ".$filter['model'];
$sql = "SELECT " . $sel_inf . " FROM sccpdevmodel ORDER BY model ";
diff --git a/Sccp_manager.inc/srvinterface.class.php b/Sccp_manager.inc/srvinterface.class.php
index ba716fd..9e0cf28 100644
--- a/Sccp_manager.inc/srvinterface.class.php
+++ b/Sccp_manager.inc/srvinterface.class.php
@@ -89,12 +89,18 @@ class srvinterface {
}
$res1 = $res3['Skinny_Phone_Type'];
+ $res4 = $res3['Config_Phone_Type'];
if (!empty($res3['Addons'])) {
$res2 = $res3['Addons'];
} else {
$res2 = '';
}
$res3['SCCP_Vendor']= Array('vendor' => strtok($res1,' '),'model' => strtok('('), 'model_id' => strtok(')'), 'vendor_addon' => strtok($res2,' '), 'model_addon' => strtok(' '));
+ if (empty($res3['SCCP_Vendor']['vendor']) || $res3['SCCP_Vendor']['vendor']=='Undefined'){
+ $res3['SCCP_Vendor']= Array('vendor' => 'Undefined','model' => $res4, 'model_id' => '', 'vendor_addon' => $res3['SCCP_Vendor']['vendor_addon'], 'model_addon' => $res3['SCCP_Vendor']['model_addon']);
+// return $res4;
+// return array();
+ }
return $res3;
} else {
return array();
diff --git a/assets/js/sccp_manager.js b/assets/js/sccp_manager.js
index ea56346..272c3fb 100644
--- a/assets/js/sccp_manager.js
+++ b/assets/js/sccp_manager.js
@@ -284,8 +284,8 @@ $(document).ready(function () {
// var btn_add=$('#sccp_hw_addon').find(':selected').data('val');
if (type_id === 1) {
- if ($('#sccp_hw_addon').val() !== 'none') {
- $('#sccp_hw_addon').val('none').change();
+ if ($('#sccp_hw_addon').val() !== 'NONE') {
+ $('#sccp_hw_addon').val('NONE').change();
}
$('#sccp_hw_addon').attr("disabled", "disabled");
diff --git a/conf/Sccp.class.php b/conf/Sccp.class.php
index af13a09..7eff4be 100644
--- a/conf/Sccp.class.php
+++ b/conf/Sccp.class.php
@@ -22,7 +22,8 @@ class Sccp extends \FreePBX\modules\Core\Driver {
"prettyName" => _("Sccp Custom Driver"),
"shortName" => "SCCP",
"description" => _("Sccp Device"),
- "sccp_driver_ver" => "11.2"
+ "sccp_driver_ver" => "11.2",
+ "about" => "Sccp mysql class Base ver: 11.2, Sccp ver: default"
);
}
diff --git a/conf/Sccp.class.php.v431 b/conf/Sccp.class.php.v431
index 59be00e..a5abfbd 100644
--- a/conf/Sccp.class.php.v431
+++ b/conf/Sccp.class.php.v431
@@ -29,7 +29,8 @@ class Sccp extends \FreePBX\modules\Core\Driver {
"prettyName" => _("Sccp Custom Driver"),
"shortName" => "SCCP",
"description" => _("Sccp Device"),
- "sccp_driver_ver" => "11.2"
+ "sccp_driver_ver" => "11.2",
+ "about" => "Sccp mysql class Base ver: 11.2, Sccp ver: 431"
);
}
public function addDevice1($id, $settings) {
diff --git a/conf/sccpgeneral.xml b/conf/sccpgeneral.xml
index d2cc65a..8ee1c21 100644
--- a/conf/sccpgeneral.xml
+++ b/conf/sccpgeneral.xml
@@ -27,6 +27,13 @@ and open the template in the editor. Base Version before all crash :-)
Help.
+ -
+
+ sccp_xml_about
+ XML Base ver: 11.2, Sccp ver: default
+
+ Help.
+
diff --git a/conf/sccpgeneral.xml.v431 b/conf/sccpgeneral.xml.v431
index 0ec23c1..ca8c345 100644
--- a/conf/sccpgeneral.xml.v431
+++ b/conf/sccpgeneral.xml.v431
@@ -27,6 +27,13 @@ and open the template in the editor. Base Version before all crash :-)
Help.
+ -
+
+ sccp_xml_about
+ XML Base ver: 11.2, Sccp ver: 431
+
+ Help.
+
diff --git a/views/formShow.php b/views/formShow.php
index 3fec33b..179185d 100644
--- a/views/formShow.php
+++ b/views/formShow.php
@@ -58,7 +58,7 @@ $sofkey_list = \FreePBX::Sccp_manager()-> srvinterface -> sccp_list_keysets();
$model_list = \FreePBX::Sccp_manager()->dbinterface->get_db_SccpTableData("HWDevice");
$extension_list = \FreePBX::Sccp_manager()->dbinterface->get_db_SccpTableData("HWextension");
-$extension_list[]=array(model=>'none', vendor=>'CISCO', dns=>'0');
+$extension_list[]=array(model=>'NONE', vendor=>'CISCO', dns=>'0');
$items = $itm -> children();
diff --git a/views/server.setting.php b/views/server.setting.php
index 46329f5..61efd64 100644
--- a/views/server.setting.php
+++ b/views/server.setting.php
@@ -5,15 +5,12 @@
* and open the template in the editor.
*/
// vim: set ai ts=4 sw=4 ft=phtml:
-// print_r($this->sccpvalues['sccp_compatible']);
-// print_r($this->sccpvalues);
-// $id_name = 'SEP000A8A5C5F25';
-// print_r($this->srvinterface->getChanSCCPVersion());
-// print_r('
');
+// print_r($this->sccpvalues['sccp_compatible']);
+// print_r($this->sccpvalues);
// print_r($this->srvinterface->getCoreSCCPVersion());
-// $lang_arr = $this->extconfigs->getextConfig('sccp_lang','sk_SK');
+// $lang_arr = $this->extconfigs->getextConfig('sccp_lang','sk_SK');
// print_r('
');
-// print_r(timezone_identifiers_list());
+// print_r(timezone_identifiers_list());
// print_r('
');
?>