From: Aaron Schulz Date: Thu, 24 Mar 2016 21:30:12 +0000 (-0700) Subject: Ignore DBPerformance warnings for ?action=purge for users with "purge" X-Git-Tag: 1.31.0-rc.0~7352^2 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/cotisations/Bar?a=commitdiff_plain;h=ac50bd61c8894d73a104a35448c8b066097ebdf1;p=lhc%2Fweb%2Fwiklou.git Ignore DBPerformance warnings for ?action=purge for users with "purge" Change-Id: Ib6d1c9a6885008a7e2233adb26b6234787e32670 --- diff --git a/includes/actions/PurgeAction.php b/includes/actions/PurgeAction.php index 508bbe0a85..576533d3b7 100644 --- a/includes/actions/PurgeAction.php +++ b/includes/actions/PurgeAction.php @@ -66,6 +66,10 @@ class PurgeAction extends FormAction { } if ( $user->isAllowed( 'purge' ) ) { + // This will update the database immediately, even on HTTP GET. + // Lots of uses may exist for this feature, so just ignore warnings. + Profiler::instance()->getTransactionProfiler()->resetExpectations(); + $this->redirectParams = wfArrayToCgi( array_diff_key( $this->getRequest()->getQueryValues(), [ 'title' => null, 'action' => null ]