@@ -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 |
@@ -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); |
@@ -450,7 +450,7 @@ |
||
450 | 450 | /** |
451 | 451 | * translate Nextcloud permissions to OCM Permissions |
452 | 452 | * |
453 | - * @param $ncPermissions |
|
453 | + * @param integer $ncPermissions |
|
454 | 454 | * @return array |
455 | 455 | */ |
456 | 456 | protected function ncPermissions2ocmPermissions($ncPermissions) { |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | * share received from another server |
151 | 151 | * |
152 | 152 | * @param ICloudFederationShare $share |
153 | - * @return string provider specific unique ID of the share |
|
153 | + * @return integer provider specific unique ID of the share |
|
154 | 154 | * |
155 | 155 | * @throws ProviderCouldNotAddShareException |
156 | 156 | * @throws \OCP\AppFramework\QueryException |
@@ -314,10 +314,10 @@ discard block |
||
314 | 314 | * notify user about new federated share |
315 | 315 | * |
316 | 316 | * @param $shareWith |
317 | - * @param $shareId |
|
318 | - * @param $ownerFederatedId |
|
319 | - * @param $sharedByFederatedId |
|
320 | - * @param $name |
|
317 | + * @param integer $shareId |
|
318 | + * @param string $ownerFederatedId |
|
319 | + * @param string $sharedByFederatedId |
|
320 | + * @param string $name |
|
321 | 321 | */ |
322 | 322 | private function notifyAboutNewShare($shareWith, $shareId, $ownerFederatedId, $sharedByFederatedId, $name) { |
323 | 323 | $notification = $this->notificationManager->createNotification(); |
@@ -810,7 +810,7 @@ discard block |
||
810 | 810 | /** |
811 | 811 | * get the supported share types, e.g. "user", "group", etc. |
812 | 812 | * |
813 | - * @return array |
|
813 | + * @return string[] |
|
814 | 814 | */ |
815 | 815 | public function getSupportedShareTypes() { |
816 | 816 | return ['user']; |
@@ -407,7 +407,7 @@ |
||
407 | 407 | /** |
408 | 408 | * calculate default permissions in case no permissions are provided |
409 | 409 | * |
410 | - * @param $path |
|
410 | + * @param string $path |
|
411 | 411 | * @return int |
412 | 412 | */ |
413 | 413 | protected function getDefaultPermissions($path) { |
@@ -450,7 +450,7 @@ |
||
450 | 450 | /** |
451 | 451 | * translate Nextcloud permissions to OCM Permissions |
452 | 452 | * |
453 | - * @param $ncPermissions |
|
453 | + * @param integer $ncPermissions |
|
454 | 454 | * @return array |
455 | 455 | */ |
456 | 456 | protected function ncPermissions2ocmPermissions($ncPermissions) { |
@@ -18,14 +18,20 @@ discard block |
||
18 | 18 | |
19 | 19 | <p> |
20 | 20 | <input type="checkbox" name="outgoing_server2server_share_enabled" id="outgoingServer2serverShareEnabled" class="checkbox" |
21 | - value="1" <?php if ($_['outgoingServer2serverShareEnabled']) print_unescaped('checked="checked"'); ?> /> |
|
21 | + value="1" <?php if ($_['outgoingServer2serverShareEnabled']) { |
|
22 | + print_unescaped('checked="checked"'); |
|
23 | +} |
|
24 | +?> /> |
|
22 | 25 | <label for="outgoingServer2serverShareEnabled"> |
23 | 26 | <?php p($l->t('Allow users on this server to send shares to other servers'));?> |
24 | 27 | </label> |
25 | 28 | </p> |
26 | 29 | <p> |
27 | 30 | <input type="checkbox" name="incoming_server2server_share_enabled" id="incomingServer2serverShareEnabled" class="checkbox" |
28 | - value="1" <?php if ($_['incomingServer2serverShareEnabled']) print_unescaped('checked="checked"'); ?> /> |
|
31 | + value="1" <?php if ($_['incomingServer2serverShareEnabled']) { |
|
32 | + print_unescaped('checked="checked"'); |
|
33 | +} |
|
34 | +?> /> |
|
29 | 35 | <label for="incomingServer2serverShareEnabled"> |
30 | 36 | <?php p($l->t('Allow users on this server to receive shares from other servers'));?> |
31 | 37 | </label><br/> |
@@ -33,14 +39,20 @@ discard block |
||
33 | 39 | <?php if($_['federatedGroupSharingSupported']): ?> |
34 | 40 | <p> |
35 | 41 | <input type="checkbox" name="outgoing_server2server_group_share_enabled" id="outgoingServer2serverGroupShareEnabled" class="checkbox" |
36 | - value="1" <?php if ($_['outgoingServer2serverGroupShareEnabled']) print_unescaped('checked="checked"'); ?> /> |
|
42 | + value="1" <?php if ($_['outgoingServer2serverGroupShareEnabled']) { |
|
43 | + print_unescaped('checked="checked"'); |
|
44 | +} |
|
45 | +?> /> |
|
37 | 46 | <label for="outgoingServer2serverGroupShareEnabled"> |
38 | 47 | <?php p($l->t('Allow users on this server to send shares to groups on other servers'));?> |
39 | 48 | </label> |
40 | 49 | </p> |
41 | 50 | <p> |
42 | 51 | <input type="checkbox" name="incoming_server2server_group_share_enabled" id="incomingServer2serverGroupShareEnabled" class="checkbox" |
43 | - value="1" <?php if ($_['incomingServer2serverGroupShareEnabled']) print_unescaped('checked="checked"'); ?> /> |
|
52 | + value="1" <?php if ($_['incomingServer2serverGroupShareEnabled']) { |
|
53 | + print_unescaped('checked="checked"'); |
|
54 | +} |
|
55 | +?> /> |
|
44 | 56 | <label for="incomingServer2serverGroupShareEnabled"> |
45 | 57 | <?php p($l->t('Allow users on this server to receive group shares from other servers'));?> |
46 | 58 | </label><br/> |
@@ -48,14 +60,20 @@ discard block |
||
48 | 60 | <?php endif; ?> |
49 | 61 | <p> |
50 | 62 | <input type="checkbox" name="lookupServerEnabled" id="lookupServerEnabled" class="checkbox" |
51 | - value="1" <?php if ($_['lookupServerEnabled']) print_unescaped('checked="checked"'); ?> /> |
|
63 | + value="1" <?php if ($_['lookupServerEnabled']) { |
|
64 | + print_unescaped('checked="checked"'); |
|
65 | +} |
|
66 | +?> /> |
|
52 | 67 | <label for="lookupServerEnabled"> |
53 | 68 | <?php p($l->t('Search global and public address book for users'));?> |
54 | 69 | </label><br/> |
55 | 70 | </p> |
56 | 71 | <p> |
57 | 72 | <input type="checkbox" name="lookupServerUploadEnabled" id="lookupServerUploadEnabled" class="checkbox" |
58 | - value="1" <?php if ($_['lookupServerUploadEnabled']) print_unescaped('checked="checked"'); ?> /> |
|
73 | + value="1" <?php if ($_['lookupServerUploadEnabled']) { |
|
74 | + print_unescaped('checked="checked"'); |
|
75 | +} |
|
76 | +?> /> |
|
59 | 77 | <label for="lookupServerUploadEnabled"> |
60 | 78 | <?php p($l->t('Allow users to publish their data to a global and public address book'));?> |
61 | 79 | </label><br/> |