@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
at upstream/main 51 lines 1.1 kB view raw
1<?php 2 3final class DifferentialChangesetListController 4 extends DifferentialController { 5 6 private $diff; 7 8 public function shouldAllowPublic() { 9 return true; 10 } 11 12 public function handleRequest(AphrontRequest $request) { 13 $viewer = $this->getViewer(); 14 15 $diff = id(new DifferentialDiffQuery()) 16 ->setViewer($viewer) 17 ->withIDs(array($request->getURIData('id'))) 18 ->executeOne(); 19 if (!$diff) { 20 return new Aphront404Response(); 21 } 22 $this->diff = $diff; 23 24 return id(new DifferentialChangesetSearchEngine()) 25 ->setController($this) 26 ->setDiff($diff) 27 ->buildResponse(); 28 } 29 30 protected function buildApplicationCrumbs() { 31 $crumbs = parent::buildApplicationCrumbs(); 32 33 $diff = $this->diff; 34 if ($diff) { 35 $revision = $diff->getRevision(); 36 if ($revision) { 37 $crumbs->addTextCrumb( 38 $revision->getMonogram(), 39 $revision->getURI()); 40 } 41 42 $crumbs->addTextCrumb( 43 pht('Diff %d', $diff->getID()), 44 $diff->getURI()); 45 } 46 47 return $crumbs; 48 } 49 50 51}