1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-22 21:40:55 +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->save();
$paste->attachContent($content);
$paste->attachRawContent($content);
return $this->buildPasteInfoDictionary($paste);
}

View file

@ -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');

View file

@ -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'));