summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib/ExpireSharesJob.php
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2020-06-24 16:49:16 +0200
committerJoas Schilling <coding@schilljs.com>2020-06-24 16:49:16 +0200
commit89ed2c37bf656ceb772bb6759c8977a7dc78b3fb (patch)
tree4a467f829fcc748531cad54e7c08e06dd98d1b7d /apps/files_sharing/lib/ExpireSharesJob.php
parent654cd18864c943d9ff93c2e6151bb6529fa44513 (diff)
downloadnextcloud-server-89ed2c37bf656ceb772bb6759c8977a7dc78b3fb.tar.gz
nextcloud-server-89ed2c37bf656ceb772bb6759c8977a7dc78b3fb.zip
Update share type constant usage
Signed-off-by: Joas Schilling <coding@schilljs.com>
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();
}