@@ -35,19 +35,19 @@ discard block |
||
35 | 35 | |
36 | 36 | <div class="section" id="mail_general_settings"> |
37 | 37 | <?php if ($_['mail_smtpmode'] === 'null') { ?> |
38 | - <h2><?php p($l->t('Email server'));?></h2> |
|
38 | + <h2><?php p($l->t('Email server')); ?></h2> |
|
39 | 39 | |
40 | 40 | <p> |
41 | 41 | <?php p($l->t('Mail delivery is disabled by instance config "%s".', ['mail_smtpmode'])); ?> |
42 | 42 | </p> |
43 | 43 | <?php } else { ?> |
44 | 44 | <form id="mail_general_settings_form" class="mail_settings"> |
45 | - <h2><?php p($l->t('Email server'));?></h2> |
|
45 | + <h2><?php p($l->t('Email server')); ?></h2> |
|
46 | 46 | <a target="_blank" |
47 | 47 | rel="noreferrer noopener" class="icon-info" |
48 | - title="<?php p($l->t('Open documentation'));?>" |
|
48 | + title="<?php p($l->t('Open documentation')); ?>" |
|
49 | 49 | href="<?php p(link_to_docs('admin-email')); ?>" |
50 | - aria-label="<?php p($l->t('Open documentation'));?>"></a> |
|
50 | + aria-label="<?php p($l->t('Open documentation')); ?>"></a> |
|
51 | 51 | <p class="settings-hint"> |
52 | 52 | <?php p($l->t('It is important to set up this server to be able to send emails, like for password reset and notifications.')); ?> |
53 | 53 | </p> |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | $selected = 'selected="selected"'; |
63 | 63 | endif; ?> |
64 | 64 | <option value="<?php p($smtpmode[0])?>" <?php p($selected) ?>><?php p($smtpmode[1]) ?></option> |
65 | - <?php endforeach;?> |
|
65 | + <?php endforeach; ?> |
|
66 | 66 | </select> |
67 | 67 | </p> |
68 | 68 | |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | $selected = 'selected="selected"'; |
84 | 84 | endif; ?> |
85 | 85 | <option value="<?php p($secure)?>" <?php p($selected) ?>><?php p($name) ?></option> |
86 | - <?php endforeach;?> |
|
86 | + <?php endforeach; ?> |
|
87 | 87 | </select> |
88 | 88 | </p> |
89 | 89 | |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | <select name="mail_sendmailmode" id="mail_sendmailmode"> |
95 | 95 | <?php foreach ($mail_sendmailmode as $sendmailmodeValue => $sendmailmodeLabel): ?> |
96 | 96 | <option value="<?php p($sendmailmodeValue)?>" <?= $sendmailmodeValue === $_['mail_sendmailmode'] ? 'selected="selected"' : '' ?>><?php p($sendmailmodeLabel) ?></option> |
97 | - <?php endforeach;?> |
|
97 | + <?php endforeach; ?> |
|
98 | 98 | </select> |
99 | 99 | </p> |
100 | 100 |
@@ -8,7 +8,7 @@ |
||
8 | 8 | <p> |
9 | 9 | <a href="<?php p($_['reasons-use-nextcloud-pdf-link']); ?>" id="open-reasons-use-nextcloud-pdf" class="link-button" target="_blank"> |
10 | 10 | <span class="icon-file-text" aria-hidden="true"></span> |
11 | - <?php p($l->t('Reasons to use Nextcloud in your organization'));?> |
|
11 | + <?php p($l->t('Reasons to use Nextcloud in your organization')); ?> |
|
12 | 12 | </a> |
13 | 13 | </p> |
14 | 14 | <p> |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | <?php foreach ($_['forms']['personal'] as $form) { |
21 | 21 | if (isset($form['anchor'])) { |
22 | 22 | $anchor = \OCP\Server::get(\OCP\IURLGenerator::class)->linkToRoute('settings.PersonalSettings.index', ['section' => $form['anchor']]); |
23 | - $class = 'nav-icon-' . $form['anchor']; |
|
23 | + $class = 'nav-icon-'.$form['anchor']; |
|
24 | 24 | $sectionName = $form['section-name']; ?> |
25 | 25 | <li <?php print_unescaped($form['active'] ? ' class="active"' : ''); ?> data-section-id="<?php print_unescaped($form['anchor']); ?>" data-section-type="personal"> |
26 | 26 | <a href="<?php p($anchor); ?>"<?php print_unescaped($form['active'] ? ' aria-current="page"' : ''); ?>> |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | <?php foreach ($_['forms']['admin'] as $form) { |
48 | 48 | if (isset($form['anchor'])) { |
49 | 49 | $anchor = \OCP\Server::get(\OCP\IURLGenerator::class)->linkToRoute('settings.AdminSettings.index', ['section' => $form['anchor']]); |
50 | - $class = 'nav-icon-' . $form['anchor']; |
|
50 | + $class = 'nav-icon-'.$form['anchor']; |
|
51 | 51 | $sectionName = $form['section-name']; ?> |
52 | 52 | <li <?php print_unescaped($form['active'] ? ' class="active"' : ''); ?> data-section-id="<?php print_unescaped($form['anchor']); ?>" data-section-type="admin"> |
53 | 53 | <a href="<?php p($anchor); ?>"<?php print_unescaped($form['active'] ? ' aria-current="page"' : ''); ?>> |
@@ -11,6 +11,6 @@ |
||
11 | 11 | |
12 | 12 | <?php foreach ($_['forms'] as $form) { |
13 | 13 | if (isset($form['form'])) {?> |
14 | - <div id="<?php isset($form['anchor']) ? p($form['anchor']) : p('');?>"><?php print_unescaped($form['form']);?></div> |
|
14 | + <div id="<?php isset($form['anchor']) ? p($form['anchor']) : p(''); ?>"><?php print_unescaped($form['form']); ?></div> |
|
15 | 15 | <?php } |
16 | 16 | } ?> |
@@ -53,7 +53,7 @@ |
||
53 | 53 | continue; |
54 | 54 | } |
55 | 55 | |
56 | - if (str_starts_with($query->getRoute(), $entry['id'] . '.')) { |
|
56 | + if (str_starts_with($query->getRoute(), $entry['id'].'.')) { |
|
57 | 57 | // Skip the current app, unlikely this is intended |
58 | 58 | continue; |
59 | 59 | } |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | private function handleGetValue(DeclarativeSettingsGetValueEvent $event): void { |
45 | 45 | |
46 | 46 | if ($event->getFieldId() === 'mail_providers_enabled') { |
47 | - $event->setValue((int)$this->config->getValueBool('core', 'mail_providers_enabled', true)); |
|
47 | + $event->setValue((int) $this->config->getValueBool('core', 'mail_providers_enabled', true)); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | } |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | private function handleSetValue(DeclarativeSettingsSetValueEvent $event): void { |
53 | 53 | |
54 | 54 | if ($event->getFieldId() === 'mail_providers_enabled') { |
55 | - $this->config->setValueBool('core', 'mail_providers_enabled', (bool)$event->getValue()); |
|
55 | + $this->config->setValueBool('core', 'mail_providers_enabled', (bool) $event->getValue()); |
|
56 | 56 | $event->stopPropagation(); |
57 | 57 | } |
58 | 58 |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | return [ |
130 | 130 | 'token' => [ |
131 | 131 | 'type' => 'highlight', |
132 | - 'id' => (string)$event->getObjectId(), |
|
132 | + 'id' => (string) $event->getObjectId(), |
|
133 | 133 | 'name' => $parameters['name'], |
134 | 134 | ] |
135 | 135 | ]; |
@@ -137,12 +137,12 @@ discard block |
||
137 | 137 | return [ |
138 | 138 | 'token' => [ |
139 | 139 | 'type' => 'highlight', |
140 | - 'id' => (string)$event->getObjectId(), |
|
140 | + 'id' => (string) $event->getObjectId(), |
|
141 | 141 | 'name' => $parameters['name'], |
142 | 142 | ], |
143 | 143 | 'newToken' => [ |
144 | 144 | 'type' => 'highlight', |
145 | - 'id' => (string)$event->getObjectId(), |
|
145 | + 'id' => (string) $event->getObjectId(), |
|
146 | 146 | 'name' => $parameters['newName'], |
147 | 147 | ] |
148 | 148 | ]; |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | private function formatSettings(array $settings, array $declarativeSettings): array { |
117 | 117 | $settings = array_merge($settings, $declarativeSettings); |
118 | 118 | |
119 | - usort($settings, function ($first, $second) { |
|
119 | + usort($settings, function($first, $second) { |
|
120 | 120 | $priorityOne = $first instanceof ISettings ? $first->getPriority() : $first['priority']; |
121 | 121 | $priorityTwo = $second instanceof ISettings ? $second->getPriority() : $second['priority']; |
122 | 122 | return $priorityOne - $priorityTwo; |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | $form = $setting->getForm(); |
129 | 129 | $html .= $form->renderAs('')->render(); |
130 | 130 | } else { |
131 | - $html .= '<div id="' . $setting['app'] . '_' . $setting['id'] . '"></div>'; |
|
131 | + $html .= '<div id="'.$setting['app'].'_'.$setting['id'].'"></div>'; |
|
132 | 132 | } |
133 | 133 | } |
134 | 134 | return ['content' => $html]; |
@@ -157,7 +157,7 @@ |
||
157 | 157 | 'message' => $this->l->t('Please provide an admin recovery password; otherwise, all account data will be lost.'), |
158 | 158 | ] |
159 | 159 | ]); |
160 | - } elseif ($recoveryEnabledForUser && ! $validRecoveryPassword) { |
|
160 | + } elseif ($recoveryEnabledForUser && !$validRecoveryPassword) { |
|
161 | 161 | return new JSONResponse([ |
162 | 162 | 'status' => 'error', |
163 | 163 | 'data' => [ |