Add name check for webdav configuration options #1227

Merged
GidiKroon merged 1 commit from bug/fix-webdav-storage-config into 2021.12-rc 2022-01-07 10:21:14 +01:00

View file

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