Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15376949
D13763.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D13763.diff
View Options
diff --git a/src/applications/chatlog/controller/PhabricatorChatLogChannelListController.php b/src/applications/chatlog/controller/PhabricatorChatLogChannelListController.php
--- a/src/applications/chatlog/controller/PhabricatorChatLogChannelListController.php
+++ b/src/applications/chatlog/controller/PhabricatorChatLogChannelListController.php
@@ -7,12 +7,11 @@
return true;
}
- public function processRequest() {
- $request = $this->getRequest();
- $user = $request->getUser();
+ public function handleRequest(AphrontRequest $request) {
+ $viewer = $request->getViewer();
$channels = id(new PhabricatorChatLogChannelQuery())
- ->setViewer($user)
+ ->setViewer($viewer)
->execute();
$list = new PHUIObjectItemListView();
diff --git a/src/applications/chatlog/controller/PhabricatorChatLogChannelLogController.php b/src/applications/chatlog/controller/PhabricatorChatLogChannelLogController.php
--- a/src/applications/chatlog/controller/PhabricatorChatLogChannelLogController.php
+++ b/src/applications/chatlog/controller/PhabricatorChatLogChannelLogController.php
@@ -3,19 +3,13 @@
final class PhabricatorChatLogChannelLogController
extends PhabricatorChatLogController {
- private $channelID;
-
public function shouldAllowPublic() {
return true;
}
- public function willProcessRequest(array $data) {
- $this->channelID = $data['channelID'];
- }
-
- public function processRequest() {
- $request = $this->getRequest();
- $user = $request->getUser();
+ public function handleRequest(AphrontRequest $request) {
+ $viewer = $request->getViewer();
+ $id = $request->getURIData('channelID');
$uri = clone $request->getRequestURI();
$uri->setQueryParams(array());
@@ -25,12 +19,12 @@
$pager->setPageSize(250);
$query = id(new PhabricatorChatLogQuery())
- ->setViewer($user)
- ->withChannelIDs(array($this->channelID));
+ ->setViewer($viewer)
+ ->withChannelIDs(array($id));
$channel = id(new PhabricatorChatLogChannelQuery())
- ->setViewer($user)
- ->withIDs(array($this->channelID))
+ ->setViewer($viewer)
+ ->withIDs(array($id))
->executeOne();
if (!$channel) {
@@ -115,7 +109,7 @@
$href = $uri->alter('at', $block['id']);
$timestamp = $block['epoch'];
- $timestamp = phabricator_datetime($timestamp, $user);
+ $timestamp = phabricator_datetime($timestamp, $viewer);
$timestamp = phutil_tag(
'a',
array(
@@ -189,7 +183,7 @@
->addTextCrumb($channel->getChannelName(), $uri);
$form = id(new AphrontFormView())
- ->setUser($user)
+ ->setUser($viewer)
->setMethod('GET')
->setAction($uri)
->appendChild(
@@ -273,7 +267,7 @@
AphrontRequest $request,
PhabricatorChatLogQuery $query) {
- $user = $request->getUser();
+ $viewer = $request->getViewer();
$at_id = $request->getInt('at');
$at_date = $request->getStr('date');
@@ -298,7 +292,7 @@
);
} else if ($at_date) {
- $timestamp = PhabricatorTime::parseLocalTime($at_date, $user);
+ $timestamp = PhabricatorTime::parseLocalTime($at_date, $viewer);
if ($timestamp) {
$context_logs = $query
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Mar 14, 6:45 AM (1 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7640196
Default Alt Text
D13763.diff (3 KB)
Attached To
Mode
D13763: Update Chatlog for handleRequest
Attached
Detach File
Event Timeline
Log In to Comment