aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Share20/DefaultShareProvider.php
diff options
context:
space:
mode:
authorStefan Cherniakov <luka-sama@pm.me>2024-08-27 09:29:21 +0200
committerJohn Molakvoæ <skjnldsv@users.noreply.github.com>2024-09-03 13:37:17 +0200
commitd633b9bce641846c3925613c04c6e6489c008248 (patch)
tree80d02b6d257ee83919badebef5d1342c053c7f17 /lib/private/Share20/DefaultShareProvider.php
parent5e4a166365a601bf0133a97fda968a85744dfef5 (diff)
downloadnextcloud-server-d633b9bce641846c3925613c04c6e6489c008248.tar.gz
nextcloud-server-d633b9bce641846c3925613c04c6e6489c008248.zip
fix(files_sharing): Make share reminders more stable & fix issues
Signed-off-by: Stefan Cherniakov <luka-sama@pm.me>
Diffstat (limited to 'lib/private/Share20/DefaultShareProvider.php')
-rw-r--r--lib/private/Share20/DefaultShareProvider.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/private/Share20/DefaultShareProvider.php b/lib/private/Share20/DefaultShareProvider.php
index 9268d575c85..a5f5ca715ce 100644
--- a/lib/private/Share20/DefaultShareProvider.php
+++ b/lib/private/Share20/DefaultShareProvider.php
@@ -97,6 +97,8 @@ class DefaultShareProvider implements IShareProviderWithNotification, IShareProv
if ($expirationDate !== null) {
$qb->setValue('expiration', $qb->createNamedParameter($expirationDate, 'datetime'));
}
+
+ $qb->setValue('reminder_sent', $qb->createNamedParameter($share->getReminderSent() ? 1 : 0, IQueryBuilder::PARAM_INT));
} elseif ($share->getShareType() === IShare::TYPE_GROUP) {
//Set the GID of the group we share with
$qb->setValue('share_with', $qb->createNamedParameter($share->getSharedWith()));
@@ -223,6 +225,7 @@ class DefaultShareProvider implements IShareProviderWithNotification, IShareProv
->set('expiration', $qb->createNamedParameter($expirationDate, IQueryBuilder::PARAM_DATE))
->set('note', $qb->createNamedParameter($share->getNote()))
->set('accepted', $qb->createNamedParameter($share->getStatus()))
+ ->set('reminder_sent', $qb->createNamedParameter($share->getReminderSent()))
->execute();
} elseif ($share->getShareType() === IShare::TYPE_GROUP) {
$qb = $this->dbConn->getQueryBuilder();
@@ -1006,7 +1009,7 @@ class DefaultShareProvider implements IShareProviderWithNotification, IShareProv
}
/**
- * Create a share object from an database row
+ * Create a share object from a database row
*
* @param mixed[] $data
* @return \OCP\Share\IShare
@@ -1068,6 +1071,7 @@ class DefaultShareProvider implements IShareProviderWithNotification, IShareProv
$share->setProviderId($this->identifier());
$share->setHideDownload((int)$data['hide_download'] === 1);
+ $share->setReminderSent((int)$data['reminder_sent'] === 1);
return $share;
}