SearchHighlighter: Stop checking for existence of "wfCite" function

…and instead look for the Cite class. Not really any better, but
it will let us eliminate the "wfCite" global function.

Change-Id: Icdf82cb9771e6ae9bcaa6a02629b1b11f840a5c6
This commit is contained in:
Kunal Mehta 2015-04-30 11:25:01 -07:00
parent 709e43aaf9
commit fe928a0a7f

View file

@ -58,7 +58,8 @@ class SearchHighlighter {
3 => "/(\n\\{\\|)|(\n\\|\\})/" ); // table
// @todo FIXME: This should prolly be a hook or something
if ( function_exists( 'wfCite' ) ) {
// instead of hardcoding a class name from the Cite extension
if ( class_exists( 'Cite' ) ) {
$spat .= '|(<ref>)'; // references via cite extension
$endPatterns[4] = '/(<ref>)|(<\/ref>)/';
}