diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:32:59 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:32:59 -0400 |
commit | 6dc1997577fab2c366781fd7048144935afa0012 (patch) | |
tree | 8918d28c7ab4342f0738985e37af1dfc42d0e93a /extensions/ConfirmEdit/includes/CaptchaStore.php | |
parent | 150f94f051128f367bc89f6b7e5f57eb2a69fc62 (diff) | |
parent | fa89acd685cb09cdbe1c64cbb721ec64975bbbc1 (diff) |
Merge commit 'fa89acd'
# Conflicts:
# .gitignore
# extensions/ArchInterWiki.sql
Diffstat (limited to 'extensions/ConfirmEdit/includes/CaptchaStore.php')
-rw-r--r-- | extensions/ConfirmEdit/includes/CaptchaStore.php | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/extensions/ConfirmEdit/includes/CaptchaStore.php b/extensions/ConfirmEdit/includes/CaptchaStore.php index b0854df1..75800710 100644 --- a/extensions/ConfirmEdit/includes/CaptchaStore.php +++ b/extensions/ConfirmEdit/includes/CaptchaStore.php @@ -58,7 +58,6 @@ abstract class CaptchaStore { } class CaptchaSessionStore extends CaptchaStore { - protected function __construct() { // Make sure the session is started if ( session_id() === '' ) { @@ -88,16 +87,18 @@ class CaptchaSessionStore extends CaptchaStore { } class CaptchaCacheStore extends CaptchaStore { - function store( $index, $info ) { - global $wgMemc, $wgCaptchaSessionExpiration; - $wgMemc->set( wfMemcKey( 'captcha', $index ), $info, - $wgCaptchaSessionExpiration ); + global $wgCaptchaSessionExpiration; + + ObjectCache::getMainStashInstance()->set( + wfMemcKey( 'captcha', $index ), + $info, + $wgCaptchaSessionExpiration + ); } function retrieve( $index ) { - global $wgMemc; - $info = $wgMemc->get( wfMemcKey( 'captcha', $index ) ); + $info = ObjectCache::getMainStashInstance()->get( wfMemcKey( 'captcha', $index ) ); if ( $info ) { return $info; } else { @@ -106,8 +107,7 @@ class CaptchaCacheStore extends CaptchaStore { } function clear( $index ) { - global $wgMemc; - $wgMemc->delete( wfMemcKey( 'captcha', $index ) ); + ObjectCache::getMainStashInstance()->delete( wfMemcKey( 'captcha', $index ) ); } function cookiesNeeded() { |