From: jenkins-bot Date: Tue, 28 Feb 2017 18:35:53 +0000 (+0000) Subject: Merge "Make EditPage::incrementConflictStats protected" X-Git-Tag: 1.31.0-rc.0~3952 X-Git-Url: http://git.cyclocoop.org/?a=commitdiff_plain;h=dcfec00f3b1224081e5192d5cf6d426a3c66029c;hp=-c;p=lhc%2Fweb%2Fwiklou.git Merge "Make EditPage::incrementConflictStats protected" --- dcfec00f3b1224081e5192d5cf6d426a3c66029c diff --combined includes/EditPage.php index e562bea3ba,f9bb3cd346..926923f4cd --- a/includes/EditPage.php +++ b/includes/EditPage.php @@@ -993,7 -993,7 +993,7 @@@ class EditPage $this->recreate = false; // When creating a new section, we can preload a section title by passing it as the - // preloadtitle parameter in the URL (Bug 13100) + // preloadtitle parameter in the URL (T15100) if ( $this->section == 'new' && $request->getVal( 'preloadtitle' ) ) { $this->sectiontitle = $request->getVal( 'preloadtitle' ); // Once wpSummary isn't being use for setting section titles, we should delete this. @@@ -1256,7 -1256,7 +1256,7 @@@ $revision = $this->mArticle->getRevisionFetched(); if ( $revision === null ) { if ( !$this->contentModel ) { - $this->contentModel = $this->getTitle()->getContentModel(); + throw new RuntimeException( 'EditPage contentModel was false' ); } $handler = ContentHandler::getForModelID( $this->contentModel ); @@@ -1300,7 -1300,7 +1300,7 @@@ if ( $content === false || $content === null ) { if ( !$this->contentModel ) { - $this->contentModel = $this->getTitle()->getContentModel(); + throw new RuntimeException( 'EditPage contentModel was false' ); } $handler = ContentHandler::getForModelID( $this->contentModel ); @@@ -1911,7 -1911,7 +1911,7 @@@ // Don't save a new page if it's blank or if it's a MediaWiki: // message with content equivalent to default (allow empty pages - // in this case to disable messages, see bug 50124) + // in this case to disable messages, see T52124) $defaultMessageText = $this->mTitle->getDefaultMessageText(); if ( $this->mTitle->getNamespace() === NS_MEDIAWIKI && $defaultMessageText !== false ) { $defaultText = $defaultMessageText; @@@ -2483,13 -2483,11 +2483,13 @@@ } # Give a notice if the user is editing a deleted/moved page... if ( !$this->mTitle->exists() ) { + $dbr = wfGetDB( DB_REPLICA ); + LogEventsList::showLogExtract( $wgOut, [ 'delete', 'move' ], $this->mTitle, '', [ 'lim' => 10, - 'conds' => [ "log_action != 'revision'" ], + 'conds' => [ 'log_action != ' . $dbr->addQuotes( 'revision' ) ], 'showIfEmpty' => false, 'msgKey' => [ 'recreate-moveddeleted-warn' ] ] @@@ -2731,7 -2729,7 +2731,7 @@@ if ( $this->hasPresetSummary ) { // If a summary has been preset using &summary= we don't want to prompt for // a different summary. Only prompt for a summary if the summary is blanked. - // (Bug 17416) + // (T19416) $this->autoSumm = md5( '' ); } @@@ -3565,7 -3563,7 +3565,7 @@@ HTM } } - private function incrementConflictStats() { + protected function incrementConflictStats() { $stats = MediaWikiServices::getInstance()->getStatsdDataFactory(); $stats->increment( 'edit.failures.conflict' ); // Only include 'standard' namespaces to avoid creating unknown numbers of statsd metrics