From: addshore Date: Wed, 27 Jan 2016 16:11:52 +0000 (+0100) Subject: Count the number of EditPage edit conflicts X-Git-Tag: 1.31.0-rc.0~8179 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=98bf111dd2c267007c1afa34558c026520bb3f08;p=lhc%2Fweb%2Fwiklou.git Count the number of EditPage edit conflicts edit.failures.* is already used for: - session_loss - bad_token - incomplete_form hence the choice of metric name. Bug: T120462 Change-Id: I7636cedaf3d589faec3153882f7d1e8ac7054a89 --- diff --git a/includes/EditPage.php b/includes/EditPage.php index 47912cb8c2..277a6cc6d8 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -3457,6 +3457,9 @@ HTML global $wgOut; if ( Hooks::run( 'EditPageBeforeConflictDiff', array( &$this, &$wgOut ) ) ) { + $stats = $wgOut->getContext()->getStats(); + $stats->increment( 'edit.failures.conflict' ); + $wgOut->wrapWikiMsg( '

$1

', "yourdiff" ); $content1 = $this->toEditContent( $this->textbox1 );