summaryrefslogtreecommitdiff
path: root/extensions/ConfirmEdit/includes/CaptchaStore.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2015-12-17 09:15:42 +0100
committerPierre Schmitz <pierre@archlinux.de>2015-12-17 09:44:51 +0100
commita1789ddde42033f1b05cc4929491214ee6e79383 (patch)
tree63615735c4ddffaaabf2428946bb26f90899f7bf /extensions/ConfirmEdit/includes/CaptchaStore.php
parent9e06a62f265e3a2aaabecc598d4bc617e06fa32d (diff)
Update to MediaWiki 1.26.0
Diffstat (limited to 'extensions/ConfirmEdit/includes/CaptchaStore.php')
-rw-r--r--extensions/ConfirmEdit/includes/CaptchaStore.php18
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() {