X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FRevisionList.php;h=811870c8c0c22e6afb09a92b260ef9b1eb138846;hb=3fb272daee23c86598049fc2cc43088a7cd7fba3;hp=731d1b3e5dc2a9a19d28cce174b353d95b43d327;hpb=96906168cac0e9a7748511b48c369cf22c8406d5;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/RevisionList.php b/includes/RevisionList.php index 731d1b3e5d..811870c8c0 100644 --- a/includes/RevisionList.php +++ b/includes/RevisionList.php @@ -23,7 +23,7 @@ /** * List for revision table items for a single page */ -abstract class RevisionListBase extends ContextSource { +abstract class RevisionListBase extends ContextSource implements Iterator { /** @var Title */ public $title; @@ -89,6 +89,10 @@ abstract class RevisionListBase extends ContextSource { return $this->current; } + public function rewind() { + $this->reset(); + } + /** * Get the current list item, or false if we are at the end * @return Revision @@ -107,6 +111,14 @@ abstract class RevisionListBase extends ContextSource { return $this->current; } + public function key() { + return $this->res ? $this->res->key(): 0; + } + + public function valid() { + return $this->res ? $this->res->valid() : false; + } + /** * Get the number of items in the list. * @return int