From 98bf111dd2c267007c1afa34558c026520bb3f08 Mon Sep 17 00:00:00 2001 From: addshore Date: Wed, 27 Jan 2016 17:11:52 +0100 Subject: [PATCH] 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 --- includes/EditPage.php | 3 +++ 1 file changed, 3 insertions(+) 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 ); -- 2.20.1