function execute($par) { global $wgOut, $wgRequest; $this->setHeaders(); $this->outputHeader(); // 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'); $pager = new ProtectedTitlesPager($this, array(), $type, $level, $NS, $sizetype, $size); $wgOut->addHTML($this->showOptions($NS, $type, $level)); if ($pager->getNumRows()) { $s = $pager->getNavigationBar(); $s .= "<ul>" . $pager->getBody() . "</ul>"; $s .= $pager->getNavigationBar(); } else { $s = '<p>' . wfMsgHtml('protectedtitlesempty') . '</p>'; } $wgOut->addHTML($s); }
function execute( $par ) { $this->setHeaders(); $this->outputHeader(); // 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' ); $pager = new ProtectedTitlesPager( $this, array(), $type, $level, $NS, $sizetype, $size ); $this->getOutput()->addHTML( $this->showOptions( $NS, $type, $level ) ); if ( $pager->getNumRows() ) { $this->getOutput()->addHTML( $pager->getNavigationBar() . '<ul>' . $pager->getBody() . '</ul>' . $pager->getNavigationBar() ); } else { $this->getOutput()->addWikiMsg( 'protectedtitlesempty' ); } }
function execute($par) { $this->setHeaders(); $this->outputHeader(); $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'); $pager = new ProtectedTitlesPager($this, [], $type, $level, $NS, $sizetype, $size); $this->getOutput()->addHTML($this->showOptions($NS, $type, $level)); if ($pager->getNumRows()) { $this->getOutput()->addHTML($pager->getNavigationBar() . '<ul>' . $pager->getBody() . '</ul>' . $pager->getNavigationBar()); } else { $this->getOutput()->addWikiMsg('protectedtitlesempty'); } }