Index: trunk/phase3/includes/Article.php |
— | — | @@ -205,14 +205,18 @@ |
206 | 206 | * @return Return the text of this revision |
207 | 207 | */ |
208 | 208 | public function getContent() { |
209 | | - global $wgUser, $wgOut, $wgMessageCache; |
| 209 | + global $wgUser, $wgContLang, $wgOut, $wgMessageCache; |
210 | 210 | wfProfileIn( __METHOD__ ); |
211 | 211 | if( $this->getID() === 0 ) { |
212 | 212 | # If this is a MediaWiki:x message, then load the messages |
213 | 213 | # and return the message value for x. |
214 | 214 | if( $this->mTitle->getNamespace() == NS_MEDIAWIKI ) { |
215 | | - $wgMessageCache->loadAllMessages(); |
216 | | - $text = wfMsgWeirdKey( $this->mTitle->getText() ) ; |
| 215 | + # If this is a system message, get the default text. |
| 216 | + list( $message, $lang ) = $wgMessageCache->figureMessage( $wgContLang->lcfirst( $this->mTitle->getText() ) ); |
| 217 | + $wgMessageCache->loadAllMessages( $lang ); |
| 218 | + $text = wfMsgGetKey( $message, false, $lang, false ); |
| 219 | + if( wfEmptyMsg( $message, $text ) ) |
| 220 | + $text = ''; |
217 | 221 | } else { |
218 | 222 | $text = wfMsg( $wgUser->isLoggedIn() ? 'noarticletext' : 'noarticletextanon' ); |
219 | 223 | } |