Merge "Use CSS columns instead of tables in Special:SpecialPages (2)"
[lhc/web/wiklou.git] / includes / search / SearchHighlighter.php
index 223a2fe..7d5d38f 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>)/';
                }
@@ -217,7 +218,7 @@ class SearchHighlighter {
                        }
 
                        // calc by how much to extend existing snippets
-                       $targetchars = intval( ( $contextchars * $contextlines ) / count ( $snippets ) );
+                       $targetchars = intval( ( $contextchars * $contextlines ) / count( $snippets ) );
                }
 
                foreach ( $snippets as $index => $line ) {