@@ 93-95 (lines=3) @@ | ||
90 | $time = $date->getTimestamp(); |
|
91 | ||
92 | \OC::$server->getLogger()->warning(json_encode(func_get_args())); |
|
93 | if (!isset($to['type'], $to['name']) || $to['type'] !== 'Person') { |
|
94 | return new DataResponse([], Http::STATUS_BAD_REQUEST); |
|
95 | } |
|
96 | ||
97 | $user = $this->userManager->get($to['name']); |
|
98 | if (!$user instanceof IUser) { |
|
@@ 102-104 (lines=3) @@ | ||
99 | return new DataResponse([], Http::STATUS_NOT_FOUND); |
|
100 | } |
|
101 | ||
102 | if (!isset($actor['type'], $actor['name']) || $actor['type'] !== 'Person') { |
|
103 | return new DataResponse([], Http::STATUS_BAD_REQUEST); |
|
104 | } |
|
105 | ||
106 | if ($user->getCloudId() === $actor['name']) { |
|
107 | return new DataResponse([], Http::STATUS_BAD_REQUEST); |
|
@@ 135-137 (lines=3) @@ | ||
132 | ||
133 | $path2 = null; |
|
134 | if ($type === 'Move') { |
|
135 | if (!isset($target['type'], $target['name']) || $target['type'] !== 'Document') { |
|
136 | return new DataResponse([], Http::STATUS_BAD_REQUEST); |
|
137 | } |
|
138 | ||
139 | if (!isset($origin['type'], $origin['name']) || $origin['type'] !== 'Document') { |
|
140 | return new DataResponse([], Http::STATUS_BAD_REQUEST); |
|
@@ 139-141 (lines=3) @@ | ||
136 | return new DataResponse([], Http::STATUS_BAD_REQUEST); |
|
137 | } |
|
138 | ||
139 | if (!isset($origin['type'], $origin['name']) || $origin['type'] !== 'Document') { |
|
140 | return new DataResponse([], Http::STATUS_BAD_REQUEST); |
|
141 | } |
|
142 | ||
143 | $path = $share['mountpoint'] . $target['name']; |
|
144 | $path2 = $share['mountpoint'] . $origin['name']; |
|
@@ 146-148 (lines=3) @@ | ||
143 | $path = $share['mountpoint'] . $target['name']; |
|
144 | $path2 = $share['mountpoint'] . $origin['name']; |
|
145 | } else { |
|
146 | if (!isset($object['type'], $object['name']) || $object['type'] !== 'Document') { |
|
147 | return new DataResponse([], Http::STATUS_BAD_REQUEST); |
|
148 | } |
|
149 | ||
150 | $path = $share['mountpoint'] . $object['name']; |
|
151 | } |