mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Get the database connection for save_phrases_xml.php.
This commit is contained in:
@@ -5,8 +5,17 @@ function save_phrases_xml() {
|
|||||||
if (strlen($_SESSION['switch']['phrases']['dir']) == 0) {
|
if (strlen($_SESSION['switch']['phrases']['dir']) == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//declare the global variables
|
//declare the global variables
|
||||||
global $db, $domain_uuid, $config;
|
global $domain_uuid, $config;
|
||||||
|
|
||||||
|
//connect to the database if not connected
|
||||||
|
if (!$db) {
|
||||||
|
require_once "resources/classes/database.php";
|
||||||
|
$database = new database;
|
||||||
|
$database->connect();
|
||||||
|
$db = $database->db;
|
||||||
|
}
|
||||||
|
|
||||||
//remove old phrase files for the domain
|
//remove old phrase files for the domain
|
||||||
$phrase_list = glob($_SESSION['switch']['phrases']['dir']."/*/phrases/".$domain_uuid.".xml");
|
$phrase_list = glob($_SESSION['switch']['phrases']['dir']."/*/phrases/".$domain_uuid.".xml");
|
||||||
|
|||||||
Reference in New Issue
Block a user