aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorSimon L <szaimen@e.mail.de>2022-02-10 17:37:29 +0100
committerGitHub <noreply@github.com>2022-02-10 17:37:29 +0100
commitb881940bf31a45de81ade6cbe3f2e870846866ad (patch)
treeb172d88c9b39c11788486b544c0f30bb4e8104e8 /apps
parentc605ef1f432dcd48ba4b3b8cc82551c234dc4f64 (diff)
parentf0424378f68ee222bc9914af6e391624d9f3c711 (diff)
downloadnextcloud-server-b881940bf31a45de81ade6cbe3f2e870846866ad.tar.gz
nextcloud-server-b881940bf31a45de81ade6cbe3f2e870846866ad.zip
Merge pull request #31077 from nextcloud/revert/public-page-changes
Revert the 'broken' public page changes
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/lib/Controller/ShareController.php2
-rw-r--r--apps/files_sharing/templates/public.php4
-rw-r--r--apps/files_sharing/tests/Controller/ShareControllerTest.php8
3 files changed, 7 insertions, 7 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareController.php b/apps/files_sharing/lib/Controller/ShareController.php
index b4a332d7419..614dae7ffba 100644
--- a/apps/files_sharing/lib/Controller/ShareController.php
+++ b/apps/files_sharing/lib/Controller/ShareController.php
@@ -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;
diff --git a/apps/files_sharing/templates/public.php b/apps/files_sharing/templates/public.php
index 677f015ce81..33dd6ecd189 100644
--- a/apps/files_sharing/templates/public.php
+++ b/apps/files_sharing/templates/public.php
@@ -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>
diff --git a/apps/files_sharing/tests/Controller/ShareControllerTest.php b/apps/files_sharing/tests/Controller/ShareControllerTest.php
index 512a61d811e..be2616f70fc 100644
--- a/apps/files_sharing/tests/Controller/ShareControllerTest.php
+++ b/apps/files_sharing/tests/Controller/ShareControllerTest.php
@@ -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,