From a8956ea2fd426ac29e7da8c8d7f81363694097f7 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Tue, 12 Jan 2010 05:20:31 +0000 Subject: [PATCH] Reverted r59548 (reopens bug 21086). wfWikiID() is used as a way to identify and connect to a given database in LoadBalancer and various extensions, that's why it must contain the database name and table prefix. Perhaps its use as a public identifier should be optional, but in that case the public identifier needs to be customised, not the return value of wfWikiID(). --- RELEASE-NOTES | 1 - includes/DefaultSettings.php | 6 ------ includes/GlobalFunctions.php | 4 +--- 3 files changed, 1 insertion(+), 10 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index d529bdef07..91befc1027 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -75,7 +75,6 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN CIDR ranges for blocking * $wgUseInstantCommons added for quick and easy enabling of Commons as a remote file repository -* $wgWikiId added to override default output of wfWikiId() * $wgDBAhandler added to choose a DBA handler when using CACHE_DBA * $wgPreviewOnOpenNamespaces for extensions that create namespaces that behave similarly to the category namespace. diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index f583b8b444..bd636d3744 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -717,12 +717,6 @@ $wgDBservers = false; */ $wgLBFactoryConf = array( 'class' => 'LBFactory_Simple' ); -/** - * Unique identifier if you're paranoid and don't want $wgDBname as part of - * wfWikiId(). See bug 21086 - */ -$wgWikiId = false; - /** How long to wait for a slave to catch up to the master */ $wgMasterWaitTimeout = 10; diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 306498eaf5..363b643f04 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -2896,9 +2896,7 @@ function wfForeignMemcKey( $db, $prefix /*, ... */ ) { * This is used as a prefix in memcached keys */ function wfWikiID() { - global $wgDBprefix, $wgDBname, $wgWikiId; - if( $wgWikiId ) - return $wgWikiId; + global $wgDBprefix, $wgDBname; if ( $wgDBprefix ) { return "$wgDBname-$wgDBprefix"; } else { -- 2.20.1