Fix. Display correct gateway name in URI on `Fax Active` page
This commit is contained in:
parent
b14dbab82a
commit
f7b7da0dd4
|
|
@ -48,6 +48,18 @@ else {
|
|||
$fax_uuid = check_str($_REQUEST["id"]);
|
||||
}
|
||||
|
||||
//load gateways into a session variable
|
||||
$sql = "select gateway_uuid, domain_uuid, gateway from v_gateways where enabled = 'true'";
|
||||
$prep_statement = $db->prepare($sql);
|
||||
if ($prep_statement) {
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
foreach ($result as $row) {
|
||||
$_SESSION['gateways'][$row['gateway_uuid']] = $row['gateway'];
|
||||
}
|
||||
}
|
||||
unset($sql, $prep_statement, $result, $row);
|
||||
|
||||
//show the header
|
||||
$document['title'] = $text['title'];
|
||||
require_once "resources/header.php";
|
||||
|
|
|
|||
|
|
@ -202,6 +202,13 @@ HERE;
|
|||
$task_files .= '<br/> ' . basename($row['greeting']);
|
||||
}
|
||||
|
||||
//replace gateway uuid with name
|
||||
if (sizeof($_SESSION['gateways']) > 0) {
|
||||
foreach ($_SESSION['gateways'] as $gateway_uuid => $gateway_name) {
|
||||
$fax_uri = str_replace($gateway_uuid, $gateway_name, $fax_uri);
|
||||
}
|
||||
}
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td valign='top' class='".$row_style[$c]."'>" . $fax_server . " </td>\n";
|
||||
echo "<td valign='top' class='".$row_style[$c]."'>" . $task_enabled . " </td>\n";
|
||||
|
|
|
|||
Loading…
Reference in New Issue