$totalhits = $matches->getTotalHits();
if ( $totalhits !== null ) {
$apiResult->addValue( array( 'query', 'searchinfo' ),
- 'totalhits', $totalhits );
+ 'totalhits', $totalhits );
}
}
if ( isset( $searchInfo['suggestion'] ) && $matches->hasSuggestion() ) {
$apiResult->addValue( array( 'query', 'searchinfo' ),
- 'suggestion', $matches->getSuggestionQuery() );
+ 'suggestion', $matches->getSuggestionQuery() );
}
// Add the search results to the result
$result = $matches->next();
while ( $result ) {
- if ( ++ $count > $limit ) {
- // We've reached the one extra which shows that there are additional items to be had. Stop here...
+ if ( ++$count > $limit ) {
+ // We've reached the one extra which shows that there are
+ // additional items to be had. Stop here...
$this->setContinueEnumParameter( 'offset', $params['offset'] + $params['limit'] );
break;
}
// Add item to results and see whether it fits
$fit = $apiResult->addValue( array( 'query', $this->getModuleName() ),
- null, $vals );
+ null, $vals );
if ( !$fit ) {
$this->setContinueEnumParameter( 'offset', $params['offset'] + $count - 1 );
break;
if ( is_null( $resultPageSet ) ) {
$apiResult->setIndexedTagName_internal( array(
- 'query', $this->getModuleName()
- ), 'p' );
+ 'query', $this->getModuleName()
+ ), 'p' );
} else {
$resultPageSet->populateFromTitles( $titles );
}