];
/**
- * Initialise $wgLocalFileRepo from backwards-compatible settings
+ * Shortcuts for $wgLocalFileRepo
*/
if ( !$wgLocalFileRepo ) {
$wgLocalFileRepo = [
'deletedHashLevels' => $wgHashedUploadDirectory ? 3 : 0
];
}
+
+if ( !isset( $wgLocalFileRepo['backend'] ) ) {
+ // Create a default FileBackend name.
+ // FileBackendGroup will register a default, if absent from $wgFileBackends.
+ $wgLocalFileRepo['backend'] = $wgLocalFileRepo['name'] . '-backend';
+}
+
/**
- * Initialise shared repo from backwards-compatible settings
+ * Shortcuts for $wgForeignFileRepos
*/
if ( $wgUseSharedUploads ) {
if ( $wgSharedUploadDBname ) {
'apiThumbCacheExpiry' => 0,
];
}
-/*
- * 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::class ) {
$repo['directory'] = $wgUploadDirectory; // b/c
/**
* @var Language $wgContLang
+ * @deprecated since 1.32, use the ContentLanguage service directly
*/
-$wgContLang = Language::factory( $wgLanguageCode );
-$wgContLang->initContLang();
+$wgContLang = MediaWikiServices::getInstance()->getContentLanguage();
// Now that variant lists may be available...
$wgRequest->interpolateTitle();