X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FSetup.php;h=4d9c495212111232645b046ad2c5b2775d2ac87a;hb=4aa6454d454df807059db5e794ef620896ff2e3d;hp=41d59455cfe6400352ff7c2ccad05d3550229f3f;hpb=9c185ca85c3c58f96e866c9347c2b7f031ddb289;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Setup.php b/includes/Setup.php index 41d59455cf..4d9c495212 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -278,7 +278,7 @@ $wgGalleryOptions += [ ]; /** - * Initialise $wgLocalFileRepo from backwards-compatible settings + * Shortcuts for $wgLocalFileRepo */ if ( !$wgLocalFileRepo ) { $wgLocalFileRepo = [ @@ -294,8 +294,15 @@ if ( !$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 ) { @@ -346,13 +353,6 @@ if ( $wgUseInstantCommons ) { '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