From e0b3883c55c914ed1ef9d7388e28da527d8b6a95 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Thu, 6 Feb 2014 14:53:45 -0800 Subject: [PATCH] Wrap texvccheck call in PoolCounter Change-Id: Iae9693d1948bec6dd08473bce3cb704f24338ff8 --- MathInputCheckTexvc.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/MathInputCheckTexvc.php b/MathInputCheckTexvc.php index 0f426be..f8b1613 100644 --- a/MathInputCheckTexvc.php +++ b/MathInputCheckTexvc.php @@ -40,11 +40,23 @@ class MathInputCheckTexvc extends MathInputCheck { } /** - * - * @global type $wgTexvc * @return boolean */ public function isValid() { + $us = $this; + $checkWork = new PoolCounterWorkViaCallback( 'MathTexvc-check', "", array( + 'doWork' => function() use ( $us ) { + return $us->doValidCheck(); + } + ) ); + return $checkWork->execute(); + } + + /** + * @global type $wgTexvc + * @return boolean + */ + public function doValidCheck() { global $wgMathTexvcCheckExecutable; if ( !is_executable( $wgMathTexvcCheckExecutable ) ) { $msg = wfMessage( 'math_notexvc' )->inContentLanguage()->escaped();