diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/composer/composer/ClassLoader.php | 10 | ||||
-rw-r--r-- | lib/composer/composer/LICENSE | 2 | ||||
-rw-r--r-- | lib/private/OCS/Provider.php | 17 |
3 files changed, 25 insertions, 4 deletions
diff --git a/lib/composer/composer/ClassLoader.php b/lib/composer/composer/ClassLoader.php index 4626994fd4d..2c72175e772 100644 --- a/lib/composer/composer/ClassLoader.php +++ b/lib/composer/composer/ClassLoader.php @@ -374,9 +374,13 @@ class ClassLoader $first = $class[0]; if (isset($this->prefixLengthsPsr4[$first])) { - foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) { - if (0 === strpos($class, $prefix)) { - foreach ($this->prefixDirsPsr4[$prefix] as $dir) { + $subPath = $class; + while (false !== $lastPos = strrpos($subPath, '\\')) { + $subPath = substr($subPath, 0, $lastPos); + $search = $subPath.'\\'; + if (isset($this->prefixDirsPsr4[$search])) { + foreach ($this->prefixDirsPsr4[$search] as $dir) { + $length = $this->prefixLengthsPsr4[$first][$search]; if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) { return $file; } diff --git a/lib/composer/composer/LICENSE b/lib/composer/composer/LICENSE index 1a28124886d..f27399a042d 100644 --- a/lib/composer/composer/LICENSE +++ b/lib/composer/composer/LICENSE @@ -1,5 +1,5 @@ -Copyright (c) 2016 Nils Adermann, Jordi Boggiano +Copyright (c) Nils Adermann, Jordi Boggiano Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/lib/private/OCS/Provider.php b/lib/private/OCS/Provider.php index 7d53479c6e2..2e9ed85b67b 100644 --- a/lib/private/OCS/Provider.php +++ b/lib/private/OCS/Provider.php @@ -70,6 +70,23 @@ class Provider extends \OCP\AppFramework\Controller { ]; } + if ($this->appManager->isEnabledForUser('federation')) { + if (isset($services['FEDERATED_SHARING'])) { + $services['FEDERATED_SHARING']['endpoints']['shared-secret'] = '/ocs/v2.php/cloud/shared-secret'; + $services['FEDERATED_SHARING']['endpoints']['system-address-book'] = '/remote.php/dav/addressbooks/system/system/system'; + $services['FEDERATED_SHARING']['endpoints']['carddav-user'] = 'system'; + } else { + $services['FEDERATED_SHARING'] = [ + 'version' => 1, + 'endpoints' => [ + 'shared-secret' => '/ocs/v2.php/cloud/shared-secret', + 'system-address-book' => '/remote.php/dav/addressbooks/system/system/system', + 'carddav-user' => 'system' + ], + ]; + } + } + if($this->appManager->isEnabledForUser('activity')) { $services['ACTIVITY'] = [ 'version' => 1, |