.mailmap: Correct typos in introduction
[lhc/web/wiklou.git] / maintenance / namespaceDupes.php
index 8fd25a6..b705500 100644 (file)
@@ -37,7 +37,7 @@ require_once __DIR__ . '/Maintenance.php';
 class NamespaceConflictChecker extends Maintenance {
 
        /**
-        * @var DatabaseBase
+        * @var Database
         */
        protected $db;
 
@@ -596,6 +596,8 @@ class NamespaceConflictChecker extends Maintenance {
 
                $this->db->delete( 'page', [ 'page_id' => $id ], __METHOD__ );
 
+               $this->commitTransaction( $this->db, __METHOD__ );
+
                /* Call LinksDeletionUpdate to delete outgoing links from the old title,
                 * and update category counts.
                 *
@@ -605,9 +607,8 @@ class NamespaceConflictChecker extends Maintenance {
                 * accidentally introduce an assumption of title validity to the code we
                 * are calling.
                 */
-               $update = new LinksDeletionUpdate( $wikiPage );
-               $update->doUpdate();
-               $this->commitTransaction( $this->db, __METHOD__ );
+               DeferredUpdates::addUpdate( new LinksDeletionUpdate( $wikiPage ) );
+               DeferredUpdates::doUpdates();
 
                return true;
        }