r75667 MediaWiki - Code Review archive
Repository:
MediaWiki
Revision:
<
r75666
|
r75667
|
r75668
>
Date:
19:31, 29 October 2010
Author:
hartman
Status:
ok
Tags:
Comment:
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) (
history
)
Diff
[
purge
]
Index: trunk/extensions/ConfirmEdit/ConfirmEdit_body.php
—
—
@@ -76,8 +76,11 @@
77
77
function getCaptcha() {
78
78
$a = mt_rand( 0, 100 );
79
79
$b = mt_rand( 0, 10 );
80
- $op = mt_rand( 0, 1 ) ? '+' : '-';
81
80
81
+ /* Minus sign is used in the question. UTF-8,
82
+ since the api uses text/plain, not text/html */
83
+ $op = mt_rand( 0, 1 ) ? '+' : '−';
84
+
82
85
$test = "$a $op $b";
83
86
$answer = ( $op == '+' ) ? ( $a + $b ) : ( $a - $b );
84
87
return array( 'question' => $test, 'answer' => $answer );
Status & tagging log
02:04, 12 January 2011
Reedy
(
talk
|
contribs
)
changed the
status
of r75667
[
removed:
new
added:
ok]