Completed
Push — master ( bbfc99...1e889d )
by Daniel
34s queued 12s
created
templates/settings-admin.php 1 patch
Spacing   +55 added lines, -55 removed lines patch added patch discarded remove patch
@@ -34,25 +34,25 @@  discard block
 block discarded – undo
34 34
 style('serverinfo', 'style');
35 35
 
36 36
 function FormatMegabytes(int $byte): string {
37
-	$unim = ['MB', 'GB', 'TB', 'PB', 'EB'];
37
+	$unim = [ 'MB', 'GB', 'TB', 'PB', 'EB' ];
38 38
 	$count = 0;
39 39
 	while ($byte >= 1024) {
40 40
 		$count++;
41 41
 		$byte /= 1024;
42 42
 	}
43
-	return number_format($byte, 2, '.', '.') . ' ' . $unim[$count];
43
+	return number_format($byte, 2, '.', '.').' '.$unim[ $count ];
44 44
 }
45 45
 
46 46
 /** @var array $_ */
47 47
 
48 48
 /** @var Memory $memory */
49
-$memory = $_['memory'];
49
+$memory = $_[ 'memory' ];
50 50
 /** @var Disk[] $disks */
51
-$disks = $_['diskinfo'];
51
+$disks = $_[ 'diskinfo' ];
52 52
 /** @var NetInterface[] $interfaces */
53
-$interfaces = $_['networkinterfaces'];
53
+$interfaces = $_[ 'networkinterfaces' ];
54 54
 /** @var bool $phpinfo */
55
-$phpinfo = $_['phpinfo'];
55
+$phpinfo = $_[ 'phpinfo' ];
56 56
 
57 57
 ?>
58 58
 
@@ -64,12 +64,12 @@  discard block
 block discarded – undo
64 64
 			<div class="col col-6 col-l-12">
65 65
 				<h2>
66 66
 					<img class="infoicon" src="<?php p(image_path('core', 'actions/screen.svg')); ?>">
67
-					<?php p($_['hostname']); ?>
67
+					<?php p($_[ 'hostname' ]); ?>
68 68
 				</h2>
69
-				<p><?php p($l->t('Operating System:')); ?> <strong id="numFilesStorage"><?php p($_['osname']); ?></strong></p>
69
+				<p><?php p($l->t('Operating System:')); ?> <strong id="numFilesStorage"><?php p($_[ 'osname' ]); ?></strong></p>
70 70
 				<p><?php p($l->t('CPU:')); ?>
71
-				<?php if ($_['cpu'] !== 'Unknown Processor'): ?>
72
-				<strong id="numFilesStorage"><?php p($_['cpu']) ?></strong></p>
71
+				<?php if ($_[ 'cpu' ] !== 'Unknown Processor'): ?>
72
+				<strong id="numFilesStorage"><?php p($_[ 'cpu' ]) ?></strong></p>
73 73
 				<?php else: ?>
74 74
 				<strong id="numFilesStorage"><?php p($l->t('Unknown Processor')) ?></strong></p>
75 75
 				<?php endif; ?>
@@ -90,10 +90,10 @@  discard block
 block discarded – undo
90 90
 						<thead>
91 91
 						</thead>
92 92
 						<tbody>
93
-						<?php foreach ($_['thermalzones'] as $thermalzone): ?>
93
+						<?php foreach ($_[ 'thermalzones' ] as $thermalzone): ?>
94 94
 						<tr>
95
-							<td><?php p($thermalzone['type'] . ':') ?></td>
96
-							<td><span class="info" id="<?php p($thermalzone['hash']) ?>"></span>°C</td>
95
+							<td><?php p($thermalzone[ 'type' ].':') ?></td>
96
+							<td><span class="info" id="<?php p($thermalzone[ 'hash' ]) ?>"></span>°C</td>
97 97
 						</tr>
98 98
 						<?php endforeach; ?>
99 99
 						</tbody>
@@ -169,10 +169,10 @@  discard block
 block discarded – undo
169 169
 			<?php endforeach; ?>
170 170
 		</div>
171 171
 
172
-		<p><?php p($l->t('Files:')); ?> <strong id="numFilesStorage"><?php p($_['storage']['num_files']); ?></strong></p>
173
-		<p><?php p($l->t('Storages:')); ?> <strong id="numFilesStorages"><?php p($_['storage']['num_storages']); ?></strong></p>
174
-		<?php if ($_['system']['freespace'] !== null): ?>
175
-			<p><?php p($l->t('Free Space:')); ?> <strong id="systemDiskFreeSpace"><?php p($_['system']['freespace']); ?></strong></p>
172
+		<p><?php p($l->t('Files:')); ?> <strong id="numFilesStorage"><?php p($_[ 'storage' ][ 'num_files' ]); ?></strong></p>
173
+		<p><?php p($l->t('Storages:')); ?> <strong id="numFilesStorages"><?php p($_[ 'storage' ][ 'num_storages' ]); ?></strong></p>
174
+		<?php if ($_[ 'system' ][ 'freespace' ] !== null): ?>
175
+			<p><?php p($l->t('Free Space:')); ?> <strong id="systemDiskFreeSpace"><?php p($_[ 'system' ][ 'freespace' ]); ?></strong></p>
176 176
 		<?php endif; ?>
