diff options
Diffstat (limited to 'www/wiki/extensions/ConfirmEdit/includes/store/CaptchaHashStore.php')
-rw-r--r-- | www/wiki/extensions/ConfirmEdit/includes/store/CaptchaHashStore.php | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/www/wiki/extensions/ConfirmEdit/includes/store/CaptchaHashStore.php b/www/wiki/extensions/ConfirmEdit/includes/store/CaptchaHashStore.php new file mode 100644 index 00000000..f28d4314 --- /dev/null +++ b/www/wiki/extensions/ConfirmEdit/includes/store/CaptchaHashStore.php @@ -0,0 +1,28 @@ +<?php + +class CaptchaHashStore extends CaptchaStore { + protected $data = []; + + public function store( $index, $info ) { + $this->data[$index] = $info; + } + + public function retrieve( $index ) { + if ( array_key_exists( $index, $this->data ) ) { + return $this->data[$index]; + } + return false; + } + + public function clear( $index ) { + unset( $this->data[$index] ); + } + + public function cookiesNeeded() { + return false; + } + + public function clearAll() { + $this->data = []; + } +} |