From 57ed6b749a31568570ea9b8a6d88e25a9e9e2a4f Mon Sep 17 00:00:00 2001 From: Chad Little Date: Mon, 4 Apr 2016 21:04:58 -0700 Subject: [PATCH] Update Help for newPage Summary: Swaps over to `newPage` and `newDialog` Test Plan: Unsure how to actually pull these up? Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D15617 --- .../PhabricatorHelpDocumentationController.php | 12 ++++-------- .../PhabricatorHelpEditorProtocolController.php | 6 +----- .../PhabricatorHelpKeyboardShortcutController.php | 5 +---- 3 files changed, 6 insertions(+), 17 deletions(-) diff --git a/src/applications/help/controller/PhabricatorHelpDocumentationController.php b/src/applications/help/controller/PhabricatorHelpDocumentationController.php index ce4dc38f42..4983520bab 100644 --- a/src/applications/help/controller/PhabricatorHelpDocumentationController.php +++ b/src/applications/help/controller/PhabricatorHelpDocumentationController.php @@ -38,14 +38,10 @@ final class PhabricatorHelpDocumentationController $crumbs = $this->buildApplicationCrumbs(); $crumbs->addTextCrumb($title); - return $this->buildApplicationPage( - array( - $crumbs, - $list, - ), - array( - 'title' => $title, - )); + return $this->newPage() + ->setTitle($title) + ->setCrumbs($crumbs) + ->appendChild($list); } diff --git a/src/applications/help/controller/PhabricatorHelpEditorProtocolController.php b/src/applications/help/controller/PhabricatorHelpEditorProtocolController.php index 010e41ffcd..22ad0f8d2d 100644 --- a/src/applications/help/controller/PhabricatorHelpEditorProtocolController.php +++ b/src/applications/help/controller/PhabricatorHelpEditorProtocolController.php @@ -10,8 +10,7 @@ final class PhabricatorHelpEditorProtocolController public function handleRequest(AphrontRequest $request) { $viewer = $request->getViewer(); - $dialog = id(new AphrontDialogView()) - ->setUser($viewer) + return $this->newDialog() ->setMethod('GET') ->setSubmitURI('/settings/panel/display/') ->setTitle(pht('Unsupported Editor Protocol')) @@ -24,9 +23,6 @@ final class PhabricatorHelpEditorProtocolController phutil_tag('tt', array(), 'uri.allowed-editor-protocols'))) ->addSubmitButton(pht('Change Settings')) ->addCancelButton('/'); - - return id(new AphrontDialogResponse()) - ->setDialog($dialog); } public static function hasAllowedProtocol($uri) { diff --git a/src/applications/help/controller/PhabricatorHelpKeyboardShortcutController.php b/src/applications/help/controller/PhabricatorHelpKeyboardShortcutController.php index b136265d7f..80bd259c48 100644 --- a/src/applications/help/controller/PhabricatorHelpKeyboardShortcutController.php +++ b/src/applications/help/controller/PhabricatorHelpKeyboardShortcutController.php @@ -57,14 +57,11 @@ final class PhabricatorHelpKeyboardShortcutController array('class' => 'keyboard-shortcut-help'), $rows); - $dialog = id(new AphrontDialogView()) - ->setUser($viewer) + return $this->newDialog() ->setTitle(pht('Keyboard Shortcuts')) ->appendChild($table) ->addCancelButton('#', pht('Close')); - return id(new AphrontDialogResponse()) - ->setDialog($dialog); } }