From d9022f63880ce039446fba8364f68e656b7bf4cb Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Thu, 3 May 2012 13:01:35 +0200 Subject: Update to MediaWiki 1.19.0 --- includes/DeferredUpdates.php | 89 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 includes/DeferredUpdates.php (limited to 'includes/DeferredUpdates.php') diff --git a/includes/DeferredUpdates.php b/includes/DeferredUpdates.php new file mode 100644 index 00000000..262994e3 --- /dev/null +++ b/includes/DeferredUpdates.php @@ -0,0 +1,89 @@ +doUpdate(); + + if ( $doCommit && $dbw->trxLevel() ) { + $dbw->commit( __METHOD__ ); + } + } + + self::clearPendingUpdates(); + wfProfileOut( __METHOD__ ); + } + + /** + * Clear all pending updates without performing them. Generally, you don't + * want or need to call this. Unit tests need it though. + */ + public static function clearPendingUpdates() { + global $wgDeferredUpdateList; + $wgDeferredUpdateList = self::$updates = array(); + } +} -- cgit v1.2.2