New setting call_log_enabled default false
This commit is contained in:
@@ -386,6 +386,14 @@
|
|||||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Options: horizontal, vertical";
|
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Options: horizontal, vertical";
|
||||||
$y++;
|
$y++;
|
||||||
|
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "29d1b0c5-bad7-492f-9517-409ad4912f6f";
|
||||||
|
$apps[$x]['default_settings'][$y]['default_setting_category'] = "cdr";
|
||||||
|
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "call_log_enabled";
|
||||||
|
$apps[$x]['default_settings'][$y]['default_setting_name'] = "boolean";
|
||||||
|
$apps[$x]['default_settings'][$y]['default_setting_value'] = "false";
|
||||||
|
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||||
|
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Enable or disable adding call logs to the database.";
|
||||||
|
$y++;
|
||||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "9d6ba316-a954-476b-9d8c-4520c3c69d2c";
|
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "9d6ba316-a954-476b-9d8c-4520c3c69d2c";
|
||||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "dashboard";
|
$apps[$x]['default_settings'][$y]['default_setting_category'] = "dashboard";
|
||||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "missed_calls_chart_main_background_color";
|
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "missed_calls_chart_main_background_color";
|
||||||
|
|||||||
@@ -963,7 +963,7 @@ if (!class_exists('xml_cdr')) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//save the call log to the database
|
//save the call log to the database
|
||||||
if (!empty($this->setting->get('switch', 'log')) && $this->setting->get('cdr', 'storage') == "db") {
|
if ($this->setting->get('cdr', 'call_log_enabled') == 'true' && !empty($this->setting->get('switch', 'log')) && $this->setting->get('cdr', 'storage') == "db") {
|
||||||
//get the log content
|
//get the log content
|
||||||
$log_content = '';
|
$log_content = '';
|
||||||
$handle = @fopen($this->setting->get('switch', 'log').'/freeswitch.log', "r");
|
$handle = @fopen($this->setting->get('switch', 'log').'/freeswitch.log', "r");
|
||||||
@@ -2034,8 +2034,3 @@ if (!class_exists('xml_cdr')) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -117,22 +117,24 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
//get the cdr log from the database
|
//get the cdr log from the database
|
||||||
$sql = "select * from v_xml_cdr_logs ";
|
if ($_SESSION['cdr']['call_log_enabled']['boolean'] == 'true') {
|
||||||
if (permission_exists('xml_cdr_all')) {
|
$sql = "select * from v_xml_cdr_logs ";
|
||||||
$sql .= "where xml_cdr_uuid = :xml_cdr_uuid ";
|
if (permission_exists('xml_cdr_all')) {
|
||||||
|
$sql .= "where xml_cdr_uuid = :xml_cdr_uuid ";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$sql .= "where xml_cdr_uuid = :xml_cdr_uuid ";
|
||||||
|
$sql .= "and domain_uuid = :domain_uuid ";
|
||||||
|
$parameters['domain_uuid'] = $domain_uuid;
|
||||||
|
}
|
||||||
|
$parameters['xml_cdr_uuid'] = $uuid;
|
||||||
|
$database = new database;
|
||||||
|
$row = $database->select($sql, $parameters, 'row');
|
||||||
|
if (!empty($row) && is_array($row) && @sizeof($row) != 0) {
|
||||||
|
$log_content = $row["log_content"];
|
||||||
|
}
|
||||||
|
unset($sql, $parameters, $row);
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
$sql .= "where xml_cdr_uuid = :xml_cdr_uuid ";
|
|
||||||
$sql .= "and domain_uuid = :domain_uuid ";
|
|
||||||
$parameters['domain_uuid'] = $domain_uuid;
|
|
||||||
}
|
|
||||||
$parameters['xml_cdr_uuid'] = $uuid;
|
|
||||||
$database = new database;
|
|
||||||
$row = $database->select($sql, $parameters, 'row');
|
|
||||||
if (!empty($row) && is_array($row) && @sizeof($row) != 0) {
|
|
||||||
$log_content = $row["log_content"];
|
|
||||||
}
|
|
||||||
unset($sql, $parameters, $row);
|
|
||||||
|
|
||||||
//get the format
|
//get the format
|
||||||
if (!empty($xml_string)) {
|
if (!empty($xml_string)) {
|
||||||
@@ -321,7 +323,7 @@
|
|||||||
echo "<td width='30%' align='left' valign='top' nowrap='nowrap'><b>".$text['title2']."</b></td>\n";
|
echo "<td width='30%' align='left' valign='top' nowrap='nowrap'><b>".$text['title2']."</b></td>\n";
|
||||||
echo "<td width='70%' align='right' valign='top'>\n";
|
echo "<td width='70%' align='right' valign='top'>\n";
|
||||||
echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'style'=>'margin-left: 15px;','link'=>'xml_cdr.php'.(!empty($_SESSION['xml_cdr']['last_query']) ? '?'.urlencode($_SESSION['xml_cdr']['last_query']) : null)]);
|
echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'style'=>'margin-left: 15px;','link'=>'xml_cdr.php'.(!empty($_SESSION['xml_cdr']['last_query']) ? '?'.urlencode($_SESSION['xml_cdr']['last_query']) : null)]);
|
||||||
if (isset($log_content) && !empty($log_content)) {
|
if ($_SESSION['cdr']['call_log_enabled']['boolean'] == 'true' && isset($log_content) && !empty($log_content)) {
|
||||||
echo button::create(['type'=>'button','label'=>$text['button-call_log'],'icon'=>$_SESSION['theme']['button_icon_search'],'style'=>'margin-left: 15px;','link'=>'xml_cdr_log.php?id='.$uuid]);
|
echo button::create(['type'=>'button','label'=>$text['button-call_log'],'icon'=>$_SESSION['theme']['button_icon_search'],'style'=>'margin-left: 15px;','link'=>'xml_cdr_log.php?id='.$uuid]);
|
||||||
}
|
}
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
|
|||||||
Reference in New Issue
Block a user