ToastFreeware
/
toast
/
cookiecaptcha.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2894a23
)
MathCaptcha requires the texvc functions, which are now in the Math extension.
author
Happy-melon
<happy-melon@users.mediawiki.org>
Sun, 24 Apr 2011 11:11:10 +0000
(11:11 +0000)
committer
Happy-melon
<happy-melon@users.mediawiki.org>
Sun, 24 Apr 2011 11:11:10 +0000
(11:11 +0000)
MathCaptcha.class.php
patch
|
blob
|
history
diff --git
a/MathCaptcha.class.php
b/MathCaptcha.class.php
index 9e3d891532753d1112a9b313b5e45456de06ccfc..5dbbeeb99bc9a66a71c63d9e8571f6853d5a4ced 100644
(file)
--- a/
MathCaptcha.class.php
+++ b/
MathCaptcha.class.php
@@
-39,7
+39,11
@@
class MathCaptcha extends SimpleCaptcha {
/** Fetch the math */
function fetchMath( $sum ) {
- $math = new MathRenderer( $sum );
+ if( MWInit::classExists( 'MathRenderer' ) ){
+ $math = new MathRenderer( $sum );
+ } else {
+ throw new MWException( 'MathCaptcha requires the Math extension for MediaWiki versions 1.18 and above.' );
+ }
$math->setOutputMode( MW_MATH_PNG );
$html = $math->render();
return preg_replace( '/alt=".*?"/', '', $html );