1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-27 09:12:41 +01:00

Swap Maniphest edit writes to new transactions

Summary: Ref T2217. This is essentially the last writer, should be able to start deleting code now.

Test Plan: Used "Edit Task" to make a bunch of task edits.

Reviewers: btrahan, garoevans

Reviewed By: garoevans

CC: aran

Maniphest Tasks: T2217

Differential Revision: https://secure.phabricator.com/D7090
This commit is contained in:
epriestley 2013-09-24 06:26:59 -07:00
parent c71a5fc0c9
commit 234de8f824
2 changed files with 7 additions and 7 deletions

View file

@ -210,9 +210,7 @@ final class ManiphestTaskEditController extends ManiphestController {
'ip' => $request->getRemoteAddr(),
));
$template = new ManiphestTransaction();
$template->setAuthorPHID($user->getPHID());
$template->setContentSource($content_source);
$template = new ManiphestTransactionPro();
$transactions = array();
foreach ($changes as $type => $value) {
@ -265,10 +263,11 @@ final class ManiphestTaskEditController extends ManiphestController {
$task = $event->getValue('task');
$transactions = $event->getValue('transactions');
$editor = new ManiphestTransactionEditor();
$editor->setActor($user);
$editor->setAuxiliaryFields($aux_fields);
$editor->applyTransactions($task, $transactions);
$editor = id(new ManiphestTransactionEditorPro())
->setActor($user)
->setContentSourceFromRequest($request)
->setContinueOnNoEffect(true)
->applyTransactions($task, $transactions);
$event = new PhabricatorEvent(
PhabricatorEventType::TYPE_MANIPHEST_DIDEDITTASK,

View file

@ -379,6 +379,7 @@ abstract class PhabricatorApplicationTransactionEditor
$xaction->setAuthorPHID($actor->getPHID());
$xaction->setContentSource($this->getContentSource());
$xaction->attachViewer($this->getActor());
}
$is_preview = $this->getIsPreview();