Count subject and talk page conflict separately
[lhc/web/wiklou.git] / 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" );