mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Remove redundant database objects
This reduces database connections and improves performance.
This commit is contained in:
@@ -27,7 +27,6 @@
|
||||
if ($domains_processed == 1) {
|
||||
|
||||
//create a view for call block
|
||||
$database = new database;
|
||||
$database->execute("DROP VIEW view_call_block;", null);
|
||||
$sql = "CREATE VIEW view_call_block AS ( \n";
|
||||
$sql .= " select c.domain_uuid, call_block_uuid, c.call_block_direction, c.extension_uuid, c.call_block_name, c.call_block_country_code, \n";
|
||||
@@ -37,13 +36,11 @@ if ($domains_processed == 1) {
|
||||
$sql .= " left join v_extensions as e \n";
|
||||
$sql .= " on c.extension_uuid = e.extension_uuid \n";
|
||||
$sql .= "); \n";
|
||||
$database = new database;
|
||||
$database->execute($sql, null);
|
||||
unset($sql);
|
||||
|
||||
//set call blocks to inbound if no direction defined
|
||||
$sql = "update v_call_block set call_block_direction = 'inbound' where call_block_direction is null ";
|
||||
$database = new database;
|
||||
$database->execute($sql, null);
|
||||
unset($sql);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user