http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75667
Revision: 75667 Author: hartman Date: 2010-10-29 19:31:07 +0000 (Fri, 29 Oct 2010) Log Message: ----------- Use a minus sign in the simplecaptcha question, instead of a hyphen. Fixes bug 16213. Per suggestion of Christopher Yeleighton, adapted by Derk-Jan Hartman. Modified Paths: -------------- trunk/extensions/ConfirmEdit/ConfirmEdit_body.php Modified: trunk/extensions/ConfirmEdit/ConfirmEdit_body.php =================================================================== --- trunk/extensions/ConfirmEdit/ConfirmEdit_body.php 2010-10-29 19:31:02 UTC (rev 75666) +++ trunk/extensions/ConfirmEdit/ConfirmEdit_body.php 2010-10-29 19:31:07 UTC (rev 75667) @@ -76,8 +76,11 @@ function getCaptcha() { $a = mt_rand( 0, 100 ); $b = mt_rand( 0, 10 ); - $op = mt_rand( 0, 1 ) ? '+' : '-'; + /* Minus sign is used in the question. UTF-8, + since the api uses text/plain, not text/html */ + $op = mt_rand( 0, 1 ) ? '+' : '−'; + $test = "$a $op $b"; $answer = ( $op == '+' ) ? ( $a + $b ) : ( $a - $b ); return array( 'question' => $test, 'answer' => $answer ); _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs