@@ -32,13 +32,13 @@ |
||
32 | 32 | |
33 | 33 | |
34 | 34 | <div id="security" class="section"> |
35 | - <h2><?php p($l->t('Security'));?></h2> |
|
36 | - <p class="settings-hint hidden-when-empty"><?php p($l->t('Web, desktop and mobile clients currently logged in to your account.'));?></p> |
|
35 | + <h2><?php p($l->t('Security')); ?></h2> |
|
36 | + <p class="settings-hint hidden-when-empty"><?php p($l->t('Web, desktop and mobile clients currently logged in to your account.')); ?></p> |
|
37 | 37 | <table class="icon-loading"> |
38 | 38 | <thead class="token-list-header"> |
39 | 39 | <tr> |
40 | - <th><?php p($l->t('Device'));?></th> |
|
41 | - <th><?php p($l->t('Last activity'));?></th> |
|
40 | + <th><?php p($l->t('Device')); ?></th> |
|
41 | + <th><?php p($l->t('Last activity')); ?></th> |
|
42 | 42 | <th></th> |
43 | 43 | </tr> |
44 | 44 | </thead> |
@@ -362,77 +362,77 @@ |
||
362 | 362 | $policy .= "base-uri 'none';"; |
363 | 363 | $policy .= "manifest-src 'self';"; |
364 | 364 | |
365 | - if(!empty($this->allowedScriptDomains) || $this->inlineScriptAllowed || $this->evalScriptAllowed) { |
|
365 | + if (!empty($this->allowedScriptDomains) || $this->inlineScriptAllowed || $this->evalScriptAllowed) { |
|
366 | 366 | $policy .= 'script-src '; |
367 | - if(is_string($this->useJsNonce)) { |
|
367 | + if (is_string($this->useJsNonce)) { |
|
368 | 368 | $policy .= '\'nonce-'.base64_encode($this->useJsNonce).'\''; |
369 | 369 | $allowedScriptDomains = array_flip($this->allowedScriptDomains); |
370 | 370 | unset($allowedScriptDomains['\'self\'']); |
371 | 371 | $this->allowedScriptDomains = array_flip($allowedScriptDomains); |
372 | - if(count($allowedScriptDomains) !== 0) { |
|
372 | + if (count($allowedScriptDomains) !== 0) { |
|
373 | 373 | $policy .= ' '; |
374 | 374 | } |
375 | 375 | } |
376 | - if(is_array($this->allowedScriptDomains)) { |
|
376 | + if (is_array($this->allowedScriptDomains)) { |
|
377 | 377 | $policy .= implode(' ', $this->allowedScriptDomains); |
378 | 378 | } |
379 | - if($this->inlineScriptAllowed) { |
|
379 | + if ($this->inlineScriptAllowed) { |
|
380 | 380 | $policy .= ' \'unsafe-inline\''; |
381 | 381 | } |
382 | - if($this->evalScriptAllowed) { |
|
382 | + if ($this->evalScriptAllowed) { |
|
383 | 383 | $policy .= ' \'unsafe-eval\''; |
384 | 384 | } |
385 | 385 | $policy .= ';'; |
386 | 386 | } |
387 | 387 | |
388 | - if(!empty($this->allowedStyleDomains) || $this->inlineStyleAllowed) { |
|
388 | + if (!empty($this->allowedStyleDomains) || $this->inlineStyleAllowed) { |
|
389 | 389 | $policy .= 'style-src '; |
390 | - if(is_array($this->allowedStyleDomains)) { |
|
390 | + if (is_array($this->allowedStyleDomains)) { |
|
391 | 391 | $policy .= implode(' ', $this->allowedStyleDomains); |
392 | 392 | } |
393 | - if($this->inlineStyleAllowed) { |
|
393 | + if ($this->inlineStyleAllowed) { |
|
394 | 394 | $policy .= ' \'unsafe-inline\''; |
395 | 395 | } |
396 | 396 | $policy .= ';'; |
397 | 397 | } |
398 | 398 | |
399 | - if(!empty($this->allowedImageDomains)) { |
|
400 | - $policy .= 'img-src ' . implode(' ', $this->allowedImageDomains); |
|
399 | + if (!empty($this->allowedImageDomains)) { |
|
400 | + $policy .= 'img-src '.implode(' ', $this->allowedImageDomains); |
|
401 | 401 | $policy .= ';'; |
402 | 402 | } |
403 | 403 | |
404 | - if(!empty($this->allowedFontDomains)) { |
|
405 | - $policy .= 'font-src ' . implode(' ', $this->allowedFontDomains); |
|
404 | + if (!empty($this->allowedFontDomains)) { |
|
405 | + $policy .= 'font-src '.implode(' ', $this->allowedFontDomains); |
|
406 | 406 | $policy .= ';'; |
407 | 407 | } |
408 | 408 | |
409 | - if(!empty($this->allowedConnectDomains)) { |
|
410 | - $policy .= 'connect-src ' . implode(' ', $this->allowedConnectDomains); |
|
409 | + if (!empty($this->allowedConnectDomains)) { |
|
410 | + $policy .= 'connect-src '.implode(' ', $this->allowedConnectDomains); |
|
411 | 411 | $policy .= ';'; |
412 | 412 | } |
413 | 413 | |
414 | - if(!empty($this->allowedMediaDomains)) { |
|
415 | - $policy .= 'media-src ' . implode(' ', $this->allowedMediaDomains); |
|
414 | + if (!empty($this->allowedMediaDomains)) { |
|
415 | + $policy .= 'media-src '.implode(' ', $this->allowedMediaDomains); |
|
416 | 416 | $policy .= ';'; |
417 | 417 | } |
418 | 418 | |
419 | - if(!empty($this->allowedObjectDomains)) { |
|
420 | - $policy .= 'object-src ' . implode(' ', $this->allowedObjectDomains); |
|
419 | + if (!empty($this->allowedObjectDomains)) { |
|
420 | + $policy .= 'object-src '.implode(' ', $this->allowedObjectDomains); |
|
421 | 421 | $policy .= ';'; |
422 | 422 | } |
423 | 423 | |
424 | - if(!empty($this->allowedFrameDomains)) { |
|
425 | - $policy .= 'frame-src ' . implode(' ', $this->allowedFrameDomains); |
|
424 | + if (!empty($this->allowedFrameDomains)) { |
|
425 | + $policy .= 'frame-src '.implode(' ', $this->allowedFrameDomains); |
|
426 | 426 | $policy .= ';'; |
427 | 427 | } |
428 | 428 | |
429 | - if(!empty($this->allowedChildSrcDomains)) { |
|
430 | - $policy .= 'child-src ' . implode(' ', $this->allowedChildSrcDomains); |
|
429 | + if (!empty($this->allowedChildSrcDomains)) { |
|
430 | + $policy .= 'child-src '.implode(' ', $this->allowedChildSrcDomains); |
|
431 | 431 | $policy .= ';'; |
432 | 432 | } |
433 | 433 | |
434 | - if(!empty($this->allowedFrameAncestors)) { |
|
435 | - $policy .= 'frame-ancestors ' . implode(' ', $this->allowedFrameAncestors); |
|
434 | + if (!empty($this->allowedFrameAncestors)) { |
|
435 | + $policy .= 'frame-ancestors '.implode(' ', $this->allowedFrameAncestors); |
|
436 | 436 | $policy .= ';'; |
437 | 437 | } |
438 | 438 |
@@ -1,12 +1,12 @@ |
||
1 | 1 | <div class="error"> |
2 | 2 | <h2><?php p($l->t('Error')) ?></h2> |
3 | 3 | <ul> |
4 | - <?php foreach($_["errors"] as $error):?> |
|
4 | + <?php foreach ($_["errors"] as $error):?> |
|
5 | 5 | <li> |
6 | 6 | <p><?php p($error['error']) ?></p> |
7 | - <?php if(isset($error['hint']) && $error['hint']): ?> |
|
7 | + <?php if (isset($error['hint']) && $error['hint']): ?> |
|
8 | 8 | <p class='hint'><?php p($error['hint']) ?></p> |
9 | - <?php endif;?> |
|
9 | + <?php endif; ?> |
|
10 | 10 | </li> |
11 | 11 | <?php endforeach ?> |
12 | 12 | </ul> |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | <ul> |
15 | 15 | <li><?php p($l->t('Remote Address: %s', $_['remoteAddr'])) ?></li> |
16 | 16 | <li><?php p($l->t('Request ID: %s', $_['requestID'])) ?></li> |
17 | - <?php if($_['debugMode']): ?> |
|
17 | + <?php if ($_['debugMode']): ?> |
|
18 | 18 | <li><?php p($l->t('Type: %s', $_['errorClass'])) ?></li> |
19 | 19 | <li><?php p($l->t('Code: %s', $_['errorCode'])) ?></li> |
20 | 20 | <li><?php p($l->t('Message: %s', $_['errorMsg'])) ?></li> |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | <?php endif; ?> |
24 | 24 | </ul> |
25 | 25 | |
26 | - <?php if($_['debugMode']): ?> |
|
26 | + <?php if ($_['debugMode']): ?> |
|
27 | 27 | <br /> |
28 | 28 | <h3><?php p($l->t('Trace')) ?></h3> |
29 | 29 | <pre><?php p($_['trace']) ?></pre> |
@@ -64,7 +64,7 @@ |
||
64 | 64 | */ |
65 | 65 | public function getForm() { |
66 | 66 | $cloudID = $this->userSession->getUser()->getCloudId(); |
67 | - $url = 'https://nextcloud.com/federation#' . $cloudID; |
|
67 | + $url = 'https://nextcloud.com/federation#'.$cloudID; |
|
68 | 68 | |
69 | 69 | $parameters = [ |
70 | 70 | 'outgoingServer2serverShareEnabled' => $this->federatedShareProvider->isOutgoingServer2serverShareEnabled(), |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | use OCP\Settings\IIconSection; |
29 | 29 | use OCP\Settings\ISettings; |
30 | 30 | |
31 | -trait CommonSettingsTrait { |
|
31 | +trait CommonSettingsTrait { |
|
32 | 32 | /** @var ISettingsManager */ |
33 | 33 | private $settingsManager; |
34 | 34 | |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | 'admin' => [] |
43 | 43 | ]; |
44 | 44 | |
45 | - if(\OC_User::isAdminUser(\OC_User::getUser())) { |
|
45 | + if (\OC_User::isAdminUser(\OC_User::getUser())) { |
|
46 | 46 | $templateParameters['admin'] = $this->formatAdminSections($currentType, $currentSection); |
47 | 47 | } |
48 | 48 | |
@@ -54,11 +54,11 @@ discard block |
||
54 | 54 | protected function formatSections($sections, $currentSection, $type, $currentType) { |
55 | 55 | $templateParameters = []; |
56 | 56 | /** @var \OCP\Settings\ISection[] $prioritizedSections */ |
57 | - foreach($sections as $prioritizedSections) { |
|
57 | + foreach ($sections as $prioritizedSections) { |
|
58 | 58 | foreach ($prioritizedSections as $section) { |
59 | - if($type === 'admin') { |
|
59 | + if ($type === 'admin') { |
|
60 | 60 | $settings = $this->settingsManager->getAdminSettings($section->getID()); |
61 | - } else if($type === 'personal') { |
|
61 | + } else if ($type === 'personal') { |
|
62 | 62 | $settings = $this->settingsManager->getPersonalSettings($section->getID()); |
63 | 63 | } |
64 | 64 | if (empty($settings)) { |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | /** |
36 | 36 | * @since 9.1.0 |
37 | 37 | */ |
38 | - const KEY_ADMIN_SECTION = 'admin-section'; |
|
38 | + const KEY_ADMIN_SECTION = 'admin-section'; |
|
39 | 39 | |
40 | 40 | /** |
41 | 41 | * @since 13.0.0 |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | /** |
46 | 46 | * @since 13.0.0 |
47 | 47 | */ |
48 | - const KEY_PERSONAL_SECTION = 'personal-section'; |
|
48 | + const KEY_PERSONAL_SECTION = 'personal-section'; |
|
49 | 49 | |
50 | 50 | /** |
51 | 51 | * sets up settings according to data specified by an apps info.xml, within |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | |
108 | 108 | $suggestedOverwriteCliUrl = ''; |
109 | 109 | if ($this->config->getSystemValue('overwrite.cli.url', '') === '') { |
110 | - $suggestedOverwriteCliUrl = $this->request->getServerProtocol() . '://' . $this->request->getInsecureServerHost() . \OC::$WEBROOT; |
|
110 | + $suggestedOverwriteCliUrl = $this->request->getServerProtocol().'://'.$this->request->getInsecureServerHost().\OC::$WEBROOT; |
|
111 | 111 | if (!$this->config->getSystemValue('config_is_read_only', false)) { |
112 | 112 | // Set the overwrite URL when it was not set yet. |
113 | 113 | $this->config->setSystemValue('overwrite.cli.url', $suggestedOverwriteCliUrl); |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | 'lastcron' => $this->config->getAppValue('core', 'lastcron', false), |
135 | 135 | 'cronErrors' => $this->config->getAppValue('core', 'cronErrors'), |
136 | 136 | 'cli_based_cron_possible' => function_exists('posix_getpwuid'), |
137 | - 'cli_based_cron_user' => function_exists('posix_getpwuid') ? posix_getpwuid(fileowner(\OC::$configDir . 'config.php'))['name'] : '', |
|
137 | + 'cli_based_cron_user' => function_exists('posix_getpwuid') ? posix_getpwuid(fileowner(\OC::$configDir.'config.php'))['name'] : '', |
|
138 | 138 | ]; |
139 | 139 | |
140 | 140 | return new TemplateResponse('settings', 'settings/admin/server', $parameters, ''); |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | 'edition' => '', |
96 | 96 | ); |
97 | 97 | |
98 | - if($this->userSession->isLoggedIn()) { |
|
98 | + if ($this->userSession->isLoggedIn()) { |
|
99 | 99 | $result['capabilities'] = $this->capabilitiesManager->getCapabilities(); |
100 | 100 | } else { |
101 | 101 | $result['capabilities'] = $this->capabilitiesManager->getCapabilities(true); |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | public function getIdentityProof($cloudId) { |
139 | 139 | $userObject = $this->userManager->get($cloudId); |
140 | 140 | |
141 | - if($userObject !== null) { |
|
141 | + if ($userObject !== null) { |
|
142 | 142 | $key = $this->keyManager->getKey($userObject); |
143 | 143 | $data = [ |
144 | 144 | 'public' => $key->getPublic(), |