* includable in a wikitext page.
*
* @TODO: allow native handling, bypassing wikitext representation, like for includable special pages.
- * @TODO: use in parser, etc!
+ * @TODO: allow transclusion into other content models than Wikitext!
+ * @TODO: used in WikiPage and MessageCache to get message text. Not so nice. What should we use instead?!
*/
public function getWikitextForTransclusion( );
}
if ( $this->mTitle->getNamespace() == NS_MEDIAWIKI ) {
+ //@todo: move this logic to MessageCache
+
if ( $this->mTitle->exists() ) {
- $text = ContentHandler::getContentText( $this->getContent() ); #XXX: get native data directly?
+ // NOTE: use transclusion text for messages.
+ // This is consistent with MessageCache::getMsgFromNamespace()
+
+ $content = $this->getContent();
+ $text = $content === null ? null : $content->getWikitextForTransclusion();
+
+ if ( $text === null ) $text = false;
} else {
$text = false;
}