When using multiple email addresses with faxing commas are used between email addresses. The commas must be escaped this change automatically does the escaping so the end user doesn't have to do it.

This commit is contained in:
Mark Crane
2014-02-19 03:11:42 +00:00
parent b8be06d295
commit 9729c9ef0b
2 changed files with 26 additions and 16 deletions

View File

@@ -17,7 +17,7 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2012
Portions created by the Initial Developer are Copyright (C) 2008-2014
the Initial Developer. All Rights Reserved.
Contributor(s):
@@ -141,21 +141,25 @@ require_once "resources/paging.php";
if ($result_count > 0) {
foreach($result as $row) {
echo "<tr >\n";
echo " <td valign='top' class='".$row_style[$c]."'>".$row['fax_name']."</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".$row['fax_extension']."</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".$row['fax_email']."&nbsp;</td>\n";
echo " <td valign='top' class='row_stylebg' width='35%'>".$row['fax_description']."&nbsp;</td>\n";
echo " <td valign='top' align='right'>\n";
if (permission_exists('fax_extension_edit')) {
echo " <a href='fax_view.php?id=".$row['fax_uuid']."' alt='edit'>$v_link_label_edit</a>\n";
}
if (permission_exists('fax_extension_delete')) {
echo " <a href='fax_delete.php?id=".$row['fax_uuid']."' alt='delete' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>\n";
}
echo " </td>\n";
echo "</tr>\n";
if ($c==0) { $c=1; } else { $c=0; }
//remove the backslash
$row['fax_email'] = str_replace("\\", "", $row['fax_email']);
//show the fax extensions
echo "<tr >\n";
echo " <td valign='top' class='".$row_style[$c]."'>".$row['fax_name']."</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".$row['fax_extension']."</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".$row['fax_email']."&nbsp;</td>\n";
echo " <td valign='top' class='row_stylebg' width='35%'>".$row['fax_description']."&nbsp;</td>\n";
echo " <td valign='top' align='right'>\n";
if (permission_exists('fax_extension_edit')) {
echo " <a href='fax_view.php?id=".$row['fax_uuid']."' alt='edit'>$v_link_label_edit</a>\n";
}
if (permission_exists('fax_extension_delete')) {
echo " <a href='fax_delete.php?id=".$row['fax_uuid']."' alt='delete' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>\n";
}
echo " </td>\n";
echo "</tr>\n";
//alternate the CSS class
if ($c==0) { $c=1; } else { $c=0; }
} //end foreach
unset($sql, $result, $row_count);
} //end if results

View File

@@ -202,6 +202,9 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
return;
}
//escape the commas with a backslash
$fax_email = str_replace(",", "\\,", $fax_email);
//set the $php_bin
//if (file_exists(PHP_BINDIR."/php")) { $php_bin = 'php'; }
if (substr(strtoupper(PHP_OS), 0, 3) == "WIN") {
@@ -513,6 +516,9 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
unset ($prep_statement);
}
//remove the backslash
$fax_email = str_replace("\\", "", $fax_email);
//set the dialplan_uuid
if (strlen($dialplan_uuid) == 0) {
$dialplan_uuid = uuid();