summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/templates
diff options
context:
space:
mode:
authorFaraz Samapoor <f.samapoor@gmail.com>2023-06-02 20:08:40 +0330
committerFaraz Samapoor <f.samapoor@gmail.com>2023-06-02 20:08:40 +0330
commit12e359429996aa2162a827792e6448dedd73c09e (patch)
treec6ce23c939e34d0b592be33eebb597803078da99 /apps/files_sharing/templates
parent21885058378c1fb15ad0cb847043c0eea0e7de22 (diff)
downloadnextcloud-server-12e359429996aa2162a827792e6448dedd73c09e.tar.gz
nextcloud-server-12e359429996aa2162a827792e6448dedd73c09e.zip
Refactors "strpos" calls in /apps/files_sharing to improve code readability.
Signed-off-by: Faraz Samapoor <f.samapoor@gmail.com>
Diffstat (limited to 'apps/files_sharing/templates')
-rw-r--r--apps/files_sharing/templates/public.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/files_sharing/templates/public.php b/apps/files_sharing/templates/public.php
index abb3b195bc6..510a8d04e04 100644
--- a/apps/files_sharing/templates/public.php
+++ b/apps/files_sharing/templates/public.php
@@ -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']) && str_starts_with($_['mimetype'], 'image')) { ?>
<div class="directDownload">
<div>
<?php p($_['filename'])?> (<?php p($_['fileSize']) ?>)