r60960 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r60959‎ | r60960 | r60961 >
Date:05:20, 12 January 2010
Author:tstarling
Status:ok
Tags:
Comment:
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().
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/GlobalFunctions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/GlobalFunctions.php
@@ -2896,9 +2896,7 @@
28972897 * This is used as a prefix in memcached keys
28982898 */
28992899 function wfWikiID() {
2900 - global $wgDBprefix, $wgDBname, $wgWikiId;
2901 - if( $wgWikiId )
2902 - return $wgWikiId;
 2900+ global $wgDBprefix, $wgDBname;
29032901 if ( $wgDBprefix ) {
29042902 return "$wgDBname-$wgDBprefix";
29052903 } else {
Index: trunk/phase3/includes/DefaultSettings.php
@@ -717,12 +717,6 @@
718718 */
719719 $wgLBFactoryConf = array( 'class' => 'LBFactory_Simple' );
720720
721 -/**
722 - * Unique identifier if you're paranoid and don't want $wgDBname as part of
723 - * wfWikiId(). See bug 21086
724 - */
725 -$wgWikiId = false;
726 -
727721 /** How long to wait for a slave to catch up to the master */
728722 $wgMasterWaitTimeout = 10;
729723
Index: trunk/phase3/RELEASE-NOTES
@@ -75,7 +75,6 @@
7676 CIDR ranges for blocking
7777 * $wgUseInstantCommons added for quick and easy enabling of Commons as a remote
7878 file repository
79 -* $wgWikiId added to override default output of wfWikiId()
8079 * $wgDBAhandler added to choose a DBA handler when using CACHE_DBA
8180 * $wgPreviewOnOpenNamespaces for extensions that create namespaces that behave
8281 similarly to the category namespace.

Follow-up revisions

RevisionCommit summaryAuthorDate
r88015(bug 21086) generateSitemap.php uses wfWikiID() in sitemap filenames...demon17:54, 13 May 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r59548Add $wgWikiId to override default wfWikiId() output. Solves bug 21086 (securi...demon16:13, 29 November 2009

Status & tagging log