Passed
Push — master ( 32f79c...03cdff )
by Roeland
10:27 queued 11s
created
core/Command/Upgrade.php 1 patch
Spacing   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 	 */
88 88
 	protected function execute(InputInterface $input, OutputInterface $output) {
89 89
 
90
-		if(Util::needUpgrade()) {
90
+		if (Util::needUpgrade()) {
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());
@@ -109,10 +109,10 @@  discard block
 block discarded – undo
109 109
 				if ($event instanceof GenericEvent) {
110 110
 					$message = $event->getSubject();
111 111
 					if (OutputInterface::VERBOSITY_NORMAL < $output->getVerbosity()) {
112
-						$output->writeln(' Checking table ' . $message);
112
+						$output->writeln(' Checking table '.$message);
113 113
 					} else {
114 114
 						if (strlen($message) > 60) {
115
-							$message = substr($message, 0, 57) . '...';
115
+							$message = substr($message, 0, 57).'...';
116 116
 						}
117 117
 						$progress->setMessage($message);
118 118
 						if ($event[0] === 1) {
@@ -153,20 +153,20 @@  discard block
 block discarded – undo
153 153
 						$output->writeln('');
154 154
 						break;
155 155
 					case '\OC\Repair::step':
156
-						if(OutputInterface::VERBOSITY_NORMAL < $output->getVerbosity()) {
157
-							$output->writeln('<info>Repair step: ' . $event->getArgument(0) . '</info>');
156
+						if (OutputInterface::VERBOSITY_NORMAL < $output->getVerbosity()) {
157
+							$output->writeln('<info>Repair step: '.$event->getArgument(0).'</info>');
158 158
 						}
159 159
 						break;
160 160
 					case '\OC\Repair::info':
161
-						if(OutputInterface::VERBOSITY_NORMAL < $output->getVerbosity()) {
162
-							$output->writeln('<info>Repair info: ' . $event->getArgument(0) . '</info>');
161
+						if (OutputInterface::VERBOSITY_NORMAL < $output->getVerbosity()) {
162
+							$output->writeln('<info>Repair info: '.$event->getArgument(0).'</info>');
163 163
 						}
164 164
 						break;
165 165
 					case '\OC\Repair::warning':
166
-						$output->writeln('<error>Repair warning: ' . $event->getArgument(0) . '</error>');
166
+						$output->writeln('<error>Repair warning: '.$event->getArgument(0).'</error>');
167 167
 						break;
168 168
 					case '\OC\Repair::error':
169
-						$output->writeln('<error>Repair error: ' . $event->getArgument(0) . '</error>');
169
+						$output->writeln('<error>Repair error: '.$event->getArgument(0).'</error>');
170 170
 						break;
171 171
 				}
172 172
 			};
@@ -182,17 +182,17 @@  discard block
 block discarded – undo
182 182
 			$dispatcher->addListener('\OC\Repair::error', $repairListener);
183 183
 
184 184
 
185
-			$updater->listen('\OC\Updater', 'maintenanceEnabled', function () use($output) {
185
+			$updater->listen('\OC\Updater', 'maintenanceEnabled', function() use($output) {
186 186
 				$output->writeln('<info>Turned on maintenance mode</info>');
187 187
 			});
188
-			$updater->listen('\OC\Updater', 'maintenanceDisabled', function () use($output) {
188
+			$updater->listen('\OC\Updater', 'maintenanceDisabled', function() use($output) {
189 189
 				$output->writeln('<info>Turned off maintenance mode</info>');
190 190
 			});
191
-			$updater->listen('\OC\Updater', 'maintenanceActive', function () use($output) {
191
+			$updater->listen('\OC\Updater', 'maintenanceActive', function() use($output) {
192 192
 				$output->writeln('<info>Maintenance mode is kept active</info>');
193 193
 			});
194 194
 			$updater->listen('\OC\Updater', 'updateEnd',
195
-				function ($success) use($output, $self) {
195
+				function($success) use($output, $self) {
196 196
 					if ($success) {
197 197
 						$message = "<info>Update successful</info>";
198 198
 					} else {
@@ -200,58 +200,58 @@  discard block
 block discarded – undo
200 200
 					}
201 201
 					$output->writeln($message);
202 202
 				});
203
-			$updater->listen('\OC\Updater', 'dbUpgradeBefore', function () use($output) {
203
+			$updater->listen('\OC\Updater', 'dbUpgradeBefore', function() use($output) {
204 204
 				$output->writeln('<info>Updating database schema</info>');
205 205
 			});
206
-			$updater->listen('\OC\Updater', 'dbUpgrade', function () use($output) {
206
+			$updater->listen('\OC\Updater', 'dbUpgrade', function() use($output) {
207 207
 				$output->writeln('<info>Updated database</info>');
208 208
 			});
209
-			$updater->listen('\OC\Updater', 'dbSimulateUpgradeBefore', function () use($output) {
209
+			$updater->listen('\OC\Updater', 'dbSimulateUpgradeBefore', function() use($output) {
210 210
 				$output->writeln('<info>Checking whether the database schema can be updated (this can take a long time depending on the database size)</info>');
211 211
 			});
212
-			$updater->listen('\OC\Updater', 'dbSimulateUpgrade', function () use($output) {
212
+			$updater->listen('\OC\Updater', 'dbSimulateUpgrade', function() use($output) {
213 213
 				$output->writeln('<info>Checked database schema update</info>');
214 214
 			});
215
-			$updater->listen('\OC\Updater', 'incompatibleAppDisabled', function ($app) use($output) {
216
-				$output->writeln('<comment>Disabled incompatible app: ' . $app . '</comment>');
215
+			$updater->listen('\OC\Updater', 'incompatibleAppDisabled', function($app) use($output) {
216
+				$output->writeln('<comment>Disabled incompatible app: '.$app.'</comment>');
217 217
 			});
218
-			$updater->listen('\OC\Updater', 'checkAppStoreAppBefore', function ($app) use($output) {
219
-				$output->writeln('<info>Checking for update of app ' . $app . ' in appstore</info>');
218
+			$updater->listen('\OC\Updater', 'checkAppStoreAppBefore', function($app) use($output) {
219
+				$output->writeln('<info>Checking for update of app '.$app.' in appstore</info>');
220 220
 			});
221
-			$updater->listen('\OC\Updater', 'upgradeAppStoreApp', function ($app) use($output) {
222
-				$output->writeln('<info>Update app ' . $app . ' from appstore</info>');
221
+			$updater->listen('\OC\Updater', 'upgradeAppStoreApp', function($app) use($output) {
222
+				$output->writeln('<info>Update app '.$app.' from appstore</info>');
223 223
 			});
224
-			$updater->listen('\OC\Updater', 'checkAppStoreApp', function ($app) use($output) {
225
-				$output->writeln('<info>Checked for update of app "' . $app . '" in appstore </info>');
224
+			$updater->listen('\OC\Updater', 'checkAppStoreApp', function($app) use($output) {
225
+				$output->writeln('<info>Checked for update of app "'.$app.'" in appstore </info>');
226 226
 			});
227
-			$updater->listen('\OC\Updater', 'appUpgradeCheckBefore', function () use ($output) {
227
+			$updater->listen('\OC\Updater', 'appUpgradeCheckBefore', function() use ($output) {
228 228
 				$output->writeln('<info>Checking updates of apps</info>');
229 229
 			});
230
-			$updater->listen('\OC\Updater', 'appSimulateUpdate', function ($app) use ($output) {
230
+			$updater->listen('\OC\Updater', 'appSimulateUpdate', function($app) use ($output) {
231 231
 				$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>");
232 232
 			});
233
-			$updater->listen('\OC\Updater', 'appUpgradeCheck', function () use ($output) {
233
+			$updater->listen('\OC\Updater', 'appUpgradeCheck', function() use ($output) {
234 234
 				$output->writeln('<info>Checked database schema update for apps</info>');
235 235
 			});
236
-			$updater->listen('\OC\Updater', 'appUpgradeStarted', function ($app, $version) use ($output) {
236
+			$updater->listen('\OC\Updater', 'appUpgradeStarted', function($app, $version) use ($output) {
237 237
 				$output->writeln("<info>Updating <$app> ...</info>");
238 238
 			});
239
-			$updater->listen('\OC\Updater', 'appUpgrade', function ($app, $version) use ($output) {
239
+			$updater->listen('\OC\Updater', 'appUpgrade', function($app, $version) use ($output) {
240 240
 				$output->writeln("<info>Updated <$app> to $version</info>");
241 241
 			});
242
-			$updater->listen('\OC\Updater', 'failure', function ($message) use($output, $self) {
242
+			$updater->listen('\OC\Updater', 'failure', function($message) use($output, $self) {
243 243
 				$output->writeln("<error>$message</error>");
244 244
 			});
245
-			$updater->listen('\OC\Updater', 'setDebugLogLevel', function ($logLevel, $logLevelName) use($output) {
245
+			$updater->listen('\OC\Updater', 'setDebugLogLevel', function($logLevel, $logLevelName) use($output) {
246 246
 				$output->writeln("<info>Set log level to debug</info>");
247 247
 			});
248
-			$updater->listen('\OC\Updater', 'resetLogLevel', function ($logLevel, $logLevelName) use($output) {
248
+			$updater->listen('\OC\Updater', 'resetLogLevel', function($logLevel, $logLevelName) use($output) {
249 249
 				$output->writeln("<info>Reset log level</info>");
250 250
 			});
251
-			$updater->listen('\OC\Updater', 'startCheckCodeIntegrity', function () use($output) {
251
+			$updater->listen('\OC\Updater', 'startCheckCodeIntegrity', function() use($output) {
252 252
 				$output->writeln("<info>Starting code integrity check...</info>");
253 253
 			});
254
-			$updater->listen('\OC\Updater', 'finishedCheckCodeIntegrity', function () use($output) {
254
+			$updater->listen('\OC\Updater', 'finishedCheckCodeIntegrity', function() use($output) {
255 255
 				$output->writeln("<info>Finished code integrity check</info>");
256 256
 			});
257 257
 
@@ -259,12 +259,12 @@  discard block
 block discarded – undo
259 259
 
260 260
 			$this->postUpgradeCheck($input, $output);
261 261
 
262
-			if(!$success) {
262
+			if (!$success) {
263 263
 				return self::ERROR_FAILURE;
264 264
 			}
265 265
 
266 266
 			return self::ERROR_SUCCESS;
267
-		} else if($this->config->getSystemValueBool('maintenance')) {
267
+		} else if ($this->config->getSystemValueBool('maintenance')) {
268 268
 			//Possible scenario: Nextcloud core is updated but an app failed
269 269
 			$output->writeln('<warning>Nextcloud is in maintenance mode</warning>');
270 270
 			$output->write('<comment>Maybe an upgrade is already in process. Please check the '
@@ -289,8 +289,8 @@  discard block
 block discarded – undo
289 289
 		$trustedDomains = $this->config->getSystemValue('trusted_domains', array());
290 290
 		if (empty($trustedDomains)) {
291 291
 			$output->write(
292
-				'<warning>The setting "trusted_domains" could not be ' .
293
-				'set automatically by the upgrade script, ' .
292
+				'<warning>The setting "trusted_domains" could not be '.
293
+				'set automatically by the upgrade script, '.
294 294
 				'please set it manually</warning>'
295 295
 			);
296 296
 		}
Please login to merge, or discard this patch.
apps/user_ldap/templates/settings.php 1 patch
Spacing   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -59,71 +59,71 @@
 block discarded – undo
59 59
 
60 60
 	<div id="ldapSettings">
61 61
 	<ul>
62
-		<li id="#ldapWizard1"><a href="#ldapWizard1"><?php p($l->t('Server'));?></a></li>
63
-		<li id="#ldapWizard2"><a href="#ldapWizard2"><?php p($l->t('Users'));?></a></li>
64
-		<li id="#ldapWizard3"><a href="#ldapWizard3"><?php p($l->t('Login Attributes'));?></a></li>
65
-		<li id="#ldapWizard4"><a href="#ldapWizard4"><?php p($l->t('Groups'));?></a></li>
66
-		<li class="ldapSettingsTabs"><a href="#ldapSettings-2"><?php p($l->t('Expert'));?></a></li>
67
-		<li class="ldapSettingsTabs"><a href="#ldapSettings-1"><?php p($l->t('Advanced'));?></a></li>
62
+		<li id="#ldapWizard1"><a href="#ldapWizard1"><?php p($l->t('Server')); ?></a></li>
63
+		<li id="#ldapWizard2"><a href="#ldapWizard2"><?php p($l->t('Users')); ?></a></li>
64
+		<li id="#ldapWizard3"><a href="#ldapWizard3"><?php p($l->t('Login Attributes')); ?></a></li>
65
+		<li id="#ldapWizard4"><a href="#ldapWizard4"><?php p($l->t('Groups')); ?></a></li>
66
+		<li class="ldapSettingsTabs"><a href="#ldapSettings-2"><?php p($l->t('Expert')); ?></a></li>
67
+		<li class="ldapSettingsTabs"><a href="#ldapSettings-1"><?php p($l->t('Advanced')); ?></a></li>
68 68
 	</ul>
69 69
 	<?php
70
-	if(!function_exists('ldap_connect')) {
70
+	if (!function_exists('ldap_connect')) {
71 71
 		print_unescaped('<p class="ldapwarning">'.$l->t('<b>Warning:</b> The PHP LDAP module is not installed, the backend will not work. Please ask your system administrator to install it.').'</p>');
72 72
 	}
73 73
 	?>
74
-	<?php require_once __DIR__ . '/part.wizard-server.php'; ?>
75
-	<?php require_once __DIR__ . '/part.wizard-userfilter.php'; ?>
76
-	<?php require_once __DIR__ . '/part.wizard-loginfilter.php'; ?>
77
-	<?php require_once __DIR__ . '/part.wizard-groupfilter.php'; ?>
74
+	<?php require_once __DIR__.'/part.wizard-server.php'; ?>
75
+	<?php require_once __DIR__.'/part.wizard-userfilter.php'; ?>
76
+	<?php require_once __DIR__.'/part.wizard-loginfilter.php'; ?>
77
+	<?php require_once __DIR__.'/part.wizard-groupfilter.php'; ?>
78 78
 	<fieldset id="ldapSettings-1">
79 79
 		<div id="ldapAdvancedAccordion">
80
-			<h3><?php p($l->t('Connection Settings'));?></h3>
80
+			<h3><?php p($l->t('Connection Settings')); ?></h3>
81 81
 			<div>
82
-				<p><label for="ldap_configuration_active"><?php p($l->t('Configuration Active'));?></label><input type="checkbox" id="ldap_configuration_active" name="ldap_configuration_active" value="1" data-default="<?php p($_['ldap_configuration_active_default']); ?>"  title="<?php p($l->t('When unchecked, this configuration will be skipped.'));?>" /></p>
83
-				<p><label for="ldap_backup_host"><?php p($l->t('Backup (Replica) Host'));?></label><input type="text" id="ldap_backup_host" name="ldap_backup_host" data-default="<?php p($_['ldap_backup_host_default']); ?>" title="<?php p($l->t('Give an optional backup host. It must be a replica of the main LDAP/AD server.'));?>"></p>
84
-				<p><label for="ldap_backup_port"><?php p($l->t('Backup (Replica) Port'));?></label><input type="number" id="ldap_backup_port" name="ldap_backup_port" data-default="<?php p($_['ldap_backup_port_default']); ?>"  /></p>
85
-				<p><label for="ldap_override_main_server"><?php p($l->t('Disable Main Server'));?></label><input type="checkbox" id="ldap_override_main_server" name="ldap_override_main_server" value="1" data-default="<?php p($_['ldap_override_main_server_default']); ?>"  title="<?php p($l->t('Only connect to the replica server.'));?>" /></p>
86
-				<p><label for="ldap_turn_off_cert_check"><?php p($l->t('Turn off SSL certificate validation.'));?></label><input type="checkbox" id="ldap_turn_off_cert_check" name="ldap_turn_off_cert_check" title="<?php p($l->t('Not recommended, use it for testing only! If connection only works with this option, import the LDAP server\'s SSL certificate in your %s server.', [$theme->getName()] ));?>" data-default="<?php p($_['ldap_turn_off_cert_check_default']); ?>" value="1"><br/></p>
87
-				<p><label for="ldap_cache_ttl"><?php p($l->t('Cache Time-To-Live'));?></label><input type="number" id="ldap_cache_ttl" name="ldap_cache_ttl" title="<?php p($l->t('in seconds. A change empties the cache.'));?>" data-default="<?php p($_['ldap_cache_ttl_default']); ?>" /></p>
82
+				<p><label for="ldap_configuration_active"><?php p($l->t('Configuration Active')); ?></label><input type="checkbox" id="ldap_configuration_active" name="ldap_configuration_active" value="1" data-default="<?php p($_['ldap_configuration_active_default']); ?>"  title="<?php p($l->t('When unchecked, this configuration will be skipped.')); ?>" /></p>
83
+				<p><label for="ldap_backup_host"><?php p($l->t('Backup (Replica) Host')); ?></label><input type="text" id="ldap_backup_host" name="ldap_backup_host" data-default="<?php p($_['ldap_backup_host_default']); ?>" title="<?php p($l->t('Give an optional backup host. It must be a replica of the main LDAP/AD server.')); ?>"></p>
84
+				<p><label for="ldap_backup_port"><?php p($l->t('Backup (Replica) Port')); ?></label><input type="number" id="ldap_backup_port" name="ldap_backup_port" data-default="<?php p($_['ldap_backup_port_default']); ?>"  /></p>
85
+				<p><label for="ldap_override_main_server"><?php p($l->t('Disable Main Server')); ?></label><input type="checkbox" id="ldap_override_main_server" name="ldap_override_main_server" value="1" data-default="<?php p($_['ldap_override_main_server_default']); ?>"  title="<?php p($l->t('Only connect to the replica server.')); ?>" /></p>
86
+				<p><label for="ldap_turn_off_cert_check"><?php p($l->t('Turn off SSL certificate validation.')); ?></label><input type="checkbox" id="ldap_turn_off_cert_check" name="ldap_turn_off_cert_check" title="<?php p($l->t('Not recommended, use it for testing only! If connection only works with this option, import the LDAP server\'s SSL certificate in your %s server.', [$theme->getName()])); ?>" data-default="<?php p($_['ldap_turn_off_cert_check_default']); ?>" value="1"><br/></p>
87
+				<p><label for="ldap_cache_ttl"><?php p($l->t('Cache Time-To-Live')); ?></label><input type="number" id="ldap_cache_ttl" name="ldap_cache_ttl" title="<?php p($l->t('in seconds. A change empties the cache.')); ?>" data-default="<?php p($_['ldap_cache_ttl_default']); ?>" /></p>
88 88
 			</div>
89
-			<h3><?php p($l->t('Directory Settings'));?></h3>
89
+			<h3><?php p($l->t('Directory Settings')); ?></h3>
90 90
 			<div>
91
-				<p><label for="ldap_display_name"><?php p($l->t('User Display Name Field'));?></label><input type="text" id="ldap_display_name" name="ldap_display_name" data-default="<?php p($_['ldap_display_name_default']); ?>" title="<?php p($l->t('The LDAP attribute to use to generate the user\'s display name.'));?>" /></p>
92
-				<p><label for="ldap_user_display_name_2"><?php p($l->t('2nd User Display Name Field'));?></label><input type="text" id="ldap_user_display_name_2" name="ldap_user_display_name_2" data-default="<?php p($_['ldap_user_display_name_2_default']); ?>" title="<?php p($l->t('Optional. An LDAP attribute to be added to the display name in brackets. Results in e.g. »John Doe ([email protected])«.'));?>" /></p>
93
-				<p><label for="ldap_base_users"><?php p($l->t('Base User Tree'));?></label><textarea id="ldap_base_users" name="ldap_base_users" placeholder="<?php p($l->t('One User Base DN per line'));?>" data-default="<?php p($_['ldap_base_users_default']); ?>" title="<?php p($l->t('Base User Tree'));?>"></textarea></p>
94
-				<p><label for="ldap_attributes_for_user_search"><?php p($l->t('User Search Attributes'));?></label><textarea id="ldap_attributes_for_user_search" name="ldap_attributes_for_user_search" placeholder="<?php p($l->t('Optional; one attribute per line'));?>" data-default="<?php p($_['ldap_attributes_for_user_search_default']); ?>" title="<?php p($l->t('User Search Attributes'));?>"></textarea></p>
95
-				<p><label for="ldap_group_display_name"><?php p($l->t('Group Display Name Field'));?></label><input type="text" id="ldap_group_display_name" name="ldap_group_display_name" data-default="<?php p($_['ldap_group_display_name_default']); ?>" title="<?php p($l->t('The LDAP attribute to use to generate the groups\'s display name.'));?>" /></p>
96
-				<p><label for="ldap_base_groups"><?php p($l->t('Base Group Tree'));?></label><textarea id="ldap_base_groups" name="ldap_base_groups" placeholder="<?php p($l->t('One Group Base DN per line'));?>" data-default="<?php p($_['ldap_base_groups_default']); ?>" title="<?php p($l->t('Base Group Tree'));?>"></textarea></p>
97
-				<p><label for="ldap_attributes_for_group_search"><?php p($l->t('Group Search Attributes'));?></label><textarea id="ldap_attributes_for_group_search" name="ldap_attributes_for_group_search" placeholder="<?php p($l->t('Optional; one attribute per line'));?>" data-default="<?php p($_['ldap_attributes_for_group_search_default']); ?>" title="<?php p($l->t('Group Search Attributes'));?>"></textarea></p>
98
-				<p><label for="ldap_group_member_assoc_attribute"><?php p($l->t('Group-Member association'));?></label><select id="ldap_group_member_assoc_attribute" name="ldap_group_member_assoc_attribute" data-default="<?php p($_['ldap_group_member_assoc_attribute_default']); ?>" ><option value="uniqueMember"<?php if (isset($_['ldap_group_member_assoc_attribute']) && ($_['ldap_group_member_assoc_attribute'] === 'uniqueMember')) p(' selected'); ?>>uniqueMember</option><option value="memberUid"<?php if (isset($_['ldap_group_member_assoc_attribute']) && ($_['ldap_group_member_assoc_attribute'] === 'memberUid')) p(' selected'); ?>>memberUid</option><option value="member"<?php if (isset($_['ldap_group_member_assoc_attribute']) && ($_['ldap_group_member_assoc_attribute'] === 'member')) p(' selected'); ?>>member (AD)</option><option value="gidNumber"<?php if (isset($_['ldap_group_member_assoc_attribute']) && ($_['ldap_group_member_assoc_attribute'] === 'gidNumber')) p(' selected'); ?>>gidNumber</option></select></p>				<p><label for="ldap_dynamic_group_member_url"><?php p($l->t('Dynamic Group Member URL'));?></label><input type="text" id="ldap_dynamic_group_member_url" name="ldap_dynamic_group_member_url" title="<?php p($l->t('The LDAP attribute that on group objects contains an LDAP search URL that determines what objects belong to the group. (An empty setting disables dynamic group membership functionality.)'));?>" data-default="<?php p($_['ldap_dynamic_group_member_url_default']); ?>" /></p>
99
-				<p><label for="ldap_nested_groups"><?php p($l->t('Nested Groups'));?></label><input type="checkbox" id="ldap_nested_groups" name="ldap_nested_groups" value="1" data-default="<?php p($_['ldap_nested_groups_default']); ?>"  title="<?php p($l->t('When switched on, groups that contain groups are supported. (Only works if the group member attribute contains DNs.)'));?>" /></p>
100
-				<p><label for="ldap_paging_size"><?php p($l->t('Paging chunksize'));?></label><input type="number" id="ldap_paging_size" name="ldap_paging_size" title="<?php p($l->t('Chunksize used for paged LDAP searches that may return bulky results like user or group enumeration. (Setting it 0 disables paged LDAP searches in those situations.)'));?>" data-default="<?php p($_['ldap_paging_size_default']); ?>" /></p>
101
-				<p><label for="ldap_turn_on_pwd_change"><?php p($l->t('Enable LDAP password changes per user'));?></label><span class="inlinetable"><span class="tablerow left"><input type="checkbox" id="ldap_turn_on_pwd_change" name="ldap_turn_on_pwd_change" value="1" data-default="<?php p($_['ldap_turn_on_pwd_change_default']); ?>" title="<?php p($l->t('Allow LDAP users to change their password and allow Super Administrators and Group Administrators to change the password of their LDAP users. Only works when access control policies are configured accordingly on the LDAP server. As passwords are sent in plaintext to the LDAP server, transport encryption must be used and password hashing should be configured on the LDAP server.'));?>" /><span class="tablecell"><?php p($l->t('(New password is sent as plain text to LDAP)'));?></span></span>
91
+				<p><label for="ldap_display_name"><?php p($l->t('User Display Name Field')); ?></label><input type="text" id="ldap_display_name" name="ldap_display_name" data-default="<?php p($_['ldap_display_name_default']); ?>" title="<?php p($l->t('The LDAP attribute to use to generate the user\'s display name.')); ?>" /></p>
92
+				<p><label for="ldap_user_display_name_2"><?php p($l->t('2nd User Display Name Field')); ?></label><input type="text" id="ldap_user_display_name_2" name="ldap_user_display_name_2" data-default="<?php p($_['ldap_user_display_name_2_default']); ?>" title="<?php p($l->t('Optional. An LDAP attribute to be added to the display name in brackets. Results in e.g. »John Doe ([email protected])«.')); ?>" /></p>
93
+				<p><label for="ldap_base_users"><?php p($l->t('Base User Tree')); ?></label><textarea id="ldap_base_users" name="ldap_base_users" placeholder="<?php p($l->t('One User Base DN per line')); ?>" data-default="<?php p($_['ldap_base_users_default']); ?>" title="<?php p($l->t('Base User Tree')); ?>"></textarea></p>
94
+				<p><label for="ldap_attributes_for_user_search"><?php p($l->t('User Search Attributes')); ?></label><textarea id="ldap_attributes_for_user_search" name="ldap_attributes_for_user_search" placeholder="<?php p($l->t('Optional; one attribute per line')); ?>" data-default="<?php p($_['ldap_attributes_for_user_search_default']); ?>" title="<?php p($l->t('User Search Attributes')); ?>"></textarea></p>
95
+				<p><label for="ldap_group_display_name"><?php p($l->t('Group Display Name Field')); ?></label><input type="text" id="ldap_group_display_name" name="ldap_group_display_name" data-default="<?php p($_['ldap_group_display_name_default']); ?>" title="<?php p($l->t('The LDAP attribute to use to generate the groups\'s display name.')); ?>" /></p>
96
+				<p><label for="ldap_base_groups"><?php p($l->t('Base Group Tree')); ?></label><textarea id="ldap_base_groups" name="ldap_base_groups" placeholder="<?php p($l->t('One Group Base DN per line')); ?>" data-default="<?php p($_['ldap_base_groups_default']); ?>" title="<?php p($l->t('Base Group Tree')); ?>"></textarea></p>
97
+				<p><label for="ldap_attributes_for_group_search"><?php p($l->t('Group Search Attributes')); ?></label><textarea id="ldap_attributes_for_group_search" name="ldap_attributes_for_group_search" placeholder="<?php p($l->t('Optional; one attribute per line')); ?>" data-default="<?php p($_['ldap_attributes_for_group_search_default']); ?>" title="<?php p($l->t('Group Search Attributes')); ?>"></textarea></p>
98
+				<p><label for="ldap_group_member_assoc_attribute"><?php p($l->t('Group-Member association')); ?></label><select id="ldap_group_member_assoc_attribute" name="ldap_group_member_assoc_attribute" data-default="<?php p($_['ldap_group_member_assoc_attribute_default']); ?>" ><option value="uniqueMember"<?php if (isset($_['ldap_group_member_assoc_attribute']) && ($_['ldap_group_member_assoc_attribute'] === 'uniqueMember')) p(' selected'); ?>>uniqueMember</option><option value="memberUid"<?php if (isset($_['ldap_group_member_assoc_attribute']) && ($_['ldap_group_member_assoc_attribute'] === 'memberUid')) p(' selected'); ?>>memberUid</option><option value="member"<?php if (isset($_['ldap_group_member_assoc_attribute']) && ($_['ldap_group_member_assoc_attribute'] === 'member')) p(' selected'); ?>>member (AD)</option><option value="gidNumber"<?php if (isset($_['ldap_group_member_assoc_attribute']) && ($_['ldap_group_member_assoc_attribute'] === 'gidNumber')) p(' selected'); ?>>gidNumber</option></select></p>				<p><label for="ldap_dynamic_group_member_url"><?php p($l->t('Dynamic Group Member URL')); ?></label><input type="text" id="ldap_dynamic_group_member_url" name="ldap_dynamic_group_member_url" title="<?php p($l->t('The LDAP attribute that on group objects contains an LDAP search URL that determines what objects belong to the group. (An empty setting disables dynamic group membership functionality.)')); ?>" data-default="<?php p($_['ldap_dynamic_group_member_url_default']); ?>" /></p>
99
+				<p><label for="ldap_nested_groups"><?php p($l->t('Nested Groups')); ?></label><input type="checkbox" id="ldap_nested_groups" name="ldap_nested_groups" value="1" data-default="<?php p($_['ldap_nested_groups_default']); ?>"  title="<?php p($l->t('When switched on, groups that contain groups are supported. (Only works if the group member attribute contains DNs.)')); ?>" /></p>
100
+				<p><label for="ldap_paging_size"><?php p($l->t('Paging chunksize')); ?></label><input type="number" id="ldap_paging_size" name="ldap_paging_size" title="<?php p($l->t('Chunksize used for paged LDAP searches that may return bulky results like user or group enumeration. (Setting it 0 disables paged LDAP searches in those situations.)')); ?>" data-default="<?php p($_['ldap_paging_size_default']); ?>" /></p>
101
+				<p><label for="ldap_turn_on_pwd_change"><?php p($l->t('Enable LDAP password changes per user')); ?></label><span class="inlinetable"><span class="tablerow left"><input type="checkbox" id="ldap_turn_on_pwd_change" name="ldap_turn_on_pwd_change" value="1" data-default="<?php p($_['ldap_turn_on_pwd_change_default']); ?>" title="<?php p($l->t('Allow LDAP users to change their password and allow Super Administrators and Group Administrators to change the password of their LDAP users. Only works when access control policies are configured accordingly on the LDAP server. As passwords are sent in plaintext to the LDAP server, transport encryption must be used and password hashing should be configured on the LDAP server.')); ?>" /><span class="tablecell"><?php p($l->t('(New password is sent as plain text to LDAP)')); ?></span></span>
102 102
 			</span><br/></p>
103
-				<p><label for="ldap_default_ppolicy_dn"><?php p($l->t('Default password policy DN'));?></label><input type="text" id="ldap_default_ppolicy_dn" name="ldap_default_ppolicy_dn" title="<?php p($l->t('The DN of a default password policy that will be used for password expiry handling. Works only when LDAP password changes per user are enabled and is only supported by OpenLDAP. Leave empty to disable password expiry handling.'));?>" data-default="<?php p($_['ldap_default_ppolicy_dn_default']); ?>" /></p>
103
+				<p><label for="ldap_default_ppolicy_dn"><?php p($l->t('Default password policy DN')); ?></label><input type="text" id="ldap_default_ppolicy_dn" name="ldap_default_ppolicy_dn" title="<?php p($l->t('The DN of a default password policy that will be used for password expiry handling. Works only when LDAP password changes per user are enabled and is only supported by OpenLDAP. Leave empty to disable password expiry handling.')); ?>" data-default="<?php p($_['ldap_default_ppolicy_dn_default']); ?>" /></p>
104 104
 			</div>
105
-			<h3><?php p($l->t('Special Attributes'));?></h3>
105
+			<h3><?php p($l->t('Special Attributes')); ?></h3>
106 106
 			<div>
107
-				<p><label for="ldap_quota_attr"><?php p($l->t('Quota Field'));?></label><input type="text" id="ldap_quota_attr" name="ldap_quota_attr" data-default="<?php p($_['ldap_quota_attr_default']); ?>" title="<?php p($l->t('Leave empty for user\'s default quota. Otherwise, specify an LDAP/AD attribute.'));?>" /></p>
108
-				<p><label for="ldap_quota_def"><?php p($l->t('Quota Default'));?></label><input type="text" id="ldap_quota_def" name="ldap_quota_def" data-default="<?php p($_['ldap_quota_def_default']); ?>" title="<?php p($l->t('Override default quota for LDAP users who do not have a quota set in the Quota Field.'));?>" /></p>
109
-				<p><label for="ldap_email_attr"><?php p($l->t('Email Field'));?></label><input type="text" id="ldap_email_attr" name="ldap_email_attr" data-default="<?php p($_['ldap_email_attr_default']); ?>" title="<?php p($l->t('Set the user\'s email from their LDAP attribute. Leave it empty for default behaviour.'));?>" /></p>
110
-				<p><label for="home_folder_naming_rule"><?php p($l->t('User Home Folder Naming Rule'));?></label><input type="text" id="home_folder_naming_rule" name="home_folder_naming_rule" title="<?php p($l->t('Leave empty for user name (default). Otherwise, specify an LDAP/AD attribute.'));?>" data-default="<?php p($_['home_folder_naming_rule_default']); ?>" /></p>
107
+				<p><label for="ldap_quota_attr"><?php p($l->t('Quota Field')); ?></label><input type="text" id="ldap_quota_attr" name="ldap_quota_attr" data-default="<?php p($_['ldap_quota_attr_default']); ?>" title="<?php p($l->t('Leave empty for user\'s default quota. Otherwise, specify an LDAP/AD attribute.')); ?>" /></p>
108
+				<p><label for="ldap_quota_def"><?php p($l->t('Quota Default')); ?></label><input type="text" id="ldap_quota_def" name="ldap_quota_def" data-default="<?php p($_['ldap_quota_def_default']); ?>" title="<?php p($l->t('Override default quota for LDAP users who do not have a quota set in the Quota Field.')); ?>" /></p>
109
+				<p><label for="ldap_email_attr"><?php p($l->t('Email Field')); ?></label><input type="text" id="ldap_email_attr" name="ldap_email_attr" data-default="<?php p($_['ldap_email_attr_default']); ?>" title="<?php p($l->t('Set the user\'s email from their LDAP attribute. Leave it empty for default behaviour.')); ?>" /></p>
110
+				<p><label for="home_folder_naming_rule"><?php p($l->t('User Home Folder Naming Rule')); ?></label><input type="text" id="home_folder_naming_rule" name="home_folder_naming_rule" title="<?php p($l->t('Leave empty for user name (default). Otherwise, specify an LDAP/AD attribute.')); ?>" data-default="<?php p($_['home_folder_naming_rule_default']); ?>" /></p>
111 111
 				<p><label for="ldap_ext_storage_home_attribute"> <?php p($l->t('"$home" Placeholder Field')); ?></label><input type="text" id="ldap_ext_storage_home_attribute" name="ldap_ext_storage_home_attribute" title="<?php p($l->t('$home in an external storage configuration will be replaced with the value of the specified attribute')); ?>" data-default="<?php p($_['ldap_ext_storage_home_attribute_default']); ?>"></p>
112 112
 			</div>
113 113
 		</div>
114 114
 		<?php print_unescaped($_['settingControls']); ?>
115 115
 	</fieldset>
116 116
 	<fieldset id="ldapSettings-2">
117
-		<p><strong><?php p($l->t('Internal Username'));?></strong></p>
118
-		<p class="ldapIndent"><?php p($l->t('By default the internal username will be created from the UUID attribute. It makes sure that the username is unique and characters do not need to be converted. The internal username has the restriction that only these characters are allowed: [ a-zA-Z0-9_.@- ].  Other characters are replaced with their ASCII correspondence or simply omitted. On collisions a number will be added/increased. The internal username is used to identify a user internally. It is also the default name for the user home folder. It is also a part of remote URLs, for instance for all *DAV services. With this setting, the default behavior can be overridden. Leave it empty for default behavior. Changes will have effect only on newly mapped (added) LDAP users.'));?></p>
119
-		<p class="ldapIndent"><label for="ldap_expert_username_attr"><?php p($l->t('Internal Username Attribute:'));?></label><input type="text" id="ldap_expert_username_attr" name="ldap_expert_username_attr" data-default="<?php p($_['ldap_expert_username_attr_default']); ?>" /></p>
120
-		<p><strong><?php p($l->t('Override UUID detection'));?></strong></p>
121
-		<p class="ldapIndent"><?php p($l->t('By default, the UUID attribute is automatically detected. The UUID attribute is used to doubtlessly identify LDAP users and groups. Also, the internal username will be created based on the UUID, if not specified otherwise above. You can override the setting and pass an attribute of your choice. You must make sure that the attribute of your choice can be fetched for both users and groups and it is unique. Leave it empty for default behavior. Changes will have effect only on newly mapped (added) LDAP users and groups.'));?></p>
122
-		<p class="ldapIndent"><label for="ldap_expert_uuid_user_attr"><?php p($l->t('UUID Attribute for Users:'));?></label><input type="text" id="ldap_expert_uuid_user_attr" name="ldap_expert_uuid_user_attr" data-default="<?php p($_['ldap_expert_uuid_user_attr_default']); ?>" /></p>
123
-		<p class="ldapIndent"><label for="ldap_expert_uuid_group_attr"><?php p($l->t('UUID Attribute for Groups:'));?></label><input type="text" id="ldap_expert_uuid_group_attr" name="ldap_expert_uuid_group_attr" data-default="<?php p($_['ldap_expert_uuid_group_attr_default']); ?>" /></p>
124
-		<p><strong><?php p($l->t('Username-LDAP User Mapping'));?></strong></p>
125
-		<p class="ldapIndent"><?php p($l->t('Usernames are used to store and assign metadata. In order to precisely identify and recognize users, each LDAP user will have an internal username. This requires a mapping from username to LDAP user. The created username is mapped to the UUID of the LDAP user. Additionally the DN is cached as well to reduce LDAP interaction, but it is not used for identification. If the DN changes, the changes will be found. The internal username is used all over. Clearing the mappings will have leftovers everywhere. Clearing the mappings is not configuration sensitive, it affects all LDAP configurations! Never clear the mappings in a production environment, only in a testing or experimental stage.'));?></p>
126
-		<p class="ldapIndent"><button type="button" id="ldap_action_clear_user_mappings" name="ldap_action_clear_user_mappings"><?php p($l->t('Clear Username-LDAP User Mapping'));?></button><br/><button type="button" id="ldap_action_clear_group_mappings" name="ldap_action_clear_group_mappings"><?php p($l->t('Clear Groupname-LDAP Group Mapping'));?></button></p>
117
+		<p><strong><?php p($l->t('Internal Username')); ?></strong></p>
118
+		<p class="ldapIndent"><?php p($l->t('By default the internal username will be created from the UUID attribute. It makes sure that the username is unique and characters do not need to be converted. The internal username has the restriction that only these characters are allowed: [ a-zA-Z0-9_.@- ].  Other characters are replaced with their ASCII correspondence or simply omitted. On collisions a number will be added/increased. The internal username is used to identify a user internally. It is also the default name for the user home folder. It is also a part of remote URLs, for instance for all *DAV services. With this setting, the default behavior can be overridden. Leave it empty for default behavior. Changes will have effect only on newly mapped (added) LDAP users.')); ?></p>
119
+		<p class="ldapIndent"><label for="ldap_expert_username_attr"><?php p($l->t('Internal Username Attribute:')); ?></label><input type="text" id="ldap_expert_username_attr" name="ldap_expert_username_attr" data-default="<?php p($_['ldap_expert_username_attr_default']); ?>" /></p>
120
+		<p><strong><?php p($l->t('Override UUID detection')); ?></strong></p>
121
+		<p class="ldapIndent"><?php p($l->t('By default, the UUID attribute is automatically detected. The UUID attribute is used to doubtlessly identify LDAP users and groups. Also, the internal username will be created based on the UUID, if not specified otherwise above. You can override the setting and pass an attribute of your choice. You must make sure that the attribute of your choice can be fetched for both users and groups and it is unique. Leave it empty for default behavior. Changes will have effect only on newly mapped (added) LDAP users and groups.')); ?></p>
122
+		<p class="ldapIndent"><label for="ldap_expert_uuid_user_attr"><?php p($l->t('UUID Attribute for Users:')); ?></label><input type="text" id="ldap_expert_uuid_user_attr" name="ldap_expert_uuid_user_attr" data-default="<?php p($_['ldap_expert_uuid_user_attr_default']); ?>" /></p>
123
+		<p class="ldapIndent"><label for="ldap_expert_uuid_group_attr"><?php p($l->t('UUID Attribute for Groups:')); ?></label><input type="text" id="ldap_expert_uuid_group_attr" name="ldap_expert_uuid_group_attr" data-default="<?php p($_['ldap_expert_uuid_group_attr_default']); ?>" /></p>
124
+		<p><strong><?php p($l->t('Username-LDAP User Mapping')); ?></strong></p>
125
+		<p class="ldapIndent"><?php p($l->t('Usernames are used to store and assign metadata. In order to precisely identify and recognize users, each LDAP user will have an internal username. This requires a mapping from username to LDAP user. The created username is mapped to the UUID of the LDAP user. Additionally the DN is cached as well to reduce LDAP interaction, but it is not used for identification. If the DN changes, the changes will be found. The internal username is used all over. Clearing the mappings will have leftovers everywhere. Clearing the mappings is not configuration sensitive, it affects all LDAP configurations! Never clear the mappings in a production environment, only in a testing or experimental stage.')); ?></p>
126
+		<p class="ldapIndent"><button type="button" id="ldap_action_clear_user_mappings" name="ldap_action_clear_user_mappings"><?php p($l->t('Clear Username-LDAP User Mapping')); ?></button><br/><button type="button" id="ldap_action_clear_group_mappings" name="ldap_action_clear_group_mappings"><?php p($l->t('Clear Groupname-LDAP Group Mapping')); ?></button></p>
127 127
 		<?php print_unescaped($_['settingControls']); ?>
128 128
 	</fieldset>
129 129
 	</div>
Please login to merge, or discard this patch.
core/templates/loginflowv2/grant.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
 	<h2><?php p($l->t('Account access')) ?></h2>
32 32
 	<p class="info">
33 33
 		<?php print_unescaped($l->t('You are about to grant %1$s access to your %2$s account.', [
34
-								'<strong>' . \OCP\Util::sanitizeHTML($_['client']) . '</strong>',
34
+								'<strong>'.\OCP\Util::sanitizeHTML($_['client']).'</strong>',
35 35
 								\OCP\Util::sanitizeHTML($_['instanceName'])
36 36
 							])) ?>
37 37
 	</p>
Please login to merge, or discard this patch.
core/templates/loginflowv2/authpicker.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
 	<h2><?php p($l->t('Connect to your account')) ?></h2>
31 31
 	<p class="info">
32 32
 		<?php print_unescaped($l->t('Please log in before granting %1$s access to your %2$s account.', [
33
-								'<strong>' . \OCP\Util::sanitizeHTML($_['client']) . '</strong>',
33
+								'<strong>'.\OCP\Util::sanitizeHTML($_['client']).'</strong>',
34 34
 								\OCP\Util::sanitizeHTML($_['instanceName'])
35 35
 							])) ?>
36 36
 	</p>
Please login to merge, or discard this patch.
core/Service/LoginFlowV2Service.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
 
212 212
 	private function hashToken(string $token): string {
213 213
 		$secret = $this->config->getSystemValue('secret');
214
-		return hash('sha512', $token . $secret);
214
+		return hash('sha512', $token.$secret);
215 215
 	}
216 216
 
217 217
 	private function getKeyPair(): array {
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
 		while ($error = openssl_error_string()) {
242 242
 			$errors[] = $error;
243 243
 		}
244
-		$this->logger->critical('Something is wrong with your openssl setup: ' . implode(', ', $errors));
244
+		$this->logger->critical('Something is wrong with your openssl setup: '.implode(', ', $errors));
245 245
 	}
246 246
 
247 247
 	private function encryptPassword(string $password, string $publicKey): string {
Please login to merge, or discard this patch.
core/Controller/ClientFlowLoginV2Controller.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
 	 * @NoSameSiteCookieRequired
149 149
 	 */
150 150
 	public function grantPage(string $stateToken): StandaloneTemplateResponse {
151
-		if(!$this->isValidStateToken($stateToken)) {
151
+		if (!$this->isValidStateToken($stateToken)) {
152 152
 			return $this->stateTokenForbiddenResponse();
153 153
 		}
154 154
 
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 	 * @UseSession
177 177
 	 */
178 178
 	public function generateAppPassword(string $stateToken): Response {
179
-		if(!$this->isValidStateToken($stateToken)) {
179
+		if (!$this->isValidStateToken($stateToken)) {
180 180
 			return $this->stateTokenForbiddenResponse();
181 181
 		}
182 182
 
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
 
240 240
 	private function isValidStateToken(string $stateToken): bool {
241 241
 		$currentToken = $this->session->get(self::stateName);
242
-		if(!is_string($stateToken) || !is_string($currentToken)) {
242
+		if (!is_string($stateToken) || !is_string($currentToken)) {
243 243
 			return false;
244 244
 		}
245 245
 		return hash_equals($currentToken, $stateToken);
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
 	 */
265 265
 	private function getFlowByLoginToken(): LoginFlowV2 {
266 266
 		$currentToken = $this->session->get(self::tokenName);
267
-		if(!is_string($currentToken)) {
267
+		if (!is_string($currentToken)) {
268 268
 			throw new LoginFlowV2NotFoundException('Login token not set in session');
269 269
 		}
270 270
 
@@ -294,6 +294,6 @@  discard block
 block discarded – undo
294 294
 		}
295 295
 
296 296
 		$protocol = $this->request->getServerProtocol();
297
-		return $protocol . '://' . $this->request->getServerHost() . $serverPostfix;
297
+		return $protocol.'://'.$this->request->getServerHost().$serverPostfix;
298 298
 	}
299 299
 }
Please login to merge, or discard this patch.
apps/files_sharing/templates/public.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
 	<!-- ONLY if this is a folder, we show the grid toggle button -->
51 51
 	<?php if (empty($_['dir']) === false) { ?>
52 52
 		<input type="checkbox" class="hidden-visually" id="showgridview"
53
-			<?php if($_['showgridview']) { ?>checked="checked" <?php } ?>/>
53
+			<?php if ($_['showgridview']) { ?>checked="checked" <?php } ?>/>
54 54
 		<label id="view-toggle" for="showgridview" class="button <?php p($_['showgridview'] ? 'icon-toggle-filelist' : 'icon-toggle-pictures') ?>"
55 55
 			title="<?php p($l->t('Toggle grid view'))?>"></label>
56 56
 	<?php } ?>
Please login to merge, or discard this patch.
apps/files/lib/Command/Scan.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 		$path = basename($fullPath);
105 105
 
106 106
 		if ($normalizedPath !== $path) {
107
-			$output->writeln("\t<error>Entry \"" . $fullPath . '" will not be accessible due to incompatible encoding</error>');
107
+			$output->writeln("\t<error>Entry \"".$fullPath.'" will not be accessible due to incompatible encoding</error>');
108 108
 		}
109 109
 	}
110 110
 
@@ -114,27 +114,27 @@  discard block
 block discarded – undo
114 114
 
115 115
 		# check on each file/folder if there was a user interrupt (ctrl-c) and throw an exception
116 116
 
117
-		$scanner->listen('\OC\Files\Utils\Scanner', 'scanFile', function ($path) use ($output) {
117
+		$scanner->listen('\OC\Files\Utils\Scanner', 'scanFile', function($path) use ($output) {
118 118
 			$output->writeln("\tFile\t<info>$path</info>", OutputInterface::VERBOSITY_VERBOSE);
119 119
 			++$this->filesCounter;
120 120
 			$this->abortIfInterrupted();
121 121
 		});
122 122
 
123
-		$scanner->listen('\OC\Files\Utils\Scanner', 'scanFolder', function ($path) use ($output) {
123
+		$scanner->listen('\OC\Files\Utils\Scanner', 'scanFolder', function($path) use ($output) {
124 124
 			$output->writeln("\tFolder\t<info>$path</info>", OutputInterface::VERBOSITY_VERBOSE);
125 125
 			++$this->foldersCounter;
126 126
 			$this->abortIfInterrupted();
127 127
 		});
128 128
 
129
-		$scanner->listen('\OC\Files\Utils\Scanner', 'StorageNotAvailable', function (StorageNotAvailableException $e) use ($output) {
130
-			$output->writeln('Error while scanning, storage not available (' . $e->getMessage() . ')', OutputInterface::VERBOSITY_VERBOSE);
129
+		$scanner->listen('\OC\Files\Utils\Scanner', 'StorageNotAvailable', function(StorageNotAvailableException $e) use ($output) {
130
+			$output->writeln('Error while scanning, storage not available ('.$e->getMessage().')', OutputInterface::VERBOSITY_VERBOSE);
131 131
 		});
132 132
 
133
-		$scanner->listen('\OC\Files\Utils\Scanner', 'scanFile', function ($path) use ($output) {
133
+		$scanner->listen('\OC\Files\Utils\Scanner', 'scanFile', function($path) use ($output) {
134 134
 			$this->checkScanWarning($path, $output);
135 135
 		});
136 136
 
137
-		$scanner->listen('\OC\Files\Utils\Scanner', 'scanFolder', function ($path) use ($output) {
137
+		$scanner->listen('\OC\Files\Utils\Scanner', 'scanFolder', function($path) use ($output) {
138 138
 			$this->checkScanWarning($path, $output);
139 139
 		});
140 140
 
@@ -151,10 +151,10 @@  discard block
 block discarded – undo
151 151
 			# exit the function if ctrl-c has been pressed
152 152
 			$output->writeln('Interrupted by user');
153 153
 		} catch (NotFoundException $e) {
154
-			$output->writeln('<error>Path not found: ' . $e->getMessage() . '</error>');
154
+			$output->writeln('<error>Path not found: '.$e->getMessage().'</error>');
155 155
 		} catch (\Exception $e) {
156
-			$output->writeln('<error>Exception during scan: ' . $e->getMessage() . '</error>');
157
-			$output->writeln('<error>' . $e->getTraceAsString() . '</error>');
156
+			$output->writeln('<error>Exception during scan: '.$e->getMessage().'</error>');
157
+			$output->writeln('<error>'.$e->getTraceAsString().'</error>');
158 158
 		}
159 159
 	}
160 160
 
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
 	protected function execute(InputInterface $input, OutputInterface $output) {
167 167
 		$inputPath = $input->getOption('path');
168 168
 		if ($inputPath) {
169
-			$inputPath = '/' . trim($inputPath, '/');
169
+			$inputPath = '/'.trim($inputPath, '/');
170 170
 			list (, $user,) = explode('/', $inputPath, 3);
171 171
 			$users = array($user);
172 172
 		} else if ($input->getOption('all')) {
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
 			if (is_object($user)) {
195 195
 				$user = $user->getUID();
196 196
 			}
197
-			$path = $inputPath ? $inputPath : '/' . $user;
197
+			$path = $inputPath ? $inputPath : '/'.$user;
198 198
 			++$user_count;
199 199
 			if ($this->userManager->userExists($user)) {
200 200
 				$output->writeln("Starting scan for user $user_count out of $users_total ($user)");
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
 	protected function formatExecTime() {
292 292
 		$secs = round($this->execTime);
293 293
 		# convert seconds into HH:MM:SS form
294
-		return sprintf('%02d:%02d:%02d', ($secs/3600), ($secs/60%60), $secs%60);
294
+		return sprintf('%02d:%02d:%02d', ($secs / 3600), ($secs / 60 % 60), $secs % 60);
295 295
 	}
296 296
 
297 297
 	/**
Please login to merge, or discard this patch.
core/Controller/AutoCompleteController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 	public function get($search, $itemType, $itemId, $sorter = null, $shareTypes = [Share::SHARE_TYPE_USER], $limit = 10): DataResponse {
70 70
 		// if enumeration/user listings are disabled, we'll receive an empty
71 71
 		// result from search() – thus nothing else to do here.
72
-		[$results,] = $this->collaboratorSearch->search($search, $shareTypes, false, $limit, 0);
72
+		[$results, ] = $this->collaboratorSearch->search($search, $shareTypes, false, $limit, 0);
73 73
 
74 74
 		$event = new AutoCompleteEvent([
75 75
 			'search' => $search,
@@ -80,14 +80,14 @@  discard block
 block discarded – undo
80 80
 			'shareTypes' => $shareTypes,
81 81
 			'limit' => $limit,
82 82
 		]);
83
-		$this->dispatcher->dispatch(IManager::class . '::filterResults', $event);
83
+		$this->dispatcher->dispatch(IManager::class.'::filterResults', $event);
84 84
 		$results = $event->getResults();
85 85
 
86 86
 		$exactMatches = $results['exact'];
87 87
 		unset($results['exact']);
88 88
 		$results = array_merge_recursive($exactMatches, $results);
89 89
 
90
-		if($sorter !== null) {
90
+		if ($sorter !== null) {
91 91
 			$sorters = array_reverse(explode('|', $sorter));
92 92
 			$this->autoCompleteManager->runSorters($sorters, $results, [
93 93
 				'itemType' => $itemType,
Please login to merge, or discard this patch.