$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 );
) );
if ( $pager->getNumRows() ) {
- $this->getOutput()->addHTML(
- $pager->getNavigationBar() .
- $pager->getBody() .
- $pager->getNavigationBar()
- );
+ $this->getOutput()->addParserOutputContent( $pager->getFullOutput() );
} else {
$this->getOutput()->addWikiMsg( 'protectedpagesempty' );
}
/**
* @param string $field
* @param string $value
- * @return string
+ * @return string HTML
* @throws MWException
*/
function formatValue( $field, $value ) {
$this->msg( 'protectedpages-unknown-timestamp' )->escaped()
);
} else {
- $formatted = $this->getLanguage()->userTimeAndDate( $value, $this->getUser() );
+ $formatted = htmlspecialchars( $this->getLanguage()->userTimeAndDate(
+ $value, $this->getUser() ) );
}
break;
break;
case 'pr_expiry':
- $formatted = $this->getLanguage()->formatExpiry( $value, /* User preference timezone */true );
+ $formatted = htmlspecialchars( $this->getLanguage()->formatExpiry(
+ $value, /* User preference timezone */true ) );
$title = Title::makeTitleSafe( $row->page_namespace, $row->page_title );
if ( $this->getUser()->isAllowed( 'protect' ) && $title ) {
$changeProtection = Linker::linkKnown(
// Messages: restriction-level-sysop, restriction-level-autoconfirmed
$params[] = $this->msg( 'restriction-level-' . $row->pr_level )->escaped();
if ( $row->pr_cascade ) {
- $params[] = $this->msg( 'protect-summary-cascade' )->text();
+ $params[] = $this->msg( 'protect-summary-cascade' )->escaped();
}
$formatted = $this->getLanguage()->commaList( $params );
break;
function getQueryInfo() {
$conds = $this->mConds;
$conds[] = 'pr_expiry > ' . $this->mDb->addQuotes( $this->mDb->timestamp() ) .
- 'OR pr_expiry IS NULL';
+ ' OR pr_expiry IS NULL';
$conds[] = 'page_id=pr_page';
$conds[] = 'pr_type=' . $this->mDb->addQuotes( $this->type );
}
public function getTableClass() {
- return 'TablePager mw-protectedpages';
+ return parent::getTableClass() . ' mw-protectedpages';
}
function getIndexField() {