Merge "Pass context to FormatMetadata class on ImagePage"
[lhc/web/wiklou.git] / includes / api / ApiQuerySearch.php
index c6999df..e489b2f 100644 (file)
@@ -174,7 +174,7 @@ class ApiQuerySearch extends ApiQueryGeneratorBase {
                                }
                                if ( !is_null( $result->getRedirectTitle() ) ) {
                                        if ( isset( $prop['redirecttitle'] ) ) {
-                                               $vals['redirecttitle'] = $result->getRedirectTitle();
+                                               $vals['redirecttitle'] = $result->getRedirectTitle()->getPrefixedText();
                                        }
                                        if ( isset( $prop['redirectsnippet'] ) ) {
                                                $vals['redirectsnippet'] = $result->getRedirectSnippet();
@@ -206,7 +206,7 @@ class ApiQuerySearch extends ApiQueryGeneratorBase {
                $hasInterwikiResults = false;
                $totalhits = null;
                if ( $interwiki && $resultPageSet === null && $matches->hasInterwikiResults() ) {
-                       foreach( $matches->getInterwikiResults() as $matches ) {
+                       foreach ( $matches->getInterwikiResults() as $matches ) {
                                $matches = $matches->getInterwikiResults();
                                $hasInterwikiResults = true;