Changeset View
Changeset View
Standalone View
Standalone View
src/applications/people/view/PhabricatorUserLogView.php
| Show All 21 Lines | public function render() { | ||||
| $phids = array(); | $phids = array(); | ||||
| foreach ($logs as $log) { | foreach ($logs as $log) { | ||||
| $phids[] = $log->getActorPHID(); | $phids[] = $log->getActorPHID(); | ||||
| $phids[] = $log->getUserPHID(); | $phids[] = $log->getUserPHID(); | ||||
| } | } | ||||
| $handles = $viewer->loadHandles($phids); | $handles = $viewer->loadHandles($phids); | ||||
| $action_map = PhabricatorUserLog::getActionTypeMap(); | $types = PhabricatorUserLogType::getAllLogTypes(); | ||||
| $types = mpull($types, 'getLogTypeName', 'getLogTypeKey'); | |||||
| $base_uri = $this->searchBaseURI; | $base_uri = $this->searchBaseURI; | ||||
| $viewer_phid = $viewer->getPHID(); | $viewer_phid = $viewer->getPHID(); | ||||
| $rows = array(); | $rows = array(); | ||||
| foreach ($logs as $log) { | foreach ($logs as $log) { | ||||
| $session = substr($log->getSession(), 0, 6); | $session = substr($log->getSession(), 0, 6); | ||||
| Show All 25 Lines | foreach ($logs as $log) { | ||||
| ), | ), | ||||
| $ip); | $ip); | ||||
| } | } | ||||
| } else { | } else { | ||||
| $ip = null; | $ip = null; | ||||
| } | } | ||||
| $action = $log->getAction(); | $action = $log->getAction(); | ||||
| $action_name = idx($action_map, $action, $action); | $action_name = idx($types, $action, $action); | ||||
| if ($actor_phid) { | if ($actor_phid) { | ||||
| $actor_name = $handles[$actor_phid]->renderLink(); | $actor_name = $handles[$actor_phid]->renderLink(); | ||||
| } else { | } else { | ||||
| $actor_name = null; | $actor_name = null; | ||||
| } | } | ||||
| if ($user_phid) { | if ($user_phid) { | ||||
| ▲ Show 20 Lines • Show All 41 Lines • Show Last 20 Lines | |||||