From 7b8da999142914ef685c4f4f109d60aba7c06fb6 Mon Sep 17 00:00:00 2001 From: epriestley Date: Thu, 10 Mar 2016 13:18:58 -0800 Subject: [PATCH] Move DifferentialRevisionViewController to newPage() Summary: I think this works? Test Plan: i am wizard {F1168808} Reviewers: chad Reviewed By: chad Differential Revision: https://secure.phabricator.com/D15457 --- .../DifferentialRevisionViewController.php | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/applications/differential/controller/DifferentialRevisionViewController.php b/src/applications/differential/controller/DifferentialRevisionViewController.php index ccd24220b5..afd5875a1a 100644 --- a/src/applications/differential/controller/DifferentialRevisionViewController.php +++ b/src/applications/differential/controller/DifferentialRevisionViewController.php @@ -481,19 +481,21 @@ final class DifferentialRevisionViewController extends DifferentialController { ->setBaseURI(new PhutilURI('/D'.$revision->getID())) ->setCollapsed((bool)$collapsed) ->build($changesets); - $nav->appendChild($content); - $nav->setCrumbs($crumbs); - $content = $nav; } else { - array_unshift($content, $crumbs); + $nav = null; } - return $this->buildApplicationPage( - $content, - array( - 'title' => $object_id.' '.$revision->getTitle(), - 'pageObjects' => array($revision->getPHID()), - )); + $page = $this->newPage() + ->setTitle($object_id.' '.$revision->getTitle()) + ->setCrumbs($crumbs) + ->setPageObjectPHIDs(array($revision->getPHID())) + ->appendChild($content); + + if ($nav) { + $page->setNavigation($nav); + } + + return $page; } private function getRevisionActions(DifferentialRevision $revision) {