From 12e47b7f7b54c1eeed477aa402d9130bb8c77696 Mon Sep 17 00:00:00 2001 From: Daniel Friesen Date: Wed, 7 May 2008 06:05:26 +0000 Subject: [PATCH] Now that I think about it, we're going to have to set $wgSharedPrefix inside of Setup.php so that it can inherit from a $wgDBprefix inside of LocalSettings.php. --- includes/DefaultSettings.php | 2 +- includes/Setup.php | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 32e9906b56..4ac2eb22ec 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -591,7 +591,7 @@ $wgCheckDBSchema = true; * EXPERIMENTAL */ $wgSharedDB = null; -$wgSharedPrefix = $wgDBprefix; +$wgSharedPrefix = false; # Defaults to $wgDBprefix $wgSharedTables = array( 'user' ); /** diff --git a/includes/Setup.php b/includes/Setup.php index ecdb819158..92e310bd34 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -187,6 +187,9 @@ wfDebug( 'Main cache: ' . get_class( $wgMemc ) . wfProfileOut( $fname.'-memcached' ); wfProfileIn( $fname.'-SetupSession' ); +# Set default shared prefix +if( $wgSharedPrefix === false ) $wgSharedPrefix = $wgDBprefix; + if ( $wgDBprefix ) { $wgCookiePrefix = $wgDBname . '_' . $wgDBprefix; } elseif ( $wgSharedDB ) { -- 2.20.1