* Modify the test module to return the link problem.

This commit is contained in:
tianshujie
2021-08-30 13:23:07 +08:00
parent 46f2dc73c3
commit e60c95725e
5 changed files with 10 additions and 8 deletions
+2 -2
View File
@@ -498,7 +498,7 @@ class baseHTML
$tab = $_COOKIE['openApp'];
$misc .= "data-app='{$tab}'";
$referer = $_SERVER['HTTP_REFERER'];
$referer = strtolower($_SERVER['HTTP_REFERER']);
$refererParts = parse_url($referer);
$refererLink = $config->requestType == 'PATH_INFO' ? $refererParts['path'] : $refererParts['query'];
$currentModule = $app->getModuleName();
@@ -507,7 +507,7 @@ class baseHTML
$gobackLink = isset($gobackList[$tab]) ? $gobackList[$tab] : '';
/* If the link of the referer is not the link of the current page or the link of the index, the cookie and gobackLink will be updated. */
if(!preg_match("/(m=|\/)(index|$currentModule)(&f=|-)(index|$currentMethod)(&|-|\.)?/", $refererLink))
if(!preg_match("/(m=|\/)(index|search|$currentModule)(&f=|-)(index|buildquery|$currentMethod)(&|-|\.)?/", $refererLink))
{
$gobackList[$tab] = $referer;
$gobackLink = $referer;
+1 -1
View File
@@ -15,7 +15,7 @@
<?php js::set('flow', $config->global->flow);?>
<div id='mainMenu' class='clearfix'>
<div class='btn-toolbar pull-left'>
<?php common::printBack($this->session->testsuiteList, 'btn btn-link');?>
<?php echo html::backButton('<i class="icon icon-back icon-sm"></i> ' . $lang->goback, '', 'btn btn-secondary');?>
<div class='divider'></div>
<div class='page-title'>
<span class='label label-id'><?php echo $suite->id;?></span>
+4 -2
View File
@@ -94,8 +94,10 @@ class testtask extends control
public function browse($productID = 0, $branch = '', $type = 'local,totalStatus', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1, $beginTime = 0, $endTime = 0)
{
/* Save session. */
$this->session->set('testtaskList', $this->app->getURI(true), 'qa');
$this->session->set('buildList', $this->app->getURI(true), 'execution');
$uri = $this->app->getURI(true);
$this->session->set('testtaskList', $uri, 'qa');
$this->session->set('reportList', $uri, 'qa');
$this->session->set('buildList', $uri, 'execution');
$scopeAndStatus = explode(',', $type);
$this->session->set('testTaskVersionScope', $scopeAndStatus[0]);
+1 -1
View File
@@ -14,7 +14,7 @@
<?php include '../../common/view/tablesorter.html.php';?>
<div id='mainMenu' class='clearfix'>
<div class='btn-toolbar pull-left'>
<?php common::printBack($this->session->testtaskList, 'btn btn-link');?>
<?php echo html::backButton('<i class="icon icon-back icon-sm"></i> ' . $lang->goback, '', 'btn btn-secondary');?>
<div class='divider'></div>
<?php
$lang->testtask->linkCase = $lang->testtask->linkByStory;
+2 -2
View File
@@ -15,7 +15,7 @@
<?php $browseLink = $this->session->testtaskList ? $this->session->testtaskList : $this->createLink('testtask', 'browse', "productID=$task->product");?>
<div id='mainMenu' class='clearfix'>
<div class='btn-toolbar pull-left'>
<?php common::printBack($browseLink, 'btn btn-link');?>
<?php echo html::backButton('<i class="icon icon-back icon-sm"></i> ' . $lang->goback, '', 'btn btn-secondary');?>
<div class='divider'></div>
<div class='page-title'>
<span class='label label-id'><?php echo $task->id;?></span>
@@ -49,7 +49,7 @@
<div class='cell'><?php include '../../common/view/action.html.php';?></div>
<div class='main-actions'>
<div class="btn-toolbar">
<?php common::printBack($browseLink);?>
<?php echo html::backButton('<i class="icon icon-back icon-sm"></i> ' . $lang->goback, '', 'btn btn-secondary');?>
<?php if(!$task->deleted):?>
<div class='divider'></div>
<?php