mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Re-use the Database connection
This commit is contained in:
@@ -36,6 +36,9 @@
|
||||
return;
|
||||
}
|
||||
|
||||
//connect to the database
|
||||
$database = new database;
|
||||
|
||||
//add multi-lingual support
|
||||
$language = new text;
|
||||
$text = $language->get();
|
||||
@@ -58,7 +61,6 @@ if (count($_GET)>0) {
|
||||
$sql .= "and menu_order = :menu_order ";
|
||||
$parameters['domain_uuid'] = $domain_uuid;
|
||||
$parameters['menu_order'] = $menu_order - 1;
|
||||
$database = new database;
|
||||
$database->app_name = 'menu';
|
||||
$database->app_uuid = 'f4b3b3d2-6287-489c-2a00-64529e46f2d7';
|
||||
$database->execute($sql, $parameters);
|
||||
@@ -71,7 +73,6 @@ if (count($_GET)>0) {
|
||||
$sql .= "and menu_item_id = :menu_item_id ";
|
||||
$parameters['domain_uuid'] = $domain_uuid;
|
||||
$parameters['menu_item_id'] = $menu_item_id;
|
||||
$database = new database;
|
||||
$database->app_name = 'menu';
|
||||
$database->app_uuid = 'f4b3b3d2-6287-489c-2a00-64529e46f2d7';
|
||||
$database->execute($sql, $parameters);
|
||||
|
||||
Reference in New Issue
Block a user