예제 #1
0
 function execute($par)
 {
     global $wgOut, $wgUser;
     $this->setHeaders();
     if (!$wgUser->isAllowed('stafflog')) {
         throw new PermissionsError('stafflog');
     }
     $pager = new StaffLoggerPager("");
     $sTypesDropDown = XML::openElement('select', array('name' => 'type', 'id' => 'StaffLogFilterType'));
     foreach ($this->aTypes as $k => $v) {
         $sTypesDropDown .= XML::option($v, $k, $k == $this->request->getText('type', ''));
     }
     $sTypesDropDown .= XML::closeElement('select');
     $wgOut->addHTML(XML::openElement('form', array('method' => 'get', 'action' => $this->getTitle()->getLocalURL())) . XML::openElement('fieldset') . XML::element('legend', null, wfMsg('stafflog-filter-label'), false) . XML::inputLabel(wfMsg('stafflog-filter-user'), 'user', 'StaffLogFilterUser', false, htmlspecialchars($this->request->getText('user', ''), ENT_QUOTES, 'UTF-8')) . XML::label(wfMsg('stafflog-filter-type'), 'StaffLogFilterType') . ' ' . $sTypesDropDown . ' ' . XML::submitButton(wfMsg('stafflog-filter-apply')) . XML::closeElement('fieldset') . XML::closeElement('form') . XML::openElement('div', array('class' => 'mw-spcontent')) . $pager->getNavigationBar() . '<ul>' . $pager->getBody() . '</ul>' . $pager->getNavigationBar() . XML::closeElement('div'));
 }
 /**
  * Uses the HTML functions to output the appropiate form for the special page if no archived version
  * exists or if no query has been specified by the user yet.
  *
  * @global $wgOut object
  */
 private function output_form()
 {
     global $wgOut;
     $this->setHeaders();
     $wgOut->addWikiMsg('archivelinks-view-archive-desc');
     $wgOut->addHTML(HTML::openElement('form', array('method' => 'get', 'action' => SpecialPage::getTitleFor('ViewArchive')->getLocalUrl())) . HTML::openElement('fieldset') . HTML::element('legend', null, wfMsg('ViewArchive')) . XML::inputLabel(wfMsg('archivelinks-view-archive-url-field'), 'archive_url', 'archive-links-archive-url', 120) . HTML::element('br') . XML::submitButton(wfMsg('archivelinks-view-archive-submit-button')) . HTML::closeElement('fieldset') . HTML::closeElement('form'));
 }