]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix preview for reshared file
authorGeorg Ehrke <developer@georgehrke.com>
Sun, 22 Dec 2013 19:27:38 +0000 (20:27 +0100)
committerGeorg Ehrke <developer@georgehrke.com>
Sun, 22 Dec 2013 19:27:38 +0000 (20:27 +0100)
apps/files_sharing/ajax/publicpreview.php

index 8c3085f158955fa87517c6a2e520453fc491e3ef..54a9806e8bf2d25b35e27bf3115ecc293104ee8b 100644 (file)
@@ -36,7 +36,9 @@ if(!isset($linkedItem['uid_owner']) || !isset($linkedItem['file_source'])) {
        exit;
 }
 
-$userId = $linkedItem['uid_owner'];
+$rootLinkItem = OCP\Share::resolveReShare($linkedItem);
+$userId = $rootLinkItem['uid_owner'];
+
 \OC_Util::setupFS($userId);
 \OC\Files\Filesystem::initMountPoints($userId);
 $view = new \OC\Files\View('/' . $userId . '/files');