@cryptotaxi247 / infra / commits / 0662962b

Wiki: Use QuestyCaptcha

Eelco Dolstra committed Nov 14, 2013 at 10:42 UTC 0662962b2cbec7a517d26734b2ef0125353279c8
1 file changed +11 -7
nixos-org/webserver.nix
+11 -7
@@ -179,15 +179,19 @@ in
179 $wgEnableDnsBlacklist = true;
180 $wgDnsBlacklistUrls = array('xbl.spamhaus.org');
181
182 - # Use a reCAPTCHA to prevent spam.
182 + # Require users to answer a question.
183 require_once("$IP/extensions/ConfirmEdit/ConfirmEdit.php");
184 - require_once("$IP/extensions/ConfirmEdit/ReCaptcha.php");
185 - $wgCaptchaClass = 'ReCaptcha';
186 - $wgReCaptchaPublicKey = '6Ldevd8SAAAAAFR6MwnU01FOWJ3O4II3aRJpMQ8F';
187 - $wgReCaptchaPrivateKey = '${builtins.readFile ./nixos.org-recaptcha-private-key}';
188 - $wgCaptchaTriggers['edit'] = true;
189 - $wgCaptchaTriggers['create'] = true;
184 + $wgCaptchaTriggers['edit'] = true;
185 + $wgCaptchaTriggers['create'] = true;
186
187 + require_once("$IP/extensions/ConfirmEdit/QuestyCaptcha.php");
188 + $wgCaptchaClass = 'QuestyCaptcha';
189 + $arr = array(
190 + "What is the name of the Linux distribution to which this wiki is dedicated?" => "NixOS",
191 + );
192 + foreach ($arr as $key => $value) {
193 + $wgCaptchaQuestions[] = array('question' => $key, 'answer' => $value);
194 + }
195 '';
196 enableUploads = true;
197 uploadDir = "/data/nixos-mediawiki-upload";