]> ToastFreeware Gitweb - toast/cookiecaptcha.git/blobdiff - CookieCaptcha.php
Scaffold of the CookieCaptcha class.
[toast/cookiecaptcha.git] / CookieCaptcha.php
index 69e3be01235a990d69d309b65dfbdb8ad8383f45..30a03170930917b2cd0e96c8614523f39c661493 100644 (file)
@@ -1,10 +1,11 @@
 <?php
 /**
- * Experimental image-based captcha plugin, using images generated by an
- * external tool.
+ * Experimental cookie-based captcha plugin.
  *
  * Copyright (C) 2005, 2006 Brion Vibber <brion@pobox.com>
  * http://www.mediawiki.org/
+ * Copyright (C) 2012, Gregor Herrmann <gregor@toastfreeware.priv.at>, Philipp Spitzer <philipp@toastfreeware.priv.at>
+ * http://www.toastfreeware.priv.at/
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -31,30 +32,7 @@ if ( !defined( 'MEDIAWIKI' ) ) {
 
 $dir = __DIR__;
 require_once $dir . '/ConfirmEdit.php';
-$wgCaptchaClass = 'FancyCaptcha';
+$wgCaptchaClass = 'CookieCaptcha';
 
-/**
- * The name of a file backend ($wgFileBackends) to be used for storing files.
- * Defaults to FSFileBackend using $wgCaptchaDirectory as a base path.
- */
-$wgCaptchaFileBackend = '';
-
-global $wgCaptchaDirectory;
-$wgCaptchaDirectory = "$wgUploadDirectory/captcha"; // bad default :D
-
-global $wgCaptchaDirectoryLevels;
-$wgCaptchaDirectoryLevels = 0; // To break into subdirectories
-
-global $wgCaptchaSecret;
-$wgCaptchaSecret = "CHANGE_THIS_SECRET!";
-
-/**
- * By default the FancyCaptcha rotates among all available captchas.
- * Setting $wgCaptchaDeleteOnSolve to true will delete the captcha
- * files when they are correctly solved. Thus the user will need
- * something like a cron creating new thumbnails to avoid drying up.
- */
-$wgCaptchaDeleteOnSolve = false;
-
-$wgExtensionMessagesFiles['FancyCaptcha'] = $dir . '/FancyCaptcha.i18n.php';
-$wgAutoloadClasses['FancyCaptcha'] = $dir . '/FancyCaptcha.class.php';
+$wgExtensionMessagesFiles['CookieCaptcha'] = $dir . '/CookieCaptcha.i18n.php';
+$wgAutoloadClasses['CookieCaptcha'] = $dir . '/CookieCaptcha.class.php';