Index: trunk/extensions/AbuseFilter/AbuseFilter.class.php |
— | — | @@ -339,12 +339,17 @@ |
340 | 340 | public static function checkConditions( $conds, $vars, $ignoreError = true ) { |
341 | 341 | global $wgAbuseFilterParserClass; |
342 | 342 | |
| 343 | + static $parser; |
| 344 | + |
343 | 345 | wfProfileIn( __METHOD__ ); |
344 | 346 | |
345 | | - try { |
| 347 | + if ( is_null($parser) ) { |
346 | 348 | $parser = new $wgAbuseFilterParserClass; |
347 | 349 | |
348 | 350 | $parser->setVars( $vars ); |
| 351 | + } |
| 352 | + |
| 353 | + try { |
349 | 354 | $result = $parser->parse( $conds, self::$condCount ); |
350 | 355 | } catch (Exception $excep) { |
351 | 356 | // Sigh. |