From d2ccc61ab1d2f9d17f90dace000c83e3850d7fc7 Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Tue, 3 Jan 2023 16:34:00 +0800 Subject: [PATCH] * Fix bug #31381. --- module/repo/control.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/module/repo/control.php b/module/repo/control.php index b950f13e0b..7a0570b710 100644 --- a/module/repo/control.php +++ b/module/repo/control.php @@ -425,6 +425,11 @@ class repo extends control if($this->get->repoPath) $entry = $this->get->repoPath; $this->repo->setBackSession('view', $withOtherModule = true); if($repoID == 0) $repoID = $this->session->repoID; + if($revision != 'HEAD') + { + setCookie("repoBranch", $revision, $this->config->cookieLife, $this->config->webRoot, '', false, true); + $this->cookie->repoBranch = $revision; + } $this->commonAction($repoID, $objectID); if($browser['name'] != 'ie') return print($this->fetch('repo', 'monaco', "repoID=$repoID&objectID=$objectID&entry=$entry&revision=$revision&showBug=$showBug&encoding=$encoding"));