28 use InvalidArgumentException;
58 throw new InvalidArgumentException(
"Page ID not known. Page doesn't exist?" );
67 parent::__construct( $immutablePageIdentity, $fakePO,
false );
72 $config = $services->getMainConfig();
73 $lbFactory = $services->getDBLoadBalancerFactory();
79 $dbw = $this->
getDB();
81 parent::doIncrementalUpdate();
89 $cat->refreshCountsIfSmall();
94 $dbw->delete(
'page_restrictions', [
'pr_page' => $id ], __METHOD__ );
97 $dbw->delete(
'redirect', [
'rd_from' => $id ], __METHOD__ );
101 $rcIdsForPage = $dbw->selectFieldValues(
104 [
'rc_type != ' .
RC_LOG,
'rc_cur_id' => $id ],
109 $rcIdBatches = array_chunk( $rcIdsForPage, $batchSize );
110 foreach ( $rcIdBatches as $rcIdBatch ) {
111 $dbw->delete(
'recentchanges', [
'rc_id' => $rcIdBatch ], __METHOD__ );
112 if ( count( $rcIdBatches ) > 1 ) {
113 $lbFactory->commitAndWaitForReplication(
114 __METHOD__, $this->ticket, [
'domain' => $dbw->getDomainID() ]
122 'domain' => $this->
getDB()->getDomainID(),
125 [
'pageId' => $this->mId,
'timestamp' => $this->timestamp ],
126 [
'removeDuplicates' =>
true ],
134 class_alias( LinksDeletionUpdate::class,
'LinksDeletionUpdate' );
wfTimestampNow()
Convenience function; returns MediaWiki timestamp for the present time.
Category objects are immutable, strictly speaking.
static newFromName( $name)
Factory function.
Class for managing the deferral of updates within the scope of a PHP script invocation.
static addCallableUpdate( $callable, $stage=self::POSTSEND, $dbw=null)
Add an update to the pending update queue that invokes the specified callback when run.
Job queue task description base code.
A class containing constants representing the names of configuration variables.
const UpdateRowsPerQuery
Name constant for the UpdateRowsPerQuery setting, for use with Config::get()
Base representation for an editable wiki page.
getId( $wikiId=self::LOCAL)
getTitle()
Get the title object of the article.
Interface that marks a DataUpdate as enqueuable via the JobQueue.