diff options
author | Joas Schilling <coding@schilljs.com> | 2020-06-24 16:49:16 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2020-06-24 16:49:16 +0200 |
commit | 89ed2c37bf656ceb772bb6759c8977a7dc78b3fb (patch) | |
tree | 4a467f829fcc748531cad54e7c08e06dd98d1b7d /apps/files_sharing/lib/Migration | |
parent | 654cd18864c943d9ff93c2e6151bb6529fa44513 (diff) | |
download | nextcloud-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/Migration')
-rw-r--r-- | apps/files_sharing/lib/Migration/OwncloudGuestShareType.php | 6 | ||||
-rw-r--r-- | apps/files_sharing/lib/Migration/SetPasswordColumn.php | 6 |
2 files changed, 6 insertions, 6 deletions
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(); } |