177 177
 	</div>
178 178
 
@@ -188,15 +188,15 @@  discard block
 block discarded – undo
188 188
 
189 189
 			<div class="col col-12">
190 190
 				<?php p($l->t('Hostname:')); ?>
191
-				<span class="info"><?php p($_['networkinfo']['hostname']); ?></span>
191
+				<span class="info"><?php p($_[ 'networkinfo' ][ 'hostname' ]); ?></span>
192 192
 			</div>
193 193
 			<div class="col col-12">
194 194
 				<?php p($l->t('DNS:')); ?>
195
-				<span class="info"><?php p($_['networkinfo']['dns']); ?></span>
195
+				<span class="info"><?php p($_[ 'networkinfo' ][ 'dns' ]); ?></span>
196 196
 			</div>
197 197
 			<div class="col col-12">
198 198
 				<?php p($l->t('Gateway:')); ?>
199
-				<span class="info"><?php p($_['networkinfo']['gateway']); ?></span>
199
+				<span class="info"><?php p($_[ 'networkinfo' ][ 'gateway' ]); ?></span>
200 200
 			</div>
201 201
 			<div class="col col-12">
202 202
 				<div class="row">
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
 									<?php p($l->t('Status:')); ?>
210 210
 									<span class="info"><?= $interface->isUp() ? 'up' : 'down'; ?></span><br>
211 211
 									<?php p($l->t('Speed:')); ?>
212
-									<span class="info"><?php p($interface->getSpeed()) ?> (<?php p($l->t('Duplex:') . ' ' . $interface->getDuplex()) ?>)</span><br>
212
+									<span class="info"><?php p($interface->getSpeed()) ?> (<?php p($l->t('Duplex:').' '.$interface->getDuplex()) ?>)</span><br>
213 213
 									<?php if (!empty($interface->getMAC())): ?>
214 214
 										<?php p($l->t('MAC:')); ?>
215 215
 										<span class="info"><?php p($interface->getMAC()) ?></span><br>
@@ -244,24 +244,24 @@  discard block
 block discarded – undo
244 244
 					<div class="col col-4 col-l-6 col-m-12">
245 245
 						<div class="infobox">
246 246
 							<div class="interface-wrapper">
247
-								<?php if ($_['storage']['num_users'] > 0) : ?>
247
+								<?php if ($_[ 'storage' ][ 'num_users' ] > 0) : ?>
248 248
 									<?php p($l->t('Total users:')); ?>
249
-									<span class="info"><?php p($_['storage']['num_users']); ?></span><br>
249
+									<span class="info"><?php p($_[ 'storage' ][ 'num_users' ]); ?></span><br>
250 250
 								<?php endif; ?>
251 251
 
252
-								<?php if ($_['activeUsers']['last24hours'] > 0) : ?>
252
+								<?php if ($_[ 'activeUsers' ][ 'last24hours' ] > 0) : ?>
253 253
 									<?php p($l->t('24 hours:')); ?>
254
-									<span class="info"><?php p($_['activeUsers']['last24hours']) ?></span><br>
254
+									<span class="info"><?php p($_[ 'activeUsers' ][ 'last24hours' ]) ?></span><br>
255 255
 								<?php endif; ?>
256 256
 
257
-								<?php if ($_['activeUsers']['last1hour'] > 0) : ?>
257
+								<?php if ($_[ 'activeUsers' ][ 'last1hour' ] > 0) : ?>
258 258
 									<?php p($l->t('1 hour:')); ?>
259
-									<span class="info"><?php p($_['activeUsers']['last1hour']) ?></span><br>
259
+									<span class="info"><?php p($_[ 'activeUsers' ][ 'last1hour' ]) ?></span><br>
260 260
 								<?php endif; ?>
261 261
 
262
-								<?php if ($_['activeUsers']['last5minutes'] > 0) : ?>
262
+								<?php if ($_[ 'activeUsers' ][ 'last5minutes' ] > 0) : ?>
263 263
 									<?php p($l->t('5 mins:')); ?>
264
-									<span class="info"><?php p($_['activeUsers']['last5minutes']) ?></span><br>
264
+									<span class="info"><?php p($_[ 'activeUsers' ][ 'last5minutes' ]) ?></span><br>
265 265
 								<?php endif; ?>
266 266
 							</div>
267 267
 						</div>
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
 	</div>
273 273
 
274 274
 	<!-- SHARES-->
275
-	<?php if ($_['shares']['num_shares'] > 0) : ?>
275
+	<?php if ($_[ 'shares' ][ 'num_shares' ] > 0) : ?>
276 276
 	<div class="section network-infos">
277 277
 		<div class="row">
278 278
 			<div class="col col-12">
@@ -287,39 +287,39 @@  discard block
 block discarded – undo
287 287
 					<div class="col col-4 col-l-6 col-m-12">
288 288
 						<div class="infobox">
289 289
 							<div class="interface-wrapper">
290
-								<?php if ($_['shares']['num_shares_user'] > 0) : ?>
290
+								<?php if ($_[ 'shares' ][ 'num_shares_user' ] > 0) : ?>
291 291
 									<?php p($l->t('Users:')); ?>
292
-									<span class="info"><?php p($_['shares']['num_shares_user']); ?></span><br>
292
+									<span class="info"><?php p($_[ 'shares' ][ 'num_shares_user' ]); ?></span><br>
293 293
 								<?php endif; ?>
294 294
 
295
-								<?php if ($_['shares']['num_shares_groups'] > 0) : ?>
295
+								<?php if ($_[ 'shares' ][ 'num_shares_groups' ] > 0) : ?>
296 296
 									<?php p($l->t('Groups:')); ?>
297
-									<span class="info"><?php p($_['shares']['num_shares_groups']); ?></span><br>
297
+									<span class="info"><?php p($_[ 'shares' ][ 'num_shares_groups' ]); ?></span><br>
298 298
 								<?php endif; ?>
299 299
 
300
-								<?php if ($_['shares']['num_shares_link'] > 0) : ?>
300
+								<?php if ($_[ 'shares' ][ 'num_shares_link' ] > 0) : ?>
301 301
 									<?php p($l->t('Links:')); ?>
302
-									<span class="info"><?php p($_['shares']['num_shares_link']); ?></span><br>
302
+									<span class="info"><?php p($_[ 'shares' ][ 'num_shares_link' ]); ?></span><br>
303 303
 								<?php endif; ?>
304 304
 
305
-								<?php if ($_['shares']['num_shares_mail'] > 0) : ?>
305
+								<?php if ($_[ 'shares' ][ 'num_shares_mail' ] > 0) : ?>
306 306
 									<?php p($l->t('Emails:')); ?>
307
-									<span class="info"><?php p($_['shares']['num_shares_mail']); ?></span><br>
307
+									<span class="info"><?php p($_[ 'shares' ][ 'num_shares_mail' ]); ?></span><br>
308 308
 								<?php endif; ?>
309 309
 
310
-								<?php if ($_['shares']['num_fed_shares_sent'] > 0) : ?>
310
+								<?php if ($_[ 'shares' ][ 'num_fed_shares_sent' ] > 0) : ?>
311 311
 									<?php p($l->t('Federated sent:')); ?>
312
-									<span class="info"><?php p($_['shares']['num_fed_shares_sent']); ?></span><br>
312
+									<span class="info"><?php p($_[ 'shares' ][ 'num_fed_shares_sent' ]); ?></span><br>
313 313
 								<?php endif; ?>
314 314
 
315
-								<?php if ($_['shares']['num_fed_shares_received'] > 0) : ?>
315
+								<?php if ($_[ 'shares' ][ 'num_fed_shares_received' ] > 0) : ?>
316 316
 									<?php p($l->t('Federated received:')); ?>
317
-									<span class="info"><?php p($_['shares']['num_fed_shares_received']); ?></span><br>
317
+									<span class="info"><?php p($_[ 'shares' ][ 'num_fed_shares_received' ]); ?></span><br>
318 318
 								<?php endif; ?>
319 319
 
320
-								<?php if ($_['shares']['num_shares_room'] > 0) : ?>
320
+								<?php if ($_[ 'shares' ][ 'num_shares_room' ] > 0) : ?>
321 321
 									<?php p($l->t('Talk conversations:')); ?>
322
-									<span class="info"><?php p($_['shares']['num_shares_room']); ?></span><br>
322
+									<span class="info"><?php p($_[ 'shares' ][ 'num_shares_room' ]); ?></span><br>
323 323
 								<?php endif; ?>
324 324
 							</div>
325 325
 						</div>
@@ -343,31 +343,31 @@  discard block
 block discarded – undo
343 343
 					<div class="phpinfo-wrapper">
344 344
 						<p>
345 345
 							<?php p($l->t('Version:')); ?>
346
-							<em id="phpVersion"><?php p($_['php']['version']); ?></em>
346
+							<em id="phpVersion"><?php p($_[ 'php' ][ 'version' ]); ?></em>
347 347
 						</p>
348 348
 						<p>
349 349
 							<?php p($l->t('Memory limit:')); ?>
350
-							<em id="phpMemLimit"><?php p($_['php']['memory_limit']); ?></em>
350
+							<em id="phpMemLimit"><?php p($_[ 'php' ][ 'memory_limit' ]); ?></em>
351 351
 						</p>
352 352
 						<p>
353 353
 							<?php p($l->t('Max execution time:')); ?>
354
-							<em id="phpMaxExecTime"><?php p($_['php']['max_execution_time']); ?></em>
354
+							<em id="phpMaxExecTime"><?php p($_[ 'php' ][ 'max_execution_time' ]); ?></em>
355 355
 						</p>
356 356
 						<p>
357 357
 							<?php p($l->t('Upload max size:')); ?>
358
-							<em id="phpUploadMaxSize"><?php p($_['php']['upload_max_filesize']); ?></em>
358
+							<em id="phpUploadMaxSize"><?php p($_[ 'php' ][ 'upload_max_filesize' ]); ?></em>
359 359
 						</p>
360 360
 						<p>
361 361
 							<?php p($l->t('OPcache Revalidate Frequency:')); ?>
362
-							<em id="phpOpcacheRevalidateFreq"><?php p($_['php']['opcache_revalidate_freq']); ?></em>
362
+							<em id="phpOpcacheRevalidateFreq"><?php p($_[ 'php' ][ 'opcache_revalidate_freq' ]); ?></em>
363 363
 						</p>
364 364
 						<p>
365 365
 							<?php p($l->t('Extensions:')); ?>
366
-							<em id="phpExtensions"><?php p($_['php']['extensions'] !== null ? implode(', ', $_['php']['extensions']) : $l->t('Unable to list extensions')); ?></em>
366
+							<em id="phpExtensions"><?php p($_[ 'php' ][ 'extensions' ] !== null ? implode(', ', $_[ 'php' ][ 'extensions' ]) : $l->t('Unable to list extensions')); ?></em>
367 367
 						</p>
368 368
 						<?php if ($phpinfo): ?>
369 369
 						<p>
370
-							<a target="_blank" href="<?= $_['phpinfoUrl'] ?>"><?php p($l->t('Show phpinfo')) ?></a>
370
+							<a target="_blank" href="<?= $_[ 'phpinfoUrl' ] ?>"><?php p($l->t('Show phpinfo')) ?></a>
371 371
 						</p>
372 372
 						<?php endif; ?>
373 373
 					</div>
@@ -384,15 +384,15 @@  discard block
 block discarded – undo
384 384
 					<div class="database-wrapper">
385 385
 						<p>
386 386
 							<?php p($l->t('Type:')); ?>
387
-							<em id="databaseType"><?php p($_['database']['type']); ?></em>
387
+							<em id="databaseType"><?php p($_[ 'database' ][ 'type' ]); ?></em>
388 388
 						</p>
389 389
 						<p>
390 390
 							<?php p($l->t('Version:')); ?>
391
-							<em id="databaseVersion"><?php p($_['database']['version']); ?></em>
391
+							<em id="databaseVersion"><?php p($_[ 'database' ][ 'version' ]); ?></em>
392 392
 						</p>
393 393
 						<p>
394 394
 							<?php p($l->t('Size:')); ?>
395
-							<em id="databaseSize"><?php p($_['database']['size']); ?></em>
395
+							<em id="databaseSize"><?php p($_[ 'database' ][ 'size' ]); ?></em>
396 396
 						</p>
397 397
 					</div>
398 398
 				</div>
@@ -410,7 +410,7 @@  discard block
 block discarded – undo
410 410
 					<?php p($l->t('You can connect an external monitoring tool by using this end point:')); ?>
411 411
 				</p>
412 412
 				<div class="monitoring-wrapper">
413
-					<input type="text" readonly="readonly" id="monitoring-endpoint-url" value="<?php echo p($_['ocs']); ?>"/>
413
+					<input type="text" readonly="readonly" id="monitoring-endpoint-url" value="<?php echo p($_[ 'ocs' ]); ?>"/>
414 414
 					<a class="clipboardButton icon icon-clippy" title="<?php p($l->t('Copy')); ?>" aria-label="<?php p($l->t('Copy')); ?>" data-clipboard-target="#monitoring-endpoint-url"></a>
415 415
 				</div>
416 416
 				<p class="settings-hint">
Please login to merge, or discard this patch.