From 6d5c9e897d31dd3d4508cddb1ff4990911de5f61 Mon Sep 17 00:00:00 2001 From: epriestley Date: Tue, 29 Sep 2015 07:09:12 -0700 Subject: [PATCH] Hide "Revision" column in Diffusion history view if Differential is uninstalled Summary: Fixes T9481. If the viewer does not have access to Differential (for example, because it is not installed), hide the "Revision" column in Diffusion. Test Plan: - Viewed history, saw "Revision" column. - Uninstalled Differential, reloaded, no "Revision" column. Reviewers: chad Reviewed By: chad Subscribers: revi Maniphest Tasks: T9481 Differential Revision: https://secure.phabricator.com/D14188 --- .../diffusion/view/DiffusionHistoryTableView.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/applications/diffusion/view/DiffusionHistoryTableView.php b/src/applications/diffusion/view/DiffusionHistoryTableView.php index fd5f463b34..80989efdf2 100644 --- a/src/applications/diffusion/view/DiffusionHistoryTableView.php +++ b/src/applications/diffusion/view/DiffusionHistoryTableView.php @@ -88,6 +88,11 @@ final class DiffusionHistoryTableView extends DiffusionView { $drequest = $this->getDiffusionRequest(); $viewer = $this->getUser(); + + $show_revisions = PhabricatorApplication::isClassInstalledForViewer( + 'PhabricatorDifferentialApplication', + $viewer); + $handles = $viewer->loadHandles($this->getRequiredHandlePHIDs()); $graph = null; @@ -242,6 +247,10 @@ final class DiffusionHistoryTableView extends DiffusionView { $view->setColumnVisibility( array( $graph ? true : false, + true, + true, + true, + $show_revisions, )); $view->setDeviceVisibility( array(