summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib/ExpireSharesJob.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_sharing/lib/ExpireSharesJob.php')
-rw-r--r--apps/files_sharing/lib/ExpireSharesJob.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/files_sharing/lib/ExpireSharesJob.php b/apps/files_sharing/lib/ExpireSharesJob.php
index 4ca3b80e343..c2916d260b3 100644
--- a/apps/files_sharing/lib/ExpireSharesJob.php
+++ b/apps/files_sharing/lib/ExpireSharesJob.php
@@ -25,6 +25,7 @@
namespace OCA\Files_Sharing;
use OC\BackgroundJob\TimedJob;
+use OCP\Share\IShare;
/**
* Delete all shares that are expired
@@ -59,7 +60,7 @@ class ExpireSharesJob extends TimedJob {
->from('share')
->where(
$qb->expr()->andX(
- $qb->expr()->eq('share_type', $qb->expr()->literal(\OCP\Share::SHARE_TYPE_LINK)),
+ $qb->expr()->eq('share_type', $qb->expr()->literal(IShare::TYPE_LINK)),
$qb->expr()->lte('expiration', $qb->expr()->literal($now)),
$qb->expr()->orX(
$qb->expr()->eq('item_type', $qb->expr()->literal('file')),
@@ -70,7 +71,7 @@ class ExpireSharesJob extends TimedJob {
$shares = $qb->execute();
while ($share = $shares->fetch()) {
- \OC\Share\Share::unshare($share['item_type'], $share['file_source'], \OCP\Share::SHARE_TYPE_LINK, null, $share['uid_owner']);
+ \OC\Share\Share::unshare($share['item_type'], $share['file_source'], IShare::TYPE_LINK, null, $share['uid_owner']);
}
$shares->closeCursor();
}