X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FRevisionList.php;h=052fd16fe2f8a58175e75bd96dcca1755f9ea3c4;hb=5f7a8191d444e474b15f120b904b69fc3a151d5d;hp=811870c8c0c22e6afb09a92b260ef9b1eb138846;hpb=6a90e4e4c333a8f9f97d4faa72e8e6b4a5db7177;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/RevisionList.php b/includes/RevisionList.php index 811870c8c0..052fd16fe2 100644 --- a/includes/RevisionList.php +++ b/includes/RevisionList.php @@ -20,6 +20,8 @@ * @file */ +use MediaWiki\MediaWikiServices; + /** * List for revision table items for a single page */ @@ -81,7 +83,7 @@ abstract class RevisionListBase extends ContextSource implements Iterator { */ public function reset() { if ( !$this->res ) { - $this->res = $this->doQuery( wfGetDB( DB_SLAVE ) ); + $this->res = $this->doQuery( wfGetDB( DB_REPLICA ) ); } else { $this->res->rewind(); } @@ -268,6 +270,14 @@ abstract class RevisionItemBase { * This is used to show the list in HTML form, by the special page. */ abstract public function getHTML(); + + /** + * Returns an instance of LinkRenderer + * @return \MediaWiki\Linker\LinkRenderer + */ + protected function getLinkRenderer() { + return MediaWikiServices::getInstance()->getLinkRenderer(); + } } class RevisionList extends RevisionListBase {