Merge pull request #1018 from moteus/number_alias_as_vm_id
Change. Use number_alias as voicemail_id.
This commit is contained in:
commit
81003e35d8
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -284,8 +284,8 @@
|
|||
--get the voicemail from the database
|
||||
if (continue) then
|
||||
vm_enabled = "true";
|
||||
if tonumber(user) == nil then
|
||||
sql = "SELECT * FROM v_voicemails WHERE domain_uuid = '" .. domain_uuid .. "' and voicemail_id = '" .. number_alias .. "' ";
|
||||
if number_alias and #number_alias > 0 then
|
||||
sql = "SELECT * FROM v_voicemails WHERE domain_uuid = '" .. domain_uuid .. "' and voicemail_id = '" .. number_alias .. "' ";
|
||||
else
|
||||
sql = "SELECT * FROM v_voicemails WHERE domain_uuid = '" .. domain_uuid .. "' and voicemail_id = '" .. user .. "' ";
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue