r92606 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r92605‎ | r92606 | r92607 >
Date:00:26, 20 July 2011
Author:yaron
Status:deferred
Tags:
Comment:
Added patch from Chris Ryan, to prevent recursive calls to parser
Modified paths:
  • /trunk/extensions/ApprovedRevs/ApprovedRevs.hooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ApprovedRevs/ApprovedRevs.hooks.php
@@ -46,7 +46,15 @@
4747 static public function setApprovedRevForParsing( &$parser, &$text, &$stripState ) {
4848 global $wgRequest;
4949
 50+ // Static variable to prevent recursive calls to this method.
 51+ static $alreadyCalled = false;
 52+
5053 if ( $wgRequest->getCheck( 'wpSave' ) ) {
 54+ if ( $alreadyCalled ) {
 55+ return true;
 56+ }
 57+ $alreadyCalled = true;
 58+
5159 // @HACK ? If the ConfirmEdit extension is installed
5260 // and kicks in for this save (i.e., prompting the
5361 // user for a CAPTCHA test), it will lead to bad

Status & tagging log