mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Remove redundant database instances (#7535)
This commit is contained in:
@@ -116,7 +116,6 @@
|
||||
$sql = "select ".implode(', ', $selected_columns)." from v_voicemails ";
|
||||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
$parameters['domain_uuid'] = $domain_uuid;
|
||||
$database = new database;
|
||||
$voicemails = $database->select($sql, $parameters, 'all');
|
||||
unset($sql, $parameters, $selected_columns);
|
||||
|
||||
|
||||
@@ -320,9 +320,6 @@
|
||||
if ($row_id === 1000) {
|
||||
|
||||
//save to the data
|
||||
$database = new database;
|
||||
$database->app_name = 'voicemails';
|
||||
$database->app_uuid = 'b523c2d2-64cd-46f1-9520-ca4b4098e044';
|
||||
$database->save($array);
|
||||
|
||||
//clear the array
|
||||
@@ -340,9 +337,6 @@
|
||||
|
||||
//save to the data
|
||||
if (!empty($array) && is_array($array)) {
|
||||
$database = new database;
|
||||
$database->app_name = 'voicemails';
|
||||
$database->app_uuid = 'b523c2d2-64cd-46f1-9520-ca4b4098e044';
|
||||
$database->save($array);
|
||||
unset($array);
|
||||
}
|
||||
|
||||
@@ -50,7 +50,6 @@
|
||||
$sql .= "and vm.domain_uuid = d.domain_uuid ";
|
||||
$parameters['voicemail_message_uuid'] = $_REQUEST["uuid"];
|
||||
$parameters['voicemail_uuid'] = $_REQUEST["voicemail_uuid"];
|
||||
$database = new database;
|
||||
$result = $database->select($sql, $parameters, 'row');
|
||||
if ($result !== false) {
|
||||
$domain_uuid = $result['domain_uuid'];
|
||||
|
||||
@@ -84,7 +84,6 @@
|
||||
$parameters['voicemail_uuid'] = $voicemail_uuid;
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$parameters['voicemail_message_uuid'] = $_GET['id'];
|
||||
$database = new database;
|
||||
$message_base64 = $database->select($sql, $parameters, 'column');
|
||||
if (!empty($message_base64)) {
|
||||
$message_decoded = base64_decode($message_base64);
|
||||
@@ -173,7 +172,6 @@
|
||||
$sql .= "and voicemail_id = :voicemail_id ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$parameters['voicemail_id'] = $voicemail_id;
|
||||
$database = new database;
|
||||
$selected_greeting_id = $database->select($sql, $parameters, 'column');
|
||||
unset($sql, $parameters);
|
||||
|
||||
@@ -187,7 +185,6 @@
|
||||
$sql .= "and voicemail_greeting_uuid = :voicemail_greeting_uuid ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$parameters['voicemail_greeting_uuid'] = $voicemail_greeting_uuid;
|
||||
$database = new database;
|
||||
$row = $database->select($sql, $parameters, 'row');
|
||||
if (!empty($row) && is_array($row) && @sizeof($row) != 0) {
|
||||
$greeting_filename = $row['greeting_filename'];
|
||||
|
||||
Reference in New Issue
Block a user