@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | * make preview_icon available as a simple function |
184 | 184 | * Returns the path to the preview of the image. |
185 | 185 | * @param string $path path of file |
186 | - * @return link to the preview |
|
186 | + * @return string to the preview |
|
187 | 187 | */ |
188 | 188 | function preview_icon( $path ) { |
189 | 189 | return \OC::$server->getURLGenerator()->linkToRoute('core.Preview.getPreview', ['x' => 32, 'y' => 32, 'file' => $path]); |
@@ -191,6 +191,7 @@ discard block |
||
191 | 191 | |
192 | 192 | /** |
193 | 193 | * @param string $path |
194 | + * @param string $token |
|
194 | 195 | */ |
195 | 196 | function publicPreview_icon ( $path, $token ) { |
196 | 197 | return \OC::$server->getURLGenerator()->linkToRoute('files_sharing.PublicPreview.getPreview', ['x' => 32, 'y' => 32, 'file' => $path, 't' => $token]); |
@@ -65,7 +65,7 @@ |
||
65 | 65 | * Set a value in the cache if it's not already stored |
66 | 66 | * |
67 | 67 | * @param string $key |
68 | - * @param mixed $value |
|
68 | + * @param integer $value |
|
69 | 69 | * @param int $ttl Time To Live in seconds. Defaults to 60*60*24 |
70 | 70 | * @return bool |
71 | 71 | */ |
@@ -65,7 +65,7 @@ |
||
65 | 65 | * Set a value in the cache if it's not already stored |
66 | 66 | * |
67 | 67 | * @param string $key |
68 | - * @param mixed $value |
|
68 | + * @param integer $value |
|
69 | 69 | * @param int $ttl Time To Live in seconds. Defaults to 60*60*24 |
70 | 70 | * @return bool |
71 | 71 | */ |
@@ -311,7 +311,7 @@ discard block |
||
311 | 311 | * @param OC\Security\Bruteforce\Throttler $throttler |
312 | 312 | * @throws LoginException |
313 | 313 | * @throws PasswordLoginForbiddenException |
314 | - * @return boolean |
|
314 | + * @return boolean|null |
|
315 | 315 | */ |
316 | 316 | public function logClientIn($user, |
317 | 317 | $password, |
@@ -361,6 +361,9 @@ discard block |
||
361 | 361 | return $this->config->getSystemValue('token_auth_enforced', false); |
362 | 362 | } |
363 | 363 | |
364 | + /** |
|
365 | + * @param string $username |
|
366 | + */ |
|
364 | 367 | protected function isTwoFactorEnforced($username) { |
365 | 368 | Util::emitHook( |
366 | 369 | '\OCA\Files_Sharing\API\Server2Server', |
@@ -47,6 +47,9 @@ |
||
47 | 47 | $this->allowUnauthenticatedAccess = false; |
48 | 48 | } |
49 | 49 | |
50 | + /** |
|
51 | + * @param string $privileges |
|
52 | + */ |
|
50 | 53 | function checkPrivileges($uri, $privileges, $recursion = self::R_PARENT, $throwExceptions = true) { |
51 | 54 | $access = parent::checkPrivileges($uri, $privileges, $recursion, false); |
52 | 55 | if($access === false && $throwExceptions) { |
@@ -25,14 +25,11 @@ |
||
25 | 25 | |
26 | 26 | use Sabre\CalDAV\Principal\User; |
27 | 27 | use Sabre\DAV\Exception\NotFound; |
28 | -use Sabre\DAV\IFile; |
|
29 | 28 | use Sabre\DAV\INode; |
30 | 29 | use \Sabre\DAV\PropFind; |
31 | 30 | use \Sabre\DAV\PropPatch; |
32 | -use Sabre\DAVACL\Exception\NeedPrivileges; |
|
33 | 31 | use \Sabre\HTTP\RequestInterface; |
34 | 32 | use \Sabre\HTTP\ResponseInterface; |
35 | -use Sabre\HTTP\URLUtil; |
|
36 | 33 | |
37 | 34 | /** |
38 | 35 | * Class DavAclPlugin is a wrapper around \Sabre\DAVACL\Plugin that returns 404 |
@@ -100,6 +100,7 @@ discard block |
||
100 | 100 | * @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE |
101 | 101 | * @param \OCP\Lock\ILockingProvider $provider |
102 | 102 | * @throws \OCP\Lock\LockedException |
103 | + * @return void |
|
103 | 104 | */ |
104 | 105 | public function acquireLock($path, $type, ILockingProvider $provider); |
105 | 106 | |
@@ -108,6 +109,7 @@ discard block |
||
108 | 109 | * @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE |
109 | 110 | * @param \OCP\Lock\ILockingProvider $provider |
110 | 111 | * @throws \OCP\Lock\LockedException |
112 | + * @return void |
|
111 | 113 | */ |
112 | 114 | public function releaseLock($path, $type, ILockingProvider $provider); |
113 | 115 | |
@@ -116,6 +118,7 @@ discard block |
||
116 | 118 | * @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE |
117 | 119 | * @param \OCP\Lock\ILockingProvider $provider |
118 | 120 | * @throws \OCP\Lock\LockedException |
121 | + * @return void |
|
119 | 122 | */ |
120 | 123 | public function changeLock($path, $type, ILockingProvider $provider); |
121 | 124 | } |
@@ -46,7 +46,6 @@ |
||
46 | 46 | use OC\AppFramework\Utility\TimeFactory; |
47 | 47 | use OC\Core\Middleware\TwoFactorMiddleware; |
48 | 48 | use OC\RichObjectStrings\Validator; |
49 | -use OC\Security\Bruteforce\Throttler; |
|
50 | 49 | use OCP\AppFramework\IApi; |
51 | 50 | use OCP\AppFramework\IAppContainer; |
52 | 51 | use OCP\Federation\ICloudIdManager; |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | /** |
105 | 105 | * Return the number of address books for a principal |
106 | 106 | * |
107 | - * @param $principalUri |
|
107 | + * @param string $principalUri |
|
108 | 108 | * @return int |
109 | 109 | */ |
110 | 110 | public function getAddressBooksForUserCount($principalUri) { |
@@ -195,6 +195,9 @@ discard block |
||
195 | 195 | return array_values($addressBooks); |
196 | 196 | } |
197 | 197 | |
198 | + /** |
|
199 | + * @param string $principalUri |
|
200 | + */ |
|
198 | 201 | public function getUsersOwnAddressBooks($principalUri) { |
199 | 202 | $principalUriOriginal = $principalUri; |
200 | 203 | $principalUri = $this->convertPrincipal($principalUri, true); |
@@ -264,7 +267,8 @@ discard block |
||
264 | 267 | } |
265 | 268 | |
266 | 269 | /** |
267 | - * @param $addressBookUri |
|
270 | + * @param string $addressBookUri |
|
271 | + * @param string $principal |
|
268 | 272 | * @return array|null |
269 | 273 | */ |
270 | 274 | public function getAddressBooksByUri($principal, $addressBookUri) { |
@@ -953,6 +957,7 @@ discard block |
||
953 | 957 | * * readOnly - boolean |
954 | 958 | * * summary - Optional, a description for the share |
955 | 959 | * |
960 | + * @param integer $addressBookId |
|
956 | 961 | * @return array |
957 | 962 | */ |
958 | 963 | public function getShares($addressBookId) { |
@@ -1052,7 +1057,7 @@ discard block |
||
1052 | 1057 | |
1053 | 1058 | /** |
1054 | 1059 | * For shared address books the sharee is set in the ACL of the address book |
1055 | - * @param $addressBookId |
|
1060 | + * @param integer $addressBookId |
|
1056 | 1061 | * @param $acl |
1057 | 1062 | * @return array |
1058 | 1063 | */ |
@@ -1060,6 +1065,9 @@ discard block |
||
1060 | 1065 | return $this->sharingBackend->applyShareAcl($addressBookId, $acl); |
1061 | 1066 | } |
1062 | 1067 | |
1068 | + /** |
|
1069 | + * @param boolean $toV2 |
|
1070 | + */ |
|
1063 | 1071 | private function convertPrincipal($principalUri, $toV2) { |
1064 | 1072 | if ($this->principalBackend->getPrincipalPrefix() === 'principals') { |
1065 | 1073 | list(, $name) = URLUtil::splitPath($principalUri); |
@@ -35,7 +35,6 @@ |
||
35 | 35 | use OCP\Files\NotFoundException; |
36 | 36 | use OCP\IConfig; |
37 | 37 | use OCP\IL10N; |
38 | -use OCP\INavigationManager; |
|
39 | 38 | use OCP\IRequest; |
40 | 39 | use OCP\IURLGenerator; |
41 | 40 | use OCP\IUserSession; |