continue;
}
- $indexTitle = $this->indexTitle( $search );
- $normalTitle = $search->normalizeText( $indexTitle );
+ $normalTitle = $this->getNormalizedTitle( $search );
if ( $page === null ) {
$search->delete( $this->id, $normalTitle );
}
/**
- * Get a string representation of a title suitable for
+ * Get a normalized string representation of a title suitable for
* including in a search index
*
* @param SearchEngine $search
* @return string A stripped-down title string ready for the search index
*/
- private function indexTitle( SearchEngine $search ) {
+ private function getNormalizedTitle( SearchEngine $search ) {
global $wgContLang;
$ns = $this->title->getNamespace();
if ( $ns == NS_FILE ) {
$t = preg_replace( "/ (png|gif|jpg|jpeg|ogg)$/", "", $t );
}
- return trim( $t );
+
+ return $search->normalizeText( trim( $t ) );
}
}