Use PHP 7 '??' operator instead of '?:' with 'isset()' where convenient
[lhc/web/wiklou.git] / includes / jobqueue / jobs / DeleteLinksJob.php
index 8d565bd..0a14192 100644 (file)
@@ -20,7 +20,8 @@
  * @file
  * @ingroup JobQueue
  */
-use \MediaWiki\MediaWikiServices;
+
+use MediaWiki\MediaWikiServices;
 
 /**
  * Job to prune link tables for pages that were deleted
@@ -54,12 +55,12 @@ 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 );
                $update->setTransactionTicket( $factory->getEmptyTransactionTicket( __METHOD__ ) );
-               DataUpdate::runUpdates( [ $update ] );
+               $update->doUpdate();
 
                return true;
        }