1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-21 04:50:55 +01:00

Remove the <a> 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
This commit is contained in:
tuomaspelkonen 2011-10-18 12:58:45 -07:00
parent a102c9a0fe
commit b63393d056
2 changed files with 12 additions and 4 deletions

View file

@ -223,7 +223,11 @@ class DiffusionBrowseFileController extends DiffusionController {
$rows = array(); $rows = array();
foreach ($text_list as $k => $line) { foreach ($text_list as $k => $line) {
$rev = $rev_list[$k]; $rev = $rev_list[$k];
if (isset($blame_dict[$rev]['handle'])) {
$author = $blame_dict[$rev]['handle']->getName();
} else {
$author = $blame_dict[$rev]['author']; $author = $blame_dict[$rev]['author'];
}
$rows[] = $rows[] =
sprintf("%-10s %-20s %s", substr($rev, 0, 7), $author, $line); sprintf("%-10s %-20s %s", substr($rev, 0, 7), $author, $line);
} }
@ -328,7 +332,11 @@ class DiffusionBrowseFileController extends DiffusionController {
'; width: 2em;">' . $prev_link . '</th>'; '; width: 2em;">' . $prev_link . '</th>';
} }
$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 = $blame_info =
$prev_link . $prev_link .
'<th style="background: '.$color. '<th style="background: '.$color.

View file

@ -126,8 +126,8 @@ abstract class DiffusionFileContentQuery {
if ($data->getCommitDetail('authorPHID')) { if ($data->getCommitDetail('authorPHID')) {
$commit_identifier = $commit_identifier =
$commits[$data->getCommitID()]->getCommitIdentifier(); $commits[$data->getCommitID()]->getCommitIdentifier();
$blame_dict[$commit_identifier]['author'] = $blame_dict[$commit_identifier]['handle'] =
$handles[$data->getCommitDetail('authorPHID')]->renderLink(); $handles[$data->getCommitDetail('authorPHID')];
} }
} }
} }