From 89ed2c37bf656ceb772bb6759c8977a7dc78b3fb Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 24 Jun 2020 16:49:16 +0200 Subject: Update share type constant usage Signed-off-by: Joas Schilling --- apps/files_sharing/lib/ExpireSharesJob.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'apps/files_sharing/lib/ExpireSharesJob.php') 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(); } -- cgit v1.2.3