From 63601400e476c6cf43d985f3e7b9864681695ed4 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Fri, 18 Jan 2013 16:46:04 +0100 Subject: Update to MediaWiki 1.20.2 this update includes: * adjusted Arch Linux skin * updated FluxBBAuthPlugin * patch for https://bugzilla.wikimedia.org/show_bug.cgi?id=44024 --- includes/objectcache/HashBagOStuff.php | 44 ++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) (limited to 'includes/objectcache/HashBagOStuff.php') diff --git a/includes/objectcache/HashBagOStuff.php b/includes/objectcache/HashBagOStuff.php index 36773306..799f26a3 100644 --- a/includes/objectcache/HashBagOStuff.php +++ b/includes/objectcache/HashBagOStuff.php @@ -1,4 +1,25 @@ bag = array(); } + /** + * @param $key string + * @return bool + */ protected function expire( $key ) { $et = $this->bag[$key][1]; @@ -25,6 +50,10 @@ class HashBagOStuff extends BagOStuff { return true; } + /** + * @param $key string + * @return bool|mixed + */ function get( $key ) { if ( !isset( $this->bag[$key] ) ) { return false; @@ -37,10 +66,22 @@ class HashBagOStuff extends BagOStuff { return $this->bag[$key][0]; } + /** + * @param $key string + * @param $value mixed + * @param $exptime int + * @return bool + */ function set( $key, $value, $exptime = 0 ) { $this->bag[$key] = array( $value, $this->convertExpiry( $exptime ) ); + return true; } + /** + * @param $key string + * @param $time int + * @return bool + */ function delete( $key, $time = 0 ) { if ( !isset( $this->bag[$key] ) ) { return false; @@ -51,6 +92,9 @@ class HashBagOStuff extends BagOStuff { return true; } + /** + * @return array + */ function keys() { return array_keys( $this->bag ); } -- cgit v1.2.2