@@ -20,7 +20,7 @@ |
||
| 20 | 20 | */ |
| 21 | 21 | |
| 22 | 22 | |
| 23 | -require_once __DIR__ . '/../lib/base.php'; |
|
| 23 | +require_once __DIR__.'/../lib/base.php'; |
|
| 24 | 24 | |
| 25 | 25 | header('Content-Type: application/json'); |
| 26 | 26 | |
@@ -6,39 +6,39 @@ |
||
| 6 | 6 | |
| 7 | 7 | class ComposerStaticInitFederatedFileSharing |
| 8 | 8 | { |
| 9 | - public static $prefixLengthsPsr4 = array ( |
|
| 9 | + public static $prefixLengthsPsr4 = array( |
|
| 10 | 10 | 'O' => |
| 11 | - array ( |
|
| 11 | + array( |
|
| 12 | 12 | 'OCA\\FederatedFileSharing\\' => 25, |
| 13 | 13 | ), |
| 14 | 14 | ); |
| 15 | 15 | |
| 16 | - public static $prefixDirsPsr4 = array ( |
|
| 16 | + public static $prefixDirsPsr4 = array( |
|
| 17 | 17 | 'OCA\\FederatedFileSharing\\' => |
| 18 | - array ( |
|
| 19 | - 0 => __DIR__ . '/..' . '/../lib', |
|
| 18 | + array( |
|
| 19 | + 0 => __DIR__.'/..'.'/../lib', |
|
| 20 | 20 | ), |
| 21 | 21 | ); |
| 22 | 22 | |
| 23 | - public static $classMap = array ( |
|
| 24 | - 'OCA\\FederatedFileSharing\\AddressHandler' => __DIR__ . '/..' . '/../lib/AddressHandler.php', |
|
| 25 | - 'OCA\\FederatedFileSharing\\AppInfo\\Application' => __DIR__ . '/..' . '/../lib/AppInfo/Application.php', |
|
| 26 | - 'OCA\\FederatedFileSharing\\BackgroundJob\\RetryJob' => __DIR__ . '/..' . '/../lib/BackgroundJob/RetryJob.php', |
|
| 27 | - 'OCA\\FederatedFileSharing\\Controller\\MountPublicLinkController' => __DIR__ . '/..' . '/../lib/Controller/MountPublicLinkController.php', |
|
| 28 | - 'OCA\\FederatedFileSharing\\Controller\\RequestHandlerController' => __DIR__ . '/..' . '/../lib/Controller/RequestHandlerController.php', |
|
| 29 | - 'OCA\\FederatedFileSharing\\FederatedShareProvider' => __DIR__ . '/..' . '/../lib/FederatedShareProvider.php', |
|
| 30 | - 'OCA\\FederatedFileSharing\\Notifications' => __DIR__ . '/..' . '/../lib/Notifications.php', |
|
| 31 | - 'OCA\\FederatedFileSharing\\Notifier' => __DIR__ . '/..' . '/../lib/Notifier.php', |
|
| 32 | - 'OCA\\FederatedFileSharing\\OCM\\CloudFederationProviderFiles' => __DIR__ . '/..' . '/../lib/ocm/CloudFederationProviderFiles.php', |
|
| 33 | - 'OCA\\FederatedFileSharing\\Settings\\Admin' => __DIR__ . '/..' . '/../lib/Settings/Admin.php', |
|
| 34 | - 'OCA\\FederatedFileSharing\\Settings\\Personal' => __DIR__ . '/..' . '/../lib/Settings/Personal.php', |
|
| 35 | - 'OCA\\FederatedFileSharing\\Settings\\PersonalSection' => __DIR__ . '/..' . '/../lib/Settings/PersonalSection.php', |
|
| 36 | - 'OCA\\FederatedFileSharing\\TokenHandler' => __DIR__ . '/..' . '/../lib/TokenHandler.php', |
|
| 23 | + public static $classMap = array( |
|
| 24 | + 'OCA\\FederatedFileSharing\\AddressHandler' => __DIR__.'/..'.'/../lib/AddressHandler.php', |
|
| 25 | + 'OCA\\FederatedFileSharing\\AppInfo\\Application' => __DIR__.'/..'.'/../lib/AppInfo/Application.php', |
|
| 26 | + 'OCA\\FederatedFileSharing\\BackgroundJob\\RetryJob' => __DIR__.'/..'.'/../lib/BackgroundJob/RetryJob.php', |
|
| 27 | + 'OCA\\FederatedFileSharing\\Controller\\MountPublicLinkController' => __DIR__.'/..'.'/../lib/Controller/MountPublicLinkController.php', |
|
| 28 | + 'OCA\\FederatedFileSharing\\Controller\\RequestHandlerController' => __DIR__.'/..'.'/../lib/Controller/RequestHandlerController.php', |
|
| 29 | + 'OCA\\FederatedFileSharing\\FederatedShareProvider' => __DIR__.'/..'.'/../lib/FederatedShareProvider.php', |
|
| 30 | + 'OCA\\FederatedFileSharing\\Notifications' => __DIR__.'/..'.'/../lib/Notifications.php', |
|
| 31 | + 'OCA\\FederatedFileSharing\\Notifier' => __DIR__.'/..'.'/../lib/Notifier.php', |
|
| 32 | + 'OCA\\FederatedFileSharing\\OCM\\CloudFederationProviderFiles' => __DIR__.'/..'.'/../lib/ocm/CloudFederationProviderFiles.php', |
|
| 33 | + 'OCA\\FederatedFileSharing\\Settings\\Admin' => __DIR__.'/..'.'/../lib/Settings/Admin.php', |
|
| 34 | + 'OCA\\FederatedFileSharing\\Settings\\Personal' => __DIR__.'/..'.'/../lib/Settings/Personal.php', |
|
| 35 | + 'OCA\\FederatedFileSharing\\Settings\\PersonalSection' => __DIR__.'/..'.'/../lib/Settings/PersonalSection.php', |
|
| 36 | + 'OCA\\FederatedFileSharing\\TokenHandler' => __DIR__.'/..'.'/../lib/TokenHandler.php', |
|
| 37 | 37 | ); |
| 38 | 38 | |
| 39 | 39 | public static function getInitializer(ClassLoader $loader) |
| 40 | 40 | { |
| 41 | - return \Closure::bind(function () use ($loader) { |
|
| 41 | + return \Closure::bind(function() use ($loader) { |
|
| 42 | 42 | $loader->prefixLengthsPsr4 = ComposerStaticInitFederatedFileSharing::$prefixLengthsPsr4; |
| 43 | 43 | $loader->prefixDirsPsr4 = ComposerStaticInitFederatedFileSharing::$prefixDirsPsr4; |
| 44 | 44 | $loader->classMap = ComposerStaticInitFederatedFileSharing::$classMap; |
@@ -6,17 +6,17 @@ |
||
| 6 | 6 | $baseDir = $vendorDir; |
| 7 | 7 | |
| 8 | 8 | return array( |
| 9 | - 'OCA\\FederatedFileSharing\\AddressHandler' => $baseDir . '/../lib/AddressHandler.php', |
|
| 10 | - 'OCA\\FederatedFileSharing\\AppInfo\\Application' => $baseDir . '/../lib/AppInfo/Application.php', |
|
| 11 | - 'OCA\\FederatedFileSharing\\BackgroundJob\\RetryJob' => $baseDir . '/../lib/BackgroundJob/RetryJob.php', |
|
| 12 | - 'OCA\\FederatedFileSharing\\Controller\\MountPublicLinkController' => $baseDir . '/../lib/Controller/MountPublicLinkController.php', |
|
| 13 | - 'OCA\\FederatedFileSharing\\Controller\\RequestHandlerController' => $baseDir . '/../lib/Controller/RequestHandlerController.php', |
|
| 14 | - 'OCA\\FederatedFileSharing\\FederatedShareProvider' => $baseDir . '/../lib/FederatedShareProvider.php', |
|
| 15 | - 'OCA\\FederatedFileSharing\\Notifications' => $baseDir . '/../lib/Notifications.php', |
|
| 16 | - 'OCA\\FederatedFileSharing\\Notifier' => $baseDir . '/../lib/Notifier.php', |
|
| 17 | - 'OCA\\FederatedFileSharing\\OCM\\CloudFederationProviderFiles' => $baseDir . '/../lib/ocm/CloudFederationProviderFiles.php', |
|
| 18 | - 'OCA\\FederatedFileSharing\\Settings\\Admin' => $baseDir . '/../lib/Settings/Admin.php', |
|
| 19 | - 'OCA\\FederatedFileSharing\\Settings\\Personal' => $baseDir . '/../lib/Settings/Personal.php', |
|
| 20 | - 'OCA\\FederatedFileSharing\\Settings\\PersonalSection' => $baseDir . '/../lib/Settings/PersonalSection.php', |
|
| 21 | - 'OCA\\FederatedFileSharing\\TokenHandler' => $baseDir . '/../lib/TokenHandler.php', |
|
| 9 | + 'OCA\\FederatedFileSharing\\AddressHandler' => $baseDir.'/../lib/AddressHandler.php', |
|
| 10 | + 'OCA\\FederatedFileSharing\\AppInfo\\Application' => $baseDir.'/../lib/AppInfo/Application.php', |
|
| 11 | + 'OCA\\FederatedFileSharing\\BackgroundJob\\RetryJob' => $baseDir.'/../lib/BackgroundJob/RetryJob.php', |
|
| 12 | + 'OCA\\FederatedFileSharing\\Controller\\MountPublicLinkController' => $baseDir.'/../lib/Controller/MountPublicLinkController.php', |
|
| 13 | + 'OCA\\FederatedFileSharing\\Controller\\RequestHandlerController' => $baseDir.'/../lib/Controller/RequestHandlerController.php', |
|
| 14 | + 'OCA\\FederatedFileSharing\\FederatedShareProvider' => $baseDir.'/../lib/FederatedShareProvider.php', |
|
| 15 | + 'OCA\\FederatedFileSharing\\Notifications' => $baseDir.'/../lib/Notifications.php', |
|
| 16 | + 'OCA\\FederatedFileSharing\\Notifier' => $baseDir.'/../lib/Notifier.php', |
|
| 17 | + 'OCA\\FederatedFileSharing\\OCM\\CloudFederationProviderFiles' => $baseDir.'/../lib/ocm/CloudFederationProviderFiles.php', |
|
| 18 | + 'OCA\\FederatedFileSharing\\Settings\\Admin' => $baseDir.'/../lib/Settings/Admin.php', |
|
| 19 | + 'OCA\\FederatedFileSharing\\Settings\\Personal' => $baseDir.'/../lib/Settings/Personal.php', |
|
| 20 | + 'OCA\\FederatedFileSharing\\Settings\\PersonalSection' => $baseDir.'/../lib/Settings/PersonalSection.php', |
|
| 21 | + 'OCA\\FederatedFileSharing\\TokenHandler' => $baseDir.'/../lib/TokenHandler.php', |
|
| 22 | 22 | ); |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | */ |
| 33 | 33 | public function __construct($providerId) { |
| 34 | 34 | $l = \OC::$server->getL10N('federation'); |
| 35 | - $message = 'Cloud Federation Provider with ID: "' . $providerId . '" does not exist.'; |
|
| 35 | + $message = 'Cloud Federation Provider with ID: "'.$providerId.'" does not exist.'; |
|
| 36 | 36 | $hint = $l->t('Cloud Federation Provider with ID: "%s" does not exist.', [$providerId]); |
| 37 | 37 | parent::__construct($message, $hint); |
| 38 | 38 | } |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | */ |
| 34 | 34 | public function __construct($newProviderId, $existingProviderName) { |
| 35 | 35 | $l = \OC::$server->getL10N('federation'); |
| 36 | - $message = 'Id "' . $newProviderId . '" already used by cloud federation provider "' . $existingProviderName . '"'; |
|
| 36 | + $message = 'Id "'.$newProviderId.'" already used by cloud federation provider "'.$existingProviderName.'"'; |
|
| 37 | 37 | $hint = $l->t('Id "%s" already used by cloud federation provider "%s"', [$newProviderId, $existingProviderName]); |
| 38 | 38 | parent::__construct($message, $hint); |
| 39 | 39 | } |
@@ -131,18 +131,18 @@ discard block |
||
| 131 | 131 | * @param int $remoteId |
| 132 | 132 | * @return Mount|null |
| 133 | 133 | */ |
| 134 | - public function addShare($remote, $token, $password, $name, $owner, $accepted=false, $user = null, $remoteId = -1) { |
|
| 134 | + public function addShare($remote, $token, $password, $name, $owner, $accepted = false, $user = null, $remoteId = -1) { |
|
| 135 | 135 | |
| 136 | 136 | $user = $user ? $user : $this->uid; |
| 137 | 137 | $accepted = $accepted ? 1 : 0; |
| 138 | - $name = Filesystem::normalizePath('/' . $name); |
|
| 138 | + $name = Filesystem::normalizePath('/'.$name); |
|
| 139 | 139 | |
| 140 | 140 | if (!$accepted) { |
| 141 | 141 | // To avoid conflicts with the mount point generation later, |
| 142 | 142 | // we only use a temporary mount point name here. The real |
| 143 | 143 | // mount point name will be generated when accepting the share, |
| 144 | 144 | // using the original share item name. |
| 145 | - $tmpMountPointName = '{{TemporaryMountPointName#' . $name . '}}'; |
|
| 145 | + $tmpMountPointName = '{{TemporaryMountPointName#'.$name.'}}'; |
|
| 146 | 146 | $mountPoint = $tmpMountPointName; |
| 147 | 147 | $hash = md5($tmpMountPointName); |
| 148 | 148 | $data = [ |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | $i = 1; |
| 162 | 162 | while (!$this->connection->insertIfNotExist('*PREFIX*share_external', $data, ['user', 'mountpoint_hash'])) { |
| 163 | 163 | // The external share already exists for the user |
| 164 | - $data['mountpoint'] = $tmpMountPointName . '-' . $i; |
|
| 164 | + $data['mountpoint'] = $tmpMountPointName.'-'.$i; |
|
| 165 | 165 | $data['mountpoint_hash'] = md5($data['mountpoint']); |
| 166 | 166 | $i++; |
| 167 | 167 | } |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | } |
| 170 | 170 | |
| 171 | 171 | $mountPoint = Files::buildNotExistingFileName('/', $name); |
| 172 | - $mountPoint = Filesystem::normalizePath('/' . $mountPoint); |
|
| 172 | + $mountPoint = Filesystem::normalizePath('/'.$mountPoint); |
|
| 173 | 173 | $hash = md5($mountPoint); |
| 174 | 174 | |
| 175 | 175 | $query = $this->connection->prepare(' |
@@ -290,14 +290,14 @@ discard block |
||
| 290 | 290 | |
| 291 | 291 | $result = $this->tryOCMEndPoint($remote, $token, $remoteId, $feedback); |
| 292 | 292 | |
| 293 | - if($result === true) { |
|
| 293 | + if ($result === true) { |
|
| 294 | 294 | return true; |
| 295 | 295 | } |
| 296 | 296 | |
| 297 | 297 | $federationEndpoints = $this->discoveryService->discover($remote, 'FEDERATED_SHARING'); |
| 298 | 298 | $endpoint = isset($federationEndpoints['share']) ? $federationEndpoints['share'] : '/ocs/v2.php/cloud/shares'; |
| 299 | 299 | |
| 300 | - $url = rtrim($remote, '/') . $endpoint . '/' . $remoteId . '/' . $feedback . '?format=' . \OCP\Share::RESPONSE_FORMAT; |
|
| 300 | + $url = rtrim($remote, '/').$endpoint.'/'.$remoteId.'/'.$feedback.'?format='.\OCP\Share::RESPONSE_FORMAT; |
|
| 301 | 301 | $fields = array('token' => $token); |
| 302 | 302 | |
| 303 | 303 | $client = $this->clientService->newClient(); |
@@ -354,13 +354,13 @@ discard block |
||
| 354 | 354 | * @return string |
| 355 | 355 | */ |
| 356 | 356 | protected function stripPath($path) { |
| 357 | - $prefix = '/' . $this->uid . '/files'; |
|
| 357 | + $prefix = '/'.$this->uid.'/files'; |
|
| 358 | 358 | return rtrim(substr($path, strlen($prefix)), '/'); |
| 359 | 359 | } |
| 360 | 360 | |
| 361 | 361 | public function getMount($data) { |
| 362 | 362 | $data['manager'] = $this; |
| 363 | - $mountPoint = '/' . $this->uid . '/files' . $data['mountpoint']; |
|
| 363 | + $mountPoint = '/'.$this->uid.'/files'.$data['mountpoint']; |
|
| 364 | 364 | $data['mountpoint'] = $mountPoint; |
| 365 | 365 | $data['certificateManager'] = \OC::$server->getCertificateManager($this->uid); |
| 366 | 366 | return new Mount(self::STORAGE, $mountPoint, $data, $this, $this->storageLoader); |
@@ -400,7 +400,7 @@ discard block |
||
| 400 | 400 | WHERE `mountpoint_hash` = ? |
| 401 | 401 | AND `user` = ? |
| 402 | 402 | '); |
| 403 | - $result = (bool)$query->execute(array($target, $targetHash, $sourceHash, $this->uid)); |
|
| 403 | + $result = (bool) $query->execute(array($target, $targetHash, $sourceHash, $this->uid)); |
|
| 404 | 404 | |
| 405 | 405 | return $result; |
| 406 | 406 | } |
@@ -435,9 +435,9 @@ discard block |
||
| 435 | 435 | WHERE `mountpoint_hash` = ? |
| 436 | 436 | AND `user` = ? |
| 437 | 437 | '); |
| 438 | - $result = (bool)$query->execute(array($hash, $this->uid)); |
|
| 438 | + $result = (bool) $query->execute(array($hash, $this->uid)); |
|
| 439 | 439 | |
| 440 | - if($result) { |
|
| 440 | + if ($result) { |
|
| 441 | 441 | $this->removeReShares($id); |
| 442 | 442 | } |
| 443 | 443 | |
@@ -458,7 +458,7 @@ discard block |
||
| 458 | 458 | |
| 459 | 459 | |
| 460 | 460 | $query->delete('federated_reshares') |
| 461 | - ->where($query->expr()->in('share_id', $query->createFunction('(' . $select . ')'))); |
|
| 461 | + ->where($query->expr()->in('share_id', $query->createFunction('('.$select.')'))); |
|
| 462 | 462 | $query->execute(); |
| 463 | 463 | |
| 464 | 464 | $deleteReShares = $this->connection->getQueryBuilder(); |
@@ -482,7 +482,7 @@ discard block |
||
| 482 | 482 | |
| 483 | 483 | if ($result) { |
| 484 | 484 | $shares = $getShare->fetchAll(); |
| 485 | - foreach($shares as $share) { |
|
| 485 | + foreach ($shares as $share) { |
|
| 486 | 486 | $this->sendFeedbackToRemote($share['remote'], $share['share_token'], $share['remote_id'], 'decline'); |
| 487 | 487 | } |
| 488 | 488 | } |
@@ -491,7 +491,7 @@ discard block |
||
| 491 | 491 | DELETE FROM `*PREFIX*share_external` |
| 492 | 492 | WHERE `user` = ? |
| 493 | 493 | '); |
| 494 | - return (bool)$query->execute(array($uid)); |
|
| 494 | + return (bool) $query->execute(array($uid)); |
|
| 495 | 495 | } |
| 496 | 496 | |
| 497 | 497 | /** |
@@ -324,7 +324,7 @@ discard block |
||
| 324 | 324 | * |
| 325 | 325 | * @param string $remoteDomain |
| 326 | 326 | * @param string $token |
| 327 | - * @param $remoteId id of the share |
|
| 327 | + * @param integer $remoteId id of the share |
|
| 328 | 328 | * @param string $feedback |
| 329 | 329 | * @return bool |
| 330 | 330 | */ |
@@ -421,6 +421,9 @@ discard block |
||
| 421 | 421 | return $result; |
| 422 | 422 | } |
| 423 | 423 | |
| 424 | + /** |
|
| 425 | + * @param string $mountPoint |
|
| 426 | + */ |
|
| 424 | 427 | public function removeShare($mountPoint) { |
| 425 | 428 | |
| 426 | 429 | $mountPointObj = $this->mountManager->find($mountPoint); |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | */ |
| 32 | 32 | public function __construct($action) { |
| 33 | 33 | $l = \OC::$server->getL10N('federation'); |
| 34 | - $message = 'Action "' . $action . '" not supported or implemented.'; |
|
| 34 | + $message = 'Action "'.$action.'" not supported or implemented.'; |
|
| 35 | 35 | $hint = $l->t('Action "%s" not supported or implemented.', [$action]); |
| 36 | 36 | parent::__construct($message, $hint); |
| 37 | 37 | } |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | $l = \OC::$server->getL10N('federation'); |
| 37 | 37 | $this->parameterList = $missingParameters; |
| 38 | 38 | $parameterList = implode(',', $missingParameters); |
| 39 | - $message = 'Parameters missing in order to complete the request. Missing Parameters: ' . $parameterList; |
|
| 39 | + $message = 'Parameters missing in order to complete the request. Missing Parameters: '.$parameterList; |
|
| 40 | 40 | $hint = $l->t('Parameters missing in order to complete the request. Missing Parameters: "%s"', [$parameterList]); |
| 41 | 41 | parent::__construct($message, $hint); |
| 42 | 42 | } |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | $ocsStatus = isset($status['ocs']); |
| 118 | 118 | $ocsSuccess = $ocsStatus && ($status['ocs']['meta']['statuscode'] === 100 || $status['ocs']['meta']['statuscode'] === 200); |
| 119 | 119 | |
| 120 | - if ($result['success'] && (!$ocsStatus ||$ocsSuccess)) { |
|
| 120 | + if ($result['success'] && (!$ocsStatus || $ocsSuccess)) { |
|
| 121 | 121 | \OC_Hook::emit('OCP\Share', 'federated_share_added', ['server' => $remote]); |
| 122 | 122 | return true; |
| 123 | 123 | } |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | return [$ocmResult['token'], $ocmResult['providerId']]; |
| 161 | 161 | } |
| 162 | 162 | |
| 163 | - $result = $this->tryLegacyEndPoint(rtrim($remote, '/'), '/' . $id . '/reshare', $fields); |
|
| 163 | + $result = $this->tryLegacyEndPoint(rtrim($remote, '/'), '/'.$id.'/reshare', $fields); |
|
| 164 | 164 | $status = json_decode($result['result'], true); |
| 165 | 165 | |
| 166 | 166 | $httpRequestSuccessful = $result['success']; |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | if ($httpRequestSuccessful && $ocsCallSuccessful && $validToken && $validRemoteId) { |
| 172 | 172 | return [ |
| 173 | 173 | $status['ocs']['data']['token'], |
| 174 | - (int)$status['ocs']['data']['remoteId'] |
|
| 174 | + (int) $status['ocs']['data']['remoteId'] |
|
| 175 | 175 | ]; |
| 176 | 176 | } |
| 177 | 177 | |
@@ -258,7 +258,7 @@ discard block |
||
| 258 | 258 | $fields[$key] = $value; |
| 259 | 259 | } |
| 260 | 260 | |
| 261 | - $result = $this->tryHttpPostToShareEndpoint(rtrim($remote, '/'), '/' . $remoteId . '/' . $action, $fields, $action); |
|
| 261 | + $result = $this->tryHttpPostToShareEndpoint(rtrim($remote, '/'), '/'.$remoteId.'/'.$action, $fields, $action); |
|
| 262 | 262 | $status = json_decode($result['result'], true); |
| 263 | 263 | |
| 264 | 264 | if ($result['success'] && |
@@ -306,10 +306,10 @@ discard block |
||
| 306 | 306 | * @return array |
| 307 | 307 | * @throws \Exception |
| 308 | 308 | */ |
| 309 | - protected function tryHttpPostToShareEndpoint($remoteDomain, $urlSuffix, array $fields, $action="share") { |
|
| 309 | + protected function tryHttpPostToShareEndpoint($remoteDomain, $urlSuffix, array $fields, $action = "share") { |
|
| 310 | 310 | |
| 311 | 311 | if ($this->addressHandler->urlContainProtocol($remoteDomain) === false) { |
| 312 | - $remoteDomain = 'https://' . $remoteDomain; |
|
| 312 | + $remoteDomain = 'https://'.$remoteDomain; |
|
| 313 | 313 | } |
| 314 | 314 | |
| 315 | 315 | $result = [ |
@@ -348,7 +348,7 @@ discard block |
||
| 348 | 348 | $federationEndpoints = $this->discoveryService->discover($remoteDomain, 'FEDERATED_SHARING'); |
| 349 | 349 | $endpoint = isset($federationEndpoints['share']) ? $federationEndpoints['share'] : '/ocs/v2.php/cloud/shares'; |
| 350 | 350 | try { |
| 351 | - $response = $client->post($remoteDomain . $endpoint . $urlSuffix . '?format=' . self::RESPONSE_FORMAT, [ |
|
| 351 | + $response = $client->post($remoteDomain.$endpoint.$urlSuffix.'?format='.self::RESPONSE_FORMAT, [ |
|
| 352 | 352 | 'body' => $fields, |
| 353 | 353 | 'timeout' => 10, |
| 354 | 354 | 'connect_timeout' => 10, |
@@ -405,7 +405,7 @@ discard block |
||
| 405 | 405 | switch ($action) { |
| 406 | 406 | case 'share': |
| 407 | 407 | $share = $this->cloudFederationFactory->getCloudFederationShare( |
| 408 | - $fields['shareWith'] . '@' . $remoteDomain, |
|
| 408 | + $fields['shareWith'].'@'.$remoteDomain, |
|
| 409 | 409 | $fields['name'], |
| 410 | 410 | '', |
| 411 | 411 | $fields['remoteId'], |