From: Sam Reed Date: Sat, 24 Jan 2015 00:43:26 +0000 (+0000) Subject: Output number of conflicts X-Git-Tag: 1.31.0-rc.0~12611^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/ajouter.php?a=commitdiff_plain;h=c5b7bdd4a04e7e9daf329cdb78f9d4d6bcdd454e;p=lhc%2Fweb%2Fwiklou.git Output number of conflicts Change-Id: I1e52db4c3bc60ab41cff3f86aa565a99ffc564ef --- 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 ) {