]> source.dussan.org Git - nextcloud-server.git/commitdiff
Revert "Add non-breaking space in the file size" 31114/head
authorszaimen <szaimen@e.mail.de>
Wed, 9 Feb 2022 08:47:44 +0000 (09:47 +0100)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Thu, 10 Feb 2022 21:38:30 +0000 (21:38 +0000)
Signed-off-by: szaimen <szaimen@e.mail.de>
apps/files_sharing/lib/Controller/ShareController.php
apps/files_sharing/templates/public.php
apps/files_sharing/tests/Controller/ShareControllerTest.php

index cce118f6d6f3d33be3795a8e90b29b053a5ee190..ffd2413e9012d38aa459570e8361c128865ea217 100644 (file)
@@ -385,7 +385,7 @@ class ShareController extends AuthPublicShareController {
                $shareTmpl['protected'] = $share->getPassword() !== null ? 'true' : 'false';
                $shareTmpl['dir'] = '';
                $shareTmpl['nonHumanFileSize'] = $shareNode->getSize();
-               $shareTmpl['fileSize'] = str_replace(' ', '&nbsp;', \OCP\Util::humanFileSize($shareNode->getSize()));
+               $shareTmpl['fileSize'] = \OCP\Util::humanFileSize($shareNode->getSize());
                $shareTmpl['hideDownload'] = $share->getHideDownload();
 
                $hideFileList = false;
index 677f015ce81d66c3bf8f462f79991f7685ef27f3..33dd6ecd1898d5fce7178dc1c7cd6912309a5d0c 100644 (file)
@@ -75,7 +75,7 @@ $maxUploadFilesize = min($upload_max_filesize, $post_max_size);
                                                <?php if (isset($_['mimetype']) && strpos($_['mimetype'], 'image') === 0) { ?>
                                                        <div class="directDownload">
                                                                <div>
-                                                                       <?php p($_['filename'])?> (<?php echo($_['fileSize']) ?>)
+                                                                       <?php p($_['filename'])?> (<?php p($_['fileSize']) ?>)
                                                                </div>
                                                                <a href="<?php p($_['downloadURL']); ?>" id="downloadFile" class="button">
                                                                        <span class="icon icon-download"></span>
@@ -87,7 +87,7 @@ $maxUploadFilesize = min($upload_max_filesize, $post_max_size);
                                <?php if ($_['previewURL'] === $_['downloadURL'] && !$_['hideDownload']): ?>
                                        <div class="directDownload">
                                                <div>
-                                                       <?php p($_['filename'])?> (<?php echo($_['fileSize']) ?>)
+                                                       <?php p($_['filename'])?>&nbsp;(<?php p($_['fileSize']) ?>)
                                                </div>
                                                <a href="<?php p($_['downloadURL']); ?>" id="downloadFile" class="button">
                                                        <span class="icon icon-download"></span>
index 512a61d811e324cc2f65b4680a3af163ff41474b..be2616f70fc90d930e193dfae86f77bb0d2ebba3 100644 (file)
@@ -329,7 +329,7 @@ class ShareControllerTest extends \Test\TestCase {
                        'protected' => 'true',
                        'dir' => '',
                        'downloadURL' => 'downloadURL',
-                       'fileSize' => '33&nbsp;B',
+                       'fileSize' => '33 B',
                        'nonHumanFileSize' => 33,
                        'maxSizeAnimateGif' => 10,
                        'previewSupported' => true,
@@ -480,7 +480,7 @@ class ShareControllerTest extends \Test\TestCase {
                        'protected' => 'true',
                        'dir' => '',
                        'downloadURL' => 'downloadURL',
-                       'fileSize' => '33&nbsp;B',
+                       'fileSize' => '33 B',
                        'nonHumanFileSize' => 33,
                        'maxSizeAnimateGif' => 10,
                        'previewSupported' => true,
@@ -631,7 +631,7 @@ class ShareControllerTest extends \Test\TestCase {
                        'protected' => 'true',
                        'dir' => '',
                        'downloadURL' => 'downloadURL',
-                       'fileSize' => '33&nbsp;B',
+                       'fileSize' => '33 B',
                        'nonHumanFileSize' => 33,
                        'maxSizeAnimateGif' => 10,
                        'previewSupported' => true,
@@ -756,7 +756,7 @@ class ShareControllerTest extends \Test\TestCase {
                        'protected' => 'false',
                        'dir' => null,
                        'downloadURL' => '',
-                       'fileSize' => '1&nbsp;KB',
+                       'fileSize' => '1 KB',
                        'nonHumanFileSize' => 1337,
                        'maxSizeAnimateGif' => null,
                        'previewSupported' => null,