Count subject and talk page conflict separately
authoraddshore <addshorewiki@gmail.com>
Fri, 20 May 2016 10:26:53 +0000 (11:26 +0100)
committeraddshore <addshorewiki@gmail.com>
Thu, 23 Jun 2016 14:18:43 +0000 (15:18 +0100)
Bug: T136547
Change-Id: If8b3dcd1d97f72058d281602242d2c44c38a48d0

includes/EditPage.php

index 7fb71f7..2a80ea6 100644 (file)
@@ -3513,6 +3513,14 @@ HTML
                if ( Hooks::run( 'EditPageBeforeConflictDiff', [ &$this, &$wgOut ] ) ) {
                        $stats = $wgOut->getContext()->getStats();
                        $stats->increment( 'edit.failures.conflict' );
+                       if ( $this->mTitle->isTalkPage() ) {
+                               $stats->increment( 'edit.failures.conflict.byType.talk' );
+                       } else {
+                               $stats->increment( 'edit.failures.conflict.byType.subject' );
+                       }
+                       if ( $this->mTitle->getNamespace() === NS_PROJECT ) {
+                               $stats->increment( 'edit.failures.conflict.byNamespace.project' );
+                       }
 
                        $wgOut->wrapWikiMsg( '<h2>$1</h2>', "yourdiff" );