mediawiki-extensions-Confir.../includes/store/CaptchaCacheStore.php
Max Semenik 5b7a36a521 Clean up some phpcs problems
Change-Id: Ie956fe86184535a376d0398483ac3c853fa9127c
2018-07-12 23:13:58 +00:00

31 lines
634 B
PHP

<?php
class CaptchaCacheStore extends CaptchaStore {
public function store( $index, $info ) {
global $wgCaptchaSessionExpiration;
ObjectCache::getMainStashInstance()->set(
wfMemcKey( 'captcha', $index ),
$info,
$wgCaptchaSessionExpiration
);
}
public function retrieve( $index ) {
$info = ObjectCache::getMainStashInstance()->get( wfMemcKey( 'captcha', $index ) );
if ( $info ) {
return $info;
} else {
return false;
}
}
public function clear( $index ) {
ObjectCache::getMainStashInstance()->delete( wfMemcKey( 'captcha', $index ) );
}
public function cookiesNeeded() {
return false;
}
}