X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;ds=sidebyside;f=includes%2Fpage%2FWikiPage.php;h=4f4decfbdd0e310ad3c9c2fd08cdb72889f5e50f;hb=6c9a2923fe1ee3a65cb027be5e781772f2b12fbd;hp=c05ba45daec2d84bde187b29988468ce6c9ec0de;hpb=36395150104588f2afea866c330b683e4329fa48;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php index c05ba45dae..4f4decfbdd 100644 --- a/includes/page/WikiPage.php +++ b/includes/page/WikiPage.php @@ -383,11 +383,12 @@ class WikiPage implements Page, IDBAccessObject { if ( is_int( $from ) ) { list( $index, $opts ) = DBAccessObjectUtils::getDBOptions( $from ); $data = $this->pageDataFromTitle( wfGetDB( $index ), $this->mTitle, $opts ); + $loadBalancer = MediaWikiServices::getInstance()->getDBLoadBalancer(); if ( !$data && $index == DB_REPLICA - && wfGetLB()->getServerCount() > 1 - && wfGetLB()->hasOrMadeRecentMasterChanges() + && $loadBalancer->getServerCount() > 1 + && $loadBalancer->hasOrMadeRecentMasterChanges() ) { $from = self::READ_LATEST; list( $index, $opts ) = DBAccessObjectUtils::getDBOptions( $from ); @@ -3000,7 +3001,7 @@ class WikiPage implements Page, IDBAccessObject { * @param string $token Rollback token. * @param bool $bot If true, mark all reverted edits as bot. * - * @param array $resultDetails Array contains result-specific array of additional values + * @param array &$resultDetails Array contains result-specific array of additional values * 'alreadyrolled' : 'current' (rev) * success : 'summary' (str), 'current' (rev), 'target' (rev) * @@ -3052,7 +3053,7 @@ class WikiPage implements Page, IDBAccessObject { * @param string $summary Custom summary. Set to default summary if empty. * @param bool $bot If true, mark all reverted edits as bot. * - * @param array $resultDetails Contains result-specific array of additional values + * @param array &$resultDetails Contains result-specific array of additional values * @param User $guser The user performing the rollback * @param array|null $tags Change tags to apply to the rollback * Callers are responsible for permission checks