MediaWiki r58652 - Code Review

Jump to: navigation, search
Repository:MediaWiki
Revision:r58651‎ | r58652 (on ViewVC)‎ | r58653 >
Date:15:38, 6 November 2009
Author:demon
Status:ok
Tags:
Comment:
Add new global $wgUseInstantCommons for quick && easy enabling of Commons for 3rd party sites using sane defaults
Modified paths:

Diff [purge]

Index: trunk/phase3/includes/Setup.php
@@ -128,6 +128,18 @@
129129 );
130130 }
131131 }
 132+if( $wgUseInstantCommons ) {
 133+ $wgForeignFileRepos[] = array(
 134+ 'class' => 'ForeignAPIRepo',
 135+ 'name' => 'wikimediacommons',
 136+ 'apibase' => 'http://commons.wikimedia.org/w/api.php',
 137+ 'fetchDescription' => true,
 138+ 'descriptionCacheExpiry' => 43200,
 139+ 'apiThumbCacheExpiry' => 86400,
 140+ );
 141+}
 142+
 143+
132144 if ( !class_exists( 'AutoLoader' ) ) {
133145 require_once( "$IP/includes/AutoLoader.php" );
134146 }
Index: trunk/phase3/includes/DefaultSettings.php
@@ -257,6 +257,13 @@
258258 /**@}*/
259259
260260 /**
 261+ * Use Commons as a remote file repository. Essentially a wrapper, when this
 262+ * is enabled $wgForeignFileRepos will point at Commons with a set of default
 263+ * settings
 264+ */
 265+$wgUseInstantCommons = false;
 266+
 267+/**
261268 * Allowed title characters -- regex character class
262269 * Don't change this unless you know what you're doing
263270 *
Index: trunk/phase3/RELEASE-NOTES
@@ -97,6 +97,8 @@
9898 * (bug 3340) $wgBlockCIDRLimit added (default: 16) to configure the low end of
9999 CIDR ranges for blocking
100100 * Added upload by default to $wgRestrictionTypes
 101+* $wgUseInstantCommons added for quick and easy enabling of Commons as a remote
 102+ file repository
101103
102104 === New features in 1.16 ===
103105

Follow-up revisions

Rev.Commit summaryAuthorDate
r59061Fix for r58652: use tabs for indentation, not spaces :)ialex13:16, 14 November 2009
r63318Follow-up r58652: Add 'shared-repo-name-wikimediacommons' message which is us...raymond16:06, 6 March 2010
r63319Backport r63318: Follow-up r58652: Add 'shared-repo-name-wikimediacommons' me...raymond16:30, 6 March 2010

Status & tagging log