From 0c2651b436fefb2b991e3e9db2afe9455b81c748 Mon Sep 17 00:00:00 2001 From: zhouxudong Date: Wed, 27 Apr 2022 07:45:27 +0000 Subject: [PATCH 1/8] * Fix bug #22038. --- lib/base/front/front.class.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/base/front/front.class.php b/lib/base/front/front.class.php index fce5e33cc0..eddd8a7fe9 100644 --- a/lib/base/front/front.class.php +++ b/lib/base/front/front.class.php @@ -509,7 +509,17 @@ class baseHTML setcookie('goback', json_encode($gobackList), $config->cookieLife, $config->webRoot, '', $config->cookieSecure, false); } - return "{$label}"; + $dataApp = ''; + foreach($gobackList as $locateApp => $locateLink) + { + if($gobackLink == $locateLink) + { + $dataApp = $locateApp; + continue; + } + } + + return "{$label}"; } /** From e2aa928abe0aabe50f632c8b4bc1a11a39630717 Mon Sep 17 00:00:00 2001 From: zhouxudong Date: Thu, 28 Apr 2022 02:57:42 +0000 Subject: [PATCH 2/8] * Fix bug #22038. --- lib/base/front/front.class.php | 13 +++---------- module/program/view/browsebylist.html.php | 2 +- module/project/model.php | 1 + 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/lib/base/front/front.class.php b/lib/base/front/front.class.php index eddd8a7fe9..5453697c61 100644 --- a/lib/base/front/front.class.php +++ b/lib/base/front/front.class.php @@ -509,17 +509,10 @@ class baseHTML setcookie('goback', json_encode($gobackList), $config->cookieLife, $config->webRoot, '', $config->cookieSecure, false); } - $dataApp = ''; - foreach($gobackList as $locateApp => $locateLink) - { - if($gobackLink == $locateLink) - { - $dataApp = $locateApp; - continue; - } - } + $dataApp = array_search($gobackLink, $gobackList) ? array_search($gobackLink, $gobackList) : ''; + $dataApp = empty($dataApp) ? '' : "data-app='$dataApp'"; - return "{$label}"; + return "{$label}"; } /** diff --git a/module/program/view/browsebylist.html.php b/module/program/view/browsebylist.html.php index ae32d22a17..26b7a53e87 100644 --- a/module/program/view/browsebylist.html.php +++ b/module/program/view/browsebylist.html.php @@ -126,7 +126,7 @@
diff --git a/module/project/model.php b/module/project/model.php index adacde8868..b1ed4dd278 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -1785,6 +1785,7 @@ class projectModel extends model echo "
"; echo ""; echo "