]> source.dussan.org Git - nextcloud-server.git/commitdiff
properly set 'hide_download' as integer 19950/head
authorRobin Appelman <robin@icewind.nl>
Fri, 13 Mar 2020 16:38:56 +0000 (17:38 +0100)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Sat, 14 Mar 2020 08:19:49 +0000 (08:19 +0000)
the database field is a smallint, not a boolean.

fixes postgresql tests

Signed-off-by: Robin Appelman <robin@icewind.nl>
apps/sharebymail/lib/ShareByMailProvider.php

index 9e60364b6a1391e805980ece924f7f41b067dd98..50338c4883015a139259ca7ce1f4e2d80234d3ee 100644 (file)
@@ -704,7 +704,7 @@ class ShareByMailProvider implements IShareProvider {
                        ->setValue('password', $qb->createNamedParameter($password))
                        ->setValue('password_by_talk', $qb->createNamedParameter($sendPasswordByTalk, IQueryBuilder::PARAM_BOOL))
                        ->setValue('stime', $qb->createNamedParameter(time()))
-                       ->setValue('hide_download', $qb->createNamedParameter($hideDownload, IQueryBuilder::PARAM_BOOL));
+                       ->setValue('hide_download', $qb->createNamedParameter((int)$hideDownload, IQueryBuilder::PARAM_INT));
 
                /*
                 * Added to fix https://github.com/owncloud/core/issues/22215
@@ -749,7 +749,7 @@ class ShareByMailProvider implements IShareProvider {
                        ->set('password_by_talk', $qb->createNamedParameter($share->getSendPasswordByTalk(), IQueryBuilder::PARAM_BOOL))
                        ->set('expiration', $qb->createNamedParameter($share->getExpirationDate(), IQueryBuilder::PARAM_DATE))
                        ->set('note', $qb->createNamedParameter($share->getNote()))
-                       ->set('hide_download', $qb->createNamedParameter($share->getHideDownload(), IQueryBuilder::PARAM_BOOL))
+                       ->set('hide_download', $qb->createNamedParameter((int)$share->getHideDownload(), IQueryBuilder::PARAM_INT))
                        ->execute();
 
                if ($originalShare->getNote() !== $share->getNote() && $share->getNote() !== '') {