From f9e838024c717563ed868934f4a1a63fa5f27371 Mon Sep 17 00:00:00 2001 From: Joshua Spence Date: Sun, 21 Jun 2015 11:08:54 +1000 Subject: [PATCH] Hide repository from atom view if it hasn't been set Summary: Fixes T8626. I guess that `$this->getViewer()->renderHandle(null)` renders as "Unknown Object", which is somewhat odd to me. Test Plan: Viewed an atom from a book without a repository linked to it. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: epriestley, Korvin Maniphest Tasks: T8626 Differential Revision: https://secure.phabricator.com/D13370 --- src/applications/diviner/controller/DivinerAtomController.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/applications/diviner/controller/DivinerAtomController.php b/src/applications/diviner/controller/DivinerAtomController.php index f5b5b6d9e1..c4e64451e4 100644 --- a/src/applications/diviner/controller/DivinerAtomController.php +++ b/src/applications/diviner/controller/DivinerAtomController.php @@ -300,6 +300,10 @@ final class DivinerAtomController extends DivinerController { PHUIPropertyListView $view, DivinerLiveSymbol $symbol) { + if (!$symbol->getRepositoryPHID()) { + return; + } + $view->addProperty( pht('Repository'), $this->getViewer()->renderHandle($symbol->getRepositoryPHID()));