13 989
edycji
(→111) |
(→222) |
||
| Linia 12: | Linia 12: | ||
==222== | ==222== | ||
[[File:Wikipedia-Marker-commons.svg|thumb|A picture from Wikimedia Commons embedded in this Wiki]] | [[File:Wikipedia-Marker-commons.svg|thumb|A picture from Wikimedia Commons embedded in this Wiki]] | ||
==333== | |||
if ( $wgUseSharedUploads ) { | |||
if ( $wgSharedUploadDBname ) { | |||
$wgForeignFileRepos[] = [ | |||
'class' => ForeignDBRepo::class, | |||
'name' => 'shared', | |||
'directory' => $wgSharedUploadDirectory, | |||
'url' => $wgSharedUploadPath, | |||
'hashLevels' => $wgHashedSharedUploadDirectory ? 2 : 0, | |||
'thumbScriptUrl' => $wgSharedThumbnailScriptPath, | |||
'transformVia404' => !$wgGenerateThumbnailOnParse, | |||
'dbType' => $wgDBtype, | |||
'dbServer' => $wgDBserver, | |||
'dbUser' => $wgDBuser, | |||
'dbPassword' => $wgDBpassword, | |||
'dbName' => $wgSharedUploadDBname, | |||
'dbFlags' => ( $wgDebugDumpSql ? DBO_DEBUG : 0 ) | DBO_DEFAULT, | |||
'tablePrefix' => $wgSharedUploadDBprefix, | |||
'hasSharedCache' => $wgCacheSharedUploads, | |||
'descBaseUrl' => $wgRepositoryBaseUrl, | |||
'fetchDescription' => $wgFetchCommonsDescriptions, | |||
]; | |||
} else { | |||
$wgForeignFileRepos[] = [ | |||
'class' => FileRepo::class, | |||
'name' => 'shared', | |||
'directory' => $wgSharedUploadDirectory, | |||
'url' => $wgSharedUploadPath, | |||
'hashLevels' => $wgHashedSharedUploadDirectory ? 2 : 0, | |||
'thumbScriptUrl' => $wgSharedThumbnailScriptPath, | |||
'transformVia404' => !$wgGenerateThumbnailOnParse, | |||
'descBaseUrl' => $wgRepositoryBaseUrl, | |||
'fetchDescription' => $wgFetchCommonsDescriptions, | |||
]; | |||
} | |||
} | |||
ForeignDBViaLBRepo class | |||