mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
fix truncated circleId returned from Share API
This commit is contained in:
parent
fa773ece6d
commit
311d1d2306
1 changed files with 4 additions and 3 deletions
|
|
@ -310,10 +310,11 @@ class ShareAPIController extends OCSController {
|
|||
|
||||
$shareWithStart = ($hasCircleId ? strrpos($share->getSharedWith(), '[') + 1 : 0);
|
||||
$shareWithLength = ($hasCircleId ? -1 : strpos($share->getSharedWith(), ' '));
|
||||
if (is_bool($shareWithLength)) {
|
||||
$shareWithLength = -1;
|
||||
if ($shareWithLength === false) {
|
||||
$result['share_with'] = substr($share->getSharedWith(), $shareWithStart);
|
||||
} else {
|
||||
$result['share_with'] = substr($share->getSharedWith(), $shareWithStart, $shareWithLength);
|
||||
}
|
||||
$result['share_with'] = substr($share->getSharedWith(), $shareWithStart, $shareWithLength);
|
||||
} elseif ($share->getShareType() === IShare::TYPE_ROOM) {
|
||||
$result['share_with'] = $share->getSharedWith();
|
||||
$result['share_with_displayname'] = '';
|
||||
|
|
|
|||
Loading…
Reference in a new issue