@@ -35,12 +35,12 @@ discard block |
||
| 35 | 35 | throw new \RuntimeException("No app with given id <$appId> known."); |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | - if (!is_dir($appPath . '/l10n/')) { |
|
| 38 | + if (!is_dir($appPath.'/l10n/')) { |
|
| 39 | 39 | return []; |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | $errors = []; |
| 43 | - $directory = new \DirectoryIterator($appPath . '/l10n/'); |
|
| 43 | + $directory = new \DirectoryIterator($appPath.'/l10n/'); |
|
| 44 | 44 | |
| 45 | 45 | foreach ($directory as $file) { |
| 46 | 46 | if ($file->getExtension() !== 'json') { |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | json_decode($content, true); |
| 52 | 52 | |
| 53 | 53 | if (json_last_error() !== JSON_ERROR_NONE) { |
| 54 | - $errors[] = 'Invalid language file found: l10n/' . $file->getFilename() . ': ' . json_last_error_msg(); |
|
| 54 | + $errors[] = 'Invalid language file found: l10n/'.$file->getFilename().': '.json_last_error_msg(); |
|
| 55 | 55 | } |
| 56 | 56 | } |
| 57 | 57 | |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | /** |
| 53 | 53 | * @param array $urlParams |
| 54 | 54 | */ |
| 55 | - public function __construct(array $urlParams=[]){ |
|
| 55 | + public function __construct(array $urlParams = []) { |
|
| 56 | 56 | parent::__construct('settings', $urlParams); |
| 57 | 57 | |
| 58 | 58 | $container = $this->getContainer(); |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | $container->registerService('isSubAdmin', function(IContainer $c) { |
| 73 | 73 | $userObject = \OC::$server->getUserSession()->getUser(); |
| 74 | 74 | $isSubAdmin = false; |
| 75 | - if($userObject !== null) { |
|
| 75 | + if ($userObject !== null) { |
|
| 76 | 76 | $isSubAdmin = \OC::$server->getGroupManager()->getSubAdmin()->isSubAdmin($userObject); |
| 77 | 77 | } |
| 78 | 78 | return $isSubAdmin; |
@@ -80,17 +80,17 @@ discard block |
||
| 80 | 80 | $container->registerService('userCertificateManager', function(IContainer $c) { |
| 81 | 81 | return $c->query('ServerContainer')->getCertificateManager(); |
| 82 | 82 | }, false); |
| 83 | - $container->registerService('systemCertificateManager', function (IContainer $c) { |
|
| 83 | + $container->registerService('systemCertificateManager', function(IContainer $c) { |
|
| 84 | 84 | return $c->query('ServerContainer')->getCertificateManager(null); |
| 85 | 85 | }, false); |
| 86 | - $container->registerService(IProvider::class, function (IContainer $c) { |
|
| 86 | + $container->registerService(IProvider::class, function(IContainer $c) { |
|
| 87 | 87 | return $c->query('ServerContainer')->query(IProvider::class); |
| 88 | 88 | }); |
| 89 | - $container->registerService(IManager::class, function (IContainer $c) { |
|
| 89 | + $container->registerService(IManager::class, function(IContainer $c) { |
|
| 90 | 90 | return $c->query('ServerContainer')->getSettingsManager(); |
| 91 | 91 | }); |
| 92 | 92 | |
| 93 | - $container->registerService(NewUserMailHelper::class, function (IContainer $c) { |
|
| 93 | + $container->registerService(NewUserMailHelper::class, function(IContainer $c) { |
|
| 94 | 94 | /** @var Server $server */ |
| 95 | 95 | $server = $c->query('ServerContainer'); |
| 96 | 96 | /** @var Defaults $defaults */ |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | $json = file_get_contents('php://stdin'); |
| 113 | 113 | } else { |
| 114 | 114 | if (!file_exists($path)) { |
| 115 | - $output->writeln('<error>File not found: ' . $path . '</error>'); |
|
| 115 | + $output->writeln('<error>File not found: '.$path.'</error>'); |
|
| 116 | 116 | return 1; |
| 117 | 117 | } |
| 118 | 118 | $json = file_get_contents($path); |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | $existingMount->getApplicableUsers() === $mount->getApplicableUsers() && |
| 165 | 165 | $existingMount->getBackendOptions() === $mount->getBackendOptions() |
| 166 | 166 | ) { |
| 167 | - $output->writeln("<error>Duplicate mount (" . $mount->getMountPoint() . ")</error>"); |
|
| 167 | + $output->writeln("<error>Duplicate mount (".$mount->getMountPoint().")</error>"); |
|
| 168 | 168 | return 1; |
| 169 | 169 | } |
| 170 | 170 | } |
@@ -31,8 +31,8 @@ discard block |
||
| 31 | 31 | OCP\User::checkLoggedIn(); |
| 32 | 32 | \OC::$server->getSession()->close(); |
| 33 | 33 | |
| 34 | -$files = isset($_GET['files']) ? (string)$_GET['files'] : ''; |
|
| 35 | -$dir = isset($_GET['dir']) ? (string)$_GET['dir'] : ''; |
|
| 34 | +$files = isset($_GET['files']) ? (string) $_GET['files'] : ''; |
|
| 35 | +$dir = isset($_GET['dir']) ? (string) $_GET['dir'] : ''; |
|
| 36 | 36 | |
| 37 | 37 | $files_list = json_decode($files); |
| 38 | 38 | // in case we get only a single file |
@@ -45,13 +45,13 @@ discard block |
||
| 45 | 45 | * the content must not be longer than 32 characters and must only contain |
| 46 | 46 | * alphanumeric characters |
| 47 | 47 | */ |
| 48 | -if(isset($_GET['downloadStartSecret']) |
|
| 48 | +if (isset($_GET['downloadStartSecret']) |
|
| 49 | 49 | && !isset($_GET['downloadStartSecret'][32]) |
| 50 | 50 | && preg_match('!^[a-zA-Z0-9]+$!', $_GET['downloadStartSecret']) === 1) { |
| 51 | 51 | setcookie('ocDownloadStarted', $_GET['downloadStartSecret'], time() + 20, '/'); |
| 52 | 52 | } |
| 53 | 53 | |
| 54 | -$server_params = array( 'head' => \OC::$server->getRequest()->getMethod() === 'HEAD' ); |
|
| 54 | +$server_params = array('head' => \OC::$server->getRequest()->getMethod() === 'HEAD'); |
|
| 55 | 55 | |
| 56 | 56 | /** |
| 57 | 57 | * Http range requests support |
@@ -68,7 +68,7 @@ |
||
| 68 | 68 | |
| 69 | 69 | $query = $this->connection->getQueryBuilder(); |
| 70 | 70 | $query->update('share') |
| 71 | - ->set('share_type', $query->createNamedParameter(Share::SHARE_TYPE_GUEST)) |
|
| 71 | + ->set('share_type', $query->createNamedParameter(Share::SHARE_TYPE_GUEST)) |
|
| 72 | 72 | ->where($query->expr()->eq('share_type', $query->createNamedParameter(Share::SHARE_TYPE_EMAIL))); |
| 73 | 73 | $query->execute(); |
| 74 | 74 | } |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | * ubos-raspberry-pi.local and ubos-raspberry-pi-2.local |
| 68 | 68 | */ |
| 69 | 69 | 'trusted_domains' => |
| 70 | - array ( |
|
| 70 | + array( |
|
| 71 | 71 | 'demo.example.org', |
| 72 | 72 | 'otherdomain.example.org', |
| 73 | 73 | ), |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | * |
| 193 | 193 | * Defaults to ``60*60*24*15`` seconds (15 days) |
| 194 | 194 | */ |
| 195 | -'remember_login_cookie_lifetime' => 60*60*24*15, |
|
| 195 | +'remember_login_cookie_lifetime' => 60 * 60 * 24 * 15, |
|
| 196 | 196 | |
| 197 | 197 | /** |
| 198 | 198 | * The lifetime of a session after inactivity. |
@@ -1074,7 +1074,7 @@ discard block |
||
| 1074 | 1074 | * See https://redis.io/topics/cluster-spec for details about the Redis cluster |
| 1075 | 1075 | */ |
| 1076 | 1076 | 'redis.cluster' => [ |
| 1077 | - 'seeds' => [ // provide some/all of the cluster servers to bootstrap discovery, port required |
|
| 1077 | + 'seeds' => [// provide some/all of the cluster servers to bootstrap discovery, port required |
|
| 1078 | 1078 | 'localhost:7000', |
| 1079 | 1079 | 'localhost:7001' |
| 1080 | 1080 | ], |
@@ -1138,7 +1138,7 @@ discard block |
||
| 1138 | 1138 | * |
| 1139 | 1139 | * Defaults to ``60*60*24`` (1 day) |
| 1140 | 1140 | */ |
| 1141 | -'cache_chunk_gc_ttl' => 60*60*24, |
|
| 1141 | +'cache_chunk_gc_ttl' => 60 * 60 * 24, |
|
| 1142 | 1142 | |
| 1143 | 1143 | /** |
| 1144 | 1144 | * Using Object Store with Nextcloud |
@@ -1462,7 +1462,7 @@ discard block |
||
| 1462 | 1462 | * Defaults to ``60*60`` seconds (1 hour) or the php |
| 1463 | 1463 | * max_execution_time, whichever is higher. |
| 1464 | 1464 | */ |
| 1465 | -'filelocking.ttl' => 60*60, |
|
| 1465 | +'filelocking.ttl' => 60 * 60, |
|
| 1466 | 1466 | |
| 1467 | 1467 | /** |
| 1468 | 1468 | * Memory caching backend for file locking |
@@ -169,8 +169,8 @@ |
||
| 169 | 169 | 'mimetype', $update->createNamedParameter($folderMimeTypeId) |
| 170 | 170 | )) |
| 171 | 171 | ->andWhere($update->expr()->like( |
| 172 | - $update->createFunction('LOWER(' . $update->getColumnName('name') . ')'), |
|
| 173 | - $update->createNamedParameter('%' . $this->dbConnection->escapeLikeParameter('.' . $ext)) |
|
| 172 | + $update->createFunction('LOWER('.$update->getColumnName('name').')'), |
|
| 173 | + $update->createNamedParameter('%'.$this->dbConnection->escapeLikeParameter('.'.$ext)) |
|
| 174 | 174 | )); |
| 175 | 175 | return $update->execute(); |
| 176 | 176 | } |
@@ -14,8 +14,8 @@ |
||
| 14 | 14 | |
| 15 | 15 | <?php if ($_['tooBig']) { ?> |
| 16 | 16 | <div class="warning updateAnyways"> |
| 17 | - <?php p($l->t('I know that if I continue doing the update via web UI has the risk, that the request runs into a timeout and could cause data loss, but I have a backup and know how to restore my instance in case of a failure.' )); ?> |
|
| 18 | - <a href="?IKnowThatThisIsABigInstanceAndTheUpdateRequestCouldRunIntoATimeoutAndHowToRestoreABackup=IAmSuperSureToDoThis" class="button updateAnywaysButton"><?php p($l->t('Upgrade via web on my own risk' )); ?></a> |
|
| 17 | + <?php p($l->t('I know that if I continue doing the update via web UI has the risk, that the request runs into a timeout and could cause data loss, but I have a backup and know how to restore my instance in case of a failure.')); ?> |
|
| 18 | + <a href="?IKnowThatThisIsABigInstanceAndTheUpdateRequestCouldRunIntoATimeoutAndHowToRestoreABackup=IAmSuperSureToDoThis" class="button updateAnywaysButton"><?php p($l->t('Upgrade via web on my own risk')); ?></a> |
|
| 19 | 19 | </div> |
| 20 | 20 | <?php } ?> |
| 21 | 21 | |
@@ -84,7 +84,7 @@ |
||
| 84 | 84 | |
| 85 | 85 | if (isset($this->namespaces[$namespace])) { |
| 86 | 86 | if (!isset($this->hasNoAppContainer[$namespace])) { |
| 87 | - $applicationClassName = 'OCA\\' . $sensitiveNamespace . '\\AppInfo\\Application'; |
|
| 87 | + $applicationClassName = 'OCA\\'.$sensitiveNamespace.'\\AppInfo\\Application'; |
|
| 88 | 88 | if (class_exists($applicationClassName)) { |
| 89 | 89 | new $applicationClassName(); |
| 90 | 90 | if (isset($this->appContainers[$namespace])) { |