Merge pull request #341 from nhirokinet/feature/adapt_groupfolder

Richdocument on Android did not work in groupfolders
This commit is contained in:
Roeland Jago Douma 2019-01-09 12:57:26 +01:00 коммит произвёл GitHub
Родитель 64e9b2dc9c e2e477b638
Коммит 53b6fa1194
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 7 добавлений и 1 удалений

Просмотреть файл

@ -131,7 +131,13 @@ class TokenManager {
$file = $rootFolder->getById($fileId)[0];
// If its a public share, use the owner from the share, otherwise check the file object
if (is_null($owneruid)) {
$owneruid = $file->getOwner()->getUID();
$owner = $file->getOwner();
if (is_null($owner)) {
// Editor UID instead of owner UID in case owner is null e.g. group folders
$owneruid = $editoruid;
} else {
$owneruid = $owner->getUID();
}
}
$serverHost = $this->urlGenerator->getAbsoluteURL('/');//$this->request->getServerProtocol() . '://' . $this->request->getServerHost();