X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fdeferred%2FSearchUpdate.php;h=20f348a2135979f34d87b898443eb24029a6a1e6;hb=e3e8659cfc2bc1ffe775a52671acc0d10dbb8527;hp=9ae903422a761176d37cb7c76b9285a968b0fa5a;hpb=06db1a2335826d7da5da2a47ddec44a08094376d;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/deferred/SearchUpdate.php b/includes/deferred/SearchUpdate.php index 9ae903422a..20f348a213 100644 --- a/includes/deferred/SearchUpdate.php +++ b/includes/deferred/SearchUpdate.php @@ -81,10 +81,10 @@ class SearchUpdate implements DeferrableUpdate { wfProfileIn( __METHOD__ ); $page = WikiPage::newFromId( $this->id, WikiPage::READ_LATEST ); - $indexTitle = $this->indexTitle(); foreach ( SearchEngine::getSearchTypes() as $type ) { $search = SearchEngine::create( $type ); + $indexTitle = $this->indexTitle( $search ); if ( !$search->supports( 'search-update' ) ) { continue; } @@ -181,13 +181,13 @@ class SearchUpdate implements DeferrableUpdate { * * @return string A stripped-down title string ready for the search index */ - private function indexTitle() { + private function indexTitle( SearchEngine $search ) { global $wgContLang; $ns = $this->title->getNamespace(); $title = $this->title->getText(); - $lc = SearchEngine::legalSearchChars() . '&#;'; + $lc = $search->legalSearchChars() . '&#;'; $t = $wgContLang->normalizeForSearch( $title ); $t = preg_replace( "/[^{$lc}]+/", ' ', $t ); $t = $wgContLang->lc( $t );