public function filterEntry(array $data) { if (!empty($data['xhr'])) { return (dmRequestLogEntry::isAlert($data) || dmRequestLogEntry::isError($data)) && $this->user->can('error_log'); } return true; }
protected function renderUserAndBrowser(dmRequestLogEntry $entry) { $browser = $entry->get('browser'); return sprintf('<div class="browser %s">%s<br />%s %s</div>', $this->getBrowserIcon($browser), ($username = $entry->get('username')) ? '<strong class="mr5">' . dmString::escape(dmString::truncate($username, 20, '...')) . '</strong>' : $this->renderIp($entry->get('ip')), ucfirst($browser->getName()), $browser->getVersion()); }