Daniel Kinzler has uploaded a new change for review.

Change subject: Prevent EmailNotifier from breaking doEdit's trx.
......................................................................

Prevent EmailNotifier from breaking doEdit's trx.

EmailNotification::notifyOnPageChange uses a transaction to update
the watchlist table. When triggered from within WikiPage::doEdit,
this used to break (prematurely commit) the edit transaction,
possibly causing data loss. Also, this triggers a warning in cli mode,
causing unit tests to fail.

The solution is to only start a transaction if non is already in progress.
This pattern is used several times in the core, it should be replaced
by something generic in the Database class.

Change-Id: I67f69854641a2a6bf1e20e8054b1e483ddadd025
---
M includes/UserMailer.php
1 file changed, 11 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/51/25251/1
--
To view, visit https://gerrit.wikimedia.org/r/25251
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I67f69854641a2a6bf1e20e8054b1e483ddadd025
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Daniel Kinzler <daniel.kinz...@wikimedia.de>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to