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/Migration/OwncloudGuestShareType.php | 6 +++--- apps/files_sharing/lib/Migration/SetPasswordColumn.php | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'apps/files_sharing/lib/Migration') diff --git a/apps/files_sharing/lib/Migration/OwncloudGuestShareType.php b/apps/files_sharing/lib/Migration/OwncloudGuestShareType.php index 237c6aca243..a4eaa5b3989 100644 --- a/apps/files_sharing/lib/Migration/OwncloudGuestShareType.php +++ b/apps/files_sharing/lib/Migration/OwncloudGuestShareType.php @@ -28,7 +28,7 @@ use OCP\IConfig; use OCP\IDBConnection; use OCP\Migration\IOutput; use OCP\Migration\IRepairStep; -use OCP\Share; +use OCP\Share\IShare; /** * Class OwncloudGuestShareType @@ -69,8 +69,8 @@ class OwncloudGuestShareType implements IRepairStep { $query = $this->connection->getQueryBuilder(); $query->update('share') - ->set('share_type', $query->createNamedParameter(Share::SHARE_TYPE_GUEST)) - ->where($query->expr()->eq('share_type', $query->createNamedParameter(Share::SHARE_TYPE_EMAIL))); + ->set('share_type', $query->createNamedParameter(IShare::TYPE_GUEST)) + ->where($query->expr()->eq('share_type', $query->createNamedParameter(IShare::TYPE_EMAIL))); $query->execute(); } diff --git a/apps/files_sharing/lib/Migration/SetPasswordColumn.php b/apps/files_sharing/lib/Migration/SetPasswordColumn.php index 5580bd46a5b..859c49f2991 100644 --- a/apps/files_sharing/lib/Migration/SetPasswordColumn.php +++ b/apps/files_sharing/lib/Migration/SetPasswordColumn.php @@ -27,7 +27,7 @@ use OCP\IConfig; use OCP\IDBConnection; use OCP\Migration\IOutput; use OCP\Migration\IRepairStep; -use OCP\Share; +use OCP\Share\IShare; /** * Class SetPasswordColumn @@ -70,7 +70,7 @@ class SetPasswordColumn implements IRepairStep { $query ->update('share') ->set('password', 'share_with') - ->where($query->expr()->eq('share_type', $query->createNamedParameter(Share::SHARE_TYPE_LINK))) + ->where($query->expr()->eq('share_type', $query->createNamedParameter(IShare::TYPE_LINK))) ->andWhere($query->expr()->isNotNull('share_with')); $result = $query->execute(); @@ -83,7 +83,7 @@ class SetPasswordColumn implements IRepairStep { $clearQuery ->update('share') ->set('share_with', $clearQuery->createNamedParameter(null)) - ->where($clearQuery->expr()->eq('share_type', $clearQuery->createNamedParameter(Share::SHARE_TYPE_LINK))); + ->where($clearQuery->expr()->eq('share_type', $clearQuery->createNamedParameter(IShare::TYPE_LINK))); $clearQuery->execute(); } -- cgit v1.2.3