From befcc82eef44cde134172152ee7c01300afd5521 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Mon, 6 Apr 2015 16:07:08 -0700 Subject: [PATCH] Avoid DB_MASTER in replaceSectionAtRev() Bug: T92357 Change-Id: Iac4511176b5c70e9deaf71302bc1866b8b1a241a --- includes/page/WikiPage.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php index b435c5cf0c..1e7dbdebd7 100644 --- a/includes/page/WikiPage.php +++ b/includes/page/WikiPage.php @@ -1553,10 +1553,7 @@ class WikiPage implements Page, IDBAccessObject { if ( is_null( $baseRevId ) || $sectionId === 'new' ) { $oldContent = $this->getContent(); } else { - // TODO: try DB_SLAVE first - $dbw = wfGetDB( DB_MASTER ); - $rev = Revision::loadFromId( $dbw, $baseRevId ); - + $rev = Revision::newFromId( $baseRevId ); if ( !$rev ) { wfDebug( __METHOD__ . " asked for bogus section (page: " . $this->getId() . "; section: $sectionId)\n" ); -- 2.20.1