X-Git-Url: https://scripts.mit.edu/gitweb/autoinstallsdev/mediawiki.git/blobdiff_plain/19e297c21b10b1b8a3acad5e73fc71dcb35db44a..6932310fd58ebef145fa01eb76edf7150284d8ea:/includes/TitleArray.php diff --git a/includes/TitleArray.php b/includes/TitleArray.php index f7a9e1dc..bf2344bb 100644 --- a/includes/TitleArray.php +++ b/includes/TitleArray.php @@ -1,24 +1,45 @@ res = $res; - $this->key = 0; - $this->setCurrent( $this->res->current() ); - } - - protected function setCurrent( $row ) { - if ( $row === false ) { - $this->current = false; - } else { - $this->current = Title::newFromRow( $row ); - } - } - - public function count() { - return $this->res->numRows(); - } - - function current() { - return $this->current; - } - - function key() { - return $this->key; - } - - function next() { - $row = $this->res->next(); - $this->setCurrent( $row ); - $this->key++; - } - - function rewind() { - $this->res->rewind(); - $this->key = 0; - $this->setCurrent( $this->res->current() ); - } - - function valid() { - return $this->current !== false; - } -}