mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Remove the unset($database) statements (#7084)
* Remove the unset($database) statements The database object is a global variable that contains a database object reference and should not be unset. * Update event_guard.php * Update event_guard.php * Update event_guard.php --------- Co-authored-by: Tim Fry <tim@fusionpbx.com> Co-authored-by: FusionPBX <markjcrane@gmail.com>
This commit is contained in:
@@ -38,6 +38,9 @@
|
||||
exit;
|
||||
}
|
||||
|
||||
//connect to database
|
||||
$database = database::new();
|
||||
|
||||
//add multi-lingual support
|
||||
$language = new text;
|
||||
$text = $language->get();
|
||||
@@ -78,7 +81,6 @@
|
||||
|
||||
//prepare to page the results
|
||||
$sql = "select count(*) from v_databases ";
|
||||
$database = new database;
|
||||
$num_rows = $database->select($sql, null, 'column');
|
||||
|
||||
//prepare to page the results
|
||||
@@ -92,7 +94,6 @@
|
||||
$sql = str_replace('count(*)', '*', $sql);
|
||||
$sql .= order_by($order_by, $order);
|
||||
$sql .= limit_offset($rows_per_page, $offset);
|
||||
$database = new database;
|
||||
$databases = $database->select($sql, null, 'all');
|
||||
unset($sql);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user