DB Update Bug fix

This commit is contained in:
PhantomVl 2018-10-31 17:26:58 +03:00
parent 12a7446019
commit b6a411f96e
2 changed files with 6 additions and 3 deletions

View file

@ -1463,7 +1463,7 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
function init_sccp_path() {
global $db;
global $amp_conf;
$driver_revision = array('0' => '', '430' => '.v431', '431' => '.v431');
$driver_revision = array('0' => '', '430' => '.v431', '431' => '.v432');
$confDir = $amp_conf["ASTETCDIR"];

View file

@ -34,7 +34,7 @@ class Sccp extends \FreePBX\modules\Core\Driver {
"prettyName" => _("Sccp Custom Driver"),
"shortName" => "SCCP",
"description" => _("Sccp Device"),
"Version" => "11.3.v431",
"Version" => "11.3.v432",
"about" => "Sccp mysql class Base ver: 11.3, Sccp ver: 431"
);
}
@ -91,7 +91,7 @@ class Sccp extends \FreePBX\modules\Core\Driver {
case 'secondary_dialtone_tone':
case 'dnd':
$sql .= ', '.$key;
if (!empty($settings[$val]['value'])){
if (!$this->is_my_blank($settings[$val]['value'])){
$sqlv .= ", '".$settings[$val]['value']."' ";
} else {
$sqlv .= ", NULL ";
@ -414,5 +414,8 @@ class Sccp extends \FreePBX\modules\Core\Driver {
'secret' => array('identifier' => _('Secret'), 'description' => sprintf(_('Secret [Enter "%s" to regenerate]'),"REGEN")),
);
}
public function is_my_blank($value) {
return empty($value) && !is_numeric($value);
}
}