Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/private/Collaboration/Collaborators/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
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 = [];
Expand Down Expand Up @@ -81,7 +81,7 @@ public function search($search, array $shareTypes, $lookup, $limit, $offset): ar
}

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');
}
Expand Down
49 changes: 0 additions & 49 deletions lib/private/Share/Constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions lib/private/Share20/DefaultShareProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@
* @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,
Expand Down
Loading