]> ToastFreeware Gitweb - toast/cookiecaptcha.git/blobdiff - ConfirmEdit.php
* (bug 9102) Cookie message optional + Es internationalization
[toast/cookiecaptcha.git] / ConfirmEdit.php
index 9052de693b0d25c9a7a7d0b065ef9ea85023c58b..4f026ea7b80741a31ec7ec2df021104aa8492091 100644 (file)
@@ -35,7 +35,7 @@ $wgExtensionFunctions[] = 'ceSetup';
 $wgExtensionCredits['other'][] = array(
        'name' => 'ConfirmEdit',
        'author' => 'Brion Vibber',
-       'url' => 'http://meta.wikimedia.org/wiki/ConfirmEdit_extension',
+       'url' => 'http://www.mediawiki.org/wiki/Extension:ConfirmEdit',
        'description' => 'Simple captcha implementation',
 );
 
@@ -549,7 +549,7 @@ class SimpleCaptcha {
        function showHelp() {
                global $wgOut, $ceAllowConfirmedEmail;
                $wgOut->setPageTitle( wfMsg( 'captchahelp-title' ) );
-               $wgOut->addWikiText( wfMsg( 'captchahelp-text' ) );
+               $wgOut->addWikiText( wfMsg( 'captchahelp-text', $this->storage->cookiesNeeded() ? wfMsg( 'captchahelp-cookies-needed' ) : '' ) );
        }
 
 }
@@ -570,6 +570,10 @@ class CaptchaSessionStore {
        function clear( $index ) {
                unset( $_SESSION['captcha' . $index] );
        }
+
+       function cookiesNeeded() {
+               return true;
+       }
 }
 
 class CaptchaCacheStore {
@@ -593,6 +597,10 @@ class CaptchaCacheStore {
                global $wgMemc;
                $wgMemc->delete( wfMemcKey( 'captcha', $index ) );
        }
+
+       function cookiesNeeded() {
+               return false;
+       }
 }
 
 } # End invocation guard