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.

This commit is contained in:
Mark Crane 2012-07-24 18:07:20 +00:00
parent 6a44c2fca2
commit 75e2ab8d28
2 changed files with 5 additions and 8 deletions

View File

@ -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();

View File

@ -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();