DB Update Bug fix
This commit is contained in:
parent
12a7446019
commit
b6a411f96e
|
@ -1463,7 +1463,7 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
function init_sccp_path() {
|
function init_sccp_path() {
|
||||||
global $db;
|
global $db;
|
||||||
global $amp_conf;
|
global $amp_conf;
|
||||||
$driver_revision = array('0' => '', '430' => '.v431', '431' => '.v431');
|
$driver_revision = array('0' => '', '430' => '.v431', '431' => '.v432');
|
||||||
|
|
||||||
|
|
||||||
$confDir = $amp_conf["ASTETCDIR"];
|
$confDir = $amp_conf["ASTETCDIR"];
|
||||||
|
|
|
@ -34,7 +34,7 @@ class Sccp extends \FreePBX\modules\Core\Driver {
|
||||||
"prettyName" => _("Sccp Custom Driver"),
|
"prettyName" => _("Sccp Custom Driver"),
|
||||||
"shortName" => "SCCP",
|
"shortName" => "SCCP",
|
||||||
"description" => _("Sccp Device"),
|
"description" => _("Sccp Device"),
|
||||||
"Version" => "11.3.v431",
|
"Version" => "11.3.v432",
|
||||||
"about" => "Sccp mysql class Base ver: 11.3, Sccp ver: 431"
|
"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 'secondary_dialtone_tone':
|
||||||
case 'dnd':
|
case 'dnd':
|
||||||
$sql .= ', '.$key;
|
$sql .= ', '.$key;
|
||||||
if (!empty($settings[$val]['value'])){
|
if (!$this->is_my_blank($settings[$val]['value'])){
|
||||||
$sqlv .= ", '".$settings[$val]['value']."' ";
|
$sqlv .= ", '".$settings[$val]['value']."' ";
|
||||||
} else {
|
} else {
|
||||||
$sqlv .= ", NULL ";
|
$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")),
|
'secret' => array('identifier' => _('Secret'), 'description' => sprintf(_('Secret [Enter "%s" to regenerate]'),"REGEN")),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
public function is_my_blank($value) {
|
||||||
|
return empty($value) && !is_numeric($value);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue