From f5defafcfb8fb5d771c62d9d0ad244ba9e6f82ce Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sun, 25 Dec 2022 22:42:20 +0100 Subject: [PATCH] Default to the records tab for found dns zones, #6436 --- interface/web/capp.php | 2 +- interface/web/dashboard/ajax_get_json.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/web/capp.php b/interface/web/capp.php index 71d3d9ba35..462f775f76 100644 --- a/interface/web/capp.php +++ b/interface/web/capp.php @@ -45,7 +45,7 @@ if ($_SESSION["s"]["user"]['active'] != 1) { } if (!preg_match("/^[a-z]{2,20}$/i", $mod)) die('module name contains unallowed chars.'); -if ($redirect != '' && !preg_match("/^[a-z0-9]+\/[a-z0-9_\.\-]+\?id=[0-9]{1,9}(\&type=[a-z0-9_\.\-]+)?$/i", $redirect)) die('redirect contains unallowed chars.'); +if ($redirect != '' && !preg_match("/^[a-z0-9]+\/[a-z0-9_\.\-]+\?id=[0-9]{1,9}(\&type=[a-z0-9_\.\-]+)?(\&next_tab=[a-z0-9_\.\-]+)?$/i", $redirect)) die('redirect contains unallowed chars.'); //* Check if user may use the module. $user_modules = explode(",", $_SESSION["s"]["user"]["modules"]); diff --git a/interface/web/dashboard/ajax_get_json.php b/interface/web/dashboard/ajax_get_json.php index 76f284352b..4c6612888d 100644 --- a/interface/web/dashboard/ajax_get_json.php +++ b/interface/web/dashboard/ajax_get_json.php @@ -109,7 +109,7 @@ if($type == 'globalsearch'){ $result[] = _search('mail', 'mail_get'); // dns zones - $result[] = _search('dns', 'dns_soa'); + $result[] = _search('dns', 'dns_soa', '', 'next_tab=dns_records'); // secondary dns zones $result[] = _search('dns', 'dns_slave'); -- GitLab