Merge pull request #5806 from nextcloud/fix-public-links-stable11

[stable11] fix preview for public links
This commit is contained in:
Roeland Jago Douma 2017-07-21 11:02:33 +02:00 committed by GitHub
commit f1b689be10
1 changed files with 3 additions and 1 deletions

View File

@ -78,10 +78,12 @@ $server = $serverFactory->createServer($baseuri, $requestUri, $authBackend, func
\OC\Files\Filesystem::addStorageWrapper('sharePermissions', function ($mountPoint, $storage) use ($share) { \OC\Files\Filesystem::addStorageWrapper('sharePermissions', function ($mountPoint, $storage) use ($share) {
return new \OC\Files\Storage\Wrapper\PermissionsMask(array('storage' => $storage, 'mask' => $share->getPermissions() | \OCP\Constants::PERMISSION_SHARE)); return new \OC\Files\Storage\Wrapper\PermissionsMask(array('storage' => $storage, 'mask' => $share->getPermissions() | \OCP\Constants::PERMISSION_SHARE));
}); });
\OC\Files\Filesystem::logWarningWhenAddingStorageWrapper($previousLog); \OC\Files\Filesystem::logWarningWhenAddingStorageWrapper($previousLog);
OC_Util::tearDownFS();
OC_Util::setupFS($owner); OC_Util::setupFS($owner);
$ownerView = \OC\Files\Filesystem::getView(); $ownerView = new \OC\Files\View('/'. $owner . '/files');
$path = $ownerView->getPath($fileId); $path = $ownerView->getPath($fileId);
$fileInfo = $ownerView->getFileInfo($path); $fileInfo = $ownerView->getFileInfo($path);
$linkCheckPlugin->setFileInfo($fileInfo); $linkCheckPlugin->setFileInfo($fileInfo);