Change. Use number_alias as voicemail_id.
This commit is contained in:
parent
c4f1221015
commit
cdc4b670d2
|
|
@ -176,11 +176,11 @@ else {
|
|||
//get the voicemails
|
||||
$sql = "select * from v_voicemails ";
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
if (is_numeric($extension)) {
|
||||
$sql .= "and voicemail_id = '$extension' ";
|
||||
if (is_numeric($number_alias)) {
|
||||
$sql .= "and voicemail_id = '$number_alias' ";
|
||||
}
|
||||
else {
|
||||
$sql .= "and voicemail_id = '$number_alias' ";
|
||||
$sql .= "and voicemail_id = '$extension' ";
|
||||
}
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
|
|
|
|||
|
|
@ -849,7 +849,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
//get the voicemails
|
||||
$sql = "select * from v_voicemails ";
|
||||
$sql .= "where domain_uuid = '".$domain_uuid."' ";
|
||||
$sql .= "and voicemail_id = '".((is_numeric($extension)) ? $extension : $number_alias)."' ";
|
||||
$sql .= "and voicemail_id = '".((is_numeric($number_alias)) ? $number_alias : $extension)."' ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
|
|
|
|||
|
|
@ -91,11 +91,11 @@
|
|||
public function voicemail() {
|
||||
|
||||
//determine the voicemail_id
|
||||
if (is_numeric($this->extension)) {
|
||||
$this->voicemail_id = $this->extension;
|
||||
if (is_numeric($this->number_alias)) {
|
||||
$this->voicemail_id = $this->number_alias;
|
||||
}
|
||||
else {
|
||||
$this->voicemail_id = $this->number_alias;
|
||||
$this->voicemail_id = $this->extension;
|
||||
}
|
||||
|
||||
//update the voicemail settings
|
||||
|
|
|
|||
|
|
@ -134,11 +134,11 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
$sql = "update v_voicemails set ";
|
||||
$sql .= "voicemail_password = '$vm_password' ";
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
if (is_numeric($extension)) {
|
||||
$sql .= "and voicemail_id = '$extension'";
|
||||
if (is_numeric($number_alias)) {
|
||||
$sql .= "and voicemail_id = '$number_alias'";
|
||||
}
|
||||
else {
|
||||
$sql .= "and voicemail_id = '$number_alias'";
|
||||
$sql .= "and voicemail_id = '$extension'";
|
||||
}
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
|
|
@ -181,11 +181,11 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
//get the voicemail data
|
||||
$sql = "select * from v_voicemails ";
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
if (is_numeric($extension)) {
|
||||
$sql .= "and voicemail_id = '$extension' ";
|
||||
if (is_numeric($number_alias)) {
|
||||
$sql .= "and voicemail_id = '$number_alias' ";
|
||||
}
|
||||
else {
|
||||
$sql .= "and voicemail_id = '$number_alias' ";
|
||||
$sql .= "and voicemail_id = '$extension' ";
|
||||
}
|
||||
//$sql .= "and voicemail_enabled = 'true' ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
|
|
|
|||
Loading…
Reference in New Issue