Skip to content

Commit 183357c

Browse files
committed
Add non-breaking space in the file size
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
1 parent 2e55ce0 commit 183357c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

apps/files_sharing/lib/Controller/ShareController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ public function showShare($path = ''): TemplateResponse {
385385
$shareTmpl['protected'] = $share->getPassword() !== null ? 'true' : 'false';
386386
$shareTmpl['dir'] = '';
387387
$shareTmpl['nonHumanFileSize'] = $shareNode->getSize();
388-
$shareTmpl['fileSize'] = \OCP\Util::humanFileSize($shareNode->getSize());
388+
$shareTmpl['fileSize'] = str_replace(' ', '&nbsp;', \OCP\Util::humanFileSize($shareNode->getSize()));
389389
$shareTmpl['hideDownload'] = $share->getHideDownload();
390390

391391
$hideFileList = false;

apps/files_sharing/templates/public.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
<?php if (isset($_['mimetype']) && strpos($_['mimetype'], 'image') === 0) { ?>
7676
<div class="directDownload">
7777
<div>
78-
<?php p($_['filename'])?> (<?php p($_['fileSize']) ?>)
78+
<?php p($_['filename'])?> (<?php echo($_['fileSize']) ?>)
7979
</div>
8080
<a href="<?php p($_['downloadURL']); ?>" id="downloadFile" class="button">
8181
<span class="icon icon-download"></span>
@@ -87,7 +87,7 @@
8787
<?php if ($_['previewURL'] === $_['downloadURL'] && !$_['hideDownload']): ?>
8888
<div class="directDownload">
8989
<div>
90-
<?php p($_['filename'])?>&nbsp;(<?php p($_['fileSize']) ?>)
90+
<?php p($_['filename'])?> (<?php echo($_['fileSize']) ?>)
9191
</div>
9292
<a href="<?php p($_['downloadURL']); ?>" id="downloadFile" class="button">
9393
<span class="icon icon-download"></span>

0 commit comments

Comments
 (0)