class NamespaceConflictChecker extends Maintenance {
/**
- * @var DatabaseBase
+ * @var Database
*/
protected $db;
$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.
*
* 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;
}