X-Git-Url: http://git.cyclocoop.org/data/Luca_Pacioli_%28Gemaelde%29.jpeg?a=blobdiff_plain;f=includes%2Fdeferred%2FLinksDeletionUpdate.php;h=3c86d11ac69c60d8a23cb89a8a27a5ca37da816d;hb=fd3f586dbbbb556aa19c0a53c7e8cb1aa93fa164;hp=f579a1f12fe572ab65d94419b8216b7135d2944e;hpb=f0bfc9ff60826007e91a0639f9cb0b34593e22a3;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/deferred/LinksDeletionUpdate.php b/includes/deferred/LinksDeletionUpdate.php index f579a1f12f..3c86d11ac6 100644 --- a/includes/deferred/LinksDeletionUpdate.php +++ b/includes/deferred/LinksDeletionUpdate.php @@ -91,18 +91,17 @@ class LinksDeletionUpdate extends DataUpdate implements EnqueueableDataUpdate { $this->page->updateCategoryCounts( [], $catBatch, $id ); if ( count( $catBatches ) > 1 ) { $lbFactory->commitAndWaitForReplication( - __METHOD__, $this->ticket, [ 'wiki' => $dbw->getWikiID() ] + __METHOD__, $this->ticket, [ 'domain' => $dbw->getDomainID() ] ); } } - // Refresh the category table entry if it seems to have no pages. Check - // master for the most up-to-date cat_pages count. + // Refresh counts on categories that should be empty now if ( $title->getNamespace() === NS_CATEGORY ) { $row = $dbw->selectRow( 'category', [ 'cat_id', 'cat_title', 'cat_pages', 'cat_subcats', 'cat_files' ], - [ 'cat_title' => $title->getDBkey(), 'cat_pages <= 0' ], + [ 'cat_title' => $title->getDBkey(), 'cat_pages <= 100' ], __METHOD__ ); if ( $row ) { @@ -187,7 +186,7 @@ class LinksDeletionUpdate extends DataUpdate implements EnqueueableDataUpdate { $dbw->delete( 'recentchanges', [ 'rc_id' => $rcIdBatch ], __METHOD__ ); if ( count( $rcIdBatches ) > 1 ) { $lbFactory->commitAndWaitForReplication( - __METHOD__, $this->ticket, [ 'wiki' => $dbw->getWikiID() ] + __METHOD__, $this->ticket, [ 'domain' => $dbw->getDomainID() ] ); } } @@ -209,7 +208,7 @@ class LinksDeletionUpdate extends DataUpdate implements EnqueueableDataUpdate { if ( count( $pkDeleteConds ) >= $bSize ) { $dbw->delete( $table, $dbw->makeList( $pkDeleteConds, LIST_OR ), __METHOD__ ); $lbFactory->commitAndWaitForReplication( - __METHOD__, $this->ticket, [ 'wiki' => $dbw->getWikiID() ] + __METHOD__, $this->ticket, [ 'domain' => $dbw->getDomainID() ] ); $pkDeleteConds = []; } @@ -230,7 +229,7 @@ class LinksDeletionUpdate extends DataUpdate implements EnqueueableDataUpdate { public function getAsJobSpecification() { return [ - 'wiki' => $this->getDB()->getWikiID(), + 'wiki' => WikiMap::getWikiIdFromDomain( $this->getDB()->getDomainID() ), 'job' => new JobSpecification( 'deleteLinks', [ 'pageId' => $this->pageId, 'timestamp' => $this->timestamp ],