summaryrefslogtreecommitdiff
path: root/includes/specials/SpecialProtectedpages.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2015-06-04 07:31:04 +0200
committerPierre Schmitz <pierre@archlinux.de>2015-06-04 07:58:39 +0200
commitf6d65e533c62f6deb21342d4901ece24497b433e (patch)
treef28adf0362d14bcd448f7b65a7aaf38650f923aa /includes/specials/SpecialProtectedpages.php
parentc27b2e832fe25651ef2410fae85b41072aae7519 (diff)
Update to MediaWiki 1.25.1
Diffstat (limited to 'includes/specials/SpecialProtectedpages.php')
-rw-r--r--includes/specials/SpecialProtectedpages.php17
1 files changed, 7 insertions, 10 deletions
diff --git a/includes/specials/SpecialProtectedpages.php b/includes/specials/SpecialProtectedpages.php
index 0ba73857..00e56c1c 100644
--- a/includes/specials/SpecialProtectedpages.php
+++ b/includes/specials/SpecialProtectedpages.php
@@ -39,11 +39,6 @@ class SpecialProtectedpages extends SpecialPage {
$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 );
@@ -353,7 +348,7 @@ class ProtectedPagesPager extends TablePager {
/**
* @param string $field
* @param string $value
- * @return string
+ * @return string HTML
* @throws MWException
*/
function formatValue( $field, $value ) {
@@ -372,7 +367,8 @@ class ProtectedPagesPager extends TablePager {
$this->msg( 'protectedpages-unknown-timestamp' )->escaped()
);
} else {
- $formatted = $this->getLanguage()->userTimeAndDate( $value, $this->getUser() );
+ $formatted = htmlspecialchars( $this->getLanguage()->userTimeAndDate(
+ $value, $this->getUser() ) );
}
break;
@@ -402,7 +398,8 @@ class ProtectedPagesPager extends TablePager {
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(
@@ -454,7 +451,7 @@ class ProtectedPagesPager extends TablePager {
// 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;
@@ -493,7 +490,7 @@ class ProtectedPagesPager extends TablePager {
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 );