Merge "Follow-up I0b781c11 (2a55449): use User::getAutomaticGroups()."
[lhc/web/wiklou.git] / includes / search / SearchEngine.php
index a8e0437..b505592 100644 (file)
@@ -315,7 +315,7 @@ class SearchEngine {
                        return $parsed;
                }
 
-               $allkeyword = wfMsgForContent( 'searchall' ) . ":";
+               $allkeyword = wfMessage( 'searchall' )->inContentLanguage()->text() . ":";
                if ( strncmp( $query, $allkeyword, strlen( $allkeyword ) ) == 0 ) {
                        $this->namespaces = null;
                        $parsed = substr( $query, strlen( $allkeyword ) );
@@ -417,7 +417,7 @@ class SearchEngine {
                $formatted = array_map( array( $wgContLang, 'getFormattedNsText' ), $namespaces );
                foreach ( $formatted as $key => $ns ) {
                        if ( empty( $ns ) )
-                               $formatted[$key] = wfMsg( 'blanknamespace' );
+                               $formatted[$key] = wfMessage( 'blanknamespace' )->text();
                }
                return $formatted;
        }
@@ -757,7 +757,7 @@ class SearchResult {
                $this->mTitle = $title;
                if ( !is_null( $this->mTitle ) ) {
                        $this->mRevision = Revision::newFromTitle(
-                               $this->mTitle, false, Revision::AVOID_MASTER );
+                               $this->mTitle, false, Revision::READ_NORMAL );
                        if ( $this->mTitle->getNamespace() === NS_FILE )
                                $this->mImage = wfFindFile( $this->mTitle );
                }