diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2013-12-08 09:55:49 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2013-12-08 09:55:49 +0100 |
commit | 4ac9fa081a7c045f6a9f1cfc529d82423f485b2e (patch) | |
tree | af68743f2f4a47d13f2b0eb05f5c4aaf86d8ea37 /includes/DeferredUpdates.php | |
parent | af4da56f1ad4d3ef7b06557bae365da2ea27a897 (diff) |
Update to MediaWiki 1.22.0
Diffstat (limited to 'includes/DeferredUpdates.php')
-rw-r--r-- | includes/DeferredUpdates.php | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/includes/DeferredUpdates.php b/includes/DeferredUpdates.php index 89c4df68..c385f138 100644 --- a/includes/DeferredUpdates.php +++ b/includes/DeferredUpdates.php @@ -64,6 +64,16 @@ class DeferredUpdates { } /** + * Add a callable update. In a lot of cases, we just need a callback/closure, + * defining a new DeferrableUpdate object is not necessary + * @see MWCallableUpdate::__construct() + * @param callable $callable + */ + public static function addCallableUpdate( $callable ) { + self::addUpdate( new MWCallableUpdate( $callable ) ); + } + + /** * Do any deferred updates and clear the list * * @param string $commit set to 'commit' to commit after every update to @@ -99,7 +109,7 @@ class DeferredUpdates { // be reported to the user since the output is already sent. // Instead we just log them. if ( !$e instanceof ErrorPageError ) { - wfDebugLog( 'exception', $e->getLogMessage() ); + MWExceptionHandler::logException( $e ); } } } |