mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Remove redundant database instances (#7535)
This commit is contained in:
@@ -38,9 +38,6 @@
|
||||
exit;
|
||||
}
|
||||
|
||||
//initialize the database object
|
||||
$database = new database;
|
||||
|
||||
//add multi-lingual support
|
||||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
@@ -314,9 +314,6 @@
|
||||
//process a chunk of the array
|
||||
if ($row_id === 1000) {
|
||||
//save to the data
|
||||
$database = new database;
|
||||
$database->app_name = 'access_controls';
|
||||
$database->app_uuid = '1416a250-f6e1-4edc-91a6-5c9b883638fd';
|
||||
$database->save($array);
|
||||
|
||||
//clear the array
|
||||
@@ -337,9 +334,6 @@
|
||||
|
||||
//save to the data
|
||||
if (!empty($array)) {
|
||||
$database = new database;
|
||||
$database->app_name = 'access_controls';
|
||||
$database->app_uuid = '1416a250-f6e1-4edc-91a6-5c9b883638fd';
|
||||
$database->save($array);
|
||||
unset($array);
|
||||
}
|
||||
|
||||
@@ -76,11 +76,6 @@
|
||||
$x++;
|
||||
}
|
||||
|
||||
//prepare the database object
|
||||
$database = new database;
|
||||
$database->app_name = 'access_controls';
|
||||
$database->app_uuid = '1416a250-f6e1-4edc-91a6-5c9b883638fd';
|
||||
|
||||
//send the array to the database class
|
||||
switch ($action) {
|
||||
case 'copy':
|
||||
@@ -125,7 +120,6 @@
|
||||
$sql .= " or lower(access_control_description) like :search ";
|
||||
$sql .= ") ";
|
||||
}
|
||||
$database = new database;
|
||||
$num_rows = $database->select($sql, $parameters ?? null, 'column');
|
||||
|
||||
//get the list
|
||||
@@ -143,7 +137,6 @@
|
||||
$sql .= ") ";
|
||||
}
|
||||
$sql .= order_by($order_by, $order, 'access_control_name', 'asc');
|
||||
$database = new database;
|
||||
$access_controls = $database->select($sql, $parameters ?? null, 'all');
|
||||
unset($sql, $parameters);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user