merged master
[lhc/web/wiklou.git] / includes / parser / CoreParserFunctions.php
index 322cb13..4c6a22f 100644 (file)
@@ -129,7 +129,8 @@ class CoreParserFunctions {
         * @return mixed|string
         */
        static function formatDate( $parser, $date, $defaultPref = null ) {
-               $df = DateFormatter::getInstance();
+               $lang = $parser->getFunctionLang();
+               $df = DateFormatter::getInstance( $lang );
 
                $date = trim( $date );
 
@@ -746,7 +747,7 @@ class CoreParserFunctions {
                        $title = SpecialPage::getTitleFor( $page, $subpage );
                        return $title->getPrefixedText();
                } else {
-                       return wfMsgForContent( 'nosuchspecialpage' );
+                       return wfMessage( 'nosuchspecialpage' )->inContentLanguage()->text();
                }
        }
 
@@ -781,9 +782,7 @@ class CoreParserFunctions {
                        return '';
                } else {
                        return( '<span class="error">' .
-                               wfMsgForContent( 'duplicate-defaultsort',
-                                                htmlspecialchars( $old ),
-                                                htmlspecialchars( $text ) ) .
+                               wfMessage( 'duplicate-defaultsort', $old, $text )->inContentLanguage()->escaped() .
                                '</span>' );
                }
        }
@@ -792,7 +791,6 @@ class CoreParserFunctions {
        // or {{filepath|300px}}, {{filepath|200x300px}}, {{filepath|nowiki|200x300px}}, {{filepath|200x300px|nowiki}}
        public static function filepath( $parser, $name='', $argA='', $argB='' ) {
                $file = wfFindFile( $name );
-               $isNowiki = false;
 
                if( $argA == 'nowiki' ) {
                        // {{filepath: | option [| size] }}
@@ -844,7 +842,7 @@ class CoreParserFunctions {
                $stripList = $parser->getStripList();
                if ( !in_array( $tagName, $stripList ) ) {
                        return '<span class="error">' .
-                               wfMsgForContent( 'unknown_extension_tag', $tagName ) .
+                               wfMessage( 'unknown_extension_tag', $tagName )->inContentLanguage()->text() .
                                '</span>';
                }