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 /lib/private/Share/Helper.php | |
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 'lib/private/Share/Helper.php')
-rw-r--r-- | lib/private/Share/Helper.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/private/Share/Helper.php b/lib/private/Share/Helper.php index ec5136040e8..90dc3e957e9 100644 --- a/lib/private/Share/Helper.php +++ b/lib/private/Share/Helper.php @@ -31,6 +31,7 @@ namespace OC\Share; use OC\HintException; +use OCP\Share\IShare; class Helper extends \OC\Share\Constants { @@ -49,13 +50,13 @@ class Helper extends \OC\Share\Constants { public static function generateTarget($itemType, $itemSource, $shareType, $shareWith, $uidOwner, $suggestedTarget = null, $groupParent = null) { // FIXME: $uidOwner and $groupParent seems to be unused $backend = \OC\Share\Share::getBackend($itemType); - if ($shareType === self::SHARE_TYPE_LINK || $shareType === self::SHARE_TYPE_REMOTE) { + if ($shareType === IShare::TYPE_LINK || $shareType === IShare::TYPE_REMOTE) { if (isset($suggestedTarget)) { return $suggestedTarget; } return $backend->generateTarget($itemSource, false); } else { - if ($shareType == self::SHARE_TYPE_USER) { + if ($shareType == IShare::TYPE_USER) { // Share with is a user, so set share type to user and groups $shareType = self::$shareTypeUserAndGroups; } @@ -64,7 +65,7 @@ class Helper extends \OC\Share\Constants { if (!isset($suggestedTarget)) { $suggestedTarget = $itemSource; } - if ($shareType == self::SHARE_TYPE_GROUP) { + if ($shareType == IShare::TYPE_GROUP) { $target = $backend->generateTarget($suggestedTarget, false); } else { $target = $backend->generateTarget($suggestedTarget, $shareWith); |