@@ -6,5 +6,5 @@ |
||
| 6 | 6 | $baseDir = $vendorDir; |
| 7 | 7 | |
| 8 | 8 | return array( |
| 9 | - 'OCA\\CloudFederationAPI\\' => array($baseDir . '/../lib'), |
|
| 9 | + 'OCA\\CloudFederationAPI\\' => array($baseDir.'/../lib'), |
|
| 10 | 10 | ); |
@@ -370,18 +370,18 @@ discard block |
||
| 370 | 370 | private function findFileWithExtension($class, $ext) |
| 371 | 371 | { |
| 372 | 372 | // PSR-4 lookup |
| 373 | - $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; |
|
| 373 | + $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR).$ext; |
|
| 374 | 374 | |
| 375 | 375 | $first = $class[0]; |
| 376 | 376 | if (isset($this->prefixLengthsPsr4[$first])) { |
| 377 | 377 | $subPath = $class; |
| 378 | 378 | while (false !== $lastPos = strrpos($subPath, '\\')) { |
| 379 | 379 | $subPath = substr($subPath, 0, $lastPos); |
| 380 | - $search = $subPath . '\\'; |
|
| 380 | + $search = $subPath.'\\'; |
|
| 381 | 381 | if (isset($this->prefixDirsPsr4[$search])) { |
| 382 | - $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); |
|
| 382 | + $pathEnd = DIRECTORY_SEPARATOR.substr($logicalPathPsr4, $lastPos + 1); |
|
| 383 | 383 | foreach ($this->prefixDirsPsr4[$search] as $dir) { |
| 384 | - if (file_exists($file = $dir . $pathEnd)) { |
|
| 384 | + if (file_exists($file = $dir.$pathEnd)) { |
|
| 385 | 385 | return $file; |
| 386 | 386 | } |
| 387 | 387 | } |
@@ -391,7 +391,7 @@ discard block |
||
| 391 | 391 | |
| 392 | 392 | // PSR-4 fallback dirs |
| 393 | 393 | foreach ($this->fallbackDirsPsr4 as $dir) { |
| 394 | - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { |
|
| 394 | + if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr4)) { |
|
| 395 | 395 | return $file; |
| 396 | 396 | } |
| 397 | 397 | } |
@@ -403,14 +403,14 @@ discard block |
||
| 403 | 403 | . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); |
| 404 | 404 | } else { |
| 405 | 405 | // PEAR-like class name |
| 406 | - $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; |
|
| 406 | + $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR).$ext; |
|
| 407 | 407 | } |
| 408 | 408 | |
| 409 | 409 | if (isset($this->prefixesPsr0[$first])) { |
| 410 | 410 | foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { |
| 411 | 411 | if (0 === strpos($class, $prefix)) { |
| 412 | 412 | foreach ($dirs as $dir) { |
| 413 | - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { |
|
| 413 | + if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr0)) { |
|
| 414 | 414 | return $file; |
| 415 | 415 | } |
| 416 | 416 | } |
@@ -420,7 +420,7 @@ discard block |
||
| 420 | 420 | |
| 421 | 421 | // PSR-0 fallback dirs |
| 422 | 422 | foreach ($this->fallbackDirsPsr0 as $dir) { |
| 423 | - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { |
|
| 423 | + if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr0)) { |
|
| 424 | 424 | return $file; |
| 425 | 425 | } |
| 426 | 426 | } |
@@ -6,5 +6,5 @@ |
||
| 6 | 6 | $baseDir = $vendorDir; |
| 7 | 7 | |
| 8 | 8 | return array( |
| 9 | - 'OCA\\WorkflowEngine\\' => array($baseDir . '/../lib'), |
|
| 9 | + 'OCA\\WorkflowEngine\\' => array($baseDir.'/../lib'), |
|
| 10 | 10 | ); |
@@ -31,23 +31,23 @@ |
||
| 31 | 31 | * @deprecated 17.0.0 listen to the AddContentSecurityPolicyEvent to add a policy |
| 32 | 32 | */ |
| 33 | 33 | interface IContentSecurityPolicyManager { |
| 34 | - /** |
|
| 35 | - * Allows to inject something into the default content policy. This is for |
|
| 36 | - * example useful when you're injecting Javascript code into a view belonging |
|
| 37 | - * to another controller and cannot modify its Content-Security-Policy itself. |
|
| 38 | - * Note that the adjustment is only applied to applications that use AppFramework |
|
| 39 | - * controllers. |
|
| 40 | - * |
|
| 41 | - * To use this from your `app.php` use `\OC::$server->getContentSecurityPolicyManager()->addDefaultPolicy($policy)`, |
|
| 42 | - * $policy has to be of type `\OCP\AppFramework\Http\ContentSecurityPolicy`. |
|
| 43 | - * |
|
| 44 | - * WARNING: Using this API incorrectly may make the instance more insecure. |
|
| 45 | - * Do think twice before adding whitelisting resources. Please do also note |
|
| 46 | - * that it is not possible to use the `disallowXYZ` functions. |
|
| 47 | - * |
|
| 48 | - * @param EmptyContentSecurityPolicy $policy |
|
| 49 | - * @since 9.0.0 |
|
| 50 | - * @deprecated 17.0.0 listen to the AddContentSecurityPolicyEvent to add a policy |
|
| 51 | - */ |
|
| 52 | - public function addDefaultPolicy(EmptyContentSecurityPolicy $policy); |
|
| 34 | + /** |
|
| 35 | + * Allows to inject something into the default content policy. This is for |
|
| 36 | + * example useful when you're injecting Javascript code into a view belonging |
|
| 37 | + * to another controller and cannot modify its Content-Security-Policy itself. |
|
| 38 | + * Note that the adjustment is only applied to applications that use AppFramework |
|
| 39 | + * controllers. |
|
| 40 | + * |
|
| 41 | + * To use this from your `app.php` use `\OC::$server->getContentSecurityPolicyManager()->addDefaultPolicy($policy)`, |
|
| 42 | + * $policy has to be of type `\OCP\AppFramework\Http\ContentSecurityPolicy`. |
|
| 43 | + * |
|
| 44 | + * WARNING: Using this API incorrectly may make the instance more insecure. |
|
| 45 | + * Do think twice before adding whitelisting resources. Please do also note |
|
| 46 | + * that it is not possible to use the `disallowXYZ` functions. |
|
| 47 | + * |
|
| 48 | + * @param EmptyContentSecurityPolicy $policy |
|
| 49 | + * @since 9.0.0 |
|
| 50 | + * @deprecated 17.0.0 listen to the AddContentSecurityPolicyEvent to add a policy |
|
| 51 | + */ |
|
| 52 | + public function addDefaultPolicy(EmptyContentSecurityPolicy $policy); |
|
| 53 | 53 | } |
@@ -31,9 +31,9 @@ |
||
| 31 | 31 | * @since 17.0.0 |
| 32 | 32 | */ |
| 33 | 33 | interface IVersionedPreviewFile { |
| 34 | - /** |
|
| 35 | - * @return string |
|
| 36 | - * @since 17.0.0 |
|
| 37 | - */ |
|
| 38 | - public function getPreviewVersion(): string; |
|
| 34 | + /** |
|
| 35 | + * @return string |
|
| 36 | + * @since 17.0.0 |
|
| 37 | + */ |
|
| 38 | + public function getPreviewVersion(): string; |
|
| 39 | 39 | } |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | $tokens = $this->tokenProvider->getTokenByUser($user->getUID()); |
| 86 | 86 | |
| 87 | 87 | /** @var IWipeableToken[] $wipeable */ |
| 88 | - $wipeable = array_filter($tokens, function (IToken $token) { |
|
| 88 | + $wipeable = array_filter($tokens, function(IToken $token) { |
|
| 89 | 89 | return $token instanceof IWipeableToken; |
| 90 | 90 | }); |
| 91 | 91 | |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | |
| 122 | 122 | $dbToken = $e->getToken(); |
| 123 | 123 | |
| 124 | - $this->logger->info("user " . $dbToken->getUID() . " started a remote wipe"); |
|
| 124 | + $this->logger->info("user ".$dbToken->getUID()." started a remote wipe"); |
|
| 125 | 125 | |
| 126 | 126 | $this->eventDispatcher->dispatch(RemoteWipeStarted::class, new RemoteWipeStarted($dbToken)); |
| 127 | 127 | |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | |
| 150 | 150 | $this->tokenProvider->invalidateToken($token); |
| 151 | 151 | |
| 152 | - $this->logger->info("user " . $dbToken->getUID() . " finished a remote wipe"); |
|
| 152 | + $this->logger->info("user ".$dbToken->getUID()." finished a remote wipe"); |
|
| 153 | 153 | $this->eventDispatcher->dispatch(RemoteWipeFinished::class, new RemoteWipeFinished($dbToken)); |
| 154 | 154 | |
| 155 | 155 | return true; |
@@ -37,117 +37,117 @@ |
||
| 37 | 37 | use OCP\IUser; |
| 38 | 38 | |
| 39 | 39 | class RemoteWipe { |
| 40 | - /** @var IProvider */ |
|
| 41 | - private $tokenProvider; |
|
| 42 | - |
|
| 43 | - /** @var IEventDispatcher */ |
|
| 44 | - private $eventDispatcher; |
|
| 45 | - |
|
| 46 | - /** @var LoggerInterface */ |
|
| 47 | - private $logger; |
|
| 48 | - |
|
| 49 | - public function __construct(IProvider $tokenProvider, |
|
| 50 | - IEventDispatcher $eventDispatcher, |
|
| 51 | - LoggerInterface $logger) { |
|
| 52 | - $this->tokenProvider = $tokenProvider; |
|
| 53 | - $this->eventDispatcher = $eventDispatcher; |
|
| 54 | - $this->logger = $logger; |
|
| 55 | - } |
|
| 56 | - |
|
| 57 | - /** |
|
| 58 | - * @param IToken $token |
|
| 59 | - * @return bool |
|
| 60 | - * |
|
| 61 | - * @throws InvalidTokenException |
|
| 62 | - * @throws WipeTokenException |
|
| 63 | - */ |
|
| 64 | - public function markTokenForWipe(IToken $token): bool { |
|
| 65 | - if (!$token instanceof IWipeableToken) { |
|
| 66 | - return false; |
|
| 67 | - } |
|
| 68 | - |
|
| 69 | - $token->wipe(); |
|
| 70 | - $this->tokenProvider->updateToken($token); |
|
| 71 | - |
|
| 72 | - return true; |
|
| 73 | - } |
|
| 74 | - |
|
| 75 | - /** |
|
| 76 | - * @param IUser $user |
|
| 77 | - * |
|
| 78 | - * @return bool true if any tokens have been marked for remote wipe |
|
| 79 | - */ |
|
| 80 | - public function markAllTokensForWipe(IUser $user): bool { |
|
| 81 | - $tokens = $this->tokenProvider->getTokenByUser($user->getUID()); |
|
| 82 | - |
|
| 83 | - /** @var IWipeableToken[] $wipeable */ |
|
| 84 | - $wipeable = array_filter($tokens, function (IToken $token) { |
|
| 85 | - return $token instanceof IWipeableToken; |
|
| 86 | - }); |
|
| 87 | - |
|
| 88 | - if (empty($wipeable)) { |
|
| 89 | - return false; |
|
| 90 | - } |
|
| 91 | - |
|
| 92 | - foreach ($wipeable as $token) { |
|
| 93 | - $token->wipe(); |
|
| 94 | - $this->tokenProvider->updateToken($token); |
|
| 95 | - } |
|
| 96 | - |
|
| 97 | - return true; |
|
| 98 | - } |
|
| 99 | - |
|
| 100 | - /** |
|
| 101 | - * @param string $token |
|
| 102 | - * |
|
| 103 | - * @return bool whether wiping was started |
|
| 104 | - * @throws InvalidTokenException |
|
| 105 | - * |
|
| 106 | - */ |
|
| 107 | - public function start(string $token): bool { |
|
| 108 | - try { |
|
| 109 | - $this->tokenProvider->getToken($token); |
|
| 110 | - |
|
| 111 | - // We expect a WipedTokenException here. If we reach this point this |
|
| 112 | - // is an ordinary token |
|
| 113 | - return false; |
|
| 114 | - } catch (WipeTokenException $e) { |
|
| 115 | - // Expected -> continue below |
|
| 116 | - } |
|
| 117 | - |
|
| 118 | - $dbToken = $e->getToken(); |
|
| 119 | - |
|
| 120 | - $this->logger->info("user " . $dbToken->getUID() . " started a remote wipe"); |
|
| 121 | - |
|
| 122 | - $this->eventDispatcher->dispatch(RemoteWipeStarted::class, new RemoteWipeStarted($dbToken)); |
|
| 123 | - |
|
| 124 | - return true; |
|
| 125 | - } |
|
| 126 | - |
|
| 127 | - /** |
|
| 128 | - * @param string $token |
|
| 129 | - * |
|
| 130 | - * @return bool whether wiping could be finished |
|
| 131 | - * @throws InvalidTokenException |
|
| 132 | - */ |
|
| 133 | - public function finish(string $token): bool { |
|
| 134 | - try { |
|
| 135 | - $this->tokenProvider->getToken($token); |
|
| 136 | - |
|
| 137 | - // We expect a WipedTokenException here. If we reach this point this |
|
| 138 | - // is an ordinary token |
|
| 139 | - return false; |
|
| 140 | - } catch (WipeTokenException $e) { |
|
| 141 | - // Expected -> continue below |
|
| 142 | - } |
|
| 143 | - |
|
| 144 | - $dbToken = $e->getToken(); |
|
| 145 | - |
|
| 146 | - $this->tokenProvider->invalidateToken($token); |
|
| 147 | - |
|
| 148 | - $this->logger->info("user " . $dbToken->getUID() . " finished a remote wipe"); |
|
| 149 | - $this->eventDispatcher->dispatch(RemoteWipeFinished::class, new RemoteWipeFinished($dbToken)); |
|
| 150 | - |
|
| 151 | - return true; |
|
| 152 | - } |
|
| 40 | + /** @var IProvider */ |
|
| 41 | + private $tokenProvider; |
|
| 42 | + |
|
| 43 | + /** @var IEventDispatcher */ |
|
| 44 | + private $eventDispatcher; |
|
| 45 | + |
|
| 46 | + /** @var LoggerInterface */ |
|
| 47 | + private $logger; |
|
| 48 | + |
|
| 49 | + public function __construct(IProvider $tokenProvider, |
|
| 50 | + IEventDispatcher $eventDispatcher, |
|
| 51 | + LoggerInterface $logger) { |
|
| 52 | + $this->tokenProvider = $tokenProvider; |
|
| 53 | + $this->eventDispatcher = $eventDispatcher; |
|
| 54 | + $this->logger = $logger; |
|
| 55 | + } |
|
| 56 | + |
|
| 57 | + /** |
|
| 58 | + * @param IToken $token |
|
| 59 | + * @return bool |
|
| 60 | + * |
|
| 61 | + * @throws InvalidTokenException |
|
| 62 | + * @throws WipeTokenException |
|
| 63 | + */ |
|
| 64 | + public function markTokenForWipe(IToken $token): bool { |
|
| 65 | + if (!$token instanceof IWipeableToken) { |
|
| 66 | + return false; |
|
| 67 | + } |
|
| 68 | + |
|
| 69 | + $token->wipe(); |
|
| 70 | + $this->tokenProvider->updateToken($token); |
|
| 71 | + |
|
| 72 | + return true; |
|
| 73 | + } |
|
| 74 | + |
|
| 75 | + /** |
|
| 76 | + * @param IUser $user |
|
| 77 | + * |
|
| 78 | + * @return bool true if any tokens have been marked for remote wipe |
|
| 79 | + */ |
|
| 80 | + public function markAllTokensForWipe(IUser $user): bool { |
|
| 81 | + $tokens = $this->tokenProvider->getTokenByUser($user->getUID()); |
|
| 82 | + |
|
| 83 | + /** @var IWipeableToken[] $wipeable */ |
|
| 84 | + $wipeable = array_filter($tokens, function (IToken $token) { |
|
| 85 | + return $token instanceof IWipeableToken; |
|
| 86 | + }); |
|
| 87 | + |
|
| 88 | + if (empty($wipeable)) { |
|
| 89 | + return false; |
|
| 90 | + } |
|
| 91 | + |
|
| 92 | + foreach ($wipeable as $token) { |
|
| 93 | + $token->wipe(); |
|
| 94 | + $this->tokenProvider->updateToken($token); |
|
| 95 | + } |
|
| 96 | + |
|
| 97 | + return true; |
|
| 98 | + } |
|
| 99 | + |
|
| 100 | + /** |
|
| 101 | + * @param string $token |
|
| 102 | + * |
|
| 103 | + * @return bool whether wiping was started |
|
| 104 | + * @throws InvalidTokenException |
|
| 105 | + * |
|
| 106 | + */ |
|
| 107 | + public function start(string $token): bool { |
|
| 108 | + try { |
|
| 109 | + $this->tokenProvider->getToken($token); |
|
| 110 | + |
|
| 111 | + // We expect a WipedTokenException here. If we reach this point this |
|
| 112 | + // is an ordinary token |
|
| 113 | + return false; |
|
| 114 | + } catch (WipeTokenException $e) { |
|
| 115 | + // Expected -> continue below |
|
| 116 | + } |
|
| 117 | + |
|
| 118 | + $dbToken = $e->getToken(); |
|
| 119 | + |
|
| 120 | + $this->logger->info("user " . $dbToken->getUID() . " started a remote wipe"); |
|
| 121 | + |
|
| 122 | + $this->eventDispatcher->dispatch(RemoteWipeStarted::class, new RemoteWipeStarted($dbToken)); |
|
| 123 | + |
|
| 124 | + return true; |
|
| 125 | + } |
|
| 126 | + |
|
| 127 | + /** |
|
| 128 | + * @param string $token |
|
| 129 | + * |
|
| 130 | + * @return bool whether wiping could be finished |
|
| 131 | + * @throws InvalidTokenException |
|
| 132 | + */ |
|
| 133 | + public function finish(string $token): bool { |
|
| 134 | + try { |
|
| 135 | + $this->tokenProvider->getToken($token); |
|
| 136 | + |
|
| 137 | + // We expect a WipedTokenException here. If we reach this point this |
|
| 138 | + // is an ordinary token |
|
| 139 | + return false; |
|
| 140 | + } catch (WipeTokenException $e) { |
|
| 141 | + // Expected -> continue below |
|
| 142 | + } |
|
| 143 | + |
|
| 144 | + $dbToken = $e->getToken(); |
|
| 145 | + |
|
| 146 | + $this->tokenProvider->invalidateToken($token); |
|
| 147 | + |
|
| 148 | + $this->logger->info("user " . $dbToken->getUID() . " finished a remote wipe"); |
|
| 149 | + $this->eventDispatcher->dispatch(RemoteWipeFinished::class, new RemoteWipeFinished($dbToken)); |
|
| 150 | + |
|
| 151 | + return true; |
|
| 152 | + } |
|
| 153 | 153 | } |
@@ -30,23 +30,23 @@ |
||
| 30 | 30 | * @since 9.0.0 |
| 31 | 31 | */ |
| 32 | 32 | interface IApp { |
| 33 | - /** |
|
| 34 | - * @param INotification $notification |
|
| 35 | - * @throws \InvalidArgumentException When the notification is not valid |
|
| 36 | - * @since 9.0.0 |
|
| 37 | - */ |
|
| 38 | - public function notify(INotification $notification): void; |
|
| 33 | + /** |
|
| 34 | + * @param INotification $notification |
|
| 35 | + * @throws \InvalidArgumentException When the notification is not valid |
|
| 36 | + * @since 9.0.0 |
|
| 37 | + */ |
|
| 38 | + public function notify(INotification $notification): void; |
|
| 39 | 39 | |
| 40 | - /** |
|
| 41 | - * @param INotification $notification |
|
| 42 | - * @since 9.0.0 |
|
| 43 | - */ |
|
| 44 | - public function markProcessed(INotification $notification): void; |
|
| 40 | + /** |
|
| 41 | + * @param INotification $notification |
|
| 42 | + * @since 9.0.0 |
|
| 43 | + */ |
|
| 44 | + public function markProcessed(INotification $notification): void; |
|
| 45 | 45 | |
| 46 | - /** |
|
| 47 | - * @param INotification $notification |
|
| 48 | - * @return int |
|
| 49 | - * @since 9.0.0 |
|
| 50 | - */ |
|
| 51 | - public function getCount(INotification $notification): int; |
|
| 46 | + /** |
|
| 47 | + * @param INotification $notification |
|
| 48 | + * @return int |
|
| 49 | + * @since 9.0.0 |
|
| 50 | + */ |
|
| 51 | + public function getCount(INotification $notification): int; |
|
| 52 | 52 | } |
@@ -34,51 +34,51 @@ |
||
| 34 | 34 | * @package OCA\LookupServerConnector |
| 35 | 35 | */ |
| 36 | 36 | class UpdateLookupServer { |
| 37 | - /** @var IConfig */ |
|
| 38 | - private $config; |
|
| 39 | - /** @var IJobList */ |
|
| 40 | - private $jobList; |
|
| 37 | + /** @var IConfig */ |
|
| 38 | + private $config; |
|
| 39 | + /** @var IJobList */ |
|
| 40 | + private $jobList; |
|
| 41 | 41 | |
| 42 | - /** |
|
| 43 | - * @param IJobList $jobList |
|
| 44 | - * @param IConfig $config |
|
| 45 | - */ |
|
| 46 | - public function __construct(IJobList $jobList, |
|
| 47 | - IConfig $config) { |
|
| 48 | - $this->config = $config; |
|
| 49 | - $this->jobList = $jobList; |
|
| 50 | - } |
|
| 42 | + /** |
|
| 43 | + * @param IJobList $jobList |
|
| 44 | + * @param IConfig $config |
|
| 45 | + */ |
|
| 46 | + public function __construct(IJobList $jobList, |
|
| 47 | + IConfig $config) { |
|
| 48 | + $this->config = $config; |
|
| 49 | + $this->jobList = $jobList; |
|
| 50 | + } |
|
| 51 | 51 | |
| 52 | - /** |
|
| 53 | - * @param IUser $user |
|
| 54 | - */ |
|
| 55 | - public function userUpdated(IUser $user): void { |
|
| 56 | - if (!$this->shouldUpdateLookupServer()) { |
|
| 57 | - return; |
|
| 58 | - } |
|
| 52 | + /** |
|
| 53 | + * @param IUser $user |
|
| 54 | + */ |
|
| 55 | + public function userUpdated(IUser $user): void { |
|
| 56 | + if (!$this->shouldUpdateLookupServer()) { |
|
| 57 | + return; |
|
| 58 | + } |
|
| 59 | 59 | |
| 60 | - // Reset retry counter |
|
| 61 | - $this->config->deleteUserValue( |
|
| 62 | - $user->getUID(), |
|
| 63 | - 'lookup_server_connector', |
|
| 64 | - 'update_retries' |
|
| 65 | - ); |
|
| 66 | - $this->jobList->add(RetryJob::class, ['userId' => $user->getUID()]); |
|
| 67 | - } |
|
| 60 | + // Reset retry counter |
|
| 61 | + $this->config->deleteUserValue( |
|
| 62 | + $user->getUID(), |
|
| 63 | + 'lookup_server_connector', |
|
| 64 | + 'update_retries' |
|
| 65 | + ); |
|
| 66 | + $this->jobList->add(RetryJob::class, ['userId' => $user->getUID()]); |
|
| 67 | + } |
|
| 68 | 68 | |
| 69 | - /** |
|
| 70 | - * check if we should update the lookup server, we only do it if |
|
| 71 | - * |
|
| 72 | - * + we have an internet connection |
|
| 73 | - * + the lookup server update was not disabled by the admin |
|
| 74 | - * + we have a valid lookup server URL |
|
| 75 | - * |
|
| 76 | - * @return bool |
|
| 77 | - */ |
|
| 78 | - private function shouldUpdateLookupServer(): bool { |
|
| 79 | - return $this->config->getSystemValueBool('has_internet_connection', true) === true && |
|
| 80 | - $this->config->getAppValue('files_sharing', 'lookupServerUploadEnabled', 'yes') === 'yes' && |
|
| 81 | - $this->config->getSystemValueString('lookup_server', 'https://lookup.nextcloud.com') !== ''; |
|
| 82 | - } |
|
| 69 | + /** |
|
| 70 | + * check if we should update the lookup server, we only do it if |
|
| 71 | + * |
|
| 72 | + * + we have an internet connection |
|
| 73 | + * + the lookup server update was not disabled by the admin |
|
| 74 | + * + we have a valid lookup server URL |
|
| 75 | + * |
|
| 76 | + * @return bool |
|
| 77 | + */ |
|
| 78 | + private function shouldUpdateLookupServer(): bool { |
|
| 79 | + return $this->config->getSystemValueBool('has_internet_connection', true) === true && |
|
| 80 | + $this->config->getAppValue('files_sharing', 'lookupServerUploadEnabled', 'yes') === 'yes' && |
|
| 81 | + $this->config->getSystemValueString('lookup_server', 'https://lookup.nextcloud.com') !== ''; |
|
| 82 | + } |
|
| 83 | 83 | |
| 84 | 84 | } |
@@ -32,10 +32,10 @@ |
||
| 32 | 32 | */ |
| 33 | 33 | class UnsupportedLimitOnInitialSyncException extends InsufficientStorage { |
| 34 | 34 | |
| 35 | - /** |
|
| 36 | - * @inheritDoc |
|
| 37 | - */ |
|
| 38 | - public function serialize(Server $server, \DOMElement $errorNode) { |
|
| 39 | - $errorNode->appendChild($errorNode->ownerDocument->createElementNS('DAV:', 'd:number-of-matches-within-limits')); |
|
| 40 | - } |
|
| 35 | + /** |
|
| 36 | + * @inheritDoc |
|
| 37 | + */ |
|
| 38 | + public function serialize(Server $server, \DOMElement $errorNode) { |
|
| 39 | + $errorNode->appendChild($errorNode->ownerDocument->createElementNS('DAV:', 'd:number-of-matches-within-limits')); |
|
| 40 | + } |
|
| 41 | 41 | } |