Update call_block_edit.php
This commit is contained in:
parent
618f01d8fa
commit
1dd99599ac
|
|
@ -151,6 +151,12 @@
|
|||
}
|
||||
}
|
||||
|
||||
//if user doesn't have call block all then use the assigned extension_uuid
|
||||
if (!permission_exists('call_block_all')) {
|
||||
$extension_uuid = $_SESSION['user']['extension'][0]['extension_uuid'];
|
||||
}
|
||||
|
||||
//save the data to the database
|
||||
if ($action == "add") {
|
||||
$array['call_block'][0]['call_block_uuid'] = uuid();
|
||||
$array['call_block'][0]['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
|
|
@ -177,7 +183,6 @@
|
|||
header("Location: call_block.php");
|
||||
return;
|
||||
}
|
||||
|
||||
if ($action == "update") {
|
||||
$sql = "select c.call_block_number, d.domain_name ";
|
||||
$sql .= "from v_call_block as c ";
|
||||
|
|
@ -248,6 +253,7 @@
|
|||
}
|
||||
|
||||
//get the extensions
|
||||
if (permission_exists('call_block_all')) {
|
||||
$sql = "select extension_uuid, extension, number_alias, user_context, description from v_extensions ";
|
||||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
$sql .= "and enabled = 'true' ";
|
||||
|
|
@ -255,6 +261,7 @@
|
|||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$database = new database;
|
||||
$extensions = $database->select($sql, $parameters);
|
||||
}
|
||||
|
||||
//get the extensions
|
||||
$sql = "select voicemail_uuid, voicemail_id, voicemail_description ";
|
||||
|
|
|
|||
Loading…
Reference in New Issue