Reedy has uploaded a new change for review.
https://gerrit.wikimedia.org/r/319901
Change subject: Allow usage of old captcha script
......................................................................
Allow usage of old captcha script
To be reverted at a later date when improved script is allowable for
usage on WMF wikis.
Change-Id: Id23483286ae2549bfd6f1377c6a0d0c0898b88c4
---
M maintenance/GenerateFancyCaptchas.php
1 file changed, 9 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ConfirmEdit
refs/changes/01/319901/1
diff --git a/maintenance/GenerateFancyCaptchas.php
b/maintenance/GenerateFancyCaptchas.php
index dc100ec..722ea81 100644
--- a/maintenance/GenerateFancyCaptchas.php
+++ b/maintenance/GenerateFancyCaptchas.php
@@ -44,6 +44,7 @@
$this->addOption( "blacklist", "A blacklist of words that
should not be used", false, true );
$this->addOption( "fill", "Fill the captcha container to N
files", true, true );
$this->addOption( "verbose", "Show debugging information" );
+ $this->addOption( "oldcaptcha", "Whether to use captcha-old.py
which doesn't have OCR fighting improvements" );
$this->mDescription = "Generate new captchas and move them into
storage";
}
@@ -72,8 +73,15 @@
$e = null; // exception
try {
+
+ $captchaScript = 'captcha.py';
+
+ if ( $this->hasOption( 'oldcaptcha' ) ) {
+ $captchaScript = 'captcha-old.py';
+ }
+
$cmd = sprintf( "python %s --key %s --output %s --count
%s --dirs %s",
- wfEscapeShellArg( __DIR__ . '/../captcha.py' ),
+ wfEscapeShellArg( dirname( __DIR__ ) . '/' .
$captchaScript ),
wfEscapeShellArg( $wgCaptchaSecret ),
wfEscapeShellArg( $tmpDir ),
wfEscapeShellArg( $countGen ),
--
To view, visit https://gerrit.wikimedia.org/r/319901
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id23483286ae2549bfd6f1377c6a0d0c0898b88c4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ConfirmEdit
Gerrit-Branch: master
Gerrit-Owner: Reedy <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits