diff --git a/sccpManTraits/ajaxHelper.php b/sccpManTraits/ajaxHelper.php index 1985827..e6ba24d 100644 --- a/sccpManTraits/ajaxHelper.php +++ b/sccpManTraits/ajaxHelper.php @@ -499,6 +499,7 @@ trait ajaxHelper { } function saveSccpDevice($get_settings, $validateonly = false) { + dbug($get_settings); $hdr_prefix = 'sccp_hw_'; $hdr_arprefix = 'sccp_hw-ar_'; $hdr_vendPrefix = 'vendorconfig_'; diff --git a/sccpManTraits/bmoFunctions.php b/sccpManTraits/bmoFunctions.php index ed3c428..d2f7b49 100644 --- a/sccpManTraits/bmoFunctions.php +++ b/sccpManTraits/bmoFunctions.php @@ -42,6 +42,9 @@ trait bmoFunctions { return $dbDevices; //this may be empty } + //$testData = $this->aminterface->sccp_getdevice_info('SEP0019305DC7F4'); + //dbug($testData); + foreach ($dbDevices as &$dev_id) { if (!empty($activeDevices[$dev_id['name']])) { // Device is in db and is connected @@ -69,8 +72,12 @@ trait bmoFunctions { } $dev_schema = $this->getSccpModelInformation('byciscoid', false, "all", array('model' => $dev_data['SCCP_Vendor']['model_id'])); if (empty($dev_schema)) { - $dev_schema[0]['model'] = "ERROR in Model Schema"; + $dev_schema[0]['model'] = "Model ${dev_data['SCCP_Vendor']['model_id']} not found in model Database"; + } else if ( $dev_schema[0]['enabled' == 0]) { + // Need to enable this model in phone types + $this->dbinterface->write('sccpdevmodel', array('model'=> $dev_data['SCCP_Vendor']['model_id'], 'enabled = 1'), 'update' , 'model'); } + $dbDevices[] = array( 'name' => $id_name, 'mac' => $id_name, diff --git a/views/hardware.sphone.php b/views/hardware.sphone.php index eecc3ac..b9b97b2 100644 --- a/views/hardware.sphone.php +++ b/views/hardware.sphone.php @@ -31,7 +31,7 @@ - + @@ -76,7 +76,7 @@ } return exp_model; } - function LineFormatter(value, row, index) { + function SipLineFormatter(value, row, index) { if (value === null) { return '-- EMPTY --'; }