@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 Chatlog for handleRequest

Summary: Updates Chatlog

Test Plan: Use Chatlog

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

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

+14 -21
+3 -4
src/applications/chatlog/controller/PhabricatorChatLogChannelListController.php
··· 7 7 return true; 8 8 } 9 9 10 - public function processRequest() { 11 - $request = $this->getRequest(); 12 - $user = $request->getUser(); 10 + public function handleRequest(AphrontRequest $request) { 11 + $viewer = $request->getViewer(); 13 12 14 13 $channels = id(new PhabricatorChatLogChannelQuery()) 15 - ->setViewer($user) 14 + ->setViewer($viewer) 16 15 ->execute(); 17 16 18 17 $list = new PHUIObjectItemListView();
+11 -17
src/applications/chatlog/controller/PhabricatorChatLogChannelLogController.php
··· 3 3 final class PhabricatorChatLogChannelLogController 4 4 extends PhabricatorChatLogController { 5 5 6 - private $channelID; 7 - 8 6 public function shouldAllowPublic() { 9 7 return true; 10 8 } 11 9 12 - public function willProcessRequest(array $data) { 13 - $this->channelID = $data['channelID']; 14 - } 15 - 16 - public function processRequest() { 17 - $request = $this->getRequest(); 18 - $user = $request->getUser(); 10 + public function handleRequest(AphrontRequest $request) { 11 + $viewer = $request->getViewer(); 12 + $id = $request->getURIData('channelID'); 19 13 20 14 $uri = clone $request->getRequestURI(); 21 15 $uri->setQueryParams(array()); ··· 25 19 $pager->setPageSize(250); 26 20 27 21 $query = id(new PhabricatorChatLogQuery()) 28 - ->setViewer($user) 29 - ->withChannelIDs(array($this->channelID)); 22 + ->setViewer($viewer) 23 + ->withChannelIDs(array($id)); 30 24 31 25 $channel = id(new PhabricatorChatLogChannelQuery()) 32 - ->setViewer($user) 33 - ->withIDs(array($this->channelID)) 26 + ->setViewer($viewer) 27 + ->withIDs(array($id)) 34 28 ->executeOne(); 35 29 36 30 if (!$channel) { ··· 115 109 116 110 $href = $uri->alter('at', $block['id']); 117 111 $timestamp = $block['epoch']; 118 - $timestamp = phabricator_datetime($timestamp, $user); 112 + $timestamp = phabricator_datetime($timestamp, $viewer); 119 113 $timestamp = phutil_tag( 120 114 'a', 121 115 array( ··· 189 183 ->addTextCrumb($channel->getChannelName(), $uri); 190 184 191 185 $form = id(new AphrontFormView()) 192 - ->setUser($user) 186 + ->setUser($viewer) 193 187 ->setMethod('GET') 194 188 ->setAction($uri) 195 189 ->appendChild( ··· 273 267 AphrontRequest $request, 274 268 PhabricatorChatLogQuery $query) { 275 269 276 - $user = $request->getUser(); 270 + $viewer = $request->getViewer(); 277 271 278 272 $at_id = $request->getInt('at'); 279 273 $at_date = $request->getStr('date'); ··· 298 292 ); 299 293 300 294 } else if ($at_date) { 301 - $timestamp = PhabricatorTime::parseLocalTime($at_date, $user); 295 + $timestamp = PhabricatorTime::parseLocalTime($at_date, $viewer); 302 296 303 297 if ($timestamp) { 304 298 $context_logs = $query