@@ -106,7 +106,6 @@ |
||
| 106 | 106 | * @param string $ownerDisplayName display name of the user who shared the item |
| 107 | 107 | * @param string $sharedBy provider specific UID of the user who shared the resource |
| 108 | 108 | * @param string $sharedByDisplayName display name of the user who shared the resource |
| 109 | - * @param string $sharedSecret use to authenticate accross servers |
|
| 110 | 109 | * @param array $protocol (e,.g. ['name' => 'webdav', 'options' => ['username' => 'john', 'permissions' => 31]]) |
| 111 | 110 | * @param string $shareType ('group' or 'user' share) |
| 112 | 111 | * @param $resourceType ('file', 'calendar',...) |
@@ -247,8 +247,7 @@ |
||
| 247 | 247 | return new JSONResponse($e->getReturnMessage(), Http::STATUS_BAD_REQUEST); |
| 248 | 248 | } catch (AuthenticationFailedException $e) { |
| 249 | 249 | return new JSONResponse(["message" => "RESOURCE_NOT_FOUND"], Http::STATUS_FORBIDDEN); |
| 250 | - } |
|
| 251 | - catch (\Exception $e) { |
|
| 250 | + } catch (\Exception $e) { |
|
| 252 | 251 | return new JSONResponse( |
| 253 | 252 | ['message' => 'Internal error at ' . $this->urlGenerator->getBaseUrl()], |
| 254 | 253 | Http::STATUS_BAD_REQUEST |
@@ -28,7 +28,6 @@ |
||
| 28 | 28 | /** |
| 29 | 29 | * BadRequestException constructor. |
| 30 | 30 | * |
| 31 | - * @param array $missingParameters |
|
| 32 | 31 | */ |
| 33 | 32 | public function __construct() { |
| 34 | 33 | $l = \OC::$server->getL10N('federation'); |
@@ -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); |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | * @param string $remote url |
| 185 | 185 | * @param int $id share id |
| 186 | 186 | * @param string $token |
| 187 | - * @return bool |
|
| 187 | + * @return boolean|null |
|
| 188 | 188 | */ |
| 189 | 189 | public function sendRemoteUnShare($remote, $id, $token) { |
| 190 | 190 | $this->sendUpdateToRemote($remote, $id, $token, 'unshare'); |
@@ -196,7 +196,7 @@ discard block |
||
| 196 | 196 | * @param string $remote url |
| 197 | 197 | * @param int $id share id |
| 198 | 198 | * @param string $token |
| 199 | - * @return bool |
|
| 199 | + * @return boolean|null |
|
| 200 | 200 | */ |
| 201 | 201 | public function sendRevokeShare($remote, $id, $token) { |
| 202 | 202 | $this->sendUpdateToRemote($remote, $id, $token, 'reshare_undo'); |
@@ -209,7 +209,7 @@ discard block |
||
| 209 | 209 | * @param int $remoteId |
| 210 | 210 | * @param string $token |
| 211 | 211 | * @param int $permissions |
| 212 | - * @return bool |
|
| 212 | + * @return boolean|null |
|
| 213 | 213 | */ |
| 214 | 214 | public function sendPermissionChange($remote, $remoteId, $token, $permissions) { |
| 215 | 215 | $this->sendUpdateToRemote($remote, $remoteId, $token, 'permissions', ['permissions' => $permissions]); |
@@ -330,8 +330,8 @@ discard block |
||
| 330 | 330 | /** |
| 331 | 331 | * try old federated sharing API if the OCM api doesn't work |
| 332 | 332 | * |
| 333 | - * @param $remoteDomain |
|
| 334 | - * @param $urlSuffix |
|
| 333 | + * @param string $remoteDomain |
|
| 334 | + * @param string $urlSuffix |
|
| 335 | 335 | * @param array $fields |
| 336 | 336 | * @return mixed |
| 337 | 337 | * @throws \Exception |
@@ -395,9 +395,9 @@ discard block |
||
| 395 | 395 | /** |
| 396 | 396 | * send action regarding federated sharing to the remote server using the OCM API |
| 397 | 397 | * |
| 398 | - * @param $remoteDomain |
|
| 398 | + * @param string $remoteDomain |
|
| 399 | 399 | * @param $fields |
| 400 | - * @param $action |
|
| 400 | + * @param string $action |
|
| 401 | 401 | * |
| 402 | 402 | * @return bool |
| 403 | 403 | */ |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | * share received from another server |
| 145 | 145 | * |
| 146 | 146 | * @param ICloudFederationShare $share |
| 147 | - * @return string provider specific unique ID of the share |
|
| 147 | + * @return integer provider specific unique ID of the share |
|
| 148 | 148 | * |
| 149 | 149 | * @throws ProviderCouldNotAddShareException |
| 150 | 150 | * @throws \OCP\AppFramework\QueryException |
@@ -469,6 +469,9 @@ discard block |
||
| 469 | 469 | return []; |
| 470 | 470 | } |
| 471 | 471 | |
| 472 | + /** |
|
| 473 | + * @param string $id |
|
| 474 | + */ |
|
| 472 | 475 | private function unshare($id, $notification) { |
| 473 | 476 | error_log("new unshare!"); |
| 474 | 477 | if (!$this->isS2SEnabled(true)) { |
@@ -546,7 +549,7 @@ discard block |
||
| 546 | 549 | /** |
| 547 | 550 | * recipient of a share request to re-share the file with another user |
| 548 | 551 | * |
| 549 | - * @param $id |
|
| 552 | + * @param string $id |
|
| 550 | 553 | * @param $notification |
| 551 | 554 | * @return array |
| 552 | 555 | * @throws AuthenticationFailedException |