* Renders one or more SearchResultSets into a sidebar grouped by
* interwiki prefix. Includes a per-wiki header indicating where
* the results are from.
+ *
+ * @deprecated since 1.31. Use InterwikiSearchResultSetWidget
*/
class SimpleSearchResultSetWidget implements SearchResultSetWidget {
/** @var SpecialSearch */
LinkRenderer $linkRenderer,
InterwikiLookup $iwLookup
) {
+ wfDeprecated( __METHOD__, '1.31' );
$this->specialSearch = $specialSearch;
$this->resultWidget = $resultWidget;
$this->linkRenderer = $linkRenderer;
$iwResults = [];
foreach ( $resultSets as $resultSet ) {
- $result = $resultSet->next();
- while ( $result ) {
+ foreach ( $resultSet as $result ) {
if ( !$result->isBrokenTitle() ) {
$iwResults[$result->getTitle()->getInterwiki()][] = $result;
}
- $result = $resultSet->next();
}
}