From b63393d056c493ac0ff4210e82f80c1a0dcb7e29 Mon Sep 17 00:00:00 2001 From: tuomaspelkonen Date: Tue, 18 Oct 2011 12:58:45 -0700 Subject: [PATCH] Remove the tags from author name in 'View as Plain Text with Blame' Summary: It looked stupid. Test Plan: It looks better now and other options still work. Reviewers: epriestley, jungejason Reviewed By: epriestley CC: aran, epriestley, tuomaspelkonen Differential Revision: 1017 --- .../file/DiffusionBrowseFileController.php | 12 ++++++++++-- .../filecontent/base/DiffusionFileContentQuery.php | 4 ++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/applications/diffusion/controller/file/DiffusionBrowseFileController.php b/src/applications/diffusion/controller/file/DiffusionBrowseFileController.php index a0ac7b1a1d..859420fa64 100644 --- a/src/applications/diffusion/controller/file/DiffusionBrowseFileController.php +++ b/src/applications/diffusion/controller/file/DiffusionBrowseFileController.php @@ -223,7 +223,11 @@ class DiffusionBrowseFileController extends DiffusionController { $rows = array(); foreach ($text_list as $k => $line) { $rev = $rev_list[$k]; - $author = $blame_dict[$rev]['author']; + if (isset($blame_dict[$rev]['handle'])) { + $author = $blame_dict[$rev]['handle']->getName(); + } else { + $author = $blame_dict[$rev]['author']; + } $rows[] = sprintf("%-10s %-20s %s", substr($rev, 0, 7), $author, $line); } @@ -328,7 +332,11 @@ class DiffusionBrowseFileController extends DiffusionController { '; width: 2em;">' . $prev_link . ''; } - $author_link = $blame_dict[$rev]['author']; + if (isset($blame_dict[$rev]['handle'])) { + $author_link = $blame_dict[$rev]['handle']->renderLink(); + } else { + $author_link = phutil_escape_html($blame_dict[$rev]['author']); + } $blame_info = $prev_link . '