1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-20 20:40:56 +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();
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 . '</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 =
$prev_link .
'<th style="background: '.$color.

View file

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