From: Kunal Mehta Date: Thu, 30 Apr 2015 18:25:01 +0000 (-0700) Subject: SearchHighlighter: Stop checking for existence of "wfCite" function X-Git-Tag: 1.31.0-rc.0~11537^2 X-Git-Url: http://git.cyclocoop.org/data/%24oldEdit?a=commitdiff_plain;h=fe928a0a7fb5761c0181f0898260067d7a3602f4;p=lhc%2Fweb%2Fwiklou.git 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 --- diff --git a/includes/search/SearchHighlighter.php b/includes/search/SearchHighlighter.php index 223a2fe4e7..5087e8d585 100644 --- a/includes/search/SearchHighlighter.php +++ b/includes/search/SearchHighlighter.php @@ -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 .= '|()'; // references via cite extension $endPatterns[4] = '/()|(<\/ref>)/'; }