X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FnamespaceDupes.php;h=506bc9c2b97f8b487f00bf5e2b74fc17bb921ffc;hb=38a023f45853a838d2af50fe6a4f52ea0380348c;hp=55f361c941f9d137098d048696301da49eaebeb8;hpb=cd69b253b13c66eb5f61c27200f22ee7eac4cde0;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/namespaceDupes.php b/maintenance/namespaceDupes.php index 55f361c941..506bc9c2b9 100644 --- a/maintenance/namespaceDupes.php +++ b/maintenance/namespaceDupes.php @@ -24,6 +24,8 @@ * @ingroup Maintenance */ +use MediaWiki\Linker\LinkTarget; + require_once __DIR__ . '/Maintenance.php'; /** @@ -594,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. * @@ -603,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; }