Index: trunk/phase3/includes/GlobalFunctions.php |
— | — | @@ -716,11 +716,10 @@ |
717 | 717 | * @return string |
718 | 718 | */ |
719 | 719 | function wfMsgWikiHtml( $key ) { |
720 | | - global $wgMessageCache; |
721 | 720 | $args = func_get_args(); |
722 | 721 | array_shift( $args ); |
723 | 722 | return wfMsgReplaceArgs( |
724 | | - $wgMessageCache->parse( wfMsgGetKey( $key, true ), null, /* can't be set to false */ true ), |
| 723 | + MessageCache::singleton()->parse( wfMsgGetKey( $key, true ), null, /* can't be set to false */ true ), |
725 | 724 | $args ); |
726 | 725 | } |
727 | 726 | |
— | — | @@ -782,16 +781,17 @@ |
783 | 782 | $string = wfMsgReplaceArgs( $string, $args ); |
784 | 783 | } |
785 | 784 | |
| 785 | + $messageCache = MessageCache::singleton(); |
786 | 786 | if( in_array( 'parse', $options, true ) ) { |
787 | | - $string = $wgMessageCache->parse( $string, null, true, !$forContent, $langCodeObj ); |
| 787 | + $string = $messageCache->parse( $string, null, true, !$forContent, $langCodeObj ); |
788 | 788 | } elseif ( in_array( 'parseinline', $options, true ) ) { |
789 | | - $string = $wgMessageCache->parse( $string, null, true, !$forContent, $langCodeObj ); |
| 789 | + $string = $messageCache->parse( $string, null, true, !$forContent, $langCodeObj ); |
790 | 790 | $m = array(); |
791 | 791 | if( preg_match( '/^<p>(.*)\n?<\/p>\n?$/sU', $string, $m ) ) { |
792 | 792 | $string = $m[1]; |
793 | 793 | } |
794 | 794 | } elseif ( in_array( 'parsemag', $options, true ) ) { |
795 | | - $string = MessageCache::singleton()->transform( $string, |
| 795 | + $string = $messageCache->transform( $string, |
796 | 796 | !$forContent, $langCodeObj ); |
797 | 797 | } |
798 | 798 | |
Index: trunk/phase3/includes/MessageCache.php |
— | — | @@ -751,7 +751,7 @@ |
752 | 752 | } |
753 | 753 | |
754 | 754 | if ( $this->mInParser ) { |
755 | | - return $message; |
| 755 | + return $message; |
756 | 756 | } |
757 | 757 | |
758 | 758 | $parser = $this->getParser(); |
— | — | @@ -798,7 +798,7 @@ |
799 | 799 | */ |
800 | 800 | public function parse( $text, $title = null, $linestart = true, $interface = false, $language = null ) { |
801 | 801 | if ( $this->mInParser ) { |
802 | | - return htmlspecialchars( $text ); |
| 802 | + return htmlspecialchars( $text ); |
803 | 803 | } |
804 | 804 | |
805 | 805 | $parser = $this->getParser(); |