summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib/Migration
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/Migration
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/Migration')
-rw-r--r--apps/files_sharing/lib/Migration/OwncloudGuestShareType.php6
-rw-r--r--apps/files_sharing/lib/Migration/SetPasswordColumn.php6
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();
}