diff --git a/app/destinations/app_defaults.php b/app/destinations/app_defaults.php index 02f255d69f..7d6fa9a635 100644 --- a/app/destinations/app_defaults.php +++ b/app/destinations/app_defaults.php @@ -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 ";