From 1735c22baf3d23768cd9f012ae7c60481535860d Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Tue, 26 Dec 2023 08:44:33 +0800 Subject: [PATCH] * Fix bug #42110. --- module/qa/model.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/module/qa/model.php b/module/qa/model.php index 91fd2191fd..8a07d797ff 100644 --- a/module/qa/model.php +++ b/module/qa/model.php @@ -26,7 +26,9 @@ class qaModel extends model if(!$this->app->user->admin and strpos(",{$this->app->user->view->products},", ",$productID,") === false and $productID != 0 and !defined('TUTORIAL')) { $this->app->loadLang('product'); - return print(js::error($this->lang->product->accessDenied) . js::locate('back')); + $productID = key($products); + $locate = $productID ? helper::createLink('bug', 'browse', "productID=$productID") : helper::createLink('qa', 'index'); + return print(js::error($this->lang->product->accessDenied) . js::locate($locate)); } $branch = ($this->cookie->preBranch !== '' and $branch === '') ? $this->cookie->preBranch : $branch;