Merge "Upstream "pulsating dot" widget from VE"
[lhc/web/wiklou.git] / includes / jobqueue / jobs / DeleteLinksJob.php
index d0969e4..8328abf 100644 (file)
@@ -47,6 +47,10 @@ class DeleteLinksJob extends Job {
 
                // Serialize links updates by page ID so they see each others' changes
                $scopedLock = LinksUpdate::acquirePageLock( wfGetDB( DB_MASTER ), $pageId, 'job' );
+               if ( $scopedLock === null ) {
+                       $this->setLastError( 'LinksUpdate already running for this page, try again later.' );
+                       return false;
+               }
 
                if ( WikiPage::newFromID( $pageId, WikiPage::READ_LATEST ) ) {
                        // The page was restored somehow or something went wrong
@@ -55,7 +59,7 @@ class DeleteLinksJob extends Job {
                }
 
                $factory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
-               $timestamp = isset( $this->params['timestamp'] ) ? $this->params['timestamp'] : null;
+               $timestamp = $this->params['timestamp'] ?? null;
                $page = WikiPage::factory( $this->title ); // title when deleted
 
                $update = new LinksDeletionUpdate( $page, $pageId, $timestamp );