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:
@@ -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(),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user