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

Fix paste

Summary:
The caching introduced by rP7e37eb48273eef87e6e6811703fb5d85a3e07a81
broke the use of PhabricatorPaste::getContent() for forking/editing
pastes and downloading pastes with arc paste. I think this fixes all
the appropriate callsites.

Test Plan: fork a paste in the web ui

Reviewers: vrana, epriestley, btrahan

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4244
This commit is contained in:
Nick Harper 2012-12-20 12:24:34 -08:00
parent eeb97db283
commit 2f32aebf6f
2 changed files with 3 additions and 2 deletions

View file

@ -17,7 +17,7 @@ abstract class ConduitAPI_paste_Method extends ConduitAPIMethod {
'language' => $paste->getLanguage(),
'uri' => PhabricatorEnv::getProductionURI('/P'.$paste->getID()),
'parentPHID' => $paste->getParentPHID(),
'content' => $paste->getContent(),
'content' => $paste->getRawContent(),
);
}

View file

@ -28,6 +28,7 @@ final class PhabricatorPasteEditController extends PhabricatorPasteController {
->setViewer($user)
->withIDs(array($parent_id))
->needContent(true)
->needRawContent(true)
->execute();
$parent = head($parent);
@ -95,7 +96,7 @@ final class PhabricatorPasteEditController extends PhabricatorPasteController {
if ($is_create && $parent) {
$paste->setTitle('Fork of '.$parent->getFullName());
$paste->setLanguage($parent->getLanguage());
$text = $parent->getContent();
$text = $parent->getRawContent();
}
}