From 75e2ab8d28f56788825e2d9b258676e7def4e1cf Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Tue, 24 Jul 2012 18:07:20 +0000 Subject: [PATCH] Add single quotes around true in the outbound_route_to_bridge function. Remove the lib_switch.php include in fax_to_email.php that was not necessary after all. --- includes/lib_switch.php | 2 +- secure/fax_to_email.php | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/includes/lib_switch.php b/includes/lib_switch.php index 883e9f57ff..a7995f20e9 100644 --- a/includes/lib_switch.php +++ b/includes/lib_switch.php @@ -2197,7 +2197,7 @@ function outbound_route_to_bridge ($destination_number) { $sql = "select * from v_dialplans "; $sql .= "where domain_uuid = '".$domain_uuid."' "; $sql .= "and app_uuid = '8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3' "; - $sql .= "and dialplan_enabled = true "; + $sql .= "and dialplan_enabled = 'true' "; $sql .= "order by dialplan_order asc "; $prep_statement = $db->prepare(check_sql($sql)); $prep_statement->execute(); diff --git a/secure/fax_to_email.php b/secure/fax_to_email.php index d3bc1b83e1..5351234885 100644 --- a/secure/fax_to_email.php +++ b/secure/fax_to_email.php @@ -38,7 +38,6 @@ if (defined('STDIN')) { //includes if (!defined('STDIN')) { include "root.php"; } require_once "includes/require.php"; - require_once "includes/lib_switch.php"; include "class.phpmailer.php"; include "class.smtp.php"; // optional, gets called from within class.phpmailer.php if not already loaded @@ -106,21 +105,19 @@ if (defined('STDIN')) { //echo "cd $dir_fax; /usr/bin/tiff2png ".$dir_fax.'/'.$fax_name.".png\n"; //get the fax details from the database - $sql = ""; - $sql .= "select * from v_domains "; + $sql = "select * from v_domains "; $sql .= "where domain_name = '".$domain_name."' "; $prep_statement = $db->prepare($sql); $prep_statement->execute(); $result = $prep_statement->fetchAll(PDO::FETCH_ASSOC); foreach ($result as &$row) { - $_SESSION['domain_uuid'] = $row["domain_uuid"]; + $domain_uuid = $row["domain_uuid"]; } unset ($prep_statement); //get the fax details from the database - $sql = ""; - $sql .= "select * from v_fax "; - $sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' "; + $sql = "select * from v_fax "; + $sql .= "where domain_uuid = '".$domain_uuid."' "; $sql .= "and fax_extension = '$fax_extension' "; $prep_statement = $db->prepare($sql); $prep_statement->execute();