diff options
author | Morris Jobke <hey@morrisjobke.de> | 2020-11-29 22:37:28 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2020-11-29 22:52:52 +0100 |
commit | 10e5ae5e1813c7c9dc844008a0df8b47232dc616 (patch) | |
tree | 9c9e782b28f6c75fbe3dca4a7602b26ad6f37e6a /lib/private/Share | |
parent | a125d8aaa160c2920c550dd40ce99b278bf90627 (diff) | |
download | nextcloud-server-10e5ae5e1813c7c9dc844008a0df8b47232dc616.tar.gz nextcloud-server-10e5ae5e1813c7c9dc844008a0df8b47232dc616.zip |
Remove unused method Share Helper::generateTarget
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'lib/private/Share')
-rw-r--r-- | lib/private/Share/Helper.php | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/lib/private/Share/Helper.php b/lib/private/Share/Helper.php index a992330b577..06f9baa4f57 100644 --- a/lib/private/Share/Helper.php +++ b/lib/private/Share/Helper.php @@ -32,51 +32,10 @@ namespace OC\Share; use OC\HintException; use OCP\DB\QueryBuilder\IQueryBuilder; -use OCP\Share\IShare; class Helper extends \OC\Share\Constants { /** - * Generate a unique target for the item - * @param string $itemType - * @param string $itemSource - * @param int $shareType SHARE_TYPE_USER, SHARE_TYPE_GROUP, or SHARE_TYPE_LINK - * @param string $shareWith User or group the item is being shared with - * @param string $uidOwner User that is the owner of shared item - * @param string $suggestedTarget The suggested target originating from a reshare (optional) - * @param int $groupParent The id of the parent group share (optional) - * @throws \Exception - * @return string Item target - */ - 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 === IShare::TYPE_LINK || $shareType === IShare::TYPE_REMOTE) { - if (isset($suggestedTarget)) { - return $suggestedTarget; - } - return $backend->generateTarget($itemSource, false); - } else { - if ($shareType == IShare::TYPE_USER) { - // Share with is a user, so set share type to user and groups - $shareType = self::$shareTypeUserAndGroups; - } - - // Check if suggested target exists first - if (!isset($suggestedTarget)) { - $suggestedTarget = $itemSource; - } - if ($shareType == IShare::TYPE_GROUP) { - $target = $backend->generateTarget($suggestedTarget, false); - } else { - $target = $backend->generateTarget($suggestedTarget, $shareWith); - } - - return $target; - } - } - - /** * Delete all reshares and group share children of an item * @param int $parent Id of item to delete * @param bool $excludeParent If true, exclude the parent from the delete (optional) |