From 4ac9fa081a7c045f6a9f1cfc529d82423f485b2e Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sun, 8 Dec 2013 09:55:49 +0100 Subject: Update to MediaWiki 1.22.0 --- includes/DeferredUpdates.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'includes/DeferredUpdates.php') diff --git a/includes/DeferredUpdates.php b/includes/DeferredUpdates.php index 89c4df68..c385f138 100644 --- a/includes/DeferredUpdates.php +++ b/includes/DeferredUpdates.php @@ -63,6 +63,16 @@ class DeferredUpdates { self::addUpdate( new HTMLCacheUpdate( $title, $table ) ); } + /** + * 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 * @@ -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 ); } } } -- cgit v1.2.2