Get the database connection for save_phrases_xml.php.
This commit is contained in:
parent
f1ac6eb9bd
commit
29e3c2eda2
|
|
@ -5,8 +5,17 @@ function save_phrases_xml() {
|
|||
if (strlen($_SESSION['switch']['phrases']['dir']) == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
//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
|
||||
$phrase_list = glob($_SESSION['switch']['phrases']['dir']."/*/phrases/".$domain_uuid.".xml");
|
||||
|
|
|
|||
Loading…
Reference in New Issue