mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Update boolean handling
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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 " <div class='heading'><b>".$text['header-new_fax']."</b></div>\n";
|
||||
echo " <div class='actions'>\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 " </div>\n";
|
||||
echo " <div style='clear: both;'></div>\n";
|
||||
@@ -1016,8 +1010,8 @@ if (!defined('STDIN')) {
|
||||
echo $text['description-2']." ".(permission_exists('fax_extension_view_domain') ? $text['description-3'] : null)."\n";
|
||||
echo "<br /><br />\n";
|
||||
|
||||
if ($domain_enabled == false) {
|
||||
echo "<div class='warning_bar'>".$text['notice-sending-disabled']."</div>\n";
|
||||
if ($domain_enabled) {
|
||||
echo "<div class='warning_bar'>".$text['notice-sending-disabled']."</div>\n";
|
||||
}
|
||||
|
||||
echo "<div class='card'>\n";
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user