aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-08-15 10:20:40 +0200
committerMorris Jobke <hey@morrisjobke.de>2017-08-15 11:28:05 +0200
commit3e13e9425417bcab4a61067bb1cd862cfa7e6a3f (patch)
tree0af2f30f699c4c97be7edd679b669d9277c39d22
parentc5c23b30b9f510ce211d9fa3187dc3c8cff4116e (diff)
downloadnextcloud-server-3e13e9425417bcab4a61067bb1cd862cfa7e6a3f.tar.gz
nextcloud-server-3e13e9425417bcab4a61067bb1cd862cfa7e6a3f.zip
Use proper methods for checkPasswordProtectedShare
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
-rw-r--r--lib/private/Share/Share.php2
-rw-r--r--lib/public/Share.php11
-rw-r--r--tests/lib/Share/ShareTest.php2
3 files changed, 2 insertions, 13 deletions
diff --git a/lib/private/Share/Share.php b/lib/private/Share/Share.php
index 52b382e6678..57e5742077b 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 bc07ce4b78c..0937fc6ae9f 100644
--- a/lib/public/Share.php
+++ b/lib/public/Share.php
@@ -235,15 +235,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/Share/ShareTest.php b/tests/lib/Share/ShareTest.php
index 0442e06fc45..cf4c553c536 100644
--- a/tests/lib/Share/ShareTest.php
+++ b/tests/lib/Share/ShareTest.php
@@ -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);
}