r14269 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r14268‎ | r14269 | r14270 >
Date:13:44, 17 May 2006
Author:nikerabbit
Status:old
Tags:
Comment:
* More escaping
Modified paths:
  • /trunk/phase3/includes/SpecialContributions.php (modified) (history)
  • /trunk/phase3/includes/SpecialWatchlist.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialContributions.php
@@ -364,7 +364,7 @@
365365 static $messages;
366366 if( !isset( $messages ) ) {
367367 foreach( explode( ' ', 'uctop diff newarticle rollbacklink diff hist minoreditletter' ) as $msg ) {
368 - $messages[$msg] = wfMsg( $msg );
 368+ $messages[$msg] = wfMsgExt( $msg, array( 'escape') );
369369 }
370370 }
371371
Index: trunk/phase3/includes/SpecialWatchlist.php
@@ -43,7 +43,7 @@
4444 /* float */ 'days' => floatval( $wgUser->getOption( 'watchlistdays' ) ), /* 3.0 or 0.5, watch further below */
4545 /* bool */ 'hideOwn' => (int)$wgUser->getBoolOption( 'watchlisthideown' ),
4646 /* bool */ 'hideBots' => (int)$wgUser->getBoolOption( 'watchlisthidebots' ),
47 - 'namespace' => 'all',
 47+ /* ? */ 'namespace' => 'all',
4848 );
4949
5050 extract($defaults);
@@ -343,12 +343,12 @@
344344 # Form for namespace filtering
345345 $thisAction = $thisTitle->escapeLocalUrl();
346346 $nsForm = "<form method=\"post\" action=\"{$thisAction}\">\n";
347 - $nsForm .= "<label for=\"namespace\">" . wfMsg( 'namespace' ) . "</label> ";
 347+ $nsForm .= "<label for=\"namespace\">" . wfMsgExt( 'namespace', array( 'parseinline') ) . "</label> ";
348348 $nsForm .= HTMLnamespaceselector( $nameSpace, '' ) . "\n";
349349 $nsForm .= ( $hideOwn ? "<input type=\"hidden\" name=\"hideown\" value=\"1\" />\n" : "" );
350350 $nsForm .= ( $hideBots ? "<input type=\"hidden\" name=\"hidebots\" value=\"1\" />\n" : "" );
351351 $nsForm .= "<input type=\"hidden\" name=\"days\" value=\"" . $days . "\" />\n";
352 - $nsForm .= "<input type=\"submit\" name=\"submit\" value=\"" . wfMsgHtml( 'allpagessubmit' ) . "\" />\n";
 352+ $nsForm .= "<input type=\"submit\" name=\"submit\" value=\"" . wfMsgExt( 'allpagessubmit', array( 'escape') ) . "\" />\n";
353353 $nsForm .= "</form>\n";
354354 $wgOut->addHTML( $nsForm );
355355
@@ -419,6 +419,9 @@
420420 return $s;
421421 }
422422
 423+/**
 424+ * Returns html
 425+ */
423426 function wlCutoffLinks( $days, $page = 'Watchlist', $options = array() ) {
424427 $hours = array( 1, 2, 6, 12 );
425428 $days = array( 1, 3, 7 );
@@ -431,7 +434,8 @@
432435 foreach( $days as $d ) {
433436 $days[$i++] = wlDaysLink( $d, $page, $options );
434437 }
435 - return wfMsg ('wlshowlast',
 438+ return wfMsgExt('wlshowlast',
 439+ array('parseinline', 'replaceafter'),
436440 implode(' | ', $hours),
437441 implode(' | ', $days),
438442 wlDaysLink( 0, $page, $options ) );

Status & tagging log