Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13962469
D18290.id43983.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D18290.id43983.diff
View Options
diff --git a/src/applications/diffusion/view/DiffusionTagListView.php b/src/applications/diffusion/view/DiffusionTagListView.php
--- a/src/applications/diffusion/view/DiffusionTagListView.php
+++ b/src/applications/diffusion/view/DiffusionTagListView.php
@@ -52,24 +52,12 @@
'commit' => $tag->getCommitIdentifier(),
));
- $author = null;
- if ($commit && $commit->getAuthorPHID()) {
- $author = $this->handles[$commit->getAuthorPHID()]->renderLink();
- } else if ($commit && $commit->getCommitData()) {
- $author = self::renderName($commit->getCommitData()->getAuthorName());
+ if ($commit) {
+ $author = $this->renderAuthor($tag, $commit);
} else {
- $author = self::renderName($tag->getAuthor());
+ $author = null;
}
- $committed = phabricator_datetime($commit->getEpoch(), $viewer);
- $author_name = phutil_tag(
- 'strong',
- array(
- 'class' => 'diffusion-history-author-name',
- ),
- $author);
- $authored = pht('%s on %s.', $author_name, $committed);
-
$description = null;
if ($tag->getType() == 'git/tag') {
// In Git, a tag may be a "real" tag, or just a reference to a commit.
@@ -139,16 +127,43 @@
->setHref($tag_href)
->addAttribute(array($commit_tag))
->addAttribute($description)
- ->addAttribute($authored)
->setSideColumn(array(
$build_view,
$button_bar,
));
+ if ($author) {
+ $item->addAttribute($author);
+ }
+
$list->addItem($item);
}
return $list;
}
+ private function renderAuthor(
+ DiffusionRepositoryTag $tag,
+ PhabricatorRepositoryCommit $commit) {
+ $viewer = $this->getViewer();
+
+ if ($commit->getAuthorPHID()) {
+ $author = $this->handles[$commit->getAuthorPHID()]->renderLink();
+ } else if ($commit->getCommitData()) {
+ $author = self::renderName($commit->getCommitData()->getAuthorName());
+ } else {
+ $author = self::renderName($tag->getAuthor());
+ }
+
+ $committed = phabricator_datetime($commit->getEpoch(), $viewer);
+ $author_name = phutil_tag(
+ 'strong',
+ array(
+ 'class' => 'diffusion-history-author-name',
+ ),
+ $author);
+
+ return pht('%s on %s.', $author_name, $committed);
+ }
+
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Oct 16 2024, 10:16 AM (4 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6717097
Default Alt Text
D18290.id43983.diff (2 KB)
Attached To
Mode
D18290: Don't fatal when viewing tags pointing at commits we haven't imported/parsed yet
Attached
Detach File
Event Timeline
Log In to Comment