diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:30:02 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:30:02 -0400 |
commit | 1de335ad3f395ca6861085393ba366a9e3fb4a0d (patch) | |
tree | f1fdd326034e05177596851be6a7127615d81498 /extensions/ConfirmEdit/ReCaptcha.php | |
parent | 9c75fa8ff6d4d38ef552c00fef5969fb154765e8 (diff) | |
parent | f6d65e533c62f6deb21342d4901ece24497b433e (diff) |
Merge commit 'f6d65'
# Conflicts:
# skins/ArchLinux/ArchLinux.php
Diffstat (limited to 'extensions/ConfirmEdit/ReCaptcha.php')
-rw-r--r-- | extensions/ConfirmEdit/ReCaptcha.php | 65 |
1 files changed, 1 insertions, 64 deletions
diff --git a/extensions/ConfirmEdit/ReCaptcha.php b/extensions/ConfirmEdit/ReCaptcha.php index b474f982..0ecabd25 100644 --- a/extensions/ConfirmEdit/ReCaptcha.php +++ b/extensions/ConfirmEdit/ReCaptcha.php @@ -1,65 +1,2 @@ <?php - -/** - * Captcha class using the reCAPTCHA widget. - * Stop Spam. Read Books. - * - * @addtogroup Extensions - * @author Mike Crawford <mike.crawford@gmail.com> - * @copyright Copyright (c) 2007 reCAPTCHA -- http://recaptcha.net - * @licence MIT/X11 - */ - -if ( !defined( 'MEDIAWIKI' ) ) { - exit; -} - -$dir = __DIR__; -require_once $dir . '/ConfirmEdit.php'; -$wgCaptchaClass = 'ReCaptcha'; - -$wgMessagesDirs['ReCaptcha'] = __DIR__ . '/i18n/re'; -$wgExtensionMessagesFiles['ReCaptcha'] = $dir . '/ReCaptcha.i18n.php'; - -$wgAutoloadClasses['ReCaptcha'] = $dir . '/ReCaptcha.class.php'; - -require_once( 'recaptchalib.php' ); - -// Set these in LocalSettings.php -$wgReCaptchaPublicKey = ''; -$wgReCaptchaPrivateKey = ''; -// For backwards compatibility -$recaptcha_public_key = ''; -$recaptcha_private_key = ''; - -/** - * Sets the theme for ReCaptcha - * - * See http://code.google.com/apis/recaptcha/docs/customization.html - */ -$wgReCaptchaTheme = 'red'; - -$wgExtensionFunctions[] = 'efReCaptcha'; - -/** - * Make sure the keys are defined. - */ -function efReCaptcha() { - global $wgReCaptchaPublicKey, $wgReCaptchaPrivateKey; - global $recaptcha_public_key, $recaptcha_private_key; - global $wgServerName; - - // Backwards compatibility - if ( $wgReCaptchaPublicKey == '' ) { - $wgReCaptchaPublicKey = $recaptcha_public_key; - } - if ( $wgReCaptchaPrivateKey == '' ) { - $wgReCaptchaPrivateKey = $recaptcha_private_key; - } - - if ( $wgReCaptchaPublicKey == '' || $wgReCaptchaPrivateKey == '' ) { - die ( 'You need to set $wgReCaptchaPrivateKey and $wgReCaptchaPublicKey in LocalSettings.php to ' . - "use the reCAPTCHA plugin. You can sign up for a key <a href='" . - htmlentities( recaptcha_get_signup_url ( $wgServerName, "mediawiki" ) ) . "'>here</a>." ); - } -} +require_once __DIR__ . "/ReCaptcha/ReCaptcha.php"; |