From 060f96079def51aa7cb6d32daf7c286c49c45a01 Mon Sep 17 00:00:00 2001 From: epriestley Date: Sat, 26 Mar 2016 11:51:47 -0700 Subject: [PATCH] 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 --- .../controller/DiffusionBrowseController.php | 42 ++++++++++--------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/src/applications/diffusion/controller/DiffusionBrowseController.php b/src/applications/diffusion/controller/DiffusionBrowseController.php index 56d00d53ce..a79613cfa9 100644 --- a/src/applications/diffusion/controller/DiffusionBrowseController.php +++ b/src/applications/diffusion/controller/DiffusionBrowseController.php @@ -995,8 +995,8 @@ final class DiffusionBrowseController extends DiffusionController { array $lines, array $blame_list, array $blame_commits, - $show_color, - $show_blame) { + $show_blame, + $show_color) { $request = $this->getRequest(); $viewer = $this->getViewer(); @@ -1233,27 +1233,29 @@ final class DiffusionBrowseController extends DiffusionController { "\xC2\xAB"); } - $row[] = phutil_tag( - 'th', - array( - 'class' => 'diffusion-blame-link', - ), - $before_link); + if ($show_blame) { + $row[] = phutil_tag( + 'th', + array( + 'class' => 'diffusion-blame-link', + ), + $before_link); - $object_links = array(); - $object_links[] = $commit_link; - if ($revision_link) { - $object_links[] = phutil_tag('span', array(), '/'); - $object_links[] = $revision_link; + $object_links = array(); + $object_links[] = $commit_link; + if ($revision_link) { + $object_links[] = phutil_tag('span', array(), '/'); + $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( 'a', array(