dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Call parent::__construct() in MysqlBase AFTER transferring specific parameters
[lhc/web/wiklou.git]
/
includes
/
RevisionList.php
diff --git
a/includes/RevisionList.php
b/includes/RevisionList.php
index
731d1b3
..
fb444bd
100644
(file)
--- a/
includes/RevisionList.php
+++ b/
includes/RevisionList.php
@@
-23,7
+23,7
@@
/**
* List for revision table items for a single page
*/
/**
* 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;
/** @var Title */
public $title;
@@
-81,7
+81,7
@@
abstract class RevisionListBase extends ContextSource {
*/
public function reset() {
if ( !$this->res ) {
*/
public function reset() {
if ( !$this->res ) {
- $this->res = $this->doQuery( wfGetDB( DB_
SLAVE
) );
+ $this->res = $this->doQuery( wfGetDB( DB_
REPLICA
) );
} else {
$this->res->rewind();
}
} else {
$this->res->rewind();
}
@@
-89,6
+89,10
@@
abstract class RevisionListBase extends ContextSource {
return $this->current;
}
return $this->current;
}
+ public function rewind() {
+ $this->reset();
+ }
+
/**
* Get the current list item, or false if we are at the end
* @return Revision
/**
* 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;
}
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
/**
* Get the number of items in the list.
* @return int