Index: trunk/phase3/includes/actions/CreditsAction.php |
— | — | @@ -89,7 +89,7 @@ |
90 | 90 | $d = ''; |
91 | 91 | $t = ''; |
92 | 92 | } |
93 | | - return wfMsgExt( 'lastmodifiedatby', 'parsemag', $d, $t, self::userLink( $user ), $user->getName() ); |
| 93 | + return wfMessage( 'lastmodifiedatby', $d, $t )->rawParams( self::userLink( $user ) )->params( $user->getName() )->escaped(); |
94 | 94 | } |
95 | 95 | |
96 | 96 | /** |
— | — | @@ -110,7 +110,7 @@ |
111 | 111 | if ( $cnt > 0 && $contributors->count() > $cnt ) { |
112 | 112 | $others_link = $this->othersLink(); |
113 | 113 | if ( !$showIfMax ) |
114 | | - return wfMsgExt( 'othercontribs', 'parsemag', $others_link, $contributors->count() ); |
| 114 | + return wfMessage( 'othercontribs' )->rawParams( $others_link )->params( $contributors->count() )->escaped(); |
115 | 115 | } |
116 | 116 | |
117 | 117 | $real_names = array(); |
— | — | @@ -144,21 +144,15 @@ |
145 | 145 | |
146 | 146 | # "ThisSite user(s) A, B and C" |
147 | 147 | if ( count( $user_names ) ) { |
148 | | - $user = wfMsgExt( |
149 | | - 'siteusers', |
150 | | - 'parsemag', |
151 | | - $wgLang->listToText( $user_names ), count( $user_names ) |
152 | | - ); |
| 148 | + $user = wfMessage( 'siteusers' )->rawParams( $wgLang->listToText( $user_names ) )->params( |
| 149 | + count( $user_names ) )->escaped(); |
153 | 150 | } else { |
154 | 151 | $user = false; |
155 | 152 | } |
156 | 153 | |
157 | 154 | if ( count( $anon_ips ) ) { |
158 | | - $anon = wfMsgExt( |
159 | | - 'anonusers', |
160 | | - 'parsemag', |
161 | | - $wgLang->listToText( $anon_ips ), count( $anon_ips ) |
162 | | - ); |
| 155 | + $anon = wfMessage( 'anonusers' )->rawParams( $wgLang->listToText( $anon_ips ) )->params( |
| 156 | + $anon_ips )->escaped(); |
163 | 157 | } else { |
164 | 158 | $anon = false; |
165 | 159 | } |
— | — | @@ -166,17 +160,16 @@ |
167 | 161 | # This is the big list, all mooshed together. We sift for blank strings |
168 | 162 | $fulllist = array(); |
169 | 163 | foreach ( array( $real, $user, $anon, $others_link ) as $s ) { |
170 | | - if ( $s ) { |
| 164 | + if ( $s !== false ) { |
171 | 165 | array_push( $fulllist, $s ); |
172 | 166 | } |
173 | 167 | } |
174 | 168 | |
175 | | - # Make the list into text... |
176 | | - $creds = $wgLang->listToText( $fulllist ); |
177 | | - |
| 169 | + $count = count( $fulllist ); |
178 | 170 | # "Based on work by ..." |
179 | | - return strlen( $creds ) |
180 | | - ? wfMsgExt( 'othercontribs', 'parsemag', $creds, count( $fulllist ) ) |
| 171 | + return $count |
| 172 | + ? wfMessage( 'othercontribs' )->rawParams( |
| 173 | + $wgLang->listToText( $fulllist ) )->params( $count )->escaped() |
181 | 174 | : ''; |
182 | 175 | } |
183 | 176 | |
— | — | @@ -214,7 +207,7 @@ |
215 | 208 | if ( !in_array( 'realname', $wgHiddenPrefs ) && $user->getRealName() ) { |
216 | 209 | return $link; |
217 | 210 | } else { |
218 | | - return wfMsgExt( 'siteuser', 'parsemag', $link, $user->getName() ); |
| 211 | + return wfMessage( 'siteuser' )->rawParams( $link )->params( $user->getName() )->escaped(); |
219 | 212 | } |
220 | 213 | } |
221 | 214 | } |