From 63980af01022736732a7ee1cfd3006d21985dd33 Mon Sep 17 00:00:00 2001 From: Ricky Elrod Date: Wed, 29 Jun 2011 03:42:40 -0400 Subject: [PATCH] Add URI to paste.info's response. Summary: Might be useful to include a $paste['uri'] in the response. Specifically for Pxxx responses in phabot. Test Plan: Local Conduit web console. Reviewers: epriestley CC: Differential Revision: 552 --- .../conduit/method/paste/info/ConduitAPI_paste_info_Method.php | 1 + src/applications/conduit/method/paste/info/__init__.php | 1 + 2 files changed, 2 insertions(+) diff --git a/src/applications/conduit/method/paste/info/ConduitAPI_paste_info_Method.php b/src/applications/conduit/method/paste/info/ConduitAPI_paste_info_Method.php index 31831450ba..45cbde1882 100644 --- a/src/applications/conduit/method/paste/info/ConduitAPI_paste_info_Method.php +++ b/src/applications/conduit/method/paste/info/ConduitAPI_paste_info_Method.php @@ -52,6 +52,7 @@ class ConduitAPI_paste_info_Method extends ConduitAPIMethod { 'filePHID' => $paste->getFilePHID(), 'title' => $paste->getTitle(), 'dateCreated' => $paste->getDateCreated(), + 'uri' => PhabricatorEnv::getProductionURI('/P'.$paste->getID()), ); return $result; diff --git a/src/applications/conduit/method/paste/info/__init__.php b/src/applications/conduit/method/paste/info/__init__.php index 1a92ec47f0..eafc577b4e 100644 --- a/src/applications/conduit/method/paste/info/__init__.php +++ b/src/applications/conduit/method/paste/info/__init__.php @@ -9,6 +9,7 @@ phutil_require_module('phabricator', 'applications/conduit/method/base'); phutil_require_module('phabricator', 'applications/conduit/protocol/exception'); phutil_require_module('phabricator', 'applications/paste/storage/paste'); +phutil_require_module('phabricator', 'infrastructure/env'); phutil_require_module('phutil', 'utils');