jenkins-bot has submitted this change and it was merged.

Change subject: Do deletion updates after commit.
......................................................................


Do deletion updates after commit.

WikiPage::doDeleteArticleReal now triggers secondary data updates
(link tables, etc) only after the deletion proper is committed.
This is consistent with the way doEditContent applies secondary
data updates, and avoids nested transactions (e.g. by one of the
updates using a retry loop).

Change-Id: Ie4d96f77d210c9953104a0e6fb11ea8ed348c42a
---
M includes/page/WikiPage.php
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Hoo man: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php
index b62f40d..9ade16e 100644
--- a/includes/page/WikiPage.php
+++ b/includes/page/WikiPage.php
@@ -2876,8 +2876,6 @@
                // Clone the title, so we have the information we need when we 
log
                $logTitle = clone $this->mTitle;
 
-               $this->doDeleteUpdates( $id, $content );
-
                // Log the deletion, if the page was suppressed, log it at 
Oversight instead
                $logtype = $suppress ? 'suppress' : 'delete';
 
@@ -2896,6 +2894,8 @@
                        $dbw->commit( __METHOD__ );
                }
 
+               $this->doDeleteUpdates( $id, $content );
+
                wfRunHooks( 'ArticleDeleteComplete', array( &$this, &$user, 
$reason, $id, $content, $logEntry ) );
                $status->value = $logid;
                return $status;

-- 
To view, visit https://gerrit.wikimedia.org/r/159504
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie4d96f77d210c9953104a0e6fb11ea8ed348c42a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Daniel Kinzler <[email protected]>
Gerrit-Reviewer: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Anomie <[email protected]>
Gerrit-Reviewer: Chad <[email protected]>
Gerrit-Reviewer: Hoo man <[email protected]>
Gerrit-Reviewer: IAlex <[email protected]>
Gerrit-Reviewer: Mattflaschen <[email protected]>
Gerrit-Reviewer: Parent5446 <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: Tim Starling <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to