public function loadPage() { $table = new PhabricatorChatLogEvent(); $conn_r = $table->establishConnection('r'); $data = queryfx_all($conn_r, 'SELECT * FROM %T e %Q %Q %Q', $table->getTableName(), $this->buildWhereClause($conn_r), $this->buildOrderClause($conn_r), $this->buildLimitClause($conn_r)); $logs = $table->loadAllFromArray($data); return $this->processResults($logs); }
public function execute() { $table = new PhabricatorChatLogEvent(); $conn_r = $table->establishConnection('r'); $where_clause = $this->buildWhereClause($conn_r); $limit_clause = $this->buildLimitClause($conn_r); $data = queryfx_all($conn_r, 'SELECT * FROM %T e %Q ORDER BY epoch ASC %Q', $table->getTableName(), $where_clause, $limit_clause); $logs = $table->loadAllFromArray($data); return $logs; }
public function processRequest() { $table = new PhabricatorChatLogEvent(); $channels = queryfx_all($table->establishConnection('r'), 'SELECT DISTINCT channel FROM %T', $table->getTableName()); $rows = array(); foreach ($channels as $channel) { $name = $channel['channel']; $rows[] = array(phutil_render_tag('a', array('href' => '/chatlog/channel/' . phutil_escape_uri($name) . '/'), phutil_escape_html($name))); } $table = new AphrontTableView($rows); $table->setHeaders(array('Channel')); $table->setColumnClasses(array('pri wide')); $panel = new AphrontPanelView(); $panel->appendChild($table); return $this->buildStandardPageResponse($panel, array('title' => 'Channel List')); }