From 45b66be96df009dc6dd3c85a1a8378f6fde31265 Mon Sep 17 00:00:00 2001 From: Nick Harper Date: Thu, 20 Dec 2012 13:14:18 -0800 Subject: [PATCH] Fix paste (again) Summary: I messed up D4244 (and didn't test it properly) - this change should load the raw content so we can use it. Test Plan: use the conduit console and actually test the paste conduit methods Reviewers: vrana, epriestley, btrahan Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D4245 --- .../paste/conduit/ConduitAPI_paste_create_Method.php | 2 +- src/applications/paste/conduit/ConduitAPI_paste_info_Method.php | 2 +- .../paste/conduit/ConduitAPI_paste_query_Method.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/applications/paste/conduit/ConduitAPI_paste_create_Method.php b/src/applications/paste/conduit/ConduitAPI_paste_create_Method.php index 691d1ee92a..114aea698f 100644 --- a/src/applications/paste/conduit/ConduitAPI_paste_create_Method.php +++ b/src/applications/paste/conduit/ConduitAPI_paste_create_Method.php @@ -57,7 +57,7 @@ final class ConduitAPI_paste_create_Method extends ConduitAPI_paste_Method { $paste->setViewPolicy(PhabricatorPolicies::POLICY_USER); $paste->save(); - $paste->attachContent($content); + $paste->attachRawContent($content); return $this->buildPasteInfoDictionary($paste); } diff --git a/src/applications/paste/conduit/ConduitAPI_paste_info_Method.php b/src/applications/paste/conduit/ConduitAPI_paste_info_Method.php index 0ced162308..2e5956f05e 100644 --- a/src/applications/paste/conduit/ConduitAPI_paste_info_Method.php +++ b/src/applications/paste/conduit/ConduitAPI_paste_info_Method.php @@ -38,7 +38,7 @@ final class ConduitAPI_paste_info_Method extends ConduitAPI_paste_Method { $paste = id(new PhabricatorPasteQuery()) ->setViewer($request->getUser()) ->withIDs(array($paste_id)) - ->needContent(true) + ->needRawContent(true) ->executeOne(); if (!$paste) { throw new ConduitException('ERR_BAD_PASTE'); diff --git a/src/applications/paste/conduit/ConduitAPI_paste_query_Method.php b/src/applications/paste/conduit/ConduitAPI_paste_query_Method.php index 836dbd4391..7f5ad4ff83 100644 --- a/src/applications/paste/conduit/ConduitAPI_paste_query_Method.php +++ b/src/applications/paste/conduit/ConduitAPI_paste_query_Method.php @@ -30,7 +30,7 @@ final class ConduitAPI_paste_query_Method extends ConduitAPI_paste_Method { protected function execute(ConduitAPIRequest $request) { $query = id(new PhabricatorPasteQuery()) ->setViewer($request->getUser()) - ->needContent(true); + ->needRawContent(true); if ($request->getValue('ids')) { $query->withIDs($request->getValue('ids'));