Index: trunk/extensions/Translate/tag/PageTranslationHooks.php |
— | — | @@ -45,6 +45,13 @@ |
46 | 46 | $name = $page->getPageDisplayTitle( $code ); |
47 | 47 | |
48 | 48 | if ( $name ) { |
| 49 | + // BC for MW < 1.19 |
| 50 | + if ( is_callable( array( $parser, 'recursivePreprocess' ) ) ) { |
| 51 | + $name = $parser->recursivePreprocess( $name ); |
| 52 | + } else { |
| 53 | + $newParser = new Parser(); |
| 54 | + $name = $newParser->preprocess( $name, $parser->getTitle(), $parser->getOptions() ); |
| 55 | + } |
49 | 56 | $name = $parser->recursivePreprocess( $name ); |
50 | 57 | $parser->getOutput()->setDisplayTitle( $name ); |
51 | 58 | } |