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

Add name check for webdav configuration options
pull/1228/head
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
1 changed files with 7 additions and 3 deletions

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());
}
}