Bug: T117039
Change-Id: Ie86c1751dacb5c32afe708b354809b914a54ea51
redirect: suggestionPage.redirect !== undefined,
disambiguation: OO.getProp( suggestionPage, 'pageprops', 'disambiguation' ) !== undefined,
imageUrl: OO.getProp( suggestionPage, 'thumbnail', 'source' ),
redirect: suggestionPage.redirect !== undefined,
disambiguation: OO.getProp( suggestionPage, 'pageprops', 'disambiguation' ) !== undefined,
imageUrl: OO.getProp( suggestionPage, 'thumbnail', 'source' ),
- description: OO.getProp( suggestionPage, 'terms', 'description' )
+ description: OO.getProp( suggestionPage, 'terms', 'description' ),
+ // sort index
+ index: suggestionPage.index
};
// Throw away pages from wrong namespaces. This can happen when 'showRedirectTargets' is true
};
// Throw away pages from wrong namespaces. This can happen when 'showRedirectTargets' is true
+ titles.sort( function ( a, b ) {
+ return pageData[ a ].index - pageData[ b ].index;
+ } );
+
// If not found, run value through mw.Title to avoid treating a match as a
// mismatch where normalisation would make them matching (bug 48476)
// If not found, run value through mw.Title to avoid treating a match as a
// mismatch where normalisation would make them matching (bug 48476)