| Index: trunk/phase3/includes/Setup.php |
| — | — | @@ -128,6 +128,18 @@ |
| 129 | 129 | ); |
| 130 | 130 | } |
| 131 | 131 | } |
| | 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 | + |
| 132 | 144 | if ( !class_exists( 'AutoLoader' ) ) { |
| 133 | 145 | require_once( "$IP/includes/AutoLoader.php" ); |
| 134 | 146 | } |
| Index: trunk/phase3/includes/DefaultSettings.php |
| — | — | @@ -257,6 +257,13 @@ |
| 258 | 258 | /**@}*/ |
| 259 | 259 | |
| 260 | 260 | /** |
| | 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 | +/** |
| 261 | 268 | * Allowed title characters -- regex character class |
| 262 | 269 | * Don't change this unless you know what you're doing |
| 263 | 270 | * |
| Index: trunk/phase3/RELEASE-NOTES |
| — | — | @@ -97,6 +97,8 @@ |
| 98 | 98 | * (bug 3340) $wgBlockCIDRLimit added (default: 16) to configure the low end of |
| 99 | 99 | CIDR ranges for blocking |
| 100 | 100 | * Added upload by default to $wgRestrictionTypes |
| | 101 | +* $wgUseInstantCommons added for quick and easy enabling of Commons as a remote |
| | 102 | + file repository |
| 101 | 103 | |
| 102 | 104 | === New features in 1.16 === |
| 103 | 105 | |