public function execute($par)
 {
     $this->setHeaders();
     $this->outputHeader();
     $this->getOutput()->addModuleStyles('mediawiki.special');
     // Purge expired entries on one in every 10 queries
     if (!mt_rand(0, 10)) {
         Title::purgeExpiredRestrictions();
     }
     $request = $this->getRequest();
     $type = $request->getVal($this->IdType);
     $level = $request->getVal($this->IdLevel);
     $sizetype = $request->getVal('sizetype');
     $size = $request->getIntOrNull('size');
     $ns = $request->getIntOrNull('namespace');
     $indefOnly = $request->getBool('indefonly') ? 1 : 0;
     $cascadeOnly = $request->getBool('cascadeonly') ? 1 : 0;
     $noRedirect = $request->getBool('noredirect') ? 1 : 0;
     $pager = new ProtectedPagesPager($this, array(), $type, $level, $ns, $sizetype, $size, $indefOnly, $cascadeOnly, $noRedirect);
     $this->getOutput()->addHTML($this->showOptions($ns, $type, $level, $sizetype, $size, $indefOnly, $cascadeOnly, $noRedirect));
     if ($pager->getNumRows()) {
         $this->getOutput()->addHTML($pager->getNavigationBar() . $pager->getBody() . $pager->getNavigationBar());
     } else {
         $this->getOutput()->addWikiMsg('protectedpagesempty');
     }
 }
 public function showList($msg = '')
 {
     global $wgOut, $wgRequest;
     if ("" != $msg) {
         $wgOut->setSubtitle($msg);
     }
     // Purge expired entries on one in every 10 queries
     if (!mt_rand(0, 10)) {
         Title::purgeExpiredRestrictions();
     }
     $type = $wgRequest->getVal($this->IdType);
     $level = $wgRequest->getVal($this->IdLevel);
     $sizetype = $wgRequest->getVal('sizetype');
     $size = $wgRequest->getIntOrNull('size');
     $NS = $wgRequest->getIntOrNull('namespace');
     $indefOnly = $wgRequest->getBool('indefonly') ? 1 : 0;
     $cascadeOnly = $wgRequest->getBool('cascadeonly') ? 1 : 0;
     $pager = new ProtectedPagesPager($this, array(), $type, $level, $NS, $sizetype, $size, $indefOnly, $cascadeOnly);
     $wgOut->addHTML($this->showOptions($NS, $type, $level, $sizetype, $size, $indefOnly, $cascadeOnly));
     if ($pager->getNumRows()) {
         $s = $pager->getNavigationBar();
         $s .= "<ul>" . $pager->getBody() . "</ul>";
         $s .= $pager->getNavigationBar();
     } else {
         $s = '<p>' . wfMsgHtml('protectedpagesempty') . '</p>';
     }
     $wgOut->addHTML($s);
 }
 public function execute($par)
 {
     $this->setHeaders();
     $this->outputHeader();
     $this->getOutput()->addModuleStyles('mediawiki.special');
     $request = $this->getRequest();
     $type = $request->getVal($this->IdType);
     $level = $request->getVal($this->IdLevel);
     $sizetype = $request->getVal('sizetype');
     $size = $request->getIntOrNull('size');
     $ns = $request->getIntOrNull('namespace');
     $indefOnly = $request->getBool('indefonly') ? 1 : 0;
     $cascadeOnly = $request->getBool('cascadeonly') ? 1 : 0;
     $noRedirect = $request->getBool('noredirect') ? 1 : 0;
     $pager = new ProtectedPagesPager($this, array(), $type, $level, $ns, $sizetype, $size, $indefOnly, $cascadeOnly, $noRedirect);
     $this->getOutput()->addHTML($this->showOptions($ns, $type, $level, $sizetype, $size, $indefOnly, $cascadeOnly, $noRedirect));
     if ($pager->getNumRows()) {
         $this->getOutput()->addParserOutputContent($pager->getFullOutput());
     } else {
         $this->getOutput()->addWikiMsg('protectedpagesempty');
     }
 }