From 9c19cb6e3851c3a7b1f18850e610637f8e18be4a Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Mon, 18 Apr 2011 13:53:24 +0000 Subject: [PATCH] Followup r86304 Things won't just happily accept a ParserOutput object when they were getting strings before Add missing calling parameter --- includes/GlobalFunctions.php | 8 +++----- includes/Message.php | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index e6af9b7e82..d71c72b1da 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -719,7 +719,7 @@ function wfMsgWikiHtml( $key ) { $args = func_get_args(); array_shift( $args ); return wfMsgReplaceArgs( - MessageCache::singleton()->parse( wfMsgGetKey( $key, true ), null, /* can't be set to false */ true ), + MessageCache::singleton()->parse( wfMsgGetKey( $key, true ), null, /* can't be set to false */ true )->getText(), $args ); } @@ -742,8 +742,6 @@ function wfMsgWikiHtml( $key ) { * Behavior for conflicting options (e.g., parse+parseinline) is undefined. */ function wfMsgExt( $key, $options ) { - global $wgMessageCache; - $args = func_get_args(); array_shift( $args ); array_shift( $args ); @@ -783,9 +781,9 @@ function wfMsgExt( $key, $options ) { $messageCache = MessageCache::singleton(); if( in_array( 'parse', $options, true ) ) { - $string = $messageCache->parse( $string, null, true, !$forContent, $langCodeObj ); + $string = $messageCache->parse( $string, null, true, !$forContent, $langCodeObj )->getText(); } elseif ( in_array( 'parseinline', $options, true ) ) { - $string = $messageCache->parse( $string, null, true, !$forContent, $langCodeObj ); + $string = $messageCache->parse( $string, null, true, !$forContent, $langCodeObj )->getText(); $m = array(); if( preg_match( '/^

(.*)\n?<\/p>\n?$/sU', $string, $m ) ) { $string = $m[1]; diff --git a/includes/Message.php b/includes/Message.php index 8c8f4b4480..69a48b8549 100644 --- a/includes/Message.php +++ b/includes/Message.php @@ -432,7 +432,7 @@ class Message { * @return string Wikitext parsed into HTML */ protected function parseText( $string ) { - return MessageCache::singleton()->parse( $string, /*linestart*/true, $this->interface, $this->language ); + return MessageCache::singleton()->parse( $string, null, /*linestart*/true, $this->interface, $this->language )->getText(); } /** -- 2.20.1