From 95faf76f97a361f3c780ee031c83d20f948d3d1e Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 10 Jul 2020 09:41:43 -0600 Subject: [PATCH] Use cast to text on domain_enabled. --- core/domains/domains.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/core/domains/domains.php b/core/domains/domains.php index e28d783192..4e06cb8908 100644 --- a/core/domains/domains.php +++ b/core/domains/domains.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2018 - 2019 + Portions created by the Initial Developer are Copyright (C) 2018 - 2020 the Initial Developer. All Rights Reserved. Contributor(s): @@ -61,7 +61,7 @@ //update the domain session variables $domain_uuid = $_GET["domain_uuid"]; - $_SESSION["previous_domain_uuid"] = $_SESSION['domain_uuid']; + $_SESSION["previous_domain_uuid"] = $_SESSION['domain_uuid']; $_SESSION['domain_uuid'] = $domain_uuid; $_SESSION["domain_name"] = $_SESSION['domains'][$domain_uuid]['domain_name']; $_SESSION['domain']['template']['name'] = $_SESSION['domains'][$domain_uuid]['template_name']; @@ -164,7 +164,11 @@ $offset = $rows_per_page * $page; //get the list - $sql = str_replace('count(domain_uuid)', '*', $sql); + $sql = "select domain_uuid, domain_name, domain_uuid, cast(domain_enabled as text), domain_description "; + $sql .= "from v_domains "; + if (isset($sql_search)) { + $sql .= "where ".$sql_search; + } $sql .= order_by($order_by, $order, 'domain_name', 'asc'); $sql .= limit_offset($rows_per_page, $offset); $database = new database;