From b753482898c2014d62d8004f609cc63a77466031 Mon Sep 17 00:00:00 2001
From: steve-lad <72376554+steve-lad@users.noreply.github.com>
Date: Thu, 29 Jul 2021 08:43:40 +0200
Subject: [PATCH] Correct defaults after db schema change
---
assets/js/sccp_manager.js | 3 ---
conf/sccpgeneral.xml.v433 | 1 -
views/form.adddevice.php | 9 +--------
3 files changed, 1 insertion(+), 12 deletions(-)
diff --git a/assets/js/sccp_manager.js b/assets/js/sccp_manager.js
index 2c4e67b..ef3ccb7 100644
--- a/assets/js/sccp_manager.js
+++ b/assets/js/sccp_manager.js
@@ -284,8 +284,6 @@ $(document).ready(function () {
// console.log('HwSelect');
var type_id = $('#sccp_hw_type').find(':selected').data('id');
var btn_dev = $('#sccp_hw_type').find(':selected').data('val');
-// 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();
@@ -305,7 +303,6 @@ $(document).ready(function () {
$(this).addClass('hidden');
}
});
-
});
$('.lineSelect').change(function (e) {
diff --git a/conf/sccpgeneral.xml.v433 b/conf/sccpgeneral.xml.v433
index 99289d6..3a1d5c9 100644
--- a/conf/sccpgeneral.xml.v433
+++ b/conf/sccpgeneral.xml.v433
@@ -1304,7 +1304,6 @@ and open the template in the editor. Base Version before all crash :-)
addon
NONE
sccp-custom
-
Addon: Addons are model specific and only work with certain base phones. This phone model is identified as being a phone that does not accept sidecars. Update devmodel if this is not correct.
diff --git a/views/form.adddevice.php b/views/form.adddevice.php
index 8468c79..186d9e2 100644
--- a/views/form.adddevice.php
+++ b/views/form.adddevice.php
@@ -69,20 +69,14 @@ if (!empty($_REQUEST['id'])) {
$val = implode('.', sscanf($val, '%4s%4s%4s')); // Convert to Cisco display Format
$def_val[$key] = array("keyword" => $key, "data" => $val, "seq" => "99");
break;
- case '_hwlang':
- $tmpar = explode(":", $val);
- $def_val['netlang'] = array("keyword" => 'netlang', "data" => $tmpar[0], "seq" => "99");
- $def_val['devlang'] = array("keyword" => 'devlang', "data" => $tmpar[1], "seq" => "99");
- break;
// case 'permit':
// case 'deny':
// $def_val[$key . '_net'] = array("keyword" => $key, "data" => before('/', $val), "seq" => "99");
// $key = $key . '_mask';
// $val = after('/', $val);
// break;
- case '_phonepersonalization':
+ case 'phonepersonalization':
$def_val['phonepersonalization'] = array("keyword" => 'phonepersonalization', "data" => $val, "seq" => "99");
-
default:
// Overwrite existing defaults after checking that data is still valid after schema updates
// Do not strip underscores as these fields are new in the schema and so should be valid.
@@ -104,7 +98,6 @@ if (!empty($_REQUEST['id'])) {
}
}
}
-
}
if (!empty($device_warning)) {