Fix Diffusion blame columns when disabling blame

Summary:
Fixes T10385. Two issues:

  - `$show_blame` and `$show_color` were improperly swapped.
  - Code to hide these columns got dropped somewhere, probably in my recent-ish rewrite.

Test Plan:
  - Showed/hid blame.
  - Showed/hid colors.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10385

Differential Revision: https://secure.phabricator.com/D15528
This commit is contained in:
epriestley
2016-03-26 11:51:47 -07:00
parent 601aaa5a86
commit 060f96079d

View File

@@ -995,8 +995,8 @@ final class DiffusionBrowseController extends DiffusionController {
array $lines, array $lines,
array $blame_list, array $blame_list,
array $blame_commits, array $blame_commits,
$show_color, $show_blame,
$show_blame) { $show_color) {
$request = $this->getRequest(); $request = $this->getRequest();
$viewer = $this->getViewer(); $viewer = $this->getViewer();
@@ -1233,27 +1233,29 @@ final class DiffusionBrowseController extends DiffusionController {
"\xC2\xAB"); "\xC2\xAB");
} }
$row[] = phutil_tag( if ($show_blame) {
'th', $row[] = phutil_tag(
array( 'th',
'class' => 'diffusion-blame-link', array(
), 'class' => 'diffusion-blame-link',
$before_link); ),
$before_link);
$object_links = array(); $object_links = array();
$object_links[] = $commit_link; $object_links[] = $commit_link;
if ($revision_link) { if ($revision_link) {
$object_links[] = phutil_tag('span', array(), '/'); $object_links[] = phutil_tag('span', array(), '/');
$object_links[] = $revision_link; $object_links[] = $revision_link;
}
$row[] = phutil_tag(
'th',
array(
'class' => 'diffusion-rev-link',
),
$object_links);
} }
$row[] = phutil_tag(
'th',
array(
'class' => 'diffusion-rev-link',
),
$object_links);
$line_link = phutil_tag( $line_link = phutil_tag(
'a', 'a',
array( array(