Commit 215d0db2 authored by Tino Goratsch's avatar Tino Goratsch

fix shariff's backend requests for case sensitive filesystems...

parent 4751af9c
Pipeline #18726810 passed with stages
in 10 minutes and 27 seconds
......@@ -37,6 +37,18 @@ class SocialServices
'info',
];
private static $availableBackendServices = [
'addthis' => 'AddThis',
'facebook' => 'Facebook',
'flattr' => 'Flattr',
'linkedin' => 'LinkedIn',
'pinterest' => 'Pinterest',
'reddit' => 'Reddit',
'stumbleupon' => 'StumbleUpon',
'vk' => 'Vk',
'xing' => 'Xing',
];
/**
* @var \ACP3\Core\Settings\SettingsInterface
*/
......@@ -67,4 +79,27 @@ class SocialServices
return \in_array($item, $this->getAvailableServices());
});
}
public function getAvailableBackendServices(): array
{
return static::$availableBackendServices;
}
public function getActiveBackendServices(): array
{
$intersection = \array_intersect(
$this->getActiveServices(),
\array_keys($this->getAvailableBackendServices())
);
return \array_values(
\array_filter(
$this->getAvailableBackendServices(),
function ($value, $key) use ($intersection) {
return \in_array($key, $intersection);
},
\ARRAY_FILTER_USE_BOTH
)
);
}
}
......@@ -85,7 +85,7 @@ class BackendFactory
'cacheDir' => $this->getCacheDir(),
'adapter' => 'Filesystem',
],
'services' => $this->socialServices->getActiveServices(),
'services' => $this->socialServices->getActiveBackendServices(),
],
$this->getFacebookCredentials()
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment