Wrap texvccheck call in PoolCounter

Change-Id: Iae9693d1948bec6dd08473bce3cb704f24338ff8
This commit is contained in:
Chad Horohoe 2014-02-06 14:53:45 -08:00
parent ff83048597
commit e0b3883c55
1 changed files with 14 additions and 2 deletions

View File

@ -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();