Merge pull request #5806 from nextcloud/fix-public-links-stable11
[stable11] fix preview for public links
This commit is contained in:
commit
f1b689be10
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue