Use context when parsing messages in Article::setOldSubtitle
[lhc/web/wiklou.git] / maintenance / namespaceDupes.php
index cbc389b..27102ad 100644 (file)
@@ -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 ) {
@@ -275,7 +285,7 @@ class NamespaceConflictChecker extends Maintenance {
        /**
         * Resolve any conflicts
         *
-        * @param stClass $row Row from the page table to fix
+        * @param stdClass $row Row from the page table to fix
         * @param bool $resolvable
         * @param string $suffix Suffix to append to the fixed page
         * @return bool