1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-22 14:52:41 +01:00

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
This commit is contained in:
Nick Harper 2012-12-20 13:14:18 -08:00
parent 2f32aebf6f
commit 45b66be96d
3 changed files with 3 additions and 3 deletions

View file

@ -57,7 +57,7 @@ final class ConduitAPI_paste_create_Method extends ConduitAPI_paste_Method {
$paste->setViewPolicy(PhabricatorPolicies::POLICY_USER); $paste->setViewPolicy(PhabricatorPolicies::POLICY_USER);
$paste->save(); $paste->save();
$paste->attachContent($content); $paste->attachRawContent($content);
return $this->buildPasteInfoDictionary($paste); return $this->buildPasteInfoDictionary($paste);
} }

View file

@ -38,7 +38,7 @@ final class ConduitAPI_paste_info_Method extends ConduitAPI_paste_Method {
$paste = id(new PhabricatorPasteQuery()) $paste = id(new PhabricatorPasteQuery())
->setViewer($request->getUser()) ->setViewer($request->getUser())
->withIDs(array($paste_id)) ->withIDs(array($paste_id))
->needContent(true) ->needRawContent(true)
->executeOne(); ->executeOne();
if (!$paste) { if (!$paste) {
throw new ConduitException('ERR_BAD_PASTE'); throw new ConduitException('ERR_BAD_PASTE');

View file

@ -30,7 +30,7 @@ final class ConduitAPI_paste_query_Method extends ConduitAPI_paste_Method {
protected function execute(ConduitAPIRequest $request) { protected function execute(ConduitAPIRequest $request) {
$query = id(new PhabricatorPasteQuery()) $query = id(new PhabricatorPasteQuery())
->setViewer($request->getUser()) ->setViewer($request->getUser())
->needContent(true); ->needRawContent(true);
if ($request->getValue('ids')) { if ($request->getValue('ids')) {
$query->withIDs($request->getValue('ids')); $query->withIDs($request->getValue('ids'));