Merge "Revert "Use display name in category page subheadings if provided""
[lhc/web/wiklou.git] / includes / search / SqlSearchResultSet.php
index 7a6aaf7..c3985d1 100644 (file)
@@ -8,7 +8,7 @@ class SqlSearchResultSet extends SearchResultSet {
        protected $terms;
        protected $totalHits;
 
-       function __construct( $resultSet, $terms, $total = null ) {
+       function __construct( ResultWrapper $resultSet, $terms, $total = null ) {
                $this->resultSet = $resultSet;
                $this->terms = $terms;
                $this->totalHits = $total;
@@ -37,10 +37,16 @@ class SqlSearchResultSet extends SearchResultSet {
                }
 
                return SearchResult::newFromTitle(
-                       Title::makeTitle( $row->page_namespace, $row->page_title )
+                       Title::makeTitle( $row->page_namespace, $row->page_title ), $this
                );
        }
 
+       function rewind() {
+               if ( $this->resultSet ) {
+                       $this->resultSet->rewind();
+               }
+       }
+
        function free() {
                if ( $this->resultSet === false ) {
                        return false;