Merge "OutputPage.php: Remove misleading comment"
[lhc/web/wiklou.git] / includes / deferred / LinksUpdate.php
index 755a7cd..9cd20fc 100644 (file)
@@ -91,7 +91,7 @@ class LinksUpdate extends SqlDataUpdate implements EnqueueableDataUpdate {
                parent::__construct( false ); // no implicit transaction
 
                $this->mTitle = $title;
-               $this->mId = $title->getArticleID();
+               $this->mId = $title->getArticleID( Title::GAID_FOR_UPDATE );
 
                if ( !$this->mId ) {
                        throw new InvalidArgumentException(
@@ -143,9 +143,8 @@ class LinksUpdate extends SqlDataUpdate implements EnqueueableDataUpdate {
                Hooks::run( 'LinksUpdate', array( &$this ) );
                $this->doIncrementalUpdate();
 
-               $that = $this;
-               $this->mDb->onTransactionIdle( function() use ( $that ) {
-                       Hooks::run( 'LinksUpdateComplete', array( &$that ) );
+               $this->mDb->onTransactionIdle( function() {
+                       Hooks::run( 'LinksUpdateComplete', array( &$this ) );
                } );
        }