return 0;
}
- /**
- * Return true if results are included in this result set.
- * STUB
- *
- * @return bool
- */
- function hasResults() {
- return false;
- }
-
/**
* Some search modes return a total hit count for the query
* in the entire article database. This may include pages
}
function getTotalHits() {
- return $this->totalHits;
+ if ( !is_null( $this->totalHits ) ) {
+ return $this->totalHits;
+ } else {
+ // Special:Search expects a number here.
+ return $this->numRows();
+ }
}
}
$this->result = $match;
}
- public function hasResult() {
- return (bool)$this->result;
- }
-
public function numRows() {
- return $this->hasResults() ? 1 : 0;
+ return $this->result ? 1 : 0;
}
public function next() {