From 54fc9ef74e89ffd88dce6d0655c3c23703cc6a70 Mon Sep 17 00:00:00 2001 From: Kevin Ji Date: Thu, 7 Mar 2019 10:13:40 -0500 Subject: [PATCH] Updated for MW 1.32 compatibility. --- CustomNavBlocks.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CustomNavBlocks.php b/CustomNavBlocks.php index dec791c..f0f4acf 100644 --- a/CustomNavBlocks.php +++ b/CustomNavBlocks.php @@ -28,7 +28,7 @@ function addCustomNavBlocks($skin, $tpl) { $parserOptions = new ParserOptions(); - $CustomNavBlocksRaw = $tpl->translator->translate('CustomNavBlocks'); + $CustomNavBlocksRaw = wfMessage('CustomNavBlocks')->text(); $CustomNavBlocksClean = trim(preg_replace( array('//s'), array(''), $CustomNavBlocksRaw)); $blocks = explode("\n", $CustomNavBlocksClean); @@ -69,9 +69,9 @@ function addCustomNavBlocks($skin, $tpl) { } } else { # get article and content: - $content = $tpl->translator->translate("$definition"); - - # parse the mediawiki-syntax into html: + $content = wfMessage("$definition")->text(); + + # parse the mediawiki-syntax into html: $content = $wgParser->preprocess( $content, $title, $parserOptions); $parserOutput = $wgParser->parse(