Merge "SearchHighlighter: Stop checking for existence of "wfCite" function"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 30 Apr 2015 18:36:29 +0000 (18:36 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 30 Apr 2015 18:36:29 +0000 (18:36 +0000)
includes/search/SearchHighlighter.php

index 223a2fe..5087e8d 100644 (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>)/';
                }