From 81244015c1f4786d657d20d1810aa00ce967eed9 Mon Sep 17 00:00:00 2001 From: vrana Date: Tue, 17 Apr 2012 23:35:22 -0700 Subject: [PATCH] Display author in paste detail Summary: This is not very nice. Test Plan: /P1 Reviewers: codeblock Reviewed By: codeblock CC: aran, epriestley Differential Revision: https://secure.phabricator.com/D2267 --- .../controller/view/PhabricatorPasteViewController.php | 10 +++++----- src/applications/paste/controller/view/__init__.php | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/applications/paste/controller/view/PhabricatorPasteViewController.php b/src/applications/paste/controller/view/PhabricatorPasteViewController.php index a8d2e3a869..bcef68d16f 100644 --- a/src/applications/paste/controller/view/PhabricatorPasteViewController.php +++ b/src/applications/paste/controller/view/PhabricatorPasteViewController.php @@ -48,13 +48,13 @@ final class PhabricatorPasteViewController extends PhabricatorPasteController { $corpus = $this->buildCorpus($paste, $file); $paste_panel = new AphrontPanelView(); + $author_phid = $paste->getAuthorPHID(); + $header = 'Viewing Paste '.$paste->getID().' by '. + PhabricatorObjectHandleData::loadOneHandle($author_phid)->renderLink(); if (strlen($paste->getTitle())) { - $paste_panel->setHeader( - 'Viewing Paste '.$paste->getID().' - '. - phutil_escape_html($paste->getTitle())); - } else { - $paste_panel->setHeader('Viewing Paste '.$paste->getID()); + $header .= ' - '.phutil_escape_html($paste->getTitle()); } + $paste_panel->setHeader($header); $paste_panel->setWidth(AphrontPanelView::WIDTH_FULL); $paste_panel->addButton( diff --git a/src/applications/paste/controller/view/__init__.php b/src/applications/paste/controller/view/__init__.php index 635b80b2ca..0e20e7aa46 100644 --- a/src/applications/paste/controller/view/__init__.php +++ b/src/applications/paste/controller/view/__init__.php @@ -13,6 +13,7 @@ phutil_require_module('phabricator', 'applications/markup/syntax'); phutil_require_module('phabricator', 'applications/paste/controller/base'); phutil_require_module('phabricator', 'applications/paste/query/paste'); phutil_require_module('phabricator', 'applications/paste/storage/paste'); +phutil_require_module('phabricator', 'applications/phid/handle/data'); phutil_require_module('phabricator', 'infrastructure/celerity/api'); phutil_require_module('phabricator', 'infrastructure/javelin/api'); phutil_require_module('phabricator', 'view/control/table');