Expose hide download to public page
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
abbb946bbb
commit
c237a3f003
3 changed files with 5 additions and 2 deletions
|
@ -321,6 +321,7 @@ class ShareController extends AuthPublicShareController {
|
|||
$shareTmpl['dir'] = '';
|
||||
$shareTmpl['nonHumanFileSize'] = $share->getNode()->getSize();
|
||||
$shareTmpl['fileSize'] = \OCP\Util::humanFileSize($share->getNode()->getSize());
|
||||
$shareTmpl['hideDownload'] = $share->getHideDownload();
|
||||
|
||||
// Show file list
|
||||
$hideFileList = false;
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
<input type="hidden" name="mimetype" value="<?php p($_['mimetype']) ?>" id="mimetype">
|
||||
<input type="hidden" name="previewSupported" value="<?php p($_['previewSupported'] ? 'true' : 'false'); ?>" id="previewSupported">
|
||||
<input type="hidden" name="mimetypeIcon" value="<?php p(\OC::$server->getMimeTypeDetector()->mimeTypeIcon($_['mimetype'])); ?>" id="mimetypeIcon">
|
||||
<input type="hidden" name="hideDownload" value="<?php p($_['hideDownload'] ? 'true' : 'false'); ?>" id="hideDownload">
|
||||
<?php
|
||||
$upload_max_filesize = OC::$server->getIniWrapper()->getBytes('upload_max_filesize');
|
||||
$post_max_size = OC::$server->getIniWrapper()->getBytes('post_max_size');
|
||||
|
@ -97,4 +98,4 @@ $maxUploadFilesize = min($upload_max_filesize, $post_max_size);
|
|||
data-url="<?php p(\OC::$server->getURLGenerator()->linkTo('files', 'ajax/upload.php')); ?>" />
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -287,7 +287,8 @@ class ShareControllerTest extends \Test\TestCase {
|
|||
'shareUrl' => null,
|
||||
'previewImage' => null,
|
||||
'previewURL' => 'downloadURL',
|
||||
'note' => $note
|
||||
'note' => $note,
|
||||
'hideDownload' => false
|
||||
);
|
||||
|
||||
$csp = new \OCP\AppFramework\Http\ContentSecurityPolicy();
|
||||
|
|
Loading…
Reference in a new issue