Legoktm has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/207871

Change subject: SearchHighlighter: Stop checking for existence of "wfCite" 
function
......................................................................

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
---
M includes/search/SearchHighlighter.php
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/71/207871/1

diff --git a/includes/search/SearchHighlighter.php 
b/includes/search/SearchHighlighter.php
index 223a2fe..5087e8d 100644
--- a/includes/search/SearchHighlighter.php
+++ b/includes/search/SearchHighlighter.php
@@ -58,7 +58,8 @@
                        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>)/';
                }

-- 
To view, visit https://gerrit.wikimedia.org/r/207871
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icdf82cb9771e6ae9bcaa6a02629b1b11f840a5c6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to