Ejemplo n.º 1
0
 private function show(FormOptions $opts, array $extraConds)
 {
     # Create a LogPager item to get the results and a LogEventsList item to format them...
     $loglist = new LogEventsList($this->getContext(), null, LogEventsList::USE_REVDEL_CHECKBOXES);
     $pager = new LogPager($loglist, $opts->getValue('type'), $opts->getValue('user'), $opts->getValue('page'), $opts->getValue('pattern'), $extraConds, $opts->getValue('year'), $opts->getValue('month'), $opts->getValue('tagfilter'));
     $this->addHeader($opts->getValue('type'));
     # Set relevant user
     if ($pager->getPerformer()) {
         $this->getSkin()->setRelevantUser(User::newFromName($pager->getPerformer()));
     }
     # Show form options
     $loglist->showOptions($pager->getType(), $opts->getValue('user'), $pager->getPage(), $pager->getPattern(), $pager->getYear(), $pager->getMonth(), $pager->getFilterParams(), $opts->getValue('tagfilter'));
     # Reuben, upgrade 1.23: apply a special hack where we insert FORCE INDEX (times)
     # into the sql query, because Mysql chooses the wrong index and the Database
     # class has a bug where it generates sql with syntax errors.
     if (!$pager->getType() && !$opts->getValue('user') && !$pager->getPage()) {
         $pager->setIndexHack();
     }
     # Insert list
     $logBody = $pager->getBody();
     if ($logBody) {
         $this->getOutput()->addHTML($pager->getNavigationBar() . $this->getRevisionButton($loglist->beginLogEventsList() . $logBody . $loglist->endLogEventsList()) . $pager->getNavigationBar());
     } else {
         $this->getOutput()->addWikiMsg('logempty');
     }
 }