diff --git a/module/repo/config/dtable.php b/module/repo/config/dtable.php index 0a1a8b2df1..2b269f526d 100644 --- a/module/repo/config/dtable.php +++ b/module/repo/config/dtable.php @@ -231,8 +231,9 @@ $config->repo->reviewDtable = new stdclass(); $config->repo->reviewDtable->fieldList['id']['title'] = $lang->idAB; $config->repo->reviewDtable->fieldList['id']['type'] = 'id'; -$config->repo->reviewDtable->fieldList['title']['type'] = 'title'; -$config->repo->reviewDtable->fieldList['title']['link'] = array('module' => 'bug', 'method' => 'view', 'params' => 'bugID={id}&from=repo'); +$config->repo->reviewDtable->fieldList['title']['type'] = 'title'; +$config->repo->reviewDtable->fieldList['title']['data-app'] = $app->tab; +$config->repo->reviewDtable->fieldList['title']['link'] = array('module' => 'bug', 'method' => 'view', 'params' => 'bugID={id}&from=repo'); $config->repo->reviewDtable->fieldList['fileLocation']['title'] = $lang->repo->file . '/' . $lang->repo->location; $config->repo->reviewDtable->fieldList['fileLocation']['name'] = 'entry'; diff --git a/module/repo/control.php b/module/repo/control.php index f5d00ebb03..13e3fee123 100644 --- a/module/repo/control.php +++ b/module/repo/control.php @@ -327,6 +327,7 @@ class repo extends control $entry = urldecode($entry); $pathInfo = helper::mbPathinfo($entry); + if($this->app->tab == 'execution') $this->view->executionID = $objectID; $this->view->title = $this->lang->repo->common . $this->lang->colon . $this->lang->repo->view; $this->view->dropMenus = $this->repoZen->getBranchAndTagItems($repo, $this->cookie->repoBranch); $this->view->type = 'view'; diff --git a/module/repo/ui/review.html.php b/module/repo/ui/review.html.php index 0f8d440e6b..84769e732a 100644 --- a/module/repo/ui/review.html.php +++ b/module/repo/ui/review.html.php @@ -24,6 +24,7 @@ jsVar('sortLink', createLink('repo', 'review', "repoID=$repoID&browseType=$brows foreach($bugs as $bug) { + $objectID = $app->tab == 'execution' ? $bug->execution : 0; $bug->revisionA = $repo->SCM != 'Subversion' ? strtr($bug->v2, '*', '-') : $bug->v2; $lines = explode(',', trim($bug->lines, ',')); @@ -31,7 +32,7 @@ foreach($bugs as $bug) { $bug->v2 = $repo->SCM != 'Subversion' ? strtr($bug->v2, '*', '-') : $bug->v2; $revision = $repo->SCM != 'Subversion' ? $this->repo->getGitRevisionName($bug->v2, zget($historys, $bug->v2)) : $bug->v2; - $bug->link = $this->repo->createLink('view', "repoID=$repoID&objectID=0&entry={$bug->entry}&revision={$bug->v2}") . "#L$lines[0]"; + $bug->link = $this->repo->createLink('view', "repoID=$repoID&objectID={$objectID}&entry={$bug->entry}&revision={$bug->v2}") . "#L$lines[0]"; } else { @@ -39,7 +40,7 @@ foreach($bugs as $bug) $revision .= ' : '; $revision .= $repo->SCM != 'Subversion' ? substr($bug->v2, 0, 10) : $bug->v2; if($repo->SCM != 'Subversion') $revision .= ' (' . zget($historys, $bug->v1) . ' : ' . zget($historys, $bug->v2) . ')'; - $bug->link = $this->repo->createLink('diff', "repoID=$repoID&objectID=0&entry={$bug->entry}&oldRevision={$bug->v1}&newRevision={$bug->v2}") . "#L$lines[0]"; + $bug->link = $this->repo->createLink('diff', "repoID=$repoID&objectID={$objectID}&entry={$bug->entry}&oldRevision={$bug->v1}&newRevision={$bug->v2}") . "#L$lines[0]"; } $bug->entry = $repo->name . '/' . $this->repo->decodePath($bug->entry);