From: Aaron Schulz Date: Mon, 6 Apr 2015 23:07:08 +0000 (-0700) Subject: Avoid DB_MASTER in replaceSectionAtRev() X-Git-Tag: 1.31.0-rc.0~11819^2 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_aide%28?a=commitdiff_plain;h=befcc82eef44cde134172152ee7c01300afd5521;p=lhc%2Fweb%2Fwiklou.git Avoid DB_MASTER in replaceSectionAtRev() Bug: T92357 Change-Id: Iac4511176b5c70e9deaf71302bc1866b8b1a241a --- 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" );