channel = $data['channel']; } public function processRequest() { $request = $this->getRequest(); $user = $request->getUser(); $query = new PhabricatorChatLogQuery(); $query->withChannels(array($this->channel)); $query->setLimit(1000); $logs = $query->execute(); require_celerity_resource('phabricator-chatlog-css'); $last_author = null; $last_epoch = null; $row_idx = 0; $row_colors = array( 'normal', 'alternate', ); $out = array(); $out[] = ''; foreach ($logs as $log) { $this_author = $log->getAuthor(); $this_epoch = $log->getEpoch(); if (($this_author !== $last_author) || ($this_epoch - (60 * 5) > $last_epoch)) { ++$row_idx; $out[] = ''; $out[] = ''; $author = $log->getAuthor(); $author = phutil_utf8_shorten($author, 18); $out[] = ''; } else { $out[] = ''; $out[] = ''; } $out[] = ''; $out[] = ''; $last_author = $this_author; $last_epoch = $this_epoch; } $out[] = '
'. phabricator_datetime($log->getEpoch(), $user).''. phutil_escape_html($author).'
'. phutil_escape_html($log->getMessage()).'
'; return $this->buildStandardPageResponse( implode("\n", $out), array( 'title' => 'Channel Log', )); } }