From 248d95339d67f05cc0d05d9963750edc2af65f66 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Thu, 1 Nov 2018 23:18:44 +0100 Subject: Cleanup some unused sharing methods from the old sharing code Signed-off-by: Morris Jobke --- lib/private/Settings/Admin/Sharing.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'lib/private/Settings/Admin/Sharing.php') diff --git a/lib/private/Settings/Admin/Sharing.php b/lib/private/Settings/Admin/Sharing.php index dfc0b11478b..ee6a64c85bf 100644 --- a/lib/private/Settings/Admin/Sharing.php +++ b/lib/private/Settings/Admin/Sharing.php @@ -32,6 +32,7 @@ use OCP\Constants; use OCP\IConfig; use OCP\IL10N; use OCP\Settings\ISettings; +use OCP\Share\IManager; use OCP\Util; class Sharing implements ISettings { @@ -41,12 +42,16 @@ class Sharing implements ISettings { /** @var IL10N */ private $l; + /** @var IManager */ + private $shareManager; + /** * @param IConfig $config */ - public function __construct(IConfig $config, IL10N $l) { + public function __construct(IConfig $config, IL10N $l, IManager $shareManager) { $this->config = $config; $this->l = $l; + $this->shareManager = $shareManager; } /** @@ -65,7 +70,7 @@ class Sharing implements ISettings { 'allowResharing' => $this->config->getAppValue('core', 'shareapi_allow_resharing', 'yes'), 'allowShareDialogUserEnumeration' => $this->config->getAppValue('core', 'shareapi_allow_share_dialog_user_enumeration', 'yes'), 'enforceLinkPassword' => Util::isPublicLinkPasswordRequired(), - 'onlyShareWithGroupMembers' => Share::shareWithGroupMembersOnly(), + 'onlyShareWithGroupMembers' => $this->shareManager->shareWithGroupMembersOnly(), 'shareAPIEnabled' => $this->config->getAppValue('core', 'shareapi_enabled', 'yes'), 'shareDefaultExpireDateSet' => $this->config->getAppValue('core', 'shareapi_default_expire_date', 'no'), 'shareExpireAfterNDays' => $this->config->getAppValue('core', 'shareapi_expire_after_n_days', '7'), -- cgit v1.2.3