jenkins-bot has submitted this change and it was merged.
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, 12 insertions(+), 1 deletion(-)
Approvals:
Florianschmidtwelzow: Looks good to me, approved
jenkins-bot: Verified
diff --git a/maintenance/GenerateFancyCaptchas.php
b/maintenance/GenerateFancyCaptchas.php
index dc100ec..f955a4a 100644
--- a/maintenance/GenerateFancyCaptchas.php
+++ b/maintenance/GenerateFancyCaptchas.php
@@ -44,6 +44,10 @@
$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 +76,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: merged
Gerrit-Change-Id: Id23483286ae2549bfd6f1377c6a0d0c0898b88c4
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ConfirmEdit
Gerrit-Branch: master
Gerrit-Owner: Reedy <[email protected]>
Gerrit-Reviewer: Dpatrick <[email protected]>
Gerrit-Reviewer: Florianschmidtwelzow <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits