Merge "HistoryAction: Implement HistoryPageToolLinks hook for adding more links"
[lhc/web/wiklou.git] / includes / deferred / SearchUpdate.php
index c94ae2a..0d1de1a 100644 (file)
@@ -44,8 +44,6 @@ class SearchUpdate implements DeferrableUpdate {
        private $page;
 
        /**
-        * Constructor
-        *
         * @param int $id Page id to update
         * @param Title|string $title Title of page to update
         * @param Content|string|bool $c Content of the page to update. Default: false.
@@ -115,7 +113,7 @@ class SearchUpdate implements DeferrableUpdate {
         * If you're using a real search engine, you'll probably want to override
         * this behavior and do something nicer with the original wikitext.
         * @param string $text
-        * @param SearchEngine $se Search engine
+        * @param SearchEngine|null $se Search engine
         * @return string
         */
        public function updateText( $text, SearchEngine $se = null ) {
@@ -124,7 +122,7 @@ class SearchUpdate implements DeferrableUpdate {
                # Language-specific strip/conversion
                $text = $wgContLang->normalizeForSearch( $text );
                $se = $se ?: MediaWikiServices::getInstance()->newSearchEngine();
-               $lc = $se->legalSearchCharsForUpdate() . '&#;';
+               $lc = $se->legalSearchChars() . '&#;';
 
                $text = preg_replace( "/<\\/?\\s*[A-Za-z][^>]*?>/",
                        ' ', $wgContLang->lc( " " . $text . " " ) ); # Strip HTML markup
@@ -207,7 +205,7 @@ class SearchUpdate implements DeferrableUpdate {
                $ns = $this->title->getNamespace();
                $title = $this->title->getText();
 
-               $lc = $search->legalSearchCharsForUpdate() . '&#;';
+               $lc = $search->legalSearchChars() . '&#;';
                $t = $wgContLang->normalizeForSearch( $title );
                $t = preg_replace( "/[^{$lc}]+/", ' ', $t );
                $t = $wgContLang->lc( $t );