From: Aaron Schulz Date: Mon, 13 Jun 2016 09:20:49 +0000 (-0700) Subject: Use the specified page ID for LinksDeletionUpdate X-Git-Tag: 1.31.0-rc.0~6610^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/operations/recherche.php?a=commitdiff_plain;h=dfc043b119213d80105c9e19991f0257a0d59a22;p=lhc%2Fweb%2Fwiklou.git Use the specified page ID for LinksDeletionUpdate This makes LinksDeleteJob use the correct page ID when a new page was later created at the title. The links and protection rows to clear should always be for the ID of the actual page being deleted. This fixes a bug when pages are moved over redirects. Bug: T128624 Change-Id: Id67a021539b97020e8dd32d56dba1b77c806f31c --- diff --git a/includes/deferred/LinksDeletionUpdate.php b/includes/deferred/LinksDeletionUpdate.php index b8bd74722c..c227ecdc8c 100644 --- a/includes/deferred/LinksDeletionUpdate.php +++ b/includes/deferred/LinksDeletionUpdate.php @@ -37,10 +37,10 @@ class LinksDeletionUpdate extends SqlDataUpdate implements EnqueueableDataUpdate parent::__construct( false ); // no implicit transaction $this->page = $page; - if ( $page->exists() ) { + if ( $pageId ) { + $this->pageId = $pageId; // page ID at time of deletion + } elseif ( $page->exists() ) { $this->pageId = $page->getId(); - } elseif ( $pageId ) { - $this->pageId = $pageId; } else { throw new InvalidArgumentException( "Page ID not known. Page doesn't exist?" ); }