Index: AuthDrupalEncode.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/mediawikiauth/AuthDrupalEncode.php,v
retrieving revision 1.3
diff -u -p -r1.3 AuthDrupalEncode.php
--- AuthDrupalEncode.php	1 Apr 2009 21:16:16 -0000	1.3
+++ AuthDrupalEncode.php	5 Oct 2010 20:43:01 -0000
@@ -63,6 +63,7 @@ function StaticUserLogout($prefix = null
 	}
 	// this lifted from wiki/includes/Setup.php which hasn't been included
 	// when we need these
+	if (is_null($prefix)) {
 	if ( $GLOBALS['wgDBprefix'] ) {
 		$prefix = $GLOBALS['wgDBname'] . '_' . $GLOBALS['wgDBprefix'];
 	}
@@ -73,6 +74,7 @@ function StaticUserLogout($prefix = null
 	} else {
 		$prefix = $GLOBALS['wgDBname'];
 	}
+	}
         $GLOBALS['wgCookiePrefix'] = $prefix; // not sure this is necessary
 
 	// $_SESSION['wsUserID'] = 0;  let's unset the cookie instead
