diff --git a/app/call_forward/call_forward_edit.php b/app/call_forward/call_forward_edit.php
index c6539e9a92..cc644b6b2a 100644
--- a/app/call_forward/call_forward_edit.php
+++ b/app/call_forward/call_forward_edit.php
@@ -310,7 +310,7 @@
//if dnd or call forward are enabled process them last
if ($follow_me_enabled != true) {
- if ($forward_all_enabled == true) {
+ if ($forward_all_enabled) {
//dnd
$dnd->set();
$dnd->user_status();
diff --git a/app/fax/fax_send.php b/app/fax/fax_send.php
index 3eb4eda568..e889c0af3a 100644
--- a/app/fax/fax_send.php
+++ b/app/fax/fax_send.php
@@ -192,15 +192,9 @@ if (!function_exists('fax_split_dtmf')) {
}
//check if the domain is enabled
- $sql = "select domain_enabled::text from v_domains where domain_uuid = :domain_uuid ";
+ $sql = "select domain_enabled from v_domains where domain_uuid = :domain_uuid ";
$parameters['domain_uuid'] = $domain_uuid;
- $row = $database->select($sql, $parameters, 'row');
- if ($row['domain_enabled']) {
- $domain_enabled = true;
- }
- else {
- $domain_enabled = false;
- }
+ $domain_enabled = $database->select($sql, $parameters, 'column');
unset($sql, $parameters, $row);
//initialize database and settings
@@ -212,7 +206,7 @@ if (!function_exists('fax_split_dtmf')) {
//send the fax
$continue = false;
if (!defined('STDIN')) {
- if (!empty($_POST['action']) && $_POST['action'] == "send" && $domain_enabled == true) {
+ if (!empty($_POST['action']) && $_POST['action'] == "send" && $domain_enabled) {
//get the values from the HTTP POST
$fax_numbers = $_POST['fax_numbers'];
$fax_uuid = $_POST["id"];
@@ -1006,9 +1000,9 @@ if (!defined('STDIN')) {
echo "
".$text['header-new_fax']."
\n";
echo " \n";
echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$settings->get('theme','button_icon_back'),'id'=>'btn_back','style'=>'margin-right: 15px;','link'=>'fax.php']);
- if ($domain_enabled == true) {
- echo button::create(['type'=>'submit','label'=>$text['button-preview'],'icon'=>'eye','name'=>'submit','value'=>'preview']);
- echo button::create(['type'=>'submit','label'=>$text['button-send'],'icon'=>'paper-plane','id'=>'btn_save','name'=>'submit','value'=>'send','style'=>'margin-left: 15px;']);
+ if ($domain_enabled) {
+ echo button::create(['type'=>'submit','label'=>$text['button-preview'],'icon'=>'eye','name'=>'submit','value'=>'preview']);
+ echo button::create(['type'=>'submit','label'=>$text['button-send'],'icon'=>'paper-plane','id'=>'btn_save','name'=>'submit','value'=>'send','style'=>'margin-left: 15px;']);
}
echo "
\n";
echo " \n";
@@ -1016,8 +1010,8 @@ if (!defined('STDIN')) {
echo $text['description-2']." ".(permission_exists('fax_extension_view_domain') ? $text['description-3'] : null)."\n";
echo "
\n";
- if ($domain_enabled == false) {
- echo "".$text['notice-sending-disabled']."
\n";
+ if ($domain_enabled) {
+ echo "".$text['notice-sending-disabled']."
\n";
}
echo "\n";
diff --git a/app/switch/resources/scripts/app/xml_handler/resources/scripts/dialplan/dialplan.lua b/app/switch/resources/scripts/app/xml_handler/resources/scripts/dialplan/dialplan.lua
index f03e5f7cc8..6b0af49e00 100644
--- a/app/switch/resources/scripts/app/xml_handler/resources/scripts/dialplan/dialplan.lua
+++ b/app/switch/resources/scripts/app/xml_handler/resources/scripts/dialplan/dialplan.lua
@@ -175,7 +175,7 @@
if (context_name == 'public' and dialplan_mode == 'single') then
--get the single inbound destination dialplan xml from the database
sql = "SELECT (SELECT domain_name FROM v_domains WHERE domain_uuid = p.domain_uuid) as domain_name, "
- sql = sql .. "(SELECT domain_enabled FROM v_domains WHERE domain_uuid = p.domain_uuid) as domain_enabled, p.dialplan_xml ";
+ sql = sql .. "(SELECT cast(domain_enabled as text) FROM v_domains WHERE domain_uuid = p.domain_uuid) as domain_enabled, p.dialplan_xml ";
sql = sql .. "FROM v_dialplans AS p ";
sql = sql .. "WHERE ( ";
sql = sql .. " p.dialplan_uuid IN ( ";
@@ -206,7 +206,7 @@
else
xml:append(row.dialplan_xml);
end
- if (row.domain_enabled == true) then
+ if (row.domain_enabled == "true") then
xml:append(row.dialplan_xml);
end
end);