We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 99c0d2d commit b3d697bCopy full SHA for b3d697b
1 file changed
lib/Listener/BeforeFetchPreviewListener.php
@@ -38,12 +38,13 @@ public function handle(Event $event): void {
38
}
39
$shareToken = $this->request->getParam('token');
40
41
+ $share = null;
42
try {
- $share = $shareToken ?
43
- // Get different share for public previews as the share from the node is only set for mounted shares
44
- $this->shareManager->getShareByToken($shareToken)
45
- // Get share for internal shares
46
- : $this->helper->getShareFromNode($event->getNode());
+ // Get different share for public previews as the share from the node is only set for mounted shares
+ $share = $shareToken ? $this->shareManager->getShareByToken($shareToken) : null;
+
+ // Get share for internal shares
47
+ $share = $this->helper->getShareFromNode($event->getNode());
48
} catch (ShareNotFound) {
49
50
0 commit comments