From 05034cc10c49cbfdbe69ebc0cc985577d49d619c Mon Sep 17 00:00:00 2001
From: liyuchun <563917701@qq.com>
Date: Mon, 29 Aug 2022 11:19:25 +0800
Subject: [PATCH 1/3] * Finish task #65978.
---
module/bug/css/view.css | 1 +
module/bug/view/view.html.php | 3 ++-
module/story/css/view.css | 3 ++-
module/story/view/view.html.php | 4 ++--
module/task/css/view.css | 3 ++-
module/task/view/view.html.php | 5 +++--
6 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/module/bug/css/view.css b/module/bug/css/view.css
index 9c7f59111b..47658ca032 100644
--- a/module/bug/css/view.css
+++ b/module/bug/css/view.css
@@ -8,3 +8,4 @@
.osContent, .browserContent {margin: 0 0 5px;}
.browserContent {margin-left: -4px;}
.resolution {white-space: nowrap; overflow: hidden;}
+.link-commit {overflow: hidden; white-space: nowrap; margin-right: 5px;}
diff --git a/module/bug/view/view.html.php b/module/bug/view/view.html.php
index e56186f989..8bbc37635e 100644
--- a/module/bug/view/view.html.php
+++ b/module/bug/view/view.html.php
@@ -441,7 +441,8 @@
foreach($linkCommits as $commit)
{
$revision = substr($commit->revision, 0, 10);
- echo ($canViewRevision ? html::a($this->createLink('repo', 'revision', "repoID={$commit->repo}&objectID=0&revision={$commit->revision}"), "$revision {$commit->comment}") : "$revisioin {$commit->comment}") . '
';
+ $title = $revision . ' ' . $commit->comment;
+ echo "
" . ($canViewRevision ? html::a($this->createLink('repo', 'revision', "repoID={$commit->repo}&objectID=0&revision={$commit->revision}"), $revision) . " $commit->comment" : $title) . '
';
}
?>
diff --git a/module/story/css/view.css b/module/story/css/view.css
index 782054d7ad..cec1c3f366 100644
--- a/module/story/css/view.css
+++ b/module/story/css/view.css
@@ -4,7 +4,7 @@
#legendStories ul li:last-child {display: block;}
.main-actions .btn-toolbar .btn {padding-right: 6px; padding-left: 6px;}
.btn-edit-comment {z-index: 100;}
-#legendRelated .table-data tbody>tr>th {width: 90px;}
+#legendRelated .table-data tbody>tr>th {width: 100px;}
#legendStories .list-unstyled li a {padding: 6px;}
#legendStories .list-unstyled li a:not(.removeButton) {overflow: hidden; white-space: nowrap; text-overflow: ellipsis;}
[lang^='zh'] #legendStories .list-unstyled li:last-child {padding: 6px 12px;}
@@ -13,3 +13,4 @@
.linkStoryTr > td {padding-left: 0px !important;}
.removeButton {margin-left: -10px;}
.resolution {white-space: nowrap; overflow: hidden;}
+.link-commit {overflow: hidden; white-space: nowrap; margin-right: 5px;}
diff --git a/module/story/view/view.html.php b/module/story/view/view.html.php
index 82800b6c8e..e97a248ad4 100644
--- a/module/story/view/view.html.php
+++ b/module/story/view/view.html.php
@@ -586,11 +586,11 @@
$commitTitle = $revision . ' ' . $commit->comment;
if($canViewRevision)
{
- echo "" . ($canViewRevision ? html::a($this->createLink('repo', 'revision', "repoID={$commit->repo}&objectID=0&revision={$commit->revision}"), "$revision") . ' ' . $commit->comment : $commitTitle) . '
';
}
?>
From 9f7367e1479b642ffe2e89617ce598b0e8138841 Mon Sep 17 00:00:00 2001
From: liyuchun <563917701@qq.com>
Date: Mon, 29 Aug 2022 11:21:23 +0800
Subject: [PATCH 2/3] * Finish task #65978.
---
module/bug/view/view.html.php | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/module/bug/view/view.html.php b/module/bug/view/view.html.php
index 8bbc37635e..7d8ddc8c5d 100644
--- a/module/bug/view/view.html.php
+++ b/module/bug/view/view.html.php
@@ -440,9 +440,9 @@
$canViewRevision = common::hasPriv('repo', 'revision');
foreach($linkCommits as $commit)
{
- $revision = substr($commit->revision, 0, 10);
- $title = $revision . ' ' . $commit->comment;
- echo "
" . ($canViewRevision ? html::a($this->createLink('repo', 'revision', "repoID={$commit->repo}&objectID=0&revision={$commit->revision}"), $revision) . " $commit->comment" : $title) . '
';
+ $revision = substr($commit->revision, 0, 10);
+ $commitTitle = $revision . ' ' . $commit->comment;
+ echo "
" . ($canViewRevision ? html::a($this->createLink('repo', 'revision', "repoID={$commit->repo}&objectID=0&revision={$commit->revision}"), $revision) . " $commit->comment" : $commitTitle) . '
';
}
?>
From e4dac840b417ed404327244aed8adc8bcbf089c7 Mon Sep 17 00:00:00 2001
From: liyuchun <563917701@qq.com>
Date: Mon, 29 Aug 2022 13:03:27 +0800
Subject: [PATCH 3/3] * Fix bug of subversion.
---
lib/scm/subversion.class.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/scm/subversion.class.php b/lib/scm/subversion.class.php
index e20b46d48a..9ea925bd22 100644
--- a/lib/scm/subversion.class.php
+++ b/lib/scm/subversion.class.php
@@ -311,7 +311,7 @@ class Subversion
$blame['lines'] = 1;
$blame['content'] = $content[$blame['line'] - 1];
- $log = $this->log('', 0, 'HEAD', 1);
+ $log = $this->log('', $blame['revision'], 'HEAD', 1);
$blame['message'] = $log[0]->comment;
$revision = $blame['revision'];