Fix dndFeature setting not saved
dndFeature setting was not saved check for existence of chan-sccp flags add helper to list chan-sccp flags fix version compatibility check update version to 14.3.0.19
This commit is contained in:
parent
1489968b9e
commit
0bc2eed76b
|
@ -1452,7 +1452,7 @@ and open the template in the editor. Base Version before all crash :-)
|
||||||
<help>Activate the callforward NOANSWER stuff and softkeys. Default is On</help>
|
<help>Activate the callforward NOANSWER stuff and softkeys. Default is On</help>
|
||||||
</item>
|
</item>
|
||||||
<item type="IS" id="5" seq="99">
|
<item type="IS" id="5" seq="99">
|
||||||
<name>dnd</name>
|
<name>dndFeature</name>
|
||||||
<label>DND Button on Device</label>
|
<label>DND Button on Device</label>
|
||||||
<default>off</default>
|
<default>off</default>
|
||||||
<button value="on">On</button>
|
<button value="on">On</button>
|
||||||
|
|
|
@ -1109,11 +1109,13 @@ function cleanUpSccpSettings() {
|
||||||
|
|
||||||
// get chan-sccp defaults
|
// get chan-sccp defaults
|
||||||
|
|
||||||
foreach (array('general','line', 'device') as $section) {
|
foreach (array('general','device','line') as $section) {
|
||||||
$sysConfig = $aminterface->getSCCPConfigMetaData($section);
|
$sysConfig = $aminterface->getSCCPConfigMetaData($section);
|
||||||
foreach ($sysConfig['Options'] as $valueArray) {
|
foreach ($sysConfig['Options'] as $valueArray) {
|
||||||
if ($valueArray['Flags'][0] == 'Obsolete' || $valueArray['Flags'][0] == 'Deprecated') {
|
if (isset($valueArray['Flags'])) {
|
||||||
continue;
|
if ($valueArray['Flags'][0] == 'Obsolete' || $valueArray['Flags'][0] == 'Deprecated') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (isset($sysConfiguration[$valueArray['Name']])) {
|
if (isset($sysConfiguration[$valueArray['Name']])) {
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<module>
|
<module>
|
||||||
<rawname>sccp_manager</rawname>
|
<rawname>sccp_manager</rawname>
|
||||||
<name>SCCP Manager</name>
|
<name>SCCP Manager</name>
|
||||||
<version>14.3.0.18</version>
|
<version>14.3.0.19</version>
|
||||||
<type>setup</type>
|
<type>setup</type>
|
||||||
<category>SCCP Connectivity</category>
|
<category>SCCP Connectivity</category>
|
||||||
<publisher>Steve Lad, Alex GP</publisher>
|
<publisher>Steve Lad, Alex GP</publisher>
|
||||||
|
|
|
@ -444,10 +444,9 @@ class aminterface
|
||||||
//Initialise result array
|
//Initialise result array
|
||||||
$result = array( 'RevisionHash' => '', 'vCode' => 0, 'RevisionNum' => 0, 'buildInfo' => '', 'Version' => 0);
|
$result = array( 'RevisionHash' => '', 'vCode' => 0, 'RevisionNum' => 0, 'buildInfo' => '', 'Version' => 0);
|
||||||
$metadata = $this->getSCCPConfigMetaData();
|
$metadata = $this->getSCCPConfigMetaData();
|
||||||
|
|
||||||
if (isset($metadata['Version'])) {
|
if (isset($metadata['Version'])) {
|
||||||
$result['Version'] = $metadata['Version'];
|
$result['Version'] = $metadata['Version'];
|
||||||
$version_parts = explode('.', $metadata['Version']);
|
$version_parts = array_map('intval',explode('.', $metadata['Version']));
|
||||||
if ($version_parts[0] === 4) {
|
if ($version_parts[0] === 4) {
|
||||||
switch ($version_parts[1]) {
|
switch ($version_parts[1]) {
|
||||||
case 1:
|
case 1:
|
||||||
|
@ -456,9 +455,9 @@ class aminterface
|
||||||
case 2:
|
case 2:
|
||||||
$result['vCode'] = 420;
|
$result['vCode'] = 420;
|
||||||
break;
|
break;
|
||||||
case 3. . .5:
|
case 3:
|
||||||
$result['vCode'] = 430;
|
$result['vCode'] = 430;
|
||||||
if($version_parts[2] == 3){
|
if($version_parts[2] >= 3){
|
||||||
$result['vCode'] = 433;
|
$result['vCode'] = 433;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -265,6 +265,15 @@ trait helperfunctions {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getChanSccpSettings() {
|
||||||
|
// This is a utility function for debug only, and is not used by core code
|
||||||
|
foreach (array('general','line', 'device') as $section) {
|
||||||
|
$sysConfig = $this->aminterface->getSCCPConfigMetaData($section);
|
||||||
|
dbug($sysConfig);
|
||||||
|
}
|
||||||
|
unset($sysConfig);
|
||||||
|
}
|
||||||
|
|
||||||
public function initVarfromXml() {
|
public function initVarfromXml() {
|
||||||
if ((array) $this->xml_data) {
|
if ((array) $this->xml_data) {
|
||||||
foreach ($this->xml_data->xpath('//page_group') as $item) {
|
foreach ($this->xml_data->xpath('//page_group') as $item) {
|
||||||
|
|
Loading…
Reference in a new issue