r92013 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r92012‎ | r92013 | r92014 >
Date:21:59, 12 July 2011
Author:yaron
Status:reverted (Comments)
Tags:
Comment:
Follow-up to r86811: changed MWInit::classExists() to class_exists() - the former is only defined in MW >= 1.18, which goes against the whole point of the call
Modified paths:
  • /trunk/extensions/ConfirmEdit/MathCaptcha.class.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ConfirmEdit/MathCaptcha.class.php
@@ -39,7 +39,7 @@
4040
4141 /** Fetch the math */
4242 function fetchMath( $sum ) {
43 - if( MWInit::classExists( 'MathRenderer' ) ){
 43+ if ( class_exists( 'MathRenderer' ) ){
4444 $math = new MathRenderer( $sum );
4545 } else {
4646 throw new MWException( 'MathCaptcha requires the Math extension for MediaWiki versions 1.18 and above.' );

Follow-up revisions

RevisionCommit summaryAuthorDate
r92018Follow-up to r86811 and r92013 - instead of using class_exists() or MWInit::c...yaron23:11, 12 July 2011
r92755Revert r92013, r92018 per CRaaron17:17, 21 July 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r86811MathCaptcha requires the texvc functions, which are now in the Math extension.happy-melon11:11, 24 April 2011

Comments

#Comment by Siebrand (talk | contribs)   22:06, 12 July 2011

IIRC class_exists() does not play nice with Hiphop, so that may be why MWInit::classExists() was used.

#Comment by 😂 (talk | contribs)   22:12, 12 July 2011

Yes, that was the reason.

#Comment by Siebrand (talk | contribs)   23:09, 12 July 2011

So this change should be reverted?

#Comment by 😂 (talk | contribs)   23:11, 12 July 2011

So ConfirmEdit can support HipHop? I'd say yes.

Status & tagging log