@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Slightly modernize transaction diff controller

Summary: Ref T9272. This doesn't fix anything, just a little cleanup while I was looking at it.

Test Plan: Clicked "Show Details" on a couple description changes, got the same effect for less code.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9272

Differential Revision: https://secure.phabricator.com/D14168

+6 -15
+6 -15
src/applications/transactions/controller/PhabricatorApplicationTransactionDetailController.php
··· 3 3 final class PhabricatorApplicationTransactionDetailController 4 4 extends PhabricatorApplicationTransactionController { 5 5 6 - private $phid; 7 - 8 6 public function shouldAllowPublic() { 9 7 return true; 10 8 } 11 9 12 - public function willProcessRequest(array $data) { 13 - $this->phid = $data['phid']; 14 - } 15 - 16 - public function processRequest() { 17 - $request = $this->getRequest(); 18 - $viewer = $request->getUser(); 10 + public function handleRequest(AphrontRequest $request) { 11 + $viewer = $this->getViewer(); 12 + $phid = $request->getURIData('phid'); 19 13 20 14 $xaction = id(new PhabricatorObjectQuery()) 21 - ->withPHIDs(array($this->phid)) 15 + ->withPHIDs(array($phid)) 22 16 ->setViewer($viewer) 23 17 ->executeOne(); 24 18 if (!$xaction) { ··· 26 20 } 27 21 28 22 $details = $xaction->renderChangeDetails($viewer); 29 - 30 23 $cancel_uri = $this->guessCancelURI($viewer, $xaction); 31 - $dialog = id(new AphrontDialogView()) 32 - ->setUser($viewer) 24 + 25 + return $this->newDialog() 33 26 ->setTitle(pht('Change Details')) 34 27 ->setWidth(AphrontDialogView::WIDTH_FULL) 35 28 ->setFlush(true) 36 29 ->appendChild($details) 37 30 ->addCancelButton($cancel_uri); 38 - 39 - return id(new AphrontDialogResponse())->setDialog($dialog); 40 31 } 41 32 42 33 }