@@ -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 | ); |
@@ -165,16 +165,16 @@ discard block |
||
| 165 | 165 | } |
| 166 | 166 | |
| 167 | 167 | // FIXME this should be a method in the user management instead |
| 168 | - $this->logger->debug('shareWith before, ' . $shareWith, ['app' => 'files_sharing']); |
|
| 168 | + $this->logger->debug('shareWith before, '.$shareWith, ['app' => 'files_sharing']); |
|
| 169 | 169 | \OCP\Util::emitHook( |
| 170 | 170 | '\OCA\Files_Sharing\API\Server2Server', |
| 171 | 171 | 'preLoginNameUsedAsUserName', |
| 172 | 172 | array('uid' => &$shareWith) |
| 173 | 173 | ); |
| 174 | - $this->logger->debug('shareWith after, ' . $shareWith, ['app' => 'files_sharing']); |
|
| 174 | + $this->logger->debug('shareWith after, '.$shareWith, ['app' => 'files_sharing']); |
|
| 175 | 175 | |
| 176 | 176 | if (!$this->userManager->userExists($shareWith)) { |
| 177 | - throw new ProviderCouldNotAddShareException('User does not exists', '',Http::STATUS_BAD_REQUEST); |
|
| 177 | + throw new ProviderCouldNotAddShareException('User does not exists', '', Http::STATUS_BAD_REQUEST); |
|
| 178 | 178 | } |
| 179 | 179 | |
| 180 | 180 | \OC_Util::setupFS($shareWith); |
@@ -198,7 +198,7 @@ discard block |
||
| 198 | 198 | ->setType('remote_share') |
| 199 | 199 | ->setSubject(RemoteShares::SUBJECT_REMOTE_SHARE_RECEIVED, [$ownerFederatedId, trim($name, '/')]) |
| 200 | 200 | ->setAffectedUser($shareWith) |
| 201 | - ->setObject('remote_share', (int)$shareId, $name); |
|
| 201 | + ->setObject('remote_share', (int) $shareId, $name); |
|
| 202 | 202 | \OC::$server->getActivityManager()->publish($event); |
| 203 | 203 | |
| 204 | 204 | $notification = $this->notificationManager->createNotification(); |
@@ -210,12 +210,12 @@ discard block |
||
| 210 | 210 | |
| 211 | 211 | $declineAction = $notification->createAction(); |
| 212 | 212 | $declineAction->setLabel('decline') |
| 213 | - ->setLink($this->urlGenerator->getAbsoluteURL($this->urlGenerator->linkTo('', 'ocs/v2.php/apps/files_sharing/api/v1/remote_shares/pending/' . $shareId)), 'DELETE'); |
|
| 213 | + ->setLink($this->urlGenerator->getAbsoluteURL($this->urlGenerator->linkTo('', 'ocs/v2.php/apps/files_sharing/api/v1/remote_shares/pending/'.$shareId)), 'DELETE'); |
|
| 214 | 214 | $notification->addAction($declineAction); |
| 215 | 215 | |
| 216 | 216 | $acceptAction = $notification->createAction(); |
| 217 | 217 | $acceptAction->setLabel('accept') |
| 218 | - ->setLink($this->urlGenerator->getAbsoluteURL($this->urlGenerator->linkTo('', 'ocs/v2.php/apps/files_sharing/api/v1/remote_shares/pending/' . $shareId)), 'POST'); |
|
| 218 | + ->setLink($this->urlGenerator->getAbsoluteURL($this->urlGenerator->linkTo('', 'ocs/v2.php/apps/files_sharing/api/v1/remote_shares/pending/'.$shareId)), 'POST'); |
|
| 219 | 219 | $notification->addAction($acceptAction); |
| 220 | 220 | |
| 221 | 221 | $this->notificationManager->notify($notification); |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | 'level' => \OCP\Util::ERROR, |
| 228 | 228 | 'app' => 'files_sharing' |
| 229 | 229 | ]); |
| 230 | - throw new ProviderCouldNotAddShareException('internal server error, was not able to add share from ' . $remote, '', HTTP::STATUS_INTERNAL_SERVER_ERROR); |
|
| 230 | + throw new ProviderCouldNotAddShareException('internal server error, was not able to add share from '.$remote, '', HTTP::STATUS_INTERNAL_SERVER_ERROR); |
|
| 231 | 231 | } |
| 232 | 232 | } |
| 233 | 233 | |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | $owner = isset($_POST['owner']) ? $_POST['owner'] : null; |
| 149 | 149 | $sharedBy = isset($_POST['sharedBy']) ? $_POST['sharedBy'] : null; |
| 150 | 150 | $shareWith = isset($_POST['shareWith']) ? $_POST['shareWith'] : null; |
| 151 | - $remoteId = isset($_POST['remoteId']) ? (int)$_POST['remoteId'] : null; |
|
| 151 | + $remoteId = isset($_POST['remoteId']) ? (int) $_POST['remoteId'] : null; |
|
| 152 | 152 | $sharedByFederatedId = isset($_POST['sharedByFederatedId']) ? $_POST['sharedByFederatedId'] : null; |
| 153 | 153 | $ownerFederatedId = isset($_POST['ownerFederatedId']) ? $_POST['ownerFederatedId'] : null; |
| 154 | 154 | |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | } catch (ProviderCouldNotAddShareException $e) { |
| 184 | 184 | throw new OCSException($e->getMessage(), $e->getCode()); |
| 185 | 185 | } catch (\Exception $e) { |
| 186 | - throw new OCSException('internal server error, was not able to add share from ' . $remote, 500); |
|
| 186 | + throw new OCSException('internal server error, was not able to add share from '.$remote, 500); |
|
| 187 | 187 | } |
| 188 | 188 | |
| 189 | 189 | return new Http\DataResponse(); |
@@ -205,8 +205,8 @@ discard block |
||
| 205 | 205 | |
| 206 | 206 | $token = $this->request->getParam('token', null); |
| 207 | 207 | $shareWith = $this->request->getParam('shareWith', null); |
| 208 | - $permission = (int)$this->request->getParam('permission', null); |
|
| 209 | - $remoteId = (int)$this->request->getParam('remoteId', null); |
|
| 208 | + $permission = (int) $this->request->getParam('permission', null); |
|
| 209 | + $remoteId = (int) $this->request->getParam('remoteId', null); |
|
| 210 | 210 | |
| 211 | 211 | if ($id === null || |
| 212 | 212 | $token === null || |
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | $share->setSharedWith($shareWith); |
| 242 | 242 | try { |
| 243 | 243 | $result = $this->federatedShareProvider->create($share); |
| 244 | - $this->federatedShareProvider->storeRemoteId((int)$result->getId(), $remoteId); |
|
| 244 | + $this->federatedShareProvider->storeRemoteId((int) $result->getId(), $remoteId); |
|
| 245 | 245 | return new Http\DataResponse([ |
| 246 | 246 | 'token' => $result->getToken(), |
| 247 | 247 | 'remoteId' => $result->getId() |
@@ -439,7 +439,7 @@ discard block |
||
| 439 | 439 | $notification = $notificationManager->createNotification(); |
| 440 | 440 | $notification->setApp('files_sharing') |
| 441 | 441 | ->setUser($share['user']) |
| 442 | - ->setObject('remote_share', (int)$share['id']); |
|
| 442 | + ->setObject('remote_share', (int) $share['id']); |
|
| 443 | 443 | $notificationManager->markProcessed($notification); |
| 444 | 444 | |
| 445 | 445 | $event = \OC::$server->getActivityManager()->generateEvent(); |
@@ -447,7 +447,7 @@ discard block |
||
| 447 | 447 | ->setType('remote_share') |
| 448 | 448 | ->setSubject(RemoteShares::SUBJECT_REMOTE_SHARE_UNSHARED, [$owner->getId(), $path]) |
| 449 | 449 | ->setAffectedUser($user) |
| 450 | - ->setObject('remote_share', (int)$share['id'], $path); |
|
| 450 | + ->setObject('remote_share', (int) $share['id'], $path); |
|
| 451 | 451 | \OC::$server->getActivityManager()->publish($event); |
| 452 | 452 | } |
| 453 | 453 | |
@@ -589,7 +589,7 @@ discard block |
||
| 589 | 589 | $validPermission = ctype_digit($permissions); |
| 590 | 590 | $validToken = $this->verifyShare($share, $token); |
| 591 | 591 | if ($validPermission && $validToken) { |
| 592 | - $this->updatePermissionsInDatabase($share, (int)$permissions); |
|
| 592 | + $this->updatePermissionsInDatabase($share, (int) $permissions); |
|
| 593 | 593 | } else { |
| 594 | 594 | throw new OCSBadRequestException(); |
| 595 | 595 | } |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | |
| 138 | 138 | if (!$this->userManager->userExists($shareWith)) { |
| 139 | 139 | return new JSONResponse( |
| 140 | - ['message' => 'User "' . $shareWith . '" does not exists at ' . $this->urlGenerator->getBaseUrl()], |
|
| 140 | + ['message' => 'User "'.$shareWith.'" does not exists at '.$this->urlGenerator->getBaseUrl()], |
|
| 141 | 141 | Http::STATUS_BAD_REQUEST |
| 142 | 142 | ); |
| 143 | 143 | } |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | ); |
| 169 | 169 | } catch (\Exception $e) { |
| 170 | 170 | return new JSONResponse( |
| 171 | - ['message' => 'Internal error at ' . $this->urlGenerator->getBaseUrl()], |
|
| 171 | + ['message' => 'Internal error at '.$this->urlGenerator->getBaseUrl()], |
|
| 172 | 172 | Http::STATUS_BAD_REQUEST |
| 173 | 173 | ); |
| 174 | 174 | } |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | ); |
| 223 | 223 | } catch (\Exception $e) { |
| 224 | 224 | return new JSONResponse( |
| 225 | - ['message' => 'Internal error at ' . $this->urlGenerator->getBaseUrl()], |
|
| 225 | + ['message' => 'Internal error at '.$this->urlGenerator->getBaseUrl()], |
|
| 226 | 226 | Http::STATUS_BAD_REQUEST |
| 227 | 227 | ); |
| 228 | 228 | } |
@@ -244,13 +244,13 @@ discard block |
||
| 244 | 244 | private function mapUid($uid) { |
| 245 | 245 | \OC::$server->getURLGenerator()->linkToDocs('key'); |
| 246 | 246 | // FIXME this should be a method in the user management instead |
| 247 | - $this->logger->debug('shareWith before, ' . $uid, ['app' => $this->appName]); |
|
| 247 | + $this->logger->debug('shareWith before, '.$uid, ['app' => $this->appName]); |
|
| 248 | 248 | \OCP\Util::emitHook( |
| 249 | 249 | '\OCA\Files_Sharing\API\Server2Server', |
| 250 | 250 | 'preLoginNameUsedAsUserName', |
| 251 | 251 | array('uid' => &$uid) |
| 252 | 252 | ); |
| 253 | - $this->logger->debug('shareWith after, ' . $uid, ['app' => $this->appName]); |
|
| 253 | + $this->logger->debug('shareWith after, '.$uid, ['app' => $this->appName]); |
|
| 254 | 254 | |
| 255 | 255 | return $uid; |
| 256 | 256 | } |
@@ -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 | } |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | 'remoteId' => $shareId |
| 133 | 133 | ); |
| 134 | 134 | |
| 135 | - $result = $this->tryHttpPostToShareEndpoint(rtrim($remote, '/'), '/' . $id . '/reshare', $fields); |
|
| 135 | + $result = $this->tryHttpPostToShareEndpoint(rtrim($remote, '/'), '/'.$id.'/reshare', $fields); |
|
| 136 | 136 | $status = json_decode($result['result'], true); |
| 137 | 137 | |
| 138 | 138 | $httpRequestSuccessful = $result['success']; |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | if ($httpRequestSuccessful && $ocsCallSuccessful && $validToken && $validRemoteId) { |
| 144 | 144 | return [ |
| 145 | 145 | $status['ocs']['data']['token'], |
| 146 | - (int)$status['ocs']['data']['remoteId'] |
|
| 146 | + (int) $status['ocs']['data']['remoteId'] |
|
| 147 | 147 | ]; |
| 148 | 148 | } |
| 149 | 149 | |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | $fields[$key] = $value; |
| 228 | 228 | } |
| 229 | 229 | |
| 230 | - $result = $this->tryHttpPostToShareEndpoint(rtrim($remote, '/'), '/' . $remoteId . '/' . $action, $fields); |
|
| 230 | + $result = $this->tryHttpPostToShareEndpoint(rtrim($remote, '/'), '/'.$remoteId.'/'.$action, $fields); |
|
| 231 | 231 | $status = json_decode($result['result'], true); |
| 232 | 232 | |
| 233 | 233 | if ($result['success'] && |
@@ -277,7 +277,7 @@ discard block |
||
| 277 | 277 | protected function tryHttpPostToShareEndpoint($remoteDomain, $urlSuffix, array $fields) { |
| 278 | 278 | |
| 279 | 279 | if ($this->addressHandler->urlContainProtocol($remoteDomain) === false) { |
| 280 | - $remoteDomain = 'https://' . $remoteDomain; |
|
| 280 | + $remoteDomain = 'https://'.$remoteDomain; |
|
| 281 | 281 | } |
| 282 | 282 | |
| 283 | 283 | $result = [ |
@@ -299,7 +299,7 @@ discard block |
||
| 299 | 299 | $federationEndpoints = $this->discoveryService->discover($remoteDomain, 'FEDERATED_SHARING'); |
| 300 | 300 | $endpoint = isset($federationEndpoints['share']) ? $federationEndpoints['share'] : '/ocs/v2.php/cloud/shares'; |
| 301 | 301 | try { |
| 302 | - $response = $client->post($remoteDomain . $endpoint . $urlSuffix . '?format=' . self::RESPONSE_FORMAT, [ |
|
| 302 | + $response = $client->post($remoteDomain.$endpoint.$urlSuffix.'?format='.self::RESPONSE_FORMAT, [ |
|
| 303 | 303 | 'body' => $fields, |
| 304 | 304 | 'timeout' => 10, |
| 305 | 305 | 'connect_timeout' => 10, |