@@ -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 | } |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | */ |
88 | 88 | protected function execute(InputInterface $input, OutputInterface $output) { |
89 | 89 | |
90 | - if(\OC::checkUpgrade(false)) { |
|
90 | + if (\OC::checkUpgrade(false)) { |
|
91 | 91 | if (OutputInterface::VERBOSITY_NORMAL < $output->getVerbosity()) { |
92 | 92 | // Prepend each line with a little timestamp |
93 | 93 | $timestampFormatter = new TimestampFormatter($this->config, $output->getFormatter()); |
@@ -111,10 +111,10 @@ discard block |
||
111 | 111 | if ($event instanceof GenericEvent) { |
112 | 112 | $message = $event->getSubject(); |
113 | 113 | if (OutputInterface::VERBOSITY_NORMAL < $output->getVerbosity()) { |
114 | - $output->writeln(' Checking table ' . $message); |
|
114 | + $output->writeln(' Checking table '.$message); |
|
115 | 115 | } else { |
116 | 116 | if (strlen($message) > 60) { |
117 | - $message = substr($message, 0, 57) . '...'; |
|
117 | + $message = substr($message, 0, 57).'...'; |
|
118 | 118 | } |
119 | 119 | $progress->setMessage($message); |
120 | 120 | if ($event[0] === 1) { |
@@ -155,20 +155,20 @@ discard block |
||
155 | 155 | $output->writeln(''); |
156 | 156 | break; |
157 | 157 | case '\OC\Repair::step': |
158 | - if(OutputInterface::VERBOSITY_NORMAL < $output->getVerbosity()) { |
|
159 | - $output->writeln('<info>Repair step: ' . $event->getArgument(0) . '</info>'); |
|
158 | + if (OutputInterface::VERBOSITY_NORMAL < $output->getVerbosity()) { |
|
159 | + $output->writeln('<info>Repair step: '.$event->getArgument(0).'</info>'); |
|
160 | 160 | } |
161 | 161 | break; |
162 | 162 | case '\OC\Repair::info': |
163 | - if(OutputInterface::VERBOSITY_NORMAL < $output->getVerbosity()) { |
|
164 | - $output->writeln('<info>Repair info: ' . $event->getArgument(0) . '</info>'); |
|
163 | + if (OutputInterface::VERBOSITY_NORMAL < $output->getVerbosity()) { |
|
164 | + $output->writeln('<info>Repair info: '.$event->getArgument(0).'</info>'); |
|
165 | 165 | } |
166 | 166 | break; |
167 | 167 | case '\OC\Repair::warning': |
168 | - $output->writeln('<error>Repair warning: ' . $event->getArgument(0) . '</error>'); |
|
168 | + $output->writeln('<error>Repair warning: '.$event->getArgument(0).'</error>'); |
|
169 | 169 | break; |
170 | 170 | case '\OC\Repair::error': |
171 | - $output->writeln('<error>Repair error: ' . $event->getArgument(0) . '</error>'); |
|
171 | + $output->writeln('<error>Repair error: '.$event->getArgument(0).'</error>'); |
|
172 | 172 | break; |
173 | 173 | } |
174 | 174 | }; |
@@ -184,17 +184,17 @@ discard block |
||
184 | 184 | $dispatcher->addListener('\OC\Repair::error', $repairListener); |
185 | 185 | |
186 | 186 | |
187 | - $updater->listen('\OC\Updater', 'maintenanceEnabled', function () use($output) { |
|
187 | + $updater->listen('\OC\Updater', 'maintenanceEnabled', function() use($output) { |
|
188 | 188 | $output->writeln('<info>Turned on maintenance mode</info>'); |
189 | 189 | }); |
190 | - $updater->listen('\OC\Updater', 'maintenanceDisabled', function () use($output) { |
|
190 | + $updater->listen('\OC\Updater', 'maintenanceDisabled', function() use($output) { |
|
191 | 191 | $output->writeln('<info>Turned off maintenance mode</info>'); |
192 | 192 | }); |
193 | - $updater->listen('\OC\Updater', 'maintenanceActive', function () use($output) { |
|
193 | + $updater->listen('\OC\Updater', 'maintenanceActive', function() use($output) { |
|
194 | 194 | $output->writeln('<info>Maintenance mode is kept active</info>'); |
195 | 195 | }); |
196 | 196 | $updater->listen('\OC\Updater', 'updateEnd', |
197 | - function ($success) use($output, $self) { |
|
197 | + function($success) use($output, $self) { |
|
198 | 198 | if ($success) { |
199 | 199 | $message = "<info>Update successful</info>"; |
200 | 200 | } else { |
@@ -202,61 +202,61 @@ discard block |
||
202 | 202 | } |
203 | 203 | $output->writeln($message); |
204 | 204 | }); |
205 | - $updater->listen('\OC\Updater', 'dbUpgradeBefore', function () use($output) { |
|
205 | + $updater->listen('\OC\Updater', 'dbUpgradeBefore', function() use($output) { |
|
206 | 206 | $output->writeln('<info>Updating database schema</info>'); |
207 | 207 | }); |
208 | - $updater->listen('\OC\Updater', 'dbUpgrade', function () use($output) { |
|
208 | + $updater->listen('\OC\Updater', 'dbUpgrade', function() use($output) { |
|
209 | 209 | $output->writeln('<info>Updated database</info>'); |
210 | 210 | }); |
211 | - $updater->listen('\OC\Updater', 'dbSimulateUpgradeBefore', function () use($output) { |
|
211 | + $updater->listen('\OC\Updater', 'dbSimulateUpgradeBefore', function() use($output) { |
|
212 | 212 | $output->writeln('<info>Checking whether the database schema can be updated (this can take a long time depending on the database size)</info>'); |
213 | 213 | }); |
214 | - $updater->listen('\OC\Updater', 'dbSimulateUpgrade', function () use($output) { |
|
214 | + $updater->listen('\OC\Updater', 'dbSimulateUpgrade', function() use($output) { |
|
215 | 215 | $output->writeln('<info>Checked database schema update</info>'); |
216 | 216 | }); |
217 | - $updater->listen('\OC\Updater', 'incompatibleAppDisabled', function ($app) use($output) { |
|
218 | - $output->writeln('<comment>Disabled incompatible app: ' . $app . '</comment>'); |
|
217 | + $updater->listen('\OC\Updater', 'incompatibleAppDisabled', function($app) use($output) { |
|
218 | + $output->writeln('<comment>Disabled incompatible app: '.$app.'</comment>'); |
|
219 | 219 | }); |
220 | - $updater->listen('\OC\Updater', 'thirdPartyAppDisabled', function ($app) use ($output) { |
|
221 | - $output->writeln('<comment>Disabled 3rd-party app: ' . $app . '</comment>'); |
|
220 | + $updater->listen('\OC\Updater', 'thirdPartyAppDisabled', function($app) use ($output) { |
|
221 | + $output->writeln('<comment>Disabled 3rd-party app: '.$app.'</comment>'); |
|
222 | 222 | }); |
223 | - $updater->listen('\OC\Updater', 'checkAppStoreAppBefore', function ($app) use($output) { |
|
224 | - $output->writeln('<info>Checking for update of app ' . $app . ' in appstore</info>'); |
|
223 | + $updater->listen('\OC\Updater', 'checkAppStoreAppBefore', function($app) use($output) { |
|
224 | + $output->writeln('<info>Checking for update of app '.$app.' in appstore</info>'); |
|
225 | 225 | }); |
226 | - $updater->listen('\OC\Updater', 'upgradeAppStoreApp', function ($app) use($output) { |
|
227 | - $output->writeln('<info>Update app ' . $app . ' from appstore</info>'); |
|
226 | + $updater->listen('\OC\Updater', 'upgradeAppStoreApp', function($app) use($output) { |
|
227 | + $output->writeln('<info>Update app '.$app.' from appstore</info>'); |
|
228 | 228 | }); |
229 | - $updater->listen('\OC\Updater', 'checkAppStoreApp', function ($app) use($output) { |
|
230 | - $output->writeln('<info>Checked for update of app "' . $app . '" in appstore </info>'); |
|
229 | + $updater->listen('\OC\Updater', 'checkAppStoreApp', function($app) use($output) { |
|
230 | + $output->writeln('<info>Checked for update of app "'.$app.'" in appstore </info>'); |
|
231 | 231 | }); |
232 | - $updater->listen('\OC\Updater', 'appUpgradeCheckBefore', function () use ($output) { |
|
232 | + $updater->listen('\OC\Updater', 'appUpgradeCheckBefore', function() use ($output) { |
|
233 | 233 | $output->writeln('<info>Checking updates of apps</info>'); |
234 | 234 | }); |
235 | - $updater->listen('\OC\Updater', 'appSimulateUpdate', function ($app) use ($output) { |
|
235 | + $updater->listen('\OC\Updater', 'appSimulateUpdate', function($app) use ($output) { |
|
236 | 236 | $output->writeln("<info>Checking whether the database schema for <$app> can be updated (this can take a long time depending on the database size)</info>"); |
237 | 237 | }); |
238 | - $updater->listen('\OC\Updater', 'appUpgradeCheck', function () use ($output) { |
|
238 | + $updater->listen('\OC\Updater', 'appUpgradeCheck', function() use ($output) { |
|
239 | 239 | $output->writeln('<info>Checked database schema update for apps</info>'); |
240 | 240 | }); |
241 | - $updater->listen('\OC\Updater', 'appUpgradeStarted', function ($app, $version) use ($output) { |
|
241 | + $updater->listen('\OC\Updater', 'appUpgradeStarted', function($app, $version) use ($output) { |
|
242 | 242 | $output->writeln("<info>Updating <$app> ...</info>"); |
243 | 243 | }); |
244 | - $updater->listen('\OC\Updater', 'appUpgrade', function ($app, $version) use ($output) { |
|
244 | + $updater->listen('\OC\Updater', 'appUpgrade', function($app, $version) use ($output) { |
|
245 | 245 | $output->writeln("<info>Updated <$app> to $version</info>"); |
246 | 246 | }); |
247 | - $updater->listen('\OC\Updater', 'failure', function ($message) use($output, $self) { |
|
247 | + $updater->listen('\OC\Updater', 'failure', function($message) use($output, $self) { |
|
248 | 248 | $output->writeln("<error>$message</error>"); |
249 | 249 | }); |
250 | - $updater->listen('\OC\Updater', 'setDebugLogLevel', function ($logLevel, $logLevelName) use($output) { |
|
250 | + $updater->listen('\OC\Updater', 'setDebugLogLevel', function($logLevel, $logLevelName) use($output) { |
|
251 | 251 | $output->writeln("<info>Set log level to debug</info>"); |
252 | 252 | }); |
253 | - $updater->listen('\OC\Updater', 'resetLogLevel', function ($logLevel, $logLevelName) use($output) { |
|
253 | + $updater->listen('\OC\Updater', 'resetLogLevel', function($logLevel, $logLevelName) use($output) { |
|
254 | 254 | $output->writeln("<info>Reset log level</info>"); |
255 | 255 | }); |
256 | - $updater->listen('\OC\Updater', 'startCheckCodeIntegrity', function () use($output) { |
|
256 | + $updater->listen('\OC\Updater', 'startCheckCodeIntegrity', function() use($output) { |
|
257 | 257 | $output->writeln("<info>Starting code integrity check...</info>"); |
258 | 258 | }); |
259 | - $updater->listen('\OC\Updater', 'finishedCheckCodeIntegrity', function () use($output) { |
|
259 | + $updater->listen('\OC\Updater', 'finishedCheckCodeIntegrity', function() use($output) { |
|
260 | 260 | $output->writeln("<info>Finished code integrity check</info>"); |
261 | 261 | }); |
262 | 262 | |
@@ -264,12 +264,12 @@ discard block |
||
264 | 264 | |
265 | 265 | $this->postUpgradeCheck($input, $output); |
266 | 266 | |
267 | - if(!$success) { |
|
267 | + if (!$success) { |
|
268 | 268 | return self::ERROR_FAILURE; |
269 | 269 | } |
270 | 270 | |
271 | 271 | return self::ERROR_SUCCESS; |
272 | - } else if($this->config->getSystemValue('maintenance', false)) { |
|
272 | + } else if ($this->config->getSystemValue('maintenance', false)) { |
|
273 | 273 | //Possible scenario: Nextcloud core is updated but an app failed |
274 | 274 | $output->writeln('<warning>Nextcloud is in maintenance mode</warning>'); |
275 | 275 | $output->write('<comment>Maybe an upgrade is already in process. Please check the ' |
@@ -294,8 +294,8 @@ discard block |
||
294 | 294 | $trustedDomains = $this->config->getSystemValue('trusted_domains', array()); |
295 | 295 | if (empty($trustedDomains)) { |
296 | 296 | $output->write( |
297 | - '<warning>The setting "trusted_domains" could not be ' . |
|
298 | - 'set automatically by the upgrade script, ' . |
|
297 | + '<warning>The setting "trusted_domains" could not be '. |
|
298 | + 'set automatically by the upgrade script, '. |
|
299 | 299 | 'please set it manually</warning>' |
300 | 300 | ); |
301 | 301 | } |
@@ -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 | } |
@@ -28,7 +28,7 @@ |
||
28 | 28 | use OCP\Util; |
29 | 29 | |
30 | 30 | class Application extends App { |
31 | - public function __construct () { |
|
31 | + public function __construct() { |
|
32 | 32 | parent::__construct('twofactor_backupcodes'); |
33 | 33 | } |
34 | 34 |
@@ -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 |
@@ -49,8 +49,8 @@ discard block |
||
49 | 49 | } |
50 | 50 | |
51 | 51 | public function get($key) { |
52 | - $result = self::$cache->get($this->getNameSpace() . $key); |
|
53 | - if ($result === false && !self::$cache->exists($this->getNameSpace() . $key)) { |
|
52 | + $result = self::$cache->get($this->getNameSpace().$key); |
|
53 | + if ($result === false && !self::$cache->exists($this->getNameSpace().$key)) { |
|
54 | 54 | return null; |
55 | 55 | } else { |
56 | 56 | return json_decode($result, true); |
@@ -59,18 +59,18 @@ discard block |
||
59 | 59 | |
60 | 60 | public function set($key, $value, $ttl = 0) { |
61 | 61 | if ($ttl > 0) { |
62 | - return self::$cache->setex($this->getNameSpace() . $key, $ttl, json_encode($value)); |
|
62 | + return self::$cache->setex($this->getNameSpace().$key, $ttl, json_encode($value)); |
|
63 | 63 | } else { |
64 | - return self::$cache->set($this->getNameSpace() . $key, json_encode($value)); |
|
64 | + return self::$cache->set($this->getNameSpace().$key, json_encode($value)); |
|
65 | 65 | } |
66 | 66 | } |
67 | 67 | |
68 | 68 | public function hasKey($key) { |
69 | - return self::$cache->exists($this->getNameSpace() . $key); |
|
69 | + return self::$cache->exists($this->getNameSpace().$key); |
|
70 | 70 | } |
71 | 71 | |
72 | 72 | public function remove($key) { |
73 | - if (self::$cache->del($this->getNameSpace() . $key)) { |
|
73 | + if (self::$cache->del($this->getNameSpace().$key)) { |
|
74 | 74 | return true; |
75 | 75 | } else { |
76 | 76 | return false; |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | } |
79 | 79 | |
80 | 80 | public function clear($prefix = '') { |
81 | - $prefix = $this->getNameSpace() . $prefix . '*'; |
|
81 | + $prefix = $this->getNameSpace().$prefix.'*'; |
|
82 | 82 | $keys = self::$cache->keys($prefix); |
83 | 83 | $deleted = self::$cache->del($keys); |
84 | 84 | |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | if (!is_int($value)) { |
99 | 99 | $value = json_encode($value); |
100 | 100 | } |
101 | - return self::$cache->setnx($this->getPrefix() . $key, $value); |
|
101 | + return self::$cache->setnx($this->getPrefix().$key, $value); |
|
102 | 102 | } |
103 | 103 | |
104 | 104 | /** |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | * @return int | bool |
110 | 110 | */ |
111 | 111 | public function inc($key, $step = 1) { |
112 | - return self::$cache->incrBy($this->getNameSpace() . $key, $step); |
|
112 | + return self::$cache->incrBy($this->getNameSpace().$key, $step); |
|
113 | 113 | } |
114 | 114 | |
115 | 115 | /** |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | if (!$this->hasKey($key)) { |
124 | 124 | return false; |
125 | 125 | } |
126 | - return self::$cache->decrBy($this->getNameSpace() . $key, $step); |
|
126 | + return self::$cache->decrBy($this->getNameSpace().$key, $step); |
|
127 | 127 | } |
128 | 128 | |
129 | 129 | /** |
@@ -138,10 +138,10 @@ discard block |
||
138 | 138 | if (!is_int($new)) { |
139 | 139 | $new = json_encode($new); |
140 | 140 | } |
141 | - self::$cache->watch($this->getNameSpace() . $key); |
|
141 | + self::$cache->watch($this->getNameSpace().$key); |
|
142 | 142 | if ($this->get($key) === $old) { |
143 | 143 | $result = self::$cache->multi() |
144 | - ->set($this->getNameSpace() . $key, $new) |
|
144 | + ->set($this->getNameSpace().$key, $new) |
|
145 | 145 | ->exec(); |
146 | 146 | return ($result === false) ? false : true; |
147 | 147 | } |
@@ -157,10 +157,10 @@ discard block |
||
157 | 157 | * @return bool |
158 | 158 | */ |
159 | 159 | public function cad($key, $old) { |
160 | - self::$cache->watch($this->getNameSpace() . $key); |
|
160 | + self::$cache->watch($this->getNameSpace().$key); |
|
161 | 161 | if ($this->get($key) === $old) { |
162 | 162 | $result = self::$cache->multi() |
163 | - ->del($this->getNameSpace() . $key) |
|
163 | + ->del($this->getNameSpace().$key) |
|
164 | 164 | ->exec(); |
165 | 165 | return ($result === false) ? false : true; |
166 | 166 | } |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | } |
170 | 170 | |
171 | 171 | public function setTTL($key, $ttl) { |
172 | - self::$cache->expire($this->getNameSpace() . $key, $ttl); |
|
172 | + self::$cache->expire($this->getNameSpace().$key, $ttl); |
|
173 | 173 | } |
174 | 174 | |
175 | 175 | static public function isAvailable() { |
@@ -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])) { |
@@ -71,7 +71,7 @@ |
||
71 | 71 | } |
72 | 72 | |
73 | 73 | $counter = 0; |
74 | - $this->userManager->callForSeenUsers(function (IUser $user) use ($counter, $ownCloudAvatars) { |
|
74 | + $this->userManager->callForSeenUsers(function(IUser $user) use ($counter, $ownCloudAvatars) { |
|
75 | 75 | $uid = $user->getUID(); |
76 | 76 | |
77 | 77 | \OC\Files\Filesystem::initMountPoints($uid); |