diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2015-12-20 09:00:55 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2015-12-20 09:00:55 +0100 |
commit | a2190ac74dd4d7080b12bab90e552d7aa81209ef (patch) | |
tree | 8b31f38de9882d18df54cf8d9e0de74167a094eb /extensions/ConfirmEdit/includes/CaptchaStore.php | |
parent | 15e69f7b20b6596b9148030acce5b59993b95a45 (diff) | |
parent | 257401d8b2cf661adf36c84b0e3fd1cf85e33c22 (diff) |
Merge branch 'mw-1.26'
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() { |