Topic on Extension talk:SphinxSearch

use of removed function breaks some searches in mw 1.27

1
Summary by Svemir Brkic

This has been corrected in Dec 2015

2001:4898:80E8:D:0:0:0:34A (talkcontribs)

The following patch needs to be applied when running on 1.27.x. It took us a while to run into this issue so you may not see immediate breakage after upgrading. The change is what's recommended on Manual:Messages API#Deprecated wfMsg.2A functions.

diff --git a/extensions/SphinxSearch/SphinxMWSearch.php b/extensions/SphinxSearch/SphinxMWSearch.php

index 4aea2b6..a6bed43 100644

--- a/extensions/SphinxSearch/SphinxMWSearch.php

+++ b/extensions/SphinxSearch/SphinxMWSearch.php

@@ -226,7 +226,7 @@ class SphinxMWSearch extends SearchEngine {

global $wgContLang, $wgCanonicalNamespaceNames, $wgNamespaceAliases;

// "search everything" keyword

-               $allkeyword = wfMsgForContent( 'searchall' );

+               $allkeyword = wfMessage( 'searchall' )->inContentLanguage()->text();

$this->prefix_handlers[ $allkeyword ] = 'searchAllNamespaces';

$all_prefixes = array_merge(