Revert r104659 and its followup r104665: break the unit tests with a fatal error...
[lhc/web/wiklou.git] / includes / LocalisationCache.php
index 828ed1c..1d0ccc5 100644 (file)
@@ -163,12 +163,7 @@ class LocalisationCache {
                                        $storeClass = 'LCStore_Accel';
                                        break;
                                case 'detect':
-                                       try {
-                                               $c = wfGetCache( CACHE_ACCEL );
-                                               $storeClass = 'LCStore_Accel';
-                                       } catch( Exception $c ) {
-                                               $storeClass = $wgCacheDirectory ? 'LCStore_CDB' : 'LCStore_DB';
-                                       }
+                                       $storeClass = $wgCacheDirectory ? 'LCStore_CDB' : 'LCStore_DB';
                                        break;
                                default:
                                        throw new MWException(
@@ -358,7 +353,6 @@ class LocalisationCache {
                $deps = $this->store->get( $code, 'deps' );
                $keys = $this->store->get( $code, 'list', 'messages' );
                $preload = $this->store->get( $code, 'preload' );
-               $this->store->close( $code );
                // Different keys may expire separately, at least in LCStore_Accel
                if ( $deps === null || $keys === null || $preload === null ) {
                        wfDebug( __METHOD__."($code): cache missing, need to make one\n" );
@@ -843,7 +837,7 @@ interface LCStore {
 
 /**
  * LCStore implementation which uses PHP accelerator to store data.
- * This will work if one of XCache, eAccelerator, or APC cacher is configured.
+ * This will work if one of XCache, WinCache or APC cacher is configured.
  * (See ObjectCache.php)
  */
 class LCStore_Accel implements LCStore {
@@ -1033,13 +1027,6 @@ class LCStore_CDB implements LCStore {
                }
        }
 
-       public function close( $code ) {
-               if ( !isset( $this->readers[$code] ) ) {
-                       return;
-               }
-               $this->readers[$code]->close();
-       }
-
        public function startWrite( $code ) {
                if ( !file_exists( $this->directory ) ) {
                        if ( !wfMkdirParents( $this->directory, null, __METHOD__ ) ) {
@@ -1194,4 +1181,4 @@ class LocalisationCache_BulkLoad extends LocalisationCache {
                        $this->unload( $code );
                }
        }
-}
+}
\ No newline at end of file