From c033a87009587459b8ad67dec2e01a3ce6bda00b Mon Sep 17 00:00:00 2001 From: liumengyi Date: Wed, 24 Aug 2022 17:19:59 +0800 Subject: [PATCH] * Fix bug #26845. --- module/common/model.php | 1 + module/story/control.php | 3 ++- module/story/view/linkstories.html.php | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/module/common/model.php b/module/common/model.php index 8504097bf8..ca2401a3bd 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -2501,6 +2501,7 @@ EOD; if($module == 'story' and !empty($params['storyType']) and strpos(",story,requirement,", ",{$params['storyType']},") !== false) $module = $params['storyType']; if($module == 'product' and $method == 'browse' and !empty($app->params['storyType']) and $app->params['storyType'] == 'requirement') $method = 'requirement'; if($module == 'product' and $method == 'browse' and !empty($params['storyType']) and $params['storyType'] == 'requirement') $method = 'requirement'; + if($module == 'story' and $method == 'linkrequirements') $module = 'requirement'; /* If the user is doing a tutorial, have all tutorial privs. */ if(defined('TUTORIAL')) diff --git a/module/story/control.php b/module/story/control.php index 395efa8d69..aa23b46d3e 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -2207,9 +2207,10 @@ class story extends control $products = $this->product->getPairs(); $queryID = ($browseType == 'bySearch') ? (int)$param : 0; $type = $story->type == 'story' ? 'linkRelateSR' : 'linkRelateUR'; + $method = $story->type == 'story' ? 'linkStories' : 'linkRequirements'; /* Build search form. */ - $actionURL = $this->createLink('story', 'linkStories', "storyID=$storyID&browseType=bySearch&excludeStories=$excludeStories&queryID=myQueryID", '', true); + $actionURL = $this->createLink('story', $method, "storyID=$storyID&browseType=bySearch&excludeStories=$excludeStories&queryID=myQueryID", '', true); $this->product->buildSearchForm($story->product, $products, $queryID, $actionURL); $this->view->story = $story; diff --git a/module/story/view/linkstories.html.php b/module/story/view/linkstories.html.php index fbb8e1c1b2..ad604ab44f 100644 --- a/module/story/view/linkstories.html.php +++ b/module/story/view/linkstories.html.php @@ -18,7 +18,7 @@ id;?> createLink('story', 'view', "storyID=$story->id"), $story->title, '_blank', "title='$story->title'");?> type == 'story' ? $lang->story->linkStoriesAB : $lang->story->linkRequirementsAB?> - arrow . $lang->story->linkStoriesAB;?> + arrow . $title;?>