mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ConfirmEdit
synced 2024-11-29 10:24:35 +00:00
8a3c51b1db
Makes MediaWiki.Files.OneClassPerFile.MultipleFound pass Change-Id: I88b5112d84d8983e67be1bca9f4039486bcefc6f
31 lines
606 B
PHP
31 lines
606 B
PHP
<?php
|
|
|
|
class CaptchaCacheStore extends CaptchaStore {
|
|
function store( $index, $info ) {
|
|
global $wgCaptchaSessionExpiration;
|
|
|
|
ObjectCache::getMainStashInstance()->set(
|
|
wfMemcKey( 'captcha', $index ),
|
|
$info,
|
|
$wgCaptchaSessionExpiration
|
|
);
|
|
}
|
|
|
|
function retrieve( $index ) {
|
|
$info = ObjectCache::getMainStashInstance()->get( wfMemcKey( 'captcha', $index ) );
|
|
if ( $info ) {
|
|
return $info;
|
|
} else {
|
|
return false;
|
|
}
|
|
}
|
|
|
|
function clear( $index ) {
|
|
ObjectCache::getMainStashInstance()->delete( wfMemcKey( 'captcha', $index ) );
|
|
}
|
|
|
|
function cookiesNeeded() {
|
|
return false;
|
|
}
|
|
}
|