don't try to redeclare classes
authorRiver Tarnell <kateturner@users.mediawiki.org>
Sat, 2 Jul 2005 23:50:09 +0000 (23:50 +0000)
committerRiver Tarnell <kateturner@users.mediawiki.org>
Sat, 2 Jul 2005 23:50:09 +0000 (23:50 +0000)
includes/ObjectCache.php

index 4558ba7..9ead4b4 100644 (file)
@@ -50,9 +50,11 @@ function &wfGetCache( $inputType ) {
                if ( !array_key_exists( CACHE_MEMCACHED, $wgCaches ) ){ 
                        require_once( 'memcached-client.php' );
                        
-                       class MemCachedClientforWiki extends memcached {
-                               function _debugprint( $text ) {
-                                       wfDebug( "memcached: $text\n" );
+                       if (!class_exists("MemcachedClientforWiki")) {
+                               class MemCachedClientforWiki extends memcached {
+                                       function _debugprint( $text ) {
+                                               wfDebug( "memcached: $text\n" );
+                                       }
                                }
                        }