30 public function run() {
31 if ( $this->title ===
null ) {
36 $pageId = $this->params[
'pageId'];
40 $scopedLock = LinksUpdate::acquirePageLock( $dbw, $pageId,
'job' );
41 if ( $scopedLock ===
null ) {
42 $this->
setLastError(
'LinksUpdate already running for this page, try again later.' );
47 $wikiPageFactory = $services->getWikiPageFactory();
48 if ( $wikiPageFactory->newFromID( $pageId, IDBAccessObject::READ_LATEST ) ) {
50 $this->
setLastError(
"deleteLinks: Page #$pageId exists" );
54 $dbProvider = $services->getConnectionProvider();
55 $timestamp = $this->params[
'timestamp'] ??
null;
56 $page = $wikiPageFactory->newFromTitle( $this->title );
59 $update->setTransactionTicket( $dbProvider->getEmptyTransactionTicket( __METHOD__ ) );