From efe44c71e479cfb46e0096ec4531b88dfaab7924 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Mon, 17 Dec 2018 18:49:02 -0700 Subject: [PATCH] Update fax_files.php --- app/fax/fax_files.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/fax/fax_files.php b/app/fax/fax_files.php index 62d9c2f846..23b982d5c0 100644 --- a/app/fax/fax_files.php +++ b/app/fax/fax_files.php @@ -47,10 +47,8 @@ $order = check_str($_GET["order"]); //get fax extension - if (strlen($_GET['id']) > 0) { - if (is_uuid($_GET["id"])) { - $fax_uuid = $_GET["id"]; - } + if (isset($_GET['id']) && is_uuid($_GET["id"])) { + $fax_uuid = $_GET["id"]; if (if_group("superadmin") || if_group("admin")) { //show all fax extensions $sql = "select fax_name, fax_extension from v_fax "; @@ -239,6 +237,7 @@ $row_style["0"] = "row_style0"; $row_style["1"] = "row_style1"; +//show the fax files echo "\n"; echo "\n"; echo th_order_by('fax_caller_id_name', $text['label-fax_caller_id_name'], $order_by, $order, "&id=".$_GET['id']."&box=".$_GET['box']."&page=".$_GET['page']); @@ -251,7 +250,7 @@ echo th_order_by('fax_date', $text['label-fax_date'], $order_by, $order, "&id=".$_GET['id']."&box=".$_GET['box']."&page=".$_GET['page']); echo "\n"; echo "\n"; - if ($num_rows > 0) { + if (is_array($fax_files)) { foreach($fax_files as $row) { $file = basename($row['fax_file_path']); if (strtolower(substr($file, -3)) == "tif" || strtolower(substr($file, -3)) == "pdf") {