@@ -35,7 +35,10 @@ discard block |
||
35 | 35 | <p id="enable"> |
36 | 36 | <input type="checkbox" |
37 | 37 | id="enableEncryption" class="checkbox" |
38 | - value="1" <?php if ($_['encryptionEnabled']) print_unescaped('checked="checked" disabled="disabled"'); ?> /> |
|
38 | + value="1" <?php if ($_['encryptionEnabled']) { |
|
39 | + print_unescaped('checked="checked" disabled="disabled"'); |
|
40 | +} |
|
41 | +?> /> |
|
39 | 42 | <label |
40 | 43 | for="enableEncryption"><?php p($l->t('Enable server-side encryption')); ?> <span id="startmigration_msg" class="msg"></span> </label><br/> |
41 | 44 | </p> |
@@ -54,8 +57,14 @@ discard block |
||
54 | 57 | value="<?php p($l->t("Enable encryption")); ?>" /></p> |
55 | 58 | </div> |
56 | 59 | |
57 | - <div id="EncryptionSettingsArea" class="<?php if (!$_['encryptionEnabled']) p('hidden'); ?>"> |
|
58 | - <div id='selectEncryptionModules' class="<?php if (!$_['encryptionReady']) p('hidden'); ?>"> |
|
60 | + <div id="EncryptionSettingsArea" class="<?php if (!$_['encryptionEnabled']) { |
|
61 | + p('hidden'); |
|
62 | +} |
|
63 | +?>"> |
|
64 | + <div id='selectEncryptionModules' class="<?php if (!$_['encryptionReady']) { |
|
65 | + p('hidden'); |
|
66 | +} |
|
67 | +?>"> |
|
59 | 68 | <?php |
60 | 69 | if (empty($_['encryptionModules'])) { |
61 | 70 | p($l->t('No encryption module loaded, please enable an encryption module in the app menu.')); |
@@ -76,7 +85,10 @@ discard block |
||
76 | 85 | </fieldset> |
77 | 86 | <?php } ?> |
78 | 87 | </div> |
79 | - <div id="migrationWarning" class="<?php if ($_['encryptionReady']) p('hidden'); ?>"> |
|
88 | + <div id="migrationWarning" class="<?php if ($_['encryptionReady']) { |
|
89 | + p('hidden'); |
|
90 | +} |
|
91 | +?>"> |
|
80 | 92 | <?php |
81 | 93 | if ($_['encryptionReady'] === false && $_['externalBackendsEnabled'] === true) { |
82 | 94 | p($l->t('You need to migrate your encryption keys from the old encryption (ownCloud <= 8.0) to the new one. Please enable the "Default encryption module" and run \'occ encryption:migrate\'')); |
@@ -71,11 +71,17 @@ discard block |
||
71 | 71 | </select> |
72 | 72 | |
73 | 73 | <label id="mail_smtpsecure_label" for="mail_smtpsecure" |
74 | - <?php if ($_['mail_smtpmode'] !== 'smtp') print_unescaped(' class="hidden"'); ?>> |
|
74 | + <?php if ($_['mail_smtpmode'] !== 'smtp') { |
|
75 | + print_unescaped(' class="hidden"'); |
|
76 | +} |
|
77 | +?>> |
|
75 | 78 | <?php p($l->t('Encryption')); ?> |
76 | 79 | </label> |
77 | 80 | <select name="mail_smtpsecure" id="mail_smtpsecure" |
78 | - <?php if ($_['mail_smtpmode'] !== 'smtp') print_unescaped(' class="hidden"'); ?>> |
|
81 | + <?php if ($_['mail_smtpmode'] !== 'smtp') { |
|
82 | + print_unescaped(' class="hidden"'); |
|
83 | +} |
|
84 | +?>> |
|
79 | 85 | <?php foreach ($mail_smtpsecure as $secure => $name): |
80 | 86 | $selected = ''; |
81 | 87 | if ($secure == $_['mail_smtpsecure']): |
@@ -94,7 +100,10 @@ discard block |
||
94 | 100 | value="<?php p($_['mail_domain']) ?>" /> |
95 | 101 | </p> |
96 | 102 | |
97 | - <p id="setting_smtpauth" <?php if ($_['mail_smtpmode'] !== 'smtp') print_unescaped(' class="hidden"'); ?>> |
|
103 | + <p id="setting_smtpauth" <?php if ($_['mail_smtpmode'] !== 'smtp') { |
|
104 | + print_unescaped(' class="hidden"'); |
|
105 | +} |
|
106 | +?>> |
|
98 | 107 | <label for="mail_smtpauthtype"><?php p($l->t('Authentication method')); ?></label> |
99 | 108 | <select name="mail_smtpauthtype" id="mail_smtpauthtype"> |
100 | 109 | <?php foreach ($mail_smtpauthtype as $authtype => $name): |
@@ -107,11 +116,17 @@ discard block |
||
107 | 116 | </select> |
108 | 117 | |
109 | 118 | <input type="checkbox" name="mail_smtpauth" id="mail_smtpauth" class="checkbox" value="1" |
110 | - <?php if ($_['mail_smtpauth']) print_unescaped('checked="checked"'); ?> /> |
|
119 | + <?php if ($_['mail_smtpauth']) { |
|
120 | + print_unescaped('checked="checked"'); |
|
121 | +} |
|
122 | +?> /> |
|
111 | 123 | <label for="mail_smtpauth"><?php p($l->t('Authentication required')); ?></label> |
112 | 124 | </p> |
113 | 125 | |
114 | - <p id="setting_smtphost" <?php if ($_['mail_smtpmode'] !== 'smtp') print_unescaped(' class="hidden"'); ?>> |
|
126 | + <p id="setting_smtphost" <?php if ($_['mail_smtpmode'] !== 'smtp') { |
|
127 | + print_unescaped(' class="hidden"'); |
|
128 | +} |
|
129 | +?>> |
|
115 | 130 | <label for="mail_smtphost"><?php p($l->t('Server address')); ?></label> |
116 | 131 | <input type="text" name="mail_smtphost" id="mail_smtphost" placeholder="smtp.example.com" |
117 | 132 | value="<?php p($_['mail_smtphost']) ?>" /> |
@@ -121,7 +136,10 @@ discard block |
||
121 | 136 | </p> |
122 | 137 | </form> |
123 | 138 | <form class="mail_settings" id="mail_credentials_settings"> |
124 | - <p id="mail_credentials" <?php if (!$_['mail_smtpauth'] || $_['mail_smtpmode'] !== 'smtp') print_unescaped(' class="hidden"'); ?>> |
|
139 | + <p id="mail_credentials" <?php if (!$_['mail_smtpauth'] || $_['mail_smtpmode'] !== 'smtp') { |
|
140 | + print_unescaped(' class="hidden"'); |
|
141 | +} |
|
142 | +?>> |
|
125 | 143 | <label for="mail_smtpname"><?php p($l->t('Credentials')); ?></label> |
126 | 144 | <input type="text" name="mail_smtpname" id="mail_smtpname" placeholder="<?php p($l->t('SMTP Username'))?>" |
127 | 145 | value="<?php p($_['mail_smtpname']) ?>" /> |
@@ -27,11 +27,15 @@ discard block |
||
27 | 27 | <?php p($l->t('Set up two-factor authentication')) ?> |
28 | 28 | </a> |
29 | 29 | <?php } ?> |
30 | - <?php else: ?> |
|
30 | + <?php else { |
|
31 | + : ?> |
|
31 | 32 | <strong><?php p($l->t('Two-factor authentication is enforced but has not been configured on your account. Use one of your backup codes to log in or contact your admin for assistance.')) ?></strong> |
32 | - <?php endif; ?> |
|
33 | + <?php endif; |
|
34 | +} |
|
35 | +?> |
|
33 | 36 | </p> |
34 | - <?php else: ?> |
|
37 | + <?php else { |
|
38 | + : ?> |
|
35 | 39 | <ul> |
36 | 40 | <?php foreach ($_['providers'] as $provider): ?> |
37 | 41 | <li> |
@@ -45,6 +49,7 @@ discard block |
||
45 | 49 | <?php |
46 | 50 | if ($provider instanceof \OCP\Authentication\TwoFactorAuth\IProvidesIcons) { |
47 | 51 | $icon = $provider->getLightIcon(); |
52 | +} |
|
48 | 53 | } else { |
49 | 54 | $icon = image_path('core', 'actions/password-white.svg'); |
50 | 55 | } |
@@ -61,7 +66,8 @@ discard block |
||
61 | 66 | <?php endif ?> |
62 | 67 | <?php if (!is_null($_['backupProvider'])): ?> |
63 | 68 | <p> |
64 | - <a class="<?php if($noProviders): ?>button primary two-factor-primary<?php else: ?>two-factor-secondary<?php endif ?>" href="<?php p(\OC::$server->getURLGenerator()->linkToRoute('core.TwoFactorChallenge.showChallenge', |
|
69 | + <a class="<?php if($noProviders): ?>button primary two-factor-primary<?php else { |
|
70 | + : ?>two-factor-secondary<?php endif ?>" href="<?php p(\OC::$server->getURLGenerator()->linkToRoute('core.TwoFactorChallenge.showChallenge', |
|
65 | 71 | [ |
66 | 72 | 'challengeProviderId' => $_['backupProvider']->getId(), |
67 | 73 | 'redirect_url' => $_['redirect_url'], |
@@ -70,7 +76,9 @@ discard block |
||
70 | 76 | <?php p($l->t('Use backup code')) ?> |
71 | 77 | </a> |
72 | 78 | </p> |
73 | - <?php endif; ?> |
|
79 | + <?php endif; |
|
80 | +} |
|
81 | +?> |
|
74 | 82 | <p><a class="two-factor-secondary" href="<?php print_unescaped($_['logout_url']); ?>"> |
75 | 83 | <?php p($l->t('Cancel login')) ?> |
76 | 84 | </a></p> |
@@ -76,16 +76,14 @@ |
||
76 | 76 | if ($provider instanceof \OCP\Authentication\TwoFactorAuth\IProvidesIcons) { |
77 | 77 | if ($_['themedark']) { |
78 | 78 | $icon = $provider->getLightIcon(); |
79 | - } |
|
80 | - else { |
|
79 | + } else { |
|
81 | 80 | $icon = $provider->getDarkIcon(); |
82 | 81 | } |
83 | 82 | //fallback icon if the 2factor provider doesn't provide an icon. |
84 | 83 | } else { |
85 | 84 | if ($_['themedark']) { |
86 | 85 | $icon = image_path('core', 'actions/password-white.svg'); |
87 | - } |
|
88 | - else { |
|
86 | + } else { |
|
89 | 87 | $icon = image_path('core', 'actions/password.svg'); |
90 | 88 | } |
91 | 89 |
@@ -125,8 +125,7 @@ |
||
125 | 125 | $query = "CREATE USER '$name'@'%' IDENTIFIED BY '$password'"; |
126 | 126 | $connection->executeUpdate($query); |
127 | 127 | } |
128 | - } |
|
129 | - catch (\Exception $ex){ |
|
128 | + } catch (\Exception $ex){ |
|
130 | 129 | $this->logger->logException($ex, [ |
131 | 130 | 'message' => 'Database user creation failed.', |
132 | 131 | 'level' => ILogger::ERROR, |
@@ -343,8 +343,9 @@ |
||
343 | 343 | $files = []; |
344 | 344 | $physicalDir = $this->getSourcePath($dir); |
345 | 345 | foreach (scandir($physicalDir) as $item) { |
346 | - if (\OC\Files\Filesystem::isIgnoredDir($item)) |
|
347 | - continue; |
|
346 | + if (\OC\Files\Filesystem::isIgnoredDir($item)) { |
|
347 | + continue; |
|
348 | + } |
|
348 | 349 | $physicalItem = $physicalDir . '/' . $item; |
349 | 350 | |
350 | 351 | if (strstr(strtolower($item), strtolower($query)) !== false) { |
@@ -14,10 +14,13 @@ |
||
14 | 14 | ?> |
15 | 15 | <?php if (isset($_['content'])): ?> |
16 | 16 | <?php print_unescaped($_['content']) ?> |
17 | -<?php else: ?> |
|
17 | +<?php else { |
|
18 | + : ?> |
|
18 | 19 | <div class="body-login-container update"> |
19 | 20 | <div class="icon-big icon-search icon-white"></div> |
20 | - <h2><?php p($l->t('File not found')); ?></h2> |
|
21 | + <h2><?php p($l->t('File not found')); |
|
22 | +} |
|
23 | +?></h2> |
|
21 | 24 | <p class="infogroup"><?php p($l->t('The document could not be found on the server. Maybe the share was deleted or has expired?')); ?></p> |
22 | 25 | <p><a class="button primary" href="<?php p(\OC::$server->getURLGenerator()->linkTo('', 'index.php')) ?>"> |
23 | 26 | <?php p($l->t('Back to %s', [$theme->getName()])); ?> |
@@ -271,8 +271,9 @@ |
||
271 | 271 | } |
272 | 272 | foreach ($dirs as $dir) { |
273 | 273 | foreach ($exts as $ext) { |
274 | - if ($check_fn("$dir/$name" . $ext)) |
|
275 | - return true; |
|
274 | + if ($check_fn("$dir/$name" . $ext)) { |
|
275 | + return true; |
|
276 | + } |
|
276 | 277 | } |
277 | 278 | } |
278 | 279 | return false; |
@@ -133,10 +133,10 @@ |
||
133 | 133 | if ($signalClass) { |
134 | 134 | if ($signalName) { |
135 | 135 | self::$registered[$signalClass][$signalName]=[]; |
136 | - }else{ |
|
136 | + } else{ |
|
137 | 137 | self::$registered[$signalClass]=[]; |
138 | 138 | } |
139 | - }else{ |
|
139 | + } else{ |
|
140 | 140 | self::$registered=[]; |
141 | 141 | } |
142 | 142 | } |