summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/files_sharing/api/sharees.php17
-rw-r--r--apps/files_sharing/appinfo/routes.php2
-rw-r--r--apps/files_sharing/tests/api/sharees.php4
3 files changed, 11 insertions, 12 deletions
diff --git a/apps/files_sharing/api/sharees.php b/apps/files_sharing/api/sharees.php
index 573fd8f2ab1..4ae6784c3d9 100644
--- a/apps/files_sharing/api/sharees.php
+++ b/apps/files_sharing/api/sharees.php
@@ -23,7 +23,7 @@ namespace OCA\Files_Sharing\API;
use OCP\IGroup;
use OCP\IGroupManager;
use OCP\IUserManager;
-use OCP\IAppConfig;
+use OCP\IConfig;
use OCP\IUserSession;
use OCP\IURLGenerator;
@@ -38,8 +38,8 @@ class Sharees {
/** @var \OCP\Contacts\IManager */
private $contactsManager;
- /** @var IAppConfig */
- private $appConfig;
+ /** @var IConfig */
+ private $config;
/** @var IUserSession */
private $userSession;
@@ -51,19 +51,19 @@ class Sharees {
* @param IGroupManager $groupManager
* @param IUserManager $userManager
* @param \OCP\Contacts\IManager $contactsManager
- * @param IAppConfig $appConfig
+ * @param IConfig $config
* @param IUserSession $userSession
*/
public function __construct(IGroupManager $groupManager,
IUserManager $userManager,
\OCP\Contacts\IManager $contactsManager,
- IAppConfig $appConfig,
+ IConfig $config,
IUserSession $userSession,
IURLGenerator $urlGenerator) {
$this->groupManager = $groupManager;
$this->userManager = $userManager;
$this->contactsManager = $contactsManager;
- $this->appConfig = $appConfig;
+ $this->config = $config;
$this->userSession = $userSession;
$this->urlGenerator = $urlGenerator;
}
@@ -178,10 +178,9 @@ class Sharees {
}
/**
- * @param array $params
* @return \OC_OCS_Result
*/
- public function search($params) {
+ public function search() {
$search = isset($_GET['search']) ? (string)$_GET['search'] : '';
$itemType = isset($_GET['itemType']) ? (string)$_GET['itemType'] : null;
$existingShares = isset($_GET['existingShares']) ? (array)$_GET['existingShares'] : [];
@@ -189,7 +188,7 @@ class Sharees {
$page = !empty($_GET['page']) ? intval($_GET['page']) : 1;
$perPage = !empty($_GET['limit']) ? intval($_GET['limit']) : 200;
- $shareWithGroupOnly = $this->appConfig->getValue('core', 'shareapi_only_share_with_group_members', 'no') === 'yes';
+ $shareWithGroupOnly = $this->config->getAppValue('core', 'shareapi_only_share_with_group_members', 'no') === 'yes';
return $this->searchSharees($search, $itemType, $existingShares, $shareType, $page, $perPage, $shareWithGroupOnly);
}
diff --git a/apps/files_sharing/appinfo/routes.php b/apps/files_sharing/appinfo/routes.php
index 498b0eb55e9..45ea85ff724 100644
--- a/apps/files_sharing/appinfo/routes.php
+++ b/apps/files_sharing/appinfo/routes.php
@@ -105,7 +105,7 @@ API::register('delete',
$sharees = new \OCA\Files_Sharing\API\Sharees(\OC::$server->getGroupManager(),
\OC::$server->getUserManager(),
\OC::$server->getContactsManager(),
- \OC::$server->getAppConfig(),
+ \OC::$server->getConfig(),
\OC::$server->getUserSession(),
\OC::$server->getURLGenerator());
diff --git a/apps/files_sharing/tests/api/sharees.php b/apps/files_sharing/tests/api/sharees.php
index 93a8d5c3d7e..863dc193ae0 100644
--- a/apps/files_sharing/tests/api/sharees.php
+++ b/apps/files_sharing/tests/api/sharees.php
@@ -63,7 +63,7 @@ class ShareesTest extends TestCase {
$this->groupManager,
$this->userManager,
$this->contactsManager,
- $this->getMockBuilder('OCP\IAppConfig')->disableOriginalConstructor()->getMock(),
+ $this->getMockBuilder('OCP\IConfig')->disableOriginalConstructor()->getMock(),
$this->session,
$this->getMockBuilder('OCP\IURLGenerator')->disableOriginalConstructor()->getMock()
);
@@ -434,7 +434,7 @@ class ShareesTest extends TestCase {
$this->groupManager,
$this->userManager,
$this->contactsManager,
- $this->getMockBuilder('OCP\IAppConfig')->disableOriginalConstructor()->getMock(),
+ $this->getMockBuilder('OCP\IConfig')->disableOriginalConstructor()->getMock(),
$this->session,
$this->getMockBuilder('OCP\IURLGenerator')->disableOriginalConstructor()->getMock()
])