From ec8b4457271e5cdba82bed2775c3c37f938354a7 Mon Sep 17 00:00:00 2001 From: epriestley Date: Wed, 28 Mar 2012 20:03:16 -0700 Subject: [PATCH] If there are no flagged revisions, don't show anything on "Active Revisions" Test Plan: Looked at /differential/ with and without flags. Reviewers: nh, btrahan Reviewed By: nh CC: aran, epriestley Maniphest Tasks: T1055 Differential Revision: https://secure.phabricator.com/D2044 --- .../DifferentialRevisionListController.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/applications/differential/controller/revisionlist/DifferentialRevisionListController.php b/src/applications/differential/controller/revisionlist/DifferentialRevisionListController.php index 7a1c5823e9..40abaaf016 100644 --- a/src/applications/differential/controller/revisionlist/DifferentialRevisionListController.php +++ b/src/applications/differential/controller/revisionlist/DifferentialRevisionListController.php @@ -452,15 +452,17 @@ final class DifferentialRevisionListController extends DifferentialController { ->needHandles(true) ->execute(); - $view = id(new PhabricatorFlagListView()) - ->setFlags($flags) - ->setUser($user); + if ($flags) { + $view = id(new PhabricatorFlagListView()) + ->setFlags($flags) + ->setUser($user); - $views[] = array( - 'title' => 'Flagged Revisions', - 'view' => $view, - 'special' => true, - ); + $views[] = array( + 'title' => 'Flagged Revisions', + 'view' => $view, + 'special' => true, + ); + } } $view = id(clone $template)