@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.

Update Daemons for handleRequest

Summary: Updates the Daemon application calls

Test Plan: Click on various things in the Daemon app

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

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

+16 -35
+3 -9
src/applications/daemon/controller/PhabricatorDaemonLogEventViewController.php
··· 3 3 final class PhabricatorDaemonLogEventViewController 4 4 extends PhabricatorDaemonController { 5 5 6 - private $id; 7 - 8 - public function willProcessRequest(array $data) { 9 - $this->id = $data['id']; 10 - } 11 - 12 - public function processRequest() { 13 - $request = $this->getRequest(); 6 + public function handleRequest(AphrontRequest $request) { 7 + $id = $request->getURIData('id'); 14 8 15 - $event = id(new PhabricatorDaemonLogEvent())->load($this->id); 9 + $event = id(new PhabricatorDaemonLogEvent())->load($id); 16 10 if (!$event) { 17 11 return new Aphront404Response(); 18 12 }
+2 -3
src/applications/daemon/controller/PhabricatorDaemonLogListController.php
··· 3 3 final class PhabricatorDaemonLogListController 4 4 extends PhabricatorDaemonController { 5 5 6 - public function processRequest() { 7 - $request = $this->getRequest(); 8 - $viewer = $request->getUser(); 6 + public function handleRequest(AphrontRequest $request) { 7 + $viewer = $request->getViewer(); 9 8 10 9 $pager = new AphrontCursorPagerView(); 11 10 $pager->readFromRequest($request);
+6 -12
src/applications/daemon/controller/PhabricatorDaemonLogViewController.php
··· 3 3 final class PhabricatorDaemonLogViewController 4 4 extends PhabricatorDaemonController { 5 5 6 - private $id; 7 - 8 - public function willProcessRequest(array $data) { 9 - $this->id = $data['id']; 10 - } 11 - 12 - public function processRequest() { 13 - $request = $this->getRequest(); 14 - $user = $request->getUser(); 6 + public function handleRequest(AphrontRequest $request) { 7 + $viewer = $request->getViewer(); 8 + $id = $request->getURIData('id'); 15 9 16 10 $log = id(new PhabricatorDaemonLogQuery()) 17 - ->setViewer($user) 18 - ->withIDs(array($this->id)) 11 + ->setViewer($viewer) 12 + ->withIDs(array($id)) 19 13 ->setAllowStatusWrites(true) 20 14 ->executeOne(); 21 15 if (!$log) { ··· 76 70 $properties = $this->buildPropertyListView($log); 77 71 78 72 $event_view = id(new PhabricatorDaemonLogEventsView()) 79 - ->setUser($user) 73 + ->setUser($viewer) 80 74 ->setEvents($events); 81 75 82 76 $event_panel = new PHUIObjectBoxView();
+5 -11
src/applications/daemon/controller/PhabricatorWorkerTaskDetailController.php
··· 3 3 final class PhabricatorWorkerTaskDetailController 4 4 extends PhabricatorDaemonController { 5 5 6 - private $id; 7 - 8 - public function willProcessRequest(array $data) { 9 - $this->id = $data['id']; 10 - } 11 - 12 - public function processRequest() { 13 - $request = $this->getRequest(); 14 - $user = $request->getUser(); 6 + public function handleRequest(AphrontRequest $request) { 7 + $viewer = $request->getViewer(); 8 + $id = $request->getURIData('id'); 15 9 16 - $task = id(new PhabricatorWorkerActiveTask())->load($this->id); 10 + $task = id(new PhabricatorWorkerActiveTask())->load($id); 17 11 if (!$task) { 18 12 $tasks = id(new PhabricatorWorkerArchiveTaskQuery()) 19 - ->withIDs(array($this->id)) 13 + ->withIDs(array($id)) 20 14 ->execute(); 21 15 $task = reset($tasks); 22 16 }