mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
cs:fix
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
This commit is contained in:
parent
2e0141165a
commit
52d729c69e
1 changed files with 3 additions and 3 deletions
|
|
@ -284,11 +284,11 @@ class Manager implements IManager {
|
|||
if (isset($preferences[$task->getType()])) {
|
||||
// If a preference for this task type is set, move the preferred provider to the start
|
||||
$provider = current(array_values(array_filter($providers, function ($provider) use ($preferences, $task) {
|
||||
if ($provider instanceof IProviderWithId) {
|
||||
if ($provider instanceof IProviderWithId) {
|
||||
return $provider->getId() === $preferences[$task->getType()];
|
||||
}
|
||||
$provider::class === $preferences[$task->getType()];
|
||||
})));
|
||||
$provider::class === $preferences[$task->getType()];
|
||||
})));
|
||||
if ($provider !== false) {
|
||||
$providers = array_filter($providers, fn ($p) => $p !== $provider);
|
||||
array_unshift($providers, $provider);
|
||||
|
|
|
|||
Loading…
Reference in a new issue