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/private/Share/Share.php2
-rw-r--r--lib/public/Share.php24
-rw-r--r--tests/lib/Files/EtagTest.php4
-rw-r--r--tests/lib/Share/ShareTest.php4
-rw-r--r--tests/lib/TagsTest.php2
8 files changed, 10 insertions, 34 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 0a8d7491a95..e417fdb74aa 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(
\OC\Share\Share::shareItem('test', 'test.txt', \OCP\Share::SHARE_TYPE_USER, $this->user2, \OCP\Constants::PERMISSION_READ),
diff --git a/lib/private/Share/Share.php b/lib/private/Share/Share.php
index 8abb52a7cfb..7f2abb8b6a2 100644
--- a/lib/private/Share/Share.php
+++ b/lib/private/Share/Share.php
@@ -283,7 +283,7 @@ class Share extends Constants {
}
// password protected shares need to be authenticated
- if ($checkPasswordProtection && !\OCP\Share::checkPasswordProtectedShare($row)) {
+ if ($checkPasswordProtection && !\OC\Share\Share::checkPasswordProtectedShare($row)) {
return false;
}
diff --git a/lib/public/Share.php b/lib/public/Share.php
index c03a200ab21..8007068abc9 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
@@ -216,15 +203,4 @@ class Share extends \OC\Share\Constants {
public static function getBackend($itemType) {
return \OC\Share\Share::getBackend($itemType);
}
-
- /**
- * In case a password protected link is not yet authenticated this function will return false
- *
- * @param array $linkItem
- * @return bool
- * @since 7.0.0
- */
- public static function checkPasswordProtectedShare(array $linkItem) {
- return \OC\Share\Share::checkPasswordProtectedShare($linkItem);
- }
}
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 1dcb6f7fe2c..4f929446da0 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');
@@ -501,7 +501,7 @@ class ShareTest extends \Test\TestCase {
*/
public function testCheckPasswordProtectedShare($expected, $item) {
\OC::$server->getSession()->set('public_link_authenticated', '100');
- $result = \OCP\Share::checkPasswordProtectedShare($item);
+ $result = \OC\Share\Share::checkPasswordProtectedShare($item);
$this->assertEquals($expected, $result);
}
diff --git a/tests/lib/TagsTest.php b/tests/lib/TagsTest.php
index a4b0e776959..e4f3b5206cf 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);