Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2891636
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
2 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/src/applications/people/view/PhabricatorUserLogView.php b/src/applications/people/view/PhabricatorUserLogView.php
index c467a9010d..c442cfd934 100644
--- a/src/applications/people/view/PhabricatorUserLogView.php
+++ b/src/applications/people/view/PhabricatorUserLogView.php
@@ -1,95 +1,94 @@
<?php
final class PhabricatorUserLogView extends AphrontView {
private $logs;
private $handles;
private $searchBaseURI;
public function setSearchBaseURI($search_base_uri) {
$this->searchBaseURI = $search_base_uri;
return $this;
}
public function setLogs(array $logs) {
assert_instances_of($logs, 'PhabricatorUserLog');
$this->logs = $logs;
return $this;
}
public function setHandles(array $handles) {
assert_instances_of($handles, 'PhabricatorObjectHandle');
$this->handles = $handles;
return $this;
}
public function render() {
$logs = $this->logs;
$handles = $this->handles;
$viewer = $this->getUser();
$action_map = PhabricatorUserLog::getActionTypeMap();
$base_uri = $this->searchBaseURI;
$rows = array();
foreach ($logs as $log) {
-
$ip = $log->getRemoteAddr();
$session = substr($log->getSession(), 0, 6);
if ($base_uri) {
$ip = phutil_tag(
'a',
array(
'href' => $base_uri.'?ip='.$ip.'#R',
),
$ip);
$session = phutil_tag(
'a',
array(
'href' => $base_uri.'?sessions='.$ip.'#R',
),
$session);
}
$action = $log->getAction();
$action_name = idx($action_map, $action, $action);
$rows[] = array(
phabricator_date($log->getDateCreated(), $viewer),
phabricator_time($log->getDateCreated(), $viewer),
$action_name,
$log->getActorPHID()
? $handles[$log->getActorPHID()]->getName()
: null,
- $handles[$log->getUserPHID()]->getName(),
+ $username = $handles[$log->getUserPHID()]->renderLink(),
$ip,
$session,
);
}
$table = new AphrontTableView($rows);
$table->setHeaders(
array(
pht('Date'),
pht('Time'),
pht('Action'),
pht('Actor'),
pht('User'),
pht('IP'),
pht('Session'),
));
$table->setColumnClasses(
array(
'',
'right',
'wide',
'',
'',
'',
'n',
));
return $table;
}
}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sun, Jan 19, 15:30 (3 w, 23 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1126012
Default Alt Text
(2 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment