]> source.dussan.org Git - nextcloud-server.git/commitdiff
make sure to show download button only one time 38818/head
authorSimon L <szaimen@e.mail.de>
Wed, 14 Jun 2023 09:30:04 +0000 (11:30 +0200)
committerbackportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com>
Wed, 14 Jun 2023 15:04:35 +0000 (15:04 +0000)
Signed-off-by: Simon L <szaimen@e.mail.de>
apps/files_sharing/templates/public.php

index abb3b195bc60b8e331679c260eb5501c59d5c67a..39c41fc90f4161cafa567aa8856a3e2435e15b6e 100644 (file)
@@ -62,7 +62,7 @@ $maxUploadFilesize = min($upload_max_filesize, $post_max_size);
                        <?php else: ?>
                                <!-- preview frame to open file in with viewer -->
                                <div id="imgframe"></div>
-                               <?php if (isset($_['mimetype']) && strpos($_['mimetype'], 'image') === 0) { ?>
+                               <?php if (isset($_['mimetype']) && strpos($_['mimetype'], 'image') === 0): ?>
                                        <div class="directDownload">
                                                <div>
                                                        <?php p($_['filename'])?> (<?php p($_['fileSize']) ?>)
@@ -74,8 +74,7 @@ $maxUploadFilesize = min($upload_max_filesize, $post_max_size);
                                                        </a>
                                                <?php } ?>
                                        </div>
-                               <?php } ?>
-                               <?php if ($_['previewURL'] === $_['downloadURL'] && !$_['hideDownload']): ?>
+                               <?php elseif ($_['previewURL'] === $_['downloadURL'] && !$_['hideDownload']): ?>
                                        <div class="directDownload">
                                                <div>
                                                        <?php p($_['filename'])?>&nbsp;(<?php p($_['fileSize']) ?>)