mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Update destination_context type inbound use public by default
Update the destination_context if the type is inbound and context is empty, then use public.
This commit is contained in:
@@ -50,6 +50,20 @@ if ($domains_processed == 1) {
|
||||
}
|
||||
unset($extensions, $row, $array);
|
||||
|
||||
//update destination_context if type is inbound and context is empty then use public
|
||||
$sql = "select count(destination_uuid) as count from v_destinations ";
|
||||
$sql .= "where destination_context is null ";
|
||||
$sql .= "and destination_type = 'inbound' ";
|
||||
$destination_count = $database->select($sql, null, 'column');
|
||||
if ($destination_count > 0) {
|
||||
$sql = "update v_destinations ";
|
||||
$sql .= "set destination_context = 'public' ";
|
||||
$sql .= "where destination_context is null ";
|
||||
$sql .= "and destination_type = 'inbound' ";
|
||||
$database->execute($sql, null);
|
||||
unset($sql, $parameters);
|
||||
}
|
||||
|
||||
//update destinations actions
|
||||
$sql = "select * from v_destinations ";
|
||||
$sql .= "where destination_actions is null ";
|
||||
|
||||
Reference in New Issue
Block a user