From c5b7bdd4a04e7e9daf329cdb78f9d4d6bcdd454e Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Sat, 24 Jan 2015 00:43:26 +0000 Subject: [PATCH] Output number of conflicts Change-Id: I1e52db4c3bc60ab41cff3f86aa565a99ffc564ef --- maintenance/namespaceDupes.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/maintenance/namespaceDupes.php b/maintenance/namespaceDupes.php index cbc389be62..62ddaef08d 100644 --- a/maintenance/namespaceDupes.php +++ b/maintenance/namespaceDupes.php @@ -172,15 +172,24 @@ class NamespaceConflictChecker extends Maintenance { return true; } + $resolveableCount = 0; + $ok = true; foreach ( $conflicts as $row ) { $resolvable = $this->reportConflict( $row, $suffix ); $ok = $ok && $resolvable; + + if ( $resolvable ) { + $resolveableCount++; + } + if ( $fix && ( $resolvable || $suffix != '' ) ) { $ok = $this->resolveConflict( $row, $resolvable, $suffix ) && $ok; } } + $this->output( "{$count} conflicts. {$resolveableCount} are resolveable." ); + return $ok; } @@ -260,7 +269,8 @@ class NamespaceConflictChecker extends Maintenance { $row->oldtitle, $newTitle->getNamespace(), $newTitle->getDBkey(), - $newTitle->getPrefixedText() ) ); + $newTitle->getPrefixedText() ) + ); $id = $newTitle->getArticleID(); if ( $id ) { -- 2.20.1