$wgNamespaceAliases['Image'] = NS_FILE;
$wgNamespaceAliases['Image_talk'] = NS_FILE_TALK;
+/**
+ * Initialise $wgLockManagers to include basic FS version
+ */
+$wgLockManagers[] = array(
+ 'name' => 'fsLockManager',
+ 'class' => 'FSLockManager',
+ 'lockDirectory' => "{$wgUploadDirectory}/lockdir",
+);
+$wgLockManagers[] = array(
+ 'name' => 'nullLockManager',
+ 'class' => 'NullLockManager',
+);
+
/**
* Initialise $wgLocalFileRepo from backwards-compatible settings
*/
);
} else {
$wgForeignFileRepos[] = array(
- 'class' => 'FSRepo',
+ 'class' => 'FileRepo',
'name' => 'shared',
'directory' => $wgSharedUploadDirectory,
'url' => $wgSharedUploadPath,
$wgForeignFileRepos[] = array(
'class' => 'ForeignAPIRepo',
'name' => 'wikimediacommons',
- 'apibase' => 'http://commons.wikimedia.org/w/api.php',
+ 'apibase' => '//commons.wikimedia.org/w/api.php',
'hashLevels' => 2,
'fetchDescription' => true,
'descriptionCacheExpiry' => 43200,
'apiThumbCacheExpiry' => 86400,
);
}
+/*
+ * Add on default file backend config for file repos.
+ * FileBackendGroup will handle initializing the backends.
+ */
+if ( !isset( $wgLocalFileRepo['backend'] ) ) {
+ $wgLocalFileRepo['backend'] = $wgLocalFileRepo['name'] . '-backend';
+}
+foreach ( $wgForeignFileRepos as &$repo ) {
+ if ( !isset( $repo['directory'] ) && $repo['class'] === 'ForeignAPIRepo' ) {
+ $repo['directory'] = $wgUploadDirectory; // b/c
+ }
+ if ( !isset( $repo['backend'] ) ) {
+ $repo['backend'] = $repo['name'] . '-backend';
+ }
+}
+unset( $repo ); // no global pollution; destroy reference
if ( is_null( $wgEnableAutoRotation ) ) {
// Only enable auto-rotation when the bitmap handler can rotate
$wgCookieSecure = ( substr( $wgServer, 0, 6 ) === 'https:' );
}
+MWDebug::init();
+
if ( !defined( 'MW_COMPILED' ) ) {
if ( !MWInit::classExists( 'AutoLoader' ) ) {
require_once( "$IP/includes/AutoLoader.php" );
}
}
wfDebug( "$debug\n" );
+ MWDebug::processRequest( $wgRequest );
}
wfProfileOut( $fname . '-misc1' );