function rewind() { if ($this->numRows()) { $this->db->dataSeek($this, 0); } $this->pos = 0; $this->currentRow = null; }
/** * Cache page existence for performance * * @param DatabaseBase $db * @param ResultWrapper $res */ function preprocessResults($db, $res) { $batch = new LinkBatch(); foreach ($res as $row) { $batch->add($row->namespace, $row->title); $batch->addObj($this->getRedirectTarget($row)); } $batch->execute(); // Back to start for display if ($res->numRows() > 0) { // If there are no rows we get an error seeking. $db->dataSeek($res, 0); } }