Index: trunk/extensions/UsabilityInitiative/OptIn/SpecialOptIn.php |
— | — | @@ -20,23 +20,21 @@ |
21 | 21 | if ( $wgUser->isAnon() ) { |
22 | 22 | $url = SpecialPage::getTitleFor( 'Userlogin' )->getFullURL( |
23 | 23 | array( 'returnto' => $this->getTitle()->getPrefixedUrl() ) ); |
24 | | - $wgOut->addHTML( Xml::openElement( 'div', |
25 | | - array( 'class' => 'plainlinks' ) ) ); |
26 | | - $wgOut->addWikiText( wfMsg( 'optin-needlogin', $url ) ); |
27 | | - $wgOut->addHTML( Xml::closeElement( 'div' ) ); |
| 24 | + $wgOut->wrapWikiMsg( "<div class='plainlinks'>\n$1\n</div>", array( 'optin-needlogin', $url ) ); |
28 | 25 | return; |
29 | 26 | } |
30 | 27 | |
31 | 28 | if ( $wgRequest->wasPosted() ) { |
| 29 | + // Is the weak comparison intentional? |
32 | 30 | if ( $wgRequest->getVal( 'opt' ) == 'in' ) { |
33 | 31 | $this->optIn( $wgUser ); |
34 | | - $wgOut->addWikiText( wfMsg( 'optin-success-in' ) ); |
| 32 | + $wgOut->addWikiMsg( 'optin-success-in' ); |
35 | 33 | } else { |
36 | 34 | $this->optOut( $wgUser ); |
37 | | - $wgOut->addWikiText( wfMsg( 'optin-success-out' ) ); |
| 35 | + $wgOut->addWikfMsg( 'optin-success-out' ); |
38 | 36 | } |
39 | 37 | } else { |
40 | | - $wgOut->addWikiText( wfMsg( 'optin-intro' ) ); |
| 38 | + $wgOut->addWikiMsg( 'optin-intro' ); |
41 | 39 | } |
42 | 40 | $this->showForm(); |
43 | 41 | } |
— | — | @@ -44,7 +42,7 @@ |
45 | 43 | function showForm() { |
46 | 44 | global $wgUser, $wgOut; |
47 | 45 | $retval = Xml::openElement( 'form', array( |
48 | | - 'method' => 'POST', |
| 46 | + 'method' => 'post', |
49 | 47 | 'action' => $this->getTitle()->getLinkURL() |
50 | 48 | ) ); |
51 | 49 | $opt = ( $this->isOptedIn( $wgUser ) ? 'out' : 'in' ); |
Index: trunk/extensions/UsabilityInitiative/PrefStats/SpecialPrefStats.php |
— | — | @@ -34,14 +34,14 @@ |
35 | 35 | |
36 | 36 | function displayTrackedPrefs() { |
37 | 37 | global $wgOut, $wgUser, $wgPrefStatsTrackPrefs; |
38 | | - $wgOut->addWikitext( wfMsg( 'prefstats-list-intro' ) ); |
| 38 | + $wgOut->addWikiMsg( 'prefstats-list-intro' ); |
39 | 39 | $wgOut->addHTML( Xml::openElement( 'ul' ) ); |
40 | 40 | foreach ( $wgPrefStatsTrackPrefs as $pref => $value ) { |
41 | 41 | $wgOut->addHTML( Xml::tags( 'li', array(), |
42 | 42 | $wgUser->getSkin()->link( |
43 | 43 | $this->getTitle( $pref ), |
44 | | - wfMsg( 'prefstats-list-elem', $pref, |
45 | | - $value ) ) ) ); |
| 44 | + htmlspecialchars( wfMsg( 'prefstats-list-elem', $pref, |
| 45 | + $value ) ) ) ) ); |
46 | 46 | } |
47 | 47 | $wgOut->addHTML( Xml::closeElement( 'ul' ) ); |
48 | 48 | } |