mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 09:03:49 +00:00
Remove the domain name from the switch recordings SESSION variable. The path for single and multi-tenant are handled the same and all will used their domain name.
This commit is contained in:
@@ -186,30 +186,6 @@
|
||||
//set the context
|
||||
$_SESSION["context"] = $_SESSION["domain_name"];
|
||||
|
||||
//recordings add the domain to the path if there is more than one domains
|
||||
if (count($_SESSION["domains"]) > 1) {
|
||||
if (strlen($_SESSION['switch']['recordings']['dir']) > 0) {
|
||||
if (substr($_SESSION['switch']['recordings']['dir'], -strlen($_SESSION["domain_name"])) != $_SESSION["domain_name"]) {
|
||||
//get the default recordings directory
|
||||
$sql = "select * from v_default_settings ";
|
||||
$sql .= "where default_setting_enabled = 'true' ";
|
||||
$sql .= "and default_setting_category = 'switch' ";
|
||||
$sql .= "and default_setting_subcategory = 'recordings' ";
|
||||
$sql .= "and default_setting_name = 'dir' ";
|
||||
$prep_statement = $db->prepare($sql);
|
||||
$prep_statement->execute();
|
||||
$result_default_settings = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
foreach ($result_default_settings as $row) {
|
||||
$name = $row['default_setting_name'];
|
||||
$category = $row['default_setting_category'];
|
||||
$subcategory = $row['default_setting_subcategory'];
|
||||
$switch_recordings_dir = $row['default_setting_value'];
|
||||
}
|
||||
//add the domain
|
||||
$_SESSION['switch']['recordings']['dir'] = $switch_recordings_dir . '/' . $_SESSION["domain_name"];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function upgrade() {
|
||||
@@ -272,16 +248,6 @@
|
||||
$prep_statement->execute();
|
||||
$result_default_settings = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
|
||||
//get the default recordings directory
|
||||
foreach($result_default_settings as $row) {
|
||||
$name = $row['default_setting_name'];
|
||||
$category = $row['default_setting_category'];
|
||||
$subcategory = $row['default_setting_subcategory'];
|
||||
if ($category == 'switch' && $subcategory == 'recordings' && $name == 'dir') {
|
||||
$switch_recordings_dir = $row['default_setting_value'];
|
||||
}
|
||||
}
|
||||
|
||||
//loop through all domains
|
||||
$sql = "select * from v_domains ";
|
||||
$v_prep_statement = $db->prepare(check_sql($sql));
|
||||
@@ -349,11 +315,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
//set the recordings directory
|
||||
if (strlen($switch_recordings_dir) > 1 && count($_SESSION["domains"]) > 1) {
|
||||
$_SESSION['switch']['recordings']['dir'] = $switch_recordings_dir."/".$domain_name;
|
||||
}
|
||||
|
||||
//get the list of installed apps from the core and mod directories and execute the php code in app_defaults.php
|
||||
$default_list = glob($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "/*/*/app_defaults.php");
|
||||
foreach ($default_list as &$default_path) {
|
||||
|
||||
Reference in New Issue
Block a user