r109030 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r109029‎ | r109030 | r109031 >
Date:12:11, 16 January 2012
Author:nikerabbit
Status:ok
Tags:
Comment:
Reuse ialex' fix for Translate to keep BC
Modified paths:
  • /trunk/extensions/Translate/tag/PageTranslationHooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/tag/PageTranslationHooks.php
@@ -45,6 +45,13 @@
4646 $name = $page->getPageDisplayTitle( $code );
4747
4848 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+ }
4956 $name = $parser->recursivePreprocess( $name );
5057 $parser->getOutput()->setDisplayTitle( $name );
5158 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r114125This line was supposed to be removed in r109030...nikerabbit10:50, 19 March 2012

Status & tagging log