Merge "Show a warning in edit preview when a template loop is detected"
[lhc/web/wiklou.git] / includes / widget / search / InterwikiSearchResultSetWidget.php
index 11f9364..81a1a43 100644 (file)
@@ -90,7 +90,8 @@ class InterwikiSearchResultSetWidget implements SearchResultSetWidget {
                        $iwResultListOutput .= Html::rawElement( 'li',
                                [
                                        'class' => 'iw-resultset',
-                                       'data-iw-resultset-pos' => $iwResultSetPos
+                                       'data-iw-resultset-pos' => $iwResultSetPos,
+                                       'data-iw-resultset-source' => $iwPrefix
                                ],
 
                                $iwResultItemOutput .
@@ -122,7 +123,6 @@ class InterwikiSearchResultSetWidget implements SearchResultSetWidget {
         * @return string HTML
         */
        protected function footerHtml( $term, $iwPrefix ) {
-
                $href = Title::makeTitle( NS_SPECIAL, 'Search', null, $iwPrefix )->getLocalURL(
                        [ 'search' => $term, 'fulltext' => 1 ]
                );
@@ -170,14 +170,13 @@ class InterwikiSearchResultSetWidget implements SearchResultSetWidget {
         * @return OOUI\IconWidget
         **/
        protected function iwIcon( $iwPrefix ) {
-
                $interwiki = $this->iwLookup->fetch( $iwPrefix );
                $parsed = wfParseUrl( wfExpandUrl( $interwiki ? $interwiki->getURL() : '/' ) );
 
                $iwIconUrl = $parsed['scheme'] .
                        $parsed['delimiter'] .
                        $parsed['host'] .
-                       ( isset ( $parsed['port'] ) ? ':' . $parsed['port'] : '' ) .
+                       ( isset( $parsed['port'] ) ? ':' . $parsed['port'] : '' ) .
                        '/favicon.ico';
 
                $iwIcon = new OOUI\IconWidget( [