diff options
Diffstat (limited to 'apps/files_sharing/ajax/publicpreview.php')
-rw-r--r-- | apps/files_sharing/ajax/publicpreview.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/files_sharing/ajax/publicpreview.php b/apps/files_sharing/ajax/publicpreview.php index 8c3085f1589..a52f522afac 100644 --- a/apps/files_sharing/ajax/publicpreview.php +++ b/apps/files_sharing/ajax/publicpreview.php @@ -36,7 +36,10 @@ if(!isset($linkedItem['uid_owner']) || !isset($linkedItem['file_source'])) { exit; } -$userId = $linkedItem['uid_owner']; +$rootLinkItem = OCP\Share::resolveReShare($linkedItem); +$userId = $rootLinkItem['uid_owner']; + +OCP\JSON::checkUserExists($rootLinkItem['uid_owner']); \OC_Util::setupFS($userId); \OC\Files\Filesystem::initMountPoints($userId); $view = new \OC\Files\View('/' . $userId . '/files'); @@ -86,4 +89,4 @@ try{ } catch (\Exception $e) { \OC_Response::setStatus(500); \OC_Log::write('core', $e->getmessage(), \OC_Log::DEBUG); -}
\ No newline at end of file +} |