Index: trunk/phase3/includes/specials/SpecialProtectedtitles.php |
— | — | @@ -78,10 +78,12 @@ |
79 | 79 | |
80 | 80 | wfProfileIn( __METHOD__ ); |
81 | 81 | |
82 | | - static $skin = null; |
| 82 | + static $skin = null, $infinity = null; |
83 | 83 | |
84 | | - if( is_null( $skin ) ) |
| 84 | + if( is_null( $skin ) ){ |
85 | 85 | $skin = $this->getSkin(); |
| 86 | + $infinity = wfGetDB( DB_SLAVE )->getInfinity(); |
| 87 | + } |
86 | 88 | |
87 | 89 | $title = Title::makeTitleSafe( $row->pt_namespace, $row->pt_title ); |
88 | 90 | $link = $skin->link( $title ); |
— | — | @@ -92,12 +94,12 @@ |
93 | 95 | |
94 | 96 | $description_items[] = $protType; |
95 | 97 | |
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 ) { |
98 | 100 | |
99 | 101 | $expiry_description = wfMsg( 'protect-expiring', $wgLang->timeanddate( $expiry ) , $wgLang->date( $expiry ) , $wgLang->time( $expiry ) ); |
100 | 102 | |
101 | | - $description_items[] = $expiry_description; |
| 103 | + $description_items[] = htmlspecialchars($expiry_description); |
102 | 104 | } |
103 | 105 | |
104 | 106 | wfProfileOut( __METHOD__ ); |