aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php2
-rw-r--r--apps/files_sharing/appinfo/app.php4
-rw-r--r--apps/files_sharing/tests/DeleteOrphanedSharesJobTest.php2
-rw-r--r--lib/public/Share.php13
-rw-r--r--tests/lib/Files/EtagTest.php4
-rw-r--r--tests/lib/Share/ShareTest.php2
-rw-r--r--tests/lib/TagsTest.php2
7 files changed, 8 insertions, 21 deletions
diff --git a/apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php b/apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php
index aa3411ecb16..d57b2cb207f 100644
--- a/apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php
+++ b/apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php
@@ -81,7 +81,7 @@ class RequestHandlerControllerTest extends TestCase {
parent::setUp();
self::loginHelper(self::TEST_FILES_SHARING_API_USER1);
- \OCP\Share::registerBackend('test', 'Test\Share\Backend');
+ \OC\Share\Share::registerBackend('test', 'Test\Share\Backend');
$config = $this->getMockBuilder('\OCP\IConfig')
->disableOriginalConstructor()->getMock();
diff --git a/apps/files_sharing/appinfo/app.php b/apps/files_sharing/appinfo/app.php
index 9a06f40abf5..30a33aa911d 100644
--- a/apps/files_sharing/appinfo/app.php
+++ b/apps/files_sharing/appinfo/app.php
@@ -28,8 +28,8 @@
\OCA\Files_Sharing\Helper::registerHooks();
-\OCP\Share::registerBackend('file', 'OCA\Files_Sharing\ShareBackend\File');
-\OCP\Share::registerBackend('folder', 'OCA\Files_Sharing\ShareBackend\Folder', 'file');
+\OC\Share\Share::registerBackend('file', 'OCA\Files_Sharing\ShareBackend\File');
+\OC\Share\Share::registerBackend('folder', 'OCA\Files_Sharing\ShareBackend\Folder', 'file');
$application = new \OCA\Files_Sharing\AppInfo\Application();
$application->registerMountProviders();
diff --git a/apps/files_sharing/tests/DeleteOrphanedSharesJobTest.php b/apps/files_sharing/tests/DeleteOrphanedSharesJobTest.php
index 6f7bef24b85..2acd8638775 100644
--- a/apps/files_sharing/tests/DeleteOrphanedSharesJobTest.php
+++ b/apps/files_sharing/tests/DeleteOrphanedSharesJobTest.php
@@ -156,7 +156,7 @@ class DeleteOrphanedSharesJobTest extends \Test\TestCase {
public function testKeepNonFileShares() {
$this->loginAsUser($this->user1);
- \OCP\Share::registerBackend('test', 'Test\Share\Backend');
+ \OC\Share\Share::registerBackend('test', 'Test\Share\Backend');
$this->assertTrue(
\OCP\Share::shareItem('test', 'test.txt', \OCP\Share::SHARE_TYPE_USER, $this->user2, \OCP\Constants::PERMISSION_READ),
diff --git a/lib/public/Share.php b/lib/public/Share.php
index 0937fc6ae9f..78f2bcf586d 100644
--- a/lib/public/Share.php
+++ b/lib/public/Share.php
@@ -53,19 +53,6 @@ namespace OCP;
class Share extends \OC\Share\Constants {
/**
- * Register a sharing backend class that implements OCP\Share_Backend for an item type
- * @param string $itemType Item type
- * @param string $class Backend class
- * @param string $collectionOf (optional) Depends on item type
- * @param array $supportedFileExtensions (optional) List of supported file extensions if this item type depends on files
- * @return boolean true if backend is registered or false if error
- * @since 5.0.0
- */
- public static function registerBackend($itemType, $class, $collectionOf = null, $supportedFileExtensions = null) {
- return \OC\Share\Share::registerBackend($itemType, $class, $collectionOf, $supportedFileExtensions);
- }
-
- /**
* Get the items of item type shared with the current user
* @param string $itemType
* @param int $format (optional) Format type must be defined by the backend
diff --git a/tests/lib/Files/EtagTest.php b/tests/lib/Files/EtagTest.php
index 67ddd6ca514..ef7bf7cfbb7 100644
--- a/tests/lib/Files/EtagTest.php
+++ b/tests/lib/Files/EtagTest.php
@@ -34,8 +34,8 @@ class EtagTest extends \Test\TestCase {
\OC_Hook::clear('OC_Filesystem', 'setup');
$application = new \OCA\Files_Sharing\AppInfo\Application();
$application->registerMountProviders();
- \OCP\Share::registerBackend('file', 'OCA\Files_Sharing\ShareBackend\File');
- \OCP\Share::registerBackend('folder', 'OCA\Files_Sharing\ShareBackend\Folder', 'file');
+ \OC\Share\Share::registerBackend('file', 'OCA\Files_Sharing\ShareBackend\File');
+ \OC\Share\Share::registerBackend('folder', 'OCA\Files_Sharing\ShareBackend\Folder', 'file');
$config = \OC::$server->getConfig();
$this->datadir = $config->getSystemValue('datadirectory');
diff --git a/tests/lib/Share/ShareTest.php b/tests/lib/Share/ShareTest.php
index cf4c553c536..cfc6eea7a46 100644
--- a/tests/lib/Share/ShareTest.php
+++ b/tests/lib/Share/ShareTest.php
@@ -100,7 +100,7 @@ class ShareTest extends \Test\TestCase {
$this->groupAndUser_group->addUser($this->user2);
$this->groupAndUser_group->addUser($this->user3);
- \OCP\Share::registerBackend('test', 'Test\Share\Backend');
+ \OC\Share\Share::registerBackend('test', 'Test\Share\Backend');
\OC_Hook::clear('OCP\\Share');
\OC::registerShareHooks();
$this->resharing = \OC::$server->getAppConfig()->getValue('core', 'shareapi_allow_resharing', 'yes');
diff --git a/tests/lib/TagsTest.php b/tests/lib/TagsTest.php
index add28a19061..0e74a08af06 100644
--- a/tests/lib/TagsTest.php
+++ b/tests/lib/TagsTest.php
@@ -287,7 +287,7 @@ class TagsTest extends \Test\TestCase {
public function testShareTags() {
$testTag = 'TestTag';
- \OCP\Share::registerBackend('test', 'Test\Share\Backend');
+ \OC\Share\Share::registerBackend('test', 'Test\Share\Backend');
$tagger = $this->tagMgr->load('test');
$tagger->tagAs(1, $testTag);