jenkins-bot has submitted this change and it was merged.

Change subject: Remove b/c code
......................................................................


Remove b/c code

Change-Id: I6de34b052851fe04aac44d081be6c9736bb74ca3
---
M includes/BuildDocument/PageTextBuilder.php
1 file changed, 11 insertions(+), 18 deletions(-)

Approvals:
  EBernhardson: Looks good to me, approved
  jenkins-bot: Verified

Objections:
  Cindy-the-browser-test-bot: There's a problem with this change, please improve



diff --git a/includes/BuildDocument/PageTextBuilder.php 
b/includes/BuildDocument/PageTextBuilder.php
index 6b0c780..35600b1 100644
--- a/includes/BuildDocument/PageTextBuilder.php
+++ b/includes/BuildDocument/PageTextBuilder.php
@@ -113,24 +113,17 @@
 
                // Strip elements from the page that we never want in the 
search text.
                $formatter->remove( $this->excludedElementSelectors );
-               $filterResult = $formatter->filterContent();
-               if ( $filterResult === null ) {
-                       // We're running against Mediawiki < 1.24wm10 which 
won't support auxiliary text
-                       // because it can't extract it using the HtmlFormatter. 
 We'll just set text to
-                       // all the text.
-                       $allText = trim( Sanitizer::stripAllTags( 
$formatter->getText() ) );
-                       $auxiliary = array();
-               } else {
-                       // Strip elements from the page that are auxiliary 
text.  These will still be
-                       // searched but matches will be ranked lower and 
non-auxiliary matches will be
-                       // prefered in highlighting.
-                       $formatter->remove( $this->auxiliaryElementSelectors );
-                       $auxiliaryElements = $formatter->filterContent();
-                       $allText = trim( Sanitizer::stripAllTags( 
$formatter->getText() ) );
-                       $auxiliary = array();
-                       foreach ( $auxiliaryElements as $auxiliaryElement ) {
-                               $auxiliary[] = trim( Sanitizer::stripAllTags( 
$formatter->getText( $auxiliaryElement ) ) );
-                       }
+               $formatter->filterContent();
+
+               // Strip elements from the page that are auxiliary text.  These 
will still be
+               // searched but matches will be ranked lower and non-auxiliary 
matches will be
+               // prefered in highlighting.
+               $formatter->remove( $this->auxiliaryElementSelectors );
+               $auxiliaryElements = $formatter->filterContent();
+               $allText = trim( Sanitizer::stripAllTags( $formatter->getText() 
) );
+               $auxiliary = array();
+               foreach ( $auxiliaryElements as $auxiliaryElement ) {
+                       $auxiliary[] = trim( Sanitizer::stripAllTags( 
$formatter->getText( $auxiliaryElement ) ) );
                }
 
                return array( $allText, $opening, $auxiliary );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6de34b052851fe04aac44d081be6c9736bb74ca3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: MaxSem <[email protected]>
Gerrit-Reviewer: Cindy-the-browser-test-bot <[email protected]>
Gerrit-Reviewer: DCausse <[email protected]>
Gerrit-Reviewer: EBernhardson <[email protected]>
Gerrit-Reviewer: Gehel <[email protected]>
Gerrit-Reviewer: Manybubbles <[email protected]>
Gerrit-Reviewer: Smalyshev <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to