Index: trunk/phase3/includes/Article.php |
— | — | @@ -210,7 +210,7 @@ |
211 | 211 | * @return Return the text of this revision |
212 | 212 | */ |
213 | 213 | function getContent() { |
214 | | - global $wgUser, $wgOut, $wgMessageCache; |
| 214 | + global $wgOut, $wgMessageCache; |
215 | 215 | |
216 | 216 | wfProfileIn( __METHOD__ ); |
217 | 217 | |
— | — | @@ -220,12 +220,11 @@ |
221 | 221 | |
222 | 222 | if ( $this->mTitle->getNamespace() == NS_MEDIAWIKI ) { |
223 | 223 | $wgMessageCache->loadAllMessages(); |
224 | | - $ret = wfMsgWeirdKey ( $this->mTitle->getText() ) ; |
| 224 | + $ret = wfMsgWeirdKey( $this->mTitle->getText() ); |
| 225 | + return "<div class='noarticletext'>\n$ret\n</div>"; |
225 | 226 | } else { |
226 | | - $ret = wfMsg( $wgUser->isLoggedIn() ? 'noarticletext' : 'noarticletextanon' ); |
| 227 | + return $this->getNoSuchPageText(); |
227 | 228 | } |
228 | | - |
229 | | - return "<div class='noarticletext'>\n$ret\n</div>"; |
230 | 229 | } else { |
231 | 230 | $this->loadContent(); |
232 | 231 | wfProfileOut( __METHOD__ ); |
— | — | @@ -233,6 +232,20 @@ |
234 | 233 | } |
235 | 234 | } |
236 | 235 | |
| 236 | + /* |
| 237 | + * HACK HACK! We pre-parse them with parsemag to get GRAMMAR working right. |
| 238 | + * It should be safe to do this and then do the full parse. |
| 239 | + */ |
| 240 | + function getNoSuchPageText() { |
| 241 | + global $wgUser; |
| 242 | + if ( $wgUser->isLoggedIn() ) { |
| 243 | + $text = wfMsgExt( 'noarticletext', 'parsemag' ); |
| 244 | + } else { |
| 245 | + $text = wfMsgExt( 'noarticletextanon', 'parsemag' ); |
| 246 | + } |
| 247 | + return "<div class='noarticletext'>\n$text\n</div>"; |
| 248 | + } |
| 249 | + |
237 | 250 | /** |
238 | 251 | * This function returns the text of a section, specified by a number ($section). |
239 | 252 | * A section is text under a heading like == Heading == or \<h1\>Heading\</h1\>, or |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -213,6 +213,7 @@ |
214 | 214 | has been blocked more than 10 times. Patch by Matt Johnston. |
215 | 215 | * (bug 12678) Skins don't show Upload link if the user isn't allowed to upload. |
216 | 216 | * Fixed incorrect usage of DB_LAST in Special:Export. Deprecated DB_LAST. |
| 217 | +* 11119 {{grammar}} broken in noarticletext(anon) when ui lang != content lang |
217 | 218 | |
218 | 219 | === API changes in 1.14 === |
219 | 220 | |