Merge pull request #1227 from GidiKroon/bug/fix-webdav-storage-config

Add name check for webdav configuration options
This commit is contained in:
Hypolite Petovan 2022-01-07 10:21:14 +01:00 committed by GitHub
commit 5df88741f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -26,11 +26,15 @@ function webdav_storage_uninstall()
function webdav_storage_instance(App $a, array &$data) function webdav_storage_instance(App $a, array &$data)
{ {
if ($data['name'] == WebDav::getName()) {
$config = new WebDavConfig(DI::l10n(), DI::config(), DI::httpClient()); $config = new WebDavConfig(DI::l10n(), DI::config(), DI::httpClient());
$data['storage'] = new WebDav($config->getUrl(), $config->getAuthOptions(), DI::httpClient(), DI::logger()); $data['storage'] = new WebDav($config->getUrl(), $config->getAuthOptions(), DI::httpClient(), DI::logger());
}
} }
function webdav_storage_config(App $a, array &$data) function webdav_storage_config(App $a, array &$data)
{ {
if ($data['name'] == WebDav::getName()) {
$data['storage_config'] = new WebDavConfig(DI::l10n(), DI::config(), DI::httpClient()); $data['storage_config'] = new WebDavConfig(DI::l10n(), DI::config(), DI::httpClient());
}
} }