diff options
author | provokateurin <kate@provokateurin.de> | 2025-07-15 11:38:42 +0200 |
---|---|---|
committer | provokateurin <kate@provokateurin.de> | 2025-07-15 12:58:30 +0200 |
commit | 40b5f5235e1c50422b4db8992464c61c67c654f2 (patch) | |
tree | 89b68c7c306d053ca7592b95ab9cb7da44e81776 | |
parent | af5acc35cd41e3384240489b96eb8d263498a1f2 (diff) | |
download | nextcloud-server-chore/share-constants.tar.gz nextcloud-server-chore/share-constants.zip |
chore(OC\Share\Constants): Remove unused SHARE_TYPE_* constantschore/share-constants
Signed-off-by: provokateurin <kate@provokateurin.de>
-rw-r--r-- | lib/private/Collaboration/Collaborators/Search.php | 4 | ||||
-rw-r--r-- | lib/private/Share/Constants.php | 49 | ||||
-rw-r--r-- | lib/private/Share20/DefaultShareProvider.php | 3 |
3 files changed, 2 insertions, 54 deletions
diff --git a/lib/private/Collaboration/Collaborators/Search.php b/lib/private/Collaboration/Collaborators/Search.php index 32c70549a7b..ea39f885fc6 100644 --- a/lib/private/Collaboration/Collaborators/Search.php +++ b/lib/private/Collaboration/Collaborators/Search.php @@ -11,7 +11,7 @@ use OCP\Collaboration\Collaborators\ISearchPlugin; use OCP\Collaboration\Collaborators\ISearchResult; use OCP\Collaboration\Collaborators\SearchResultType; use OCP\IContainer; -use OCP\Share; +use OCP\Share\IShare; class Search implements ISearch { protected array $pluginList = []; @@ -81,7 +81,7 @@ class Search implements ISearch { } public function registerPlugin(array $pluginInfo): void { - $shareType = constant(Share::class . '::' . $pluginInfo['shareType']); + $shareType = constant(IShare::class . '::' . substr($pluginInfo['shareType'], strlen('SHARE_'))); if ($shareType === null) { throw new \InvalidArgumentException('Provided ShareType is invalid'); } diff --git a/lib/private/Share/Constants.php b/lib/private/Share/Constants.php index baff04fbc4a..c55caee6f0a 100644 --- a/lib/private/Share/Constants.php +++ b/lib/private/Share/Constants.php @@ -7,56 +7,7 @@ */ namespace OC\Share; -use OCP\Share\IShare; - class Constants { - /** - * @deprecated 17.0.0 - use IShare::TYPE_USER instead - */ - public const SHARE_TYPE_USER = 0; - /** - * @deprecated 17.0.0 - use IShare::TYPE_GROUP instead - */ - public const SHARE_TYPE_GROUP = 1; - // const SHARE_TYPE_USERGROUP = 2; // Internal type used by DefaultShareProvider - /** - * @deprecated 17.0.0 - use IShare::TYPE_LINK instead - */ - public const SHARE_TYPE_LINK = 3; - /** - * @deprecated 17.0.0 - use IShare::TYPE_EMAIL instead - */ - public const SHARE_TYPE_EMAIL = 4; - public const SHARE_TYPE_CONTACT = 5; // ToDo Check if it is still in use otherwise remove it - /** - * @deprecated 17.0.0 - use IShare::TYPE_REMOTE instead - */ - public const SHARE_TYPE_REMOTE = 6; - /** - * @deprecated 17.0.0 - use IShare::TYPE_CIRCLE instead - */ - public const SHARE_TYPE_CIRCLE = 7; - /** - * @deprecated 17.0.0 - use IShare::TYPE_GUEST instead - */ - public const SHARE_TYPE_GUEST = 8; - /** - * @deprecated 17.0.0 - use IShare::REMOTE_GROUP instead - */ - public const SHARE_TYPE_REMOTE_GROUP = 9; - /** - * @deprecated 17.0.0 - use IShare::TYPE_ROOM instead - */ - public const SHARE_TYPE_ROOM = 10; - // const SHARE_TYPE_USERROOM = 11; // Internal type used by RoomShareProvider - /** - * @deprecated 21.0.0 - use IShare::TYPE_DECK instead - */ - public const SHARE_TYPE_DECK = 12; - // const SHARE_TYPE_DECK_USER = 13; // Internal type used by DeckShareProvider - - // Note to developers: Do not add new share types here - public const FORMAT_NONE = -1; public const FORMAT_STATUSES = -2; public const FORMAT_SOURCES = -3; // ToDo Check if it is still in use otherwise remove it diff --git a/lib/private/Share20/DefaultShareProvider.php b/lib/private/Share20/DefaultShareProvider.php index e1eebe1e450..e9c4c85bc89 100644 --- a/lib/private/Share20/DefaultShareProvider.php +++ b/lib/private/Share20/DefaultShareProvider.php @@ -43,9 +43,6 @@ use function str_starts_with; * @package OC\Share20 */ class DefaultShareProvider implements IShareProviderWithNotification, IShareProviderSupportsAccept, IShareProviderSupportsAllSharesInFolder { - // Special share type for user modified group shares - public const SHARE_TYPE_USERGROUP = 2; - public function __construct( private IDBConnection $dbConn, private IUserManager $userManager, |