r99976 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99975‎ | r99976 | r99977 >
Date:22:06, 16 October 2011
Author:demon
Status:ok
Tags:
Comment:
MFT r93726
Modified paths:
  • /branches/wmf/1.18wmf1/includes/specials/SpecialProtectedtitles.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.18wmf1/includes/specials/SpecialProtectedtitles.php
@@ -78,10 +78,12 @@
7979
8080 wfProfileIn( __METHOD__ );
8181
82 - static $skin = null;
 82+ static $skin = null, $infinity = null;
8383
84 - if( is_null( $skin ) )
 84+ if( is_null( $skin ) ){
8585 $skin = $this->getSkin();
 86+ $infinity = wfGetDB( DB_SLAVE )->getInfinity();
 87+ }
8688
8789 $title = Title::makeTitleSafe( $row->pt_namespace, $row->pt_title );
8890 $link = $skin->link( $title );
@@ -92,12 +94,12 @@
9395
9496 $description_items[] = $protType;
9597
96 - if ( $row->pt_expiry != 'infinity' && strlen($row->pt_expiry) ) {
97 - $expiry = $wgLang->formatExpiry( $row->pt_expiry );
 98+ $expiry = strlen( $row->pt_expiry ) ? $wgLang->formatExpiry( $row->pt_expiry, TS_MW ) : $infinity;
 99+ if( $expiry != $infinity ) {
98100
99101 $expiry_description = wfMsg( 'protect-expiring', $wgLang->timeanddate( $expiry ) , $wgLang->date( $expiry ) , $wgLang->time( $expiry ) );
100102
101 - $description_items[] = $expiry_description;
 103+ $description_items[] = htmlspecialchars($expiry_description);
102104 }
103105
104106 wfProfileOut( __METHOD__ );
Property changes on: branches/wmf/1.18wmf1/includes/specials/SpecialProtectedtitles.php
___________________________________________________________________
Added: svn:mergeinfo
105107 Merged /branches/sqlite/includes/specials/SpecialProtectedtitles.php:r58211-58321
106108 Merged /trunk/phase3/includes/specials/SpecialProtectedtitles.php:r92580,92634,92713,92762,92765,92791,92854,92884,92886-92887,92894,92898,92907,92932,92958,93141,93149,93151,93233-93234,93258,93266,93303,93516-93518,93726,93818-93822,93847,93858,93891,93935-93936,94058,94062,94068,94107,94155,94235,94346,94372,94422,94425,94444,94448,94456,94498,94601,94630,94728,94825,94862,94995-94997,95042,95155,95332,95410,95442,95468,95601,95812,98578,98598,98656
107109 Merged /branches/wmf-deployment/includes/specials/SpecialProtectedtitles.php:r53381,56967
108110 Merged /branches/REL1_15/phase3/includes/specials/SpecialProtectedtitles.php:r51646

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r93726Fixing Special:Protectedtitles to match Special:Protectedpages. This prevents...rotem11:43, 2 August 2011

Status & tagging log