@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | $supportedShareTypes = $this->config->getSupportedShareTypes($resourceType); |
147 | 147 | if (!in_array($shareType, $supportedShareTypes)) { |
148 | 148 | return new JSONResponse( |
149 | - ['message' => 'Share type "' . $shareType . '" not implemented'], |
|
149 | + ['message' => 'Share type "'.$shareType.'" not implemented'], |
|
150 | 150 | Http::STATUS_NOT_IMPLEMENTED |
151 | 151 | ); |
152 | 152 | } |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | |
160 | 160 | if (!$this->userManager->userExists($shareWith)) { |
161 | 161 | return new JSONResponse( |
162 | - ['message' => 'User "' . $shareWith . '" does not exists at ' . $this->urlGenerator->getBaseUrl()], |
|
162 | + ['message' => 'User "'.$shareWith.'" does not exists at '.$this->urlGenerator->getBaseUrl()], |
|
163 | 163 | Http::STATUS_BAD_REQUEST |
164 | 164 | ); |
165 | 165 | } |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | if ($shareType === 'group') { |
169 | 169 | if (!$this->groupManager->groupExists($shareWith)) { |
170 | 170 | return new JSONResponse( |
171 | - ['message' => 'Group "' . $shareWith . '" does not exists at ' . $this->urlGenerator->getBaseUrl()], |
|
171 | + ['message' => 'Group "'.$shareWith.'" does not exists at '.$this->urlGenerator->getBaseUrl()], |
|
172 | 172 | Http::STATUS_BAD_REQUEST |
173 | 173 | ); |
174 | 174 | } |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | ); |
202 | 202 | } catch (\Exception $e) { |
203 | 203 | return new JSONResponse( |
204 | - ['message' => 'Internal error at ' . $this->urlGenerator->getBaseUrl()], |
|
204 | + ['message' => 'Internal error at '.$this->urlGenerator->getBaseUrl()], |
|
205 | 205 | Http::STATUS_BAD_REQUEST |
206 | 206 | ); |
207 | 207 | } |
@@ -268,12 +268,12 @@ discard block |
||
268 | 268 | return new JSONResponse(["message" => "RESOURCE_NOT_FOUND"], Http::STATUS_FORBIDDEN); |
269 | 269 | } catch (\Exception $e) { |
270 | 270 | return new JSONResponse( |
271 | - ['message' => 'Internal error at ' . $this->urlGenerator->getBaseUrl()], |
|
271 | + ['message' => 'Internal error at '.$this->urlGenerator->getBaseUrl()], |
|
272 | 272 | Http::STATUS_BAD_REQUEST |
273 | 273 | ); |
274 | 274 | } |
275 | 275 | |
276 | - return new JSONResponse($result,Http::STATUS_CREATED); |
|
276 | + return new JSONResponse($result, Http::STATUS_CREATED); |
|
277 | 277 | } |
278 | 278 | |
279 | 279 | /** |
@@ -284,13 +284,13 @@ discard block |
||
284 | 284 | */ |
285 | 285 | private function mapUid($uid) { |
286 | 286 | // FIXME this should be a method in the user management instead |
287 | - $this->logger->debug('shareWith before, ' . $uid, ['app' => $this->appName]); |
|
287 | + $this->logger->debug('shareWith before, '.$uid, ['app' => $this->appName]); |
|
288 | 288 | \OCP\Util::emitHook( |
289 | 289 | '\OCA\Files_Sharing\API\Server2Server', |
290 | 290 | 'preLoginNameUsedAsUserName', |
291 | 291 | ['uid' => &$uid] |
292 | 292 | ); |
293 | - $this->logger->debug('shareWith after, ' . $uid, ['app' => $this->appName]); |
|
293 | + $this->logger->debug('shareWith after, '.$uid, ['app' => $this->appName]); |
|
294 | 294 | |
295 | 295 | return $uid; |
296 | 296 | } |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | $encryptedRecoveryKey = $this->crypt->encryptPrivateKey($decryptedRecoveryKey, $newPassword); |
127 | 127 | $header = $this->crypt->generateHeader(); |
128 | 128 | if ($encryptedRecoveryKey) { |
129 | - $this->keyManager->setSystemPrivateKey($this->keyManager->getRecoveryKeyId(), $header . $encryptedRecoveryKey); |
|
129 | + $this->keyManager->setSystemPrivateKey($this->keyManager->getRecoveryKeyId(), $header.$encryptedRecoveryKey); |
|
130 | 130 | return true; |
131 | 131 | } |
132 | 132 | return false; |
@@ -187,9 +187,9 @@ discard block |
||
187 | 187 | $value); |
188 | 188 | |
189 | 189 | if ($value === '1') { |
190 | - $this->addRecoveryKeys('/' . $this->user->getUID() . '/files/'); |
|
190 | + $this->addRecoveryKeys('/'.$this->user->getUID().'/files/'); |
|
191 | 191 | } else { |
192 | - $this->removeRecoveryKeys('/' . $this->user->getUID() . '/files/'); |
|
192 | + $this->removeRecoveryKeys('/'.$this->user->getUID().'/files/'); |
|
193 | 193 | } |
194 | 194 | |
195 | 195 | return true; |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | foreach ($dirContent as $item) { |
208 | 208 | $filePath = $item->getPath(); |
209 | 209 | if ($item['type'] === 'dir') { |
210 | - $this->addRecoveryKeys($filePath . '/'); |
|
210 | + $this->addRecoveryKeys($filePath.'/'); |
|
211 | 211 | } else { |
212 | 212 | $fileKey = $this->keyManager->getFileKey($filePath, $this->user->getUID()); |
213 | 213 | if (!empty($fileKey)) { |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | foreach ($dirContent as $item) { |
236 | 236 | $filePath = $item->getPath(); |
237 | 237 | if ($item['type'] === 'dir') { |
238 | - $this->removeRecoveryKeys($filePath . '/'); |
|
238 | + $this->removeRecoveryKeys($filePath.'/'); |
|
239 | 239 | } else { |
240 | 240 | $this->keyManager->deleteShareKey($filePath, $this->keyManager->getRecoveryKeyId()); |
241 | 241 | } |
@@ -253,7 +253,7 @@ discard block |
||
253 | 253 | |
254 | 254 | $privateKey = $this->crypt->decryptPrivateKey($encryptedKey, $recoveryPassword); |
255 | 255 | if ($privateKey !== false) { |
256 | - $this->recoverAllFiles('/' . $user . '/files/', $privateKey, $user); |
|
256 | + $this->recoverAllFiles('/'.$user.'/files/', $privateKey, $user); |
|
257 | 257 | } |
258 | 258 | } |
259 | 259 | |
@@ -271,7 +271,7 @@ discard block |
||
271 | 271 | // Get relative path from encryption/keyfiles |
272 | 272 | $filePath = $item->getPath(); |
273 | 273 | if ($this->view->is_dir($filePath)) { |
274 | - $this->recoverAllFiles($filePath . '/', $privateKey, $uid); |
|
274 | + $this->recoverAllFiles($filePath.'/', $privateKey, $uid); |
|
275 | 275 | } else { |
276 | 276 | $this->recoverFile($filePath, $privateKey, $uid); |
277 | 277 | } |
@@ -14,7 +14,7 @@ |
||
14 | 14 | value="1" <?php if ($_['encryptHomeStorage']) { |
15 | 15 | print_unescaped('checked="checked"'); |
16 | 16 | } ?> /> |
17 | - <label for="encryptHomeStorage"><?php p($l->t('Encrypt the home storage'));?></label></br> |
|
17 | + <label for="encryptHomeStorage"><?php p($l->t('Encrypt the home storage')); ?></label></br> |
|
18 | 18 | <em><?php p($l->t("Enabling this option encrypts all files stored on the main storage, otherwise only files on external storage will be encrypted")); ?></em> |
19 | 19 | </p> |
20 | 20 | <br /> |
@@ -87,9 +87,9 @@ |
||
87 | 87 | private function getLegacyForms() { |
88 | 88 | $forms = \OC_App::getForms('admin'); |
89 | 89 | |
90 | - $forms = array_map(function ($form) { |
|
90 | + $forms = array_map(function($form) { |
|
91 | 91 | if (preg_match('%(<h2(?P<class>[^>]*)>.*?</h2>)%i', $form, $regs)) { |
92 | - $sectionName = str_replace('<h2' . $regs['class'] . '>', '', $regs[0]); |
|
92 | + $sectionName = str_replace('<h2'.$regs['class'].'>', '', $regs[0]); |
|
93 | 93 | $sectionName = str_replace('</h2>', '', $sectionName); |
94 | 94 | $anchor = strtolower($sectionName); |
95 | 95 | $anchor = str_replace(' ', '-', $anchor); |
@@ -79,9 +79,9 @@ |
||
79 | 79 | private function getLegacyForms() { |
80 | 80 | $forms = \OC_App::getForms('personal'); |
81 | 81 | |
82 | - $forms = array_map(function ($form) { |
|
82 | + $forms = array_map(function($form) { |
|
83 | 83 | if (preg_match('%(<h2(?P<class>[^>]*)>.*?</h2>)%i', $form, $regs)) { |
84 | - $sectionName = str_replace('<h2' . $regs['class'] . '>', '', $regs[0]); |
|
84 | + $sectionName = str_replace('<h2'.$regs['class'].'>', '', $regs[0]); |
|
85 | 85 | $sectionName = str_replace('</h2>', '', $sectionName); |
86 | 86 | $anchor = strtolower($sectionName); |
87 | 87 | $anchor = str_replace(' ', '-', $anchor); |
@@ -229,7 +229,7 @@ |
||
229 | 229 | 'message' => $this->l->t('Please provide an admin recovery password; otherwise, all user data will be lost.'), |
230 | 230 | ] |
231 | 231 | ]); |
232 | - } elseif ($recoveryEnabledForUser && ! $validRecoveryPassword) { |
|
232 | + } elseif ($recoveryEnabledForUser && !$validRecoveryPassword) { |
|
233 | 233 | return new JSONResponse([ |
234 | 234 | 'status' => 'error', |
235 | 235 | 'data' => [ |
@@ -76,7 +76,7 @@ |
||
76 | 76 | } |
77 | 77 | |
78 | 78 | $documentationUrl = $this->urlGenerator->getAbsoluteURL( |
79 | - $this->urlGenerator->linkTo('core', 'doc/' . $mode . '/index.html') |
|
79 | + $this->urlGenerator->linkTo('core', 'doc/'.$mode.'/index.html') |
|
80 | 80 | ); |
81 | 81 | |
82 | 82 | $urlUserDocs = $this->urlGenerator->linkToRoute('settings.Help.help', ['mode' => 'user']); |
@@ -28,21 +28,21 @@ discard block |
||
28 | 28 | ?> |
29 | 29 | |
30 | 30 | <div id="security-warning" class="section"> |
31 | - <h2 class="inlineblock"><?php p($l->t('Security & setup warnings'));?></h2> |
|
32 | - <a target="_blank" rel="noreferrer" class="icon-info" title="<?php p($l->t('Open documentation'));?>" href="<?php p(link_to_docs('admin-warnings')); ?>"></a> |
|
33 | - <p class="settings-hint"><?php p($l->t('It\'s important for the security and performance of your instance that everything is configured correctly. To help you with that we are doing some automatic checks. Please see the linked documentation for more information.'));?></p> |
|
31 | + <h2 class="inlineblock"><?php p($l->t('Security & setup warnings')); ?></h2> |
|
32 | + <a target="_blank" rel="noreferrer" class="icon-info" title="<?php p($l->t('Open documentation')); ?>" href="<?php p(link_to_docs('admin-warnings')); ?>"></a> |
|
33 | + <p class="settings-hint"><?php p($l->t('It\'s important for the security and performance of your instance that everything is configured correctly. To help you with that we are doing some automatic checks. Please see the linked documentation for more information.')); ?></p> |
|
34 | 34 | |
35 | 35 | <div id="security-warning-state-ok" class="hidden"> |
36 | - <span class="icon icon-checkmark-white"></span><span class="message"><?php p($l->t('All checks passed.'));?></span> |
|
36 | + <span class="icon icon-checkmark-white"></span><span class="message"><?php p($l->t('All checks passed.')); ?></span> |
|
37 | 37 | </div> |
38 | 38 | <div id="security-warning-state-failure" class="hidden"> |
39 | - <span class="icon icon-close-white"></span><span class="message"><?php p($l->t('There are some errors regarding your setup.'));?></span> |
|
39 | + <span class="icon icon-close-white"></span><span class="message"><?php p($l->t('There are some errors regarding your setup.')); ?></span> |
|
40 | 40 | </div> |
41 | 41 | <div id="security-warning-state-warning" class="hidden"> |
42 | - <span class="icon icon-error-white"></span><span class="message"><?php p($l->t('There are some warnings regarding your setup.'));?></span> |
|
42 | + <span class="icon icon-error-white"></span><span class="message"><?php p($l->t('There are some warnings regarding your setup.')); ?></span> |
|
43 | 43 | </div> |
44 | 44 | <div id="security-warning-state-loading"> |
45 | - <span class="icon loading"></span><span class="message"><?php p($l->t('Checking for system and security issues.'));?></span> |
|
45 | + <span class="icon loading"></span><span class="message"><?php p($l->t('Checking for system and security issues.')); ?></span> |
|
46 | 46 | </div> |
47 | 47 | |
48 | 48 | <div id="postsetupchecks" data-check-wellknown="<?php if ($_['checkForWorkingWellKnownSetup']) { |
@@ -59,13 +59,13 @@ discard block |
||
59 | 59 | </p> |
60 | 60 | |
61 | 61 | <p class="extra-top-margin"> |
62 | - <?php print_unescaped($l->t('Check the security of your Nextcloud over <a target="_blank" rel="noreferrer noopener" href="%s">our security scan ↗</a>.', ['https://scan.nextcloud.com']));?> |
|
62 | + <?php print_unescaped($l->t('Check the security of your Nextcloud over <a target="_blank" rel="noreferrer noopener" href="%s">our security scan ↗</a>.', ['https://scan.nextcloud.com'])); ?> |
|
63 | 63 | </p> |
64 | 64 | |
65 | 65 | </div> |
66 | 66 | |
67 | 67 | <div id="version" class="section"> |
68 | 68 | <!-- should be the last part, so Updater can follow if enabled (it has no heading therefore). --> |
69 | - <h2><?php p($l->t('Version'));?></h2> |
|
69 | + <h2><?php p($l->t('Version')); ?></h2> |
|
70 | 70 | <p><strong><a href="<?php print_unescaped($theme->getBaseUrl()); ?>" rel="noreferrer noopener" target="_blank"><?php p($theme->getTitle()); ?></a> <?php p(OC_Util::getHumanVersion()) ?></strong></p> |
71 | 71 | </div> |
@@ -28,6 +28,6 @@ |
||
28 | 28 | |
29 | 29 | <?php foreach ($_['forms'] as $form) { |
30 | 30 | if (isset($form['form'])) {?> |
31 | - <div id="<?php isset($form['anchor']) ? p($form['anchor']) : p('');?>"><?php print_unescaped($form['form']);?></div> |
|
31 | + <div id="<?php isset($form['anchor']) ? p($form['anchor']) : p(''); ?>"><?php print_unescaped($form['form']); ?></div> |
|
32 | 32 | <?php } |
33 | 33 | } ?> |