diff options
-rw-r--r-- | apps/files_sharing/public.php | 1 | ||||
-rw-r--r-- | apps/files_sharing/templates/public.php | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php index 1145b2ce2a9..9f4efa6d54b 100644 --- a/apps/files_sharing/public.php +++ b/apps/files_sharing/public.php @@ -136,6 +136,7 @@ if (isset($path)) { $tmpl->assign('sharingToken', $token); $tmpl->assign('server2serversharing', Helper::isOutgoingServer2serverShareEnabled()); $tmpl->assign('protected', isset($linkItem['share_with']) ? 'true' : 'false'); + $tmpl->assign('previewEnabled', \OC::$server->getConfig()->getSystemValue('enable_previews', true)); $urlLinkIdentifiers= (isset($token)?'&t='.$token:'') .(isset($_GET['dir'])?'&dir='.$_GET['dir']:'') diff --git a/apps/files_sharing/templates/public.php b/apps/files_sharing/templates/public.php index 46bf90b1b41..d4bb255f24e 100644 --- a/apps/files_sharing/templates/public.php +++ b/apps/files_sharing/templates/public.php @@ -54,7 +54,7 @@ $previewSupported = OC\Preview::isMimeSupported($_['mimetype']) ? 'true' : 'fals <?php if (isset($_['folder'])): ?> <?php print_unescaped($_['folder']); ?> <?php else: ?> - <?php if (substr($_['mimetype'], 0, strpos($_['mimetype'], '/')) == 'video'): ?> + <?php if ($_['previewEnabled'] && substr($_['mimetype'], 0, strpos($_['mimetype'], '/')) == 'video'): ?> <div id="imgframe"> <video tabindex="0" controls="" preload="none"> <source src="<?php p($_['downloadURL']); ?>" type="<?php p($_['mimetype']); ?>" /> |