* WMF has has ignore_user_abort() for *all* request in configuration
for many years. This brings this to default MediaWiki for all POST
requests, which are likely to do writes. Of course, some do not,
notably parse requests and previews, since GET cannot carry the
payload. Avoiding data corruption is more important though.
Bug: T102890
Change-Id: I11c8b0d99583a682f756cef9747ec5ba9751c5e3
if ( !defined( 'MW_NO_SETUP' ) ) {
require_once "$IP/includes/Setup.php";
}
+
+# Multiple DBs or commits might be used; keep the request as transactional as possible
+if ( isset( $_SERVER['REQUEST_METHOD'] ) && $_SERVER['REQUEST_METHOD'] === 'POST' ) {
+ ignore_user_abort( true );
+}
\ No newline at end of file