Test Setup Failed
Push — master ( d62009...b98104 )
by Stefan
21:57
created
web/admin/edit_silverbullet.php 1 patch
Spacing   +73 added lines, -73 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 /*
21 21
  * Class autoloader invocation, should be included prior to any other code at the entry points to the application
22 22
  */
23
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
23
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
24 24
 
25 25
 $auth = new \web\lib\admin\Authentication();
26 26
 $auth->authenticate();
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
     $fed = new \core\Federation($inst->federation);
54 54
     $allowSb = $fed->getAttributes("fed:silverbullet");
55 55
     if (count($allowSb) == 0) {
56
-        throw new Exception("We were told to create a new SB profile, but this " . \config\ConfAssistant::CONSORTIUM['nomenclature_federation'] . " does not allow SB at all!");
56
+        throw new Exception("We were told to create a new SB profile, but this ".\config\ConfAssistant::CONSORTIUM['nomenclature_federation']." does not allow SB at all!");
57 57
     }
58 58
     // okay, new SB profiles are allowed. 
59 59
     // but is there a support:email attribute on inst level?
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
     // Create one.
65 65
     $newProfile = $inst->newProfile(core\AbstractProfile::PROFILETYPE_SILVERBULLET);
66 66
     // and modify the REQUEST_URI to add the new profile ID
67
-    $_SERVER['REQUEST_URI'] = $_SERVER['REQUEST_URI'] . "&profile_id=" . $newProfile->identifier;
67
+    $_SERVER['REQUEST_URI'] = $_SERVER['REQUEST_URI']."&profile_id=".$newProfile->identifier;
68 68
     $_GET['profile_id'] = $newProfile->identifier;
69 69
     $profile = $newProfile;
70 70
 } else {
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 if (isset($_POST['command'])) {
90 90
     switch ($_POST['command']) {
91 91
         case \web\lib\common\FormElements::BUTTON_CLOSE:
92
-            header("Location: overview_org.php?inst_id=" . $inst->identifier);
92
+            header("Location: overview_org.php?inst_id=".$inst->identifier);
93 93
             break;
94 94
         case \web\lib\common\FormElements::BUTTON_TERMSOFUSE:
95 95
             if (isset($_POST['agreement']) && $_POST['agreement'] == 'true') {
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
                         break;
133 133
                     }
134 134
                     $properName = $validator->syntaxConformUser($elements[0]);
135
-                    $properDate = new DateTime($elements[1] . " 00:00:00");
135
+                    $properDate = new DateTime($elements[1]." 00:00:00");
136 136
                     $numberOfActivations = $elements[2] ?? 5;
137 137
                     $number = $validator->integer($numberOfActivations);
138 138
                     if ($number === FALSE) { // invalid input received, default to sane
@@ -235,18 +235,18 @@  discard block
 block discarded – undo
235 235
                     // warn and ask for confirmation unless already confirmed
236 236
                     if (!isset($_POST['insecureconfirm']) || $_POST['insecureconfirm'] != "CONFIRM") {
237 237
                         echo $deco->pageheader(_("Insecure mail domain!"), "ADMIN-IDP-USERS");
238
-                        echo "<p>" . sprintf(_("The mail domain of the mail address <strong>%s</strong> is not secure: some or all of the mail servers are not accepting encrypted connections (no consistent support for STARTTLS)."), $properEmail) . "</p>";
239
-                        echo "<p>" . _("The invitation would need to be sent in cleartext across the internet, and can possibly be read and abused by anyone in transit.") . "</p>";
240
-                        echo "<p>" . _("Do you want the system to send this mail anyway?") . "</p>";
238
+                        echo "<p>".sprintf(_("The mail domain of the mail address <strong>%s</strong> is not secure: some or all of the mail servers are not accepting encrypted connections (no consistent support for STARTTLS)."), $properEmail)."</p>";
239
+                        echo "<p>"._("The invitation would need to be sent in cleartext across the internet, and can possibly be read and abused by anyone in transit.")."</p>";
240
+                        echo "<p>"._("Do you want the system to send this mail anyway?")."</p>";
241 241
                         echo $formtext;
242
-                        echo "<button type='submit' class='delete'>" . _("DO NOT SEND") . "</button>";
242
+                        echo "<button type='submit' class='delete'>"._("DO NOT SEND")."</button>";
243 243
                         echo "</form>";
244 244
                         echo $formtext;
245
-                        echo "<input type='hidden' name='command' value='" . \web\lib\common\FormElements::BUTTON_SENDINVITATIONMAILBYCAT . "'</>";
245
+                        echo "<input type='hidden' name='command' value='".\web\lib\common\FormElements::BUTTON_SENDINVITATIONMAILBYCAT."'</>";
246 246
                         echo "<input type='hidden' name='address' value='$properEmail'</>";
247
-                        echo "<input type='hidden' name='token' value='" . $invitationObject->invitationTokenString . "'</>";
247
+                        echo "<input type='hidden' name='token' value='".$invitationObject->invitationTokenString."'</>";
248 248
                         echo "<input type='hidden' name='insecureconfirm' value='CONFIRM'/>";
249
-                        echo "<button type='submit'>" . _("Send anyway.") . "</button>";
249
+                        echo "<button type='submit'>"._("Send anyway.")."</button>";
250 250
                         echo "</form>";
251 251
                         echo $deco->footer();
252 252
                         exit;
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
 $activeUsers = $profile->listActiveUsers();
298 298
 
299 299
 
300
-echo $deco->defaultPagePrelude(sprintf(_('Managing %s users'), \core\ProfileSilverbullet::PRODUCTNAME ));
300
+echo $deco->defaultPagePrelude(sprintf(_('Managing %s users'), \core\ProfileSilverbullet::PRODUCTNAME));
301 301
 
302 302
 ?>
303 303
 <script src='js/option_expand.js' type='text/javascript'></script>
@@ -337,12 +337,12 @@  discard block
 block discarded – undo
337 337
     <img src='../resources/images/icons/loading51.gif' id='spin' alt='loading...' style='position:absolute;left: 50%; top: 50%; transform: translate(-100px, -50px); display:none; z-index: 100;'>
338 338
     <?php echo $uiElements->instLevelInfoBoxes($inst); ?>
339 339
     <div class='infobox'>
340
-        <h2><?php $tablecaption = sprintf(_('Current %s users'), \core\ProfileSilverbullet::PRODUCTNAME); echo $tablecaption;?></h2>
340
+        <h2><?php $tablecaption = sprintf(_('Current %s users'), \core\ProfileSilverbullet::PRODUCTNAME); echo $tablecaption; ?></h2>
341 341
         <table>
342
-            <caption><?php echo $tablecaption;?></caption>
342
+            <caption><?php echo $tablecaption; ?></caption>
343 343
             <tr>
344
-                <th class="wai-invisible" scope="col"><?php echo _("Property Type");?></th>
345
-                <th class="wai-invisible" scope="col"><?php echo _("Property Value");?></th>
344
+                <th class="wai-invisible" scope="col"><?php echo _("Property Type"); ?></th>
345
+                <th class="wai-invisible" scope="col"><?php echo _("Property Value"); ?></th>
346 346
             </tr>
347 347
 
348 348
             <tr>
@@ -366,19 +366,19 @@  discard block
 block discarded – undo
366 366
         case "NOSTIPULATION":
367 367
             break;
368 368
         case "EMAIL-SENT":
369
-            echo $boundaryPre . $uiElements->boxOkay(_("The e-mail was sent successfully."), _("E-mail OK."), FALSE) . $boundaryPost;
369
+            echo $boundaryPre.$uiElements->boxOkay(_("The e-mail was sent successfully."), _("E-mail OK."), FALSE).$boundaryPost;
370 370
             break;
371 371
         case "EMAIL-NOTSENT":
372
-            echo $boundaryPre . $uiElements->boxError(_("The e-mail was NOT sent."), _("E-mail not OK."), FALSE) . $boundaryPost;
372
+            echo $boundaryPre.$uiElements->boxError(_("The e-mail was NOT sent."), _("E-mail not OK."), FALSE).$boundaryPost;
373 373
             break;
374 374
         case "SMS-SENT":
375
-            echo $boundaryPre . $uiElements->boxOkay(_("The SMS was sent successfully."), _("SMS OK."), FALSE) . $boundaryPost;
375
+            echo $boundaryPre.$uiElements->boxOkay(_("The SMS was sent successfully."), _("SMS OK."), FALSE).$boundaryPost;
376 376
             break;
377 377
         case "SMS-NOTSENT":
378
-            echo $boundaryPre . $uiElements->boxOkay(_("The SMS was NOT sent."), _("SMS not OK."), FALSE) . $boundaryPost;
378
+            echo $boundaryPre.$uiElements->boxOkay(_("The SMS was NOT sent."), _("SMS not OK."), FALSE).$boundaryPost;
379 379
             break;
380 380
         case "SMS-FRAGMENT":
381
-            echo $boundaryPre . $uiElements->boxWarning(_("Only a fragment of the SMS was sent. You should re-send it."), _("SMS Fragment."), FALSE) . $boundaryPost;
381
+            echo $boundaryPre.$uiElements->boxWarning(_("Only a fragment of the SMS was sent. You should re-send it."), _("SMS Fragment."), FALSE).$boundaryPost;
382 382
             break;
383 383
     }
384 384
     ?>
@@ -391,17 +391,17 @@  discard block
 block discarded – undo
391 391
             <?php
392 392
             $bufferCurrentUsers = "<table class='sb-user-table' style='max-width:1920px;'>
393 393
                 <tr class='sb-title-row'>
394
-                    <td>" . _("User") . "</td>
395
-                    <td>" . _("Token/Certificate details") . "</td>
396
-                    <td>" . _("User/Token Expiry") . "</td>
397
-                    <td>" . _("Actions") . "</td>
394
+                    <td>" . _("User")."</td>
395
+                    <td>" . _("Token/Certificate details")."</td>
396
+                    <td>" . _("User/Token Expiry")."</td>
397
+                    <td>" . _("Actions")."</td>
398 398
                 </tr>";
399 399
             $bufferPreviousUsers = "<table class='sb-user-table' style='max-width:1920px;'>
400 400
                 <tr class='sb-title-row'>
401
-                    <td>" . _("User") . "</td>
402
-                    <td>" . _("Certificate details") . "</td>
403
-                    <td>" . _("User Expiry") . "</td>
404
-                    <td>" . _("Actions") . "</td>
401
+                    <td>" . _("User")."</td>
402
+                    <td>" . _("Certificate details")."</td>
403
+                    <td>" . _("User Expiry")."</td>
404
+                    <td>" . _("Actions")."</td>
405 405
                 </tr>";
406 406
 
407 407
             natsort($allUsers);
@@ -458,23 +458,23 @@  discard block
 block discarded – undo
458 458
                     $display = empty(devices\Devices::listDevices()[$oneCert->device]['display']) ? $oneCert->device : devices\Devices::listDevices()[$oneCert->device]['display'];
459 459
 
460 460
                     $bufferText = "<div class='sb-certificate-summary ca-summary' $style>
461
-                                    <div class='sb-certificate-details'>" . _("Device:") . " " . $display .
462
-                            "<br>" . _("Serial Number:") . "&nbsp;" . dechex($oneCert->serial) .
463
-                            "<br>" . _("CN:") . "&nbsp;" . explode('@', $oneCert->username)[0] . "@…" .
464
-                            "<br>" . _("Expiry:") . "&nbsp;" . $oneCert->expiry .
465
-                            "<br>" . _("Issued:") . "&nbsp;" . $oneCert->issued .
466
-                            "</div>" .
461
+                                    <div class='sb-certificate-details'>"._("Device:")." ".$display.
462
+                            "<br>"._("Serial Number:")."&nbsp;".dechex($oneCert->serial).
463
+                            "<br>"._("CN:")."&nbsp;".explode('@', $oneCert->username)[0]."@…".
464
+                            "<br>"._("Expiry:")."&nbsp;".$oneCert->expiry.
465
+                            "<br>"._("Issued:")."&nbsp;".$oneCert->issued.
466
+                            "</div>".
467 467
                             "<div style='text-align:right;padding-top: 5px; $buttonStyle'>";
468 468
 
469 469
                     if ($buttonText == "") {
470 470
                         $bufferText .= $formtext
471
-                                . "<input type='hidden' name='certSerial' value='" . $oneCert->serial . "'/>"
472
-                                . "<input type='hidden' name='certAlgo' value='" . $oneCert->ca_type . "'/>"
471
+                                . "<input type='hidden' name='certSerial' value='".$oneCert->serial."'/>"
472
+                                . "<input type='hidden' name='certAlgo' value='".$oneCert->ca_type."'/>"
473 473
                                 . "<button type='submit' "
474 474
                                 . "name='command' "
475
-                                . "value='" . \web\lib\common\FormElements::BUTTON_REVOKECREDENTIAL . "' "
475
+                                . "value='".\web\lib\common\FormElements::BUTTON_REVOKECREDENTIAL."' "
476 476
                                 . "class='delete' "
477
-                                . "onclick='return confirm(\"" . sprintf(_("The device in question will stop functioning with %s. The revocation cannot be undone. Are you sure you want to do this?"), \config\ConfAssistant::CONSORTIUM['display_name']) . "\")'>"
477
+                                . "onclick='return confirm(\"".sprintf(_("The device in question will stop functioning with %s. The revocation cannot be undone. Are you sure you want to do this?"), \config\ConfAssistant::CONSORTIUM['display_name'])."\")'>"
478 478
                                 . _("Revoke")
479 479
                                 . "</button>"
480 480
                                 . "</form>";
@@ -499,13 +499,13 @@  discard block
 block discarded – undo
499 499
                 }
500 500
                 // wrap the revoked and expired certs in a div that is hidden by default
501 501
                 if ($textRevokedCerts !== "") {
502
-                    $textRevokedCerts = "<span style='text-decoration: underline;' id='$oneUserId-revoked-heading' onclick='document.getElementById(\"$oneUserId-revoked-certs\").style.display = \"block\"; document.getElementById(\"$oneUserId-revoked-heading\").style.display = \"none\";'>" . sprintf(ngettext("(show %d revoked certificate)", "(show %d revoked certificates)", $countRevoked), $countRevoked) . "</span><div id='$oneUserId-revoked-certs' style='display:none;'>" . $textRevokedCerts . "</div>";
502
+                    $textRevokedCerts = "<span style='text-decoration: underline;' id='$oneUserId-revoked-heading' onclick='document.getElementById(\"$oneUserId-revoked-certs\").style.display = \"block\"; document.getElementById(\"$oneUserId-revoked-heading\").style.display = \"none\";'>".sprintf(ngettext("(show %d revoked certificate)", "(show %d revoked certificates)", $countRevoked), $countRevoked)."</span><div id='$oneUserId-revoked-certs' style='display:none;'>".$textRevokedCerts."</div>";
503 503
                 }
504 504
                 if ($textExpiredCerts !== "") {
505
-                    $textExpiredCerts = "<span style='text-decoration: underline;' id='$oneUserId-expired-heading' onclick='document.getElementById(\"$oneUserId-expired-certs\").style.display = \"block\"; document.getElementById(\"$oneUserId-expired-heading\").style.display = \"none\";'>" . sprintf(ngettext("(show %d expired certificate)", "(show %d expired certificates)", $countExpired), $countExpired) . "</span><div id='$oneUserId-expired-certs' style='display:none;'>" . $textExpiredCerts . "</div>";
505
+                    $textExpiredCerts = "<span style='text-decoration: underline;' id='$oneUserId-expired-heading' onclick='document.getElementById(\"$oneUserId-expired-certs\").style.display = \"block\"; document.getElementById(\"$oneUserId-expired-heading\").style.display = \"none\";'>".sprintf(ngettext("(show %d expired certificate)", "(show %d expired certificates)", $countExpired), $countExpired)."</span><div id='$oneUserId-expired-certs' style='display:none;'>".$textExpiredCerts."</div>";
506 506
                 }
507 507
                 // and push out the HTML
508
-                ${$outputBuffer} .= $textActiveCerts . "<br/>" . $textExpiredCerts . " " . $textRevokedCerts . "</td>";
508
+                ${$outputBuffer} .= $textActiveCerts."<br/>".$textExpiredCerts." ".$textRevokedCerts."</td>";
509 509
                 $tokenHtmlBuffer = "";
510 510
                 $hasOnePendingInvite = FALSE;
511 511
                 foreach ($tokensWithoutCerts as $invitationObject) {
@@ -516,38 +516,38 @@  discard block
 block discarded – undo
516 516
                             $tokenHtmlBuffer .= "<tr class='sb-certificate-row'><td></td>";
517 517
                             $jsEncodedBody = str_replace('\n', '%0D%0A', str_replace('"', '', json_encode($invitationObject->invitationMailBody())));
518 518
                             $tokenHtmlBuffer .= "<td>";
519
-                            $tokenHtmlBuffer .= sprintf(_("The invitation token %s is ready for sending! Choose how to send it:"), "<input type='text' readonly='readonly' style='background-color:lightgrey;' size='60' value='" . $invitationObject->link() . "' name='token' class='identifiedtokenarea-" . $invitationObject->identifier . "'>(…)<br/>");
519
+                            $tokenHtmlBuffer .= sprintf(_("The invitation token %s is ready for sending! Choose how to send it:"), "<input type='text' readonly='readonly' style='background-color:lightgrey;' size='60' value='".$invitationObject->link()."' name='token' class='identifiedtokenarea-".$invitationObject->identifier."'>(…)<br/>");
520 520
                             $tokenHtmlBuffer .= "<table>
521
-                                    <tr><td style='vertical-align:bottom;'>" . _("E-Mail:") . "</td><td>
521
+                                    <tr><td style='vertical-align:bottom;'>" . _("E-Mail:")."</td><td>
522 522
                                     $formtext
523
-                                <input type='hidden' value='" . $invitationObject->invitationTokenString . "' name='token'><br/>
523
+                                <input type='hidden' value='".$invitationObject->invitationTokenString."' name='token'><br/>
524 524
                                 <input type='text' name='address' id='address-$invitationObject->identifier'/>
525
-                                <button type='button' onclick='window.location=\"mailto:\"+document.getElementById(\"address-$invitationObject->identifier\").value+\"?subject=" . $invitationObject->invitationMailSubject() . "&amp;body=$jsEncodedBody\"; return false;'>" . _("Local mail client") . "</button>
526
-                                <button type='submit' name='command' onclick='document.getElementById(\"spin\").style.display =\"block\"' value='" . \web\lib\common\FormElements::BUTTON_SENDINVITATIONMAILBYCAT . "'>" . _("Send with CAT") . "</button>
525
+                                <button type='button' onclick='window.location=\"mailto:\"+document.getElementById(\"address-$invitationObject->identifier\").value+\"?subject=".$invitationObject->invitationMailSubject()."&amp;body=$jsEncodedBody\"; return false;'>"._("Local mail client")."</button>
526
+                                <button type='submit' name='command' onclick='document.getElementById(\"spin\").style.display =\"block\"' value='" . \web\lib\common\FormElements::BUTTON_SENDINVITATIONMAILBYCAT."'>"._("Send with CAT")."</button>
527 527
                                     </form>
528 528
                                     </td></tr>
529
-                                    <tr><td style='vertical-align:bottom;'>" . _("SMS:") . "</td><td>
529
+                                    <tr><td style='vertical-align:bottom;'>" . _("SMS:")."</td><td>
530 530
                                     $formtext
531
-                                    <input type='hidden' value='" . $invitationObject->invitationTokenString . "' name='token'><br/>
531
+                                    <input type='hidden' value='".$invitationObject->invitationTokenString."' name='token'><br/>
532 532
                                     <input type='text' name='smsnumber' />
533
-				<button type='submit' name='command' value='" . \web\lib\common\FormElements::BUTTON_SENDINVITATIONSMS . "'>" . _("Send in SMS...") . "</button>
533
+				<button type='submit' name='command' value='" . \web\lib\common\FormElements::BUTTON_SENDINVITATIONSMS."'>"._("Send in SMS...")."</button>
534 534
                                     </form>
535 535
 				</td></tr>
536
-                                    <tr><td style='vertical-align:bottom;'>" . _("Manual:") . "</td><td>
537
-				<button type='button' class='clipboardButton' onclick='clipboardCopy(" . $invitationObject->identifier . ");'>" . _("Copy to Clipboard") . "</button>
536
+                                    <tr><td style='vertical-align:bottom;'>" . _("Manual:")."</td><td>
537
+				<button type='button' class='clipboardButton' onclick='clipboardCopy(" . $invitationObject->identifier.");'>"._("Copy to Clipboard")."</button>
538 538
                                     <form style='display:inline-block;' method='post' action='inc/displayQRcode.inc.php' onsubmit='popupQRWindow(this); return false;' accept-charset='UTF-8'>
539
-                                    <input type='hidden' value='" . $invitationObject->invitationTokenString . "' name='token'><br/>
540
-                                      <button type='submit'>" . _("Display QR code") . "</button>
539
+                                    <input type='hidden' value='" . $invitationObject->invitationTokenString."' name='token'><br/>
540
+                                      <button type='submit'>" . _("Display QR code")."</button>
541 541
                                   </form>
542 542
                                         </td></tr>
543 543
                                         
544 544
                                 </table>
545 545
                                 </td>";
546
-                            $tokenHtmlBuffer .= "<td>" . _("Expiry Date:") . " " . $invitationObject->expiry . " UTC<br>" . _("Activations remaining:") . " " . sprintf(_("%d of %d"), $invitationObject->activationsRemaining, $invitationObject->activationsTotal) . "</td>";
546
+                            $tokenHtmlBuffer .= "<td>"._("Expiry Date:")." ".$invitationObject->expiry." UTC<br>"._("Activations remaining:")." ".sprintf(_("%d of %d"), $invitationObject->activationsRemaining, $invitationObject->activationsTotal)."</td>";
547 547
                             $tokenHtmlBuffer .= "<td>"
548 548
                                     . $formtext
549
-                                    . "<input type='hidden' name='invitationtoken' value='" . $invitationObject->invitationTokenString . "'/>"
550
-                                    . "<button type='submit' name='command' value='" . \web\lib\common\FormElements::BUTTON_REVOKEINVITATION . "' class='delete'>" . _("Revoke") . "</button></form>"
549
+                                    . "<input type='hidden' name='invitationtoken' value='".$invitationObject->invitationTokenString."'/>"
550
+                                    . "<button type='submit' name='command' value='".\web\lib\common\FormElements::BUTTON_REVOKEINVITATION."' class='delete'>"._("Revoke")."</button></form>"
551 551
                                     . "</td></tr>";
552 552
                             break;
553 553
                         case core\SilverbulletInvitation::SB_TOKENSTATUS_EXPIRED:
@@ -563,10 +563,10 @@  discard block
 block discarded – undo
563 563
                 }
564 564
                 ${$outputBuffer} .= "<td>$formtext
565 565
                     <div class='sb-date-container' style='min-width: 200px;'>
566
-                        <span><input type='text' maxlength='19' class='sb-date-picker' name='userexpiry' value='" . $profile->getUserExpiryDate($oneUserId) . "'>&nbsp;(UTC)</span>
566
+                        <span><input type='text' maxlength='19' class='sb-date-picker' name='userexpiry' value='".$profile->getUserExpiryDate($oneUserId)."'>&nbsp;(UTC)</span>
567 567
                     </div>
568 568
                     <input type='hidden' name='userid' value='$oneUserId'/>
569
-                    <button type='submit' name='command' value='" . \web\lib\common\FormElements::BUTTON_CHANGEUSEREXPIRY . "'>" . _("Update") . "</button>
569
+                    <button type='submit' name='command' value='".\web\lib\common\FormElements::BUTTON_CHANGEUSEREXPIRY."'>"._("Update")."</button>
570 570
                     </form>
571 571
                 </td>
572 572
                 <td>
@@ -574,33 +574,33 @@  discard block
 block discarded – undo
574 574
 
575 575
                 if ($hasOnePendingInvite || count($validCerts) > 0) {
576 576
                     $deletionText = sprintf(_("All of the currently active devices will stop functioning with %s. This cannot be undone. While the user can be re-activated later, they will then need to be re-provisioned with new invitation tokens. Are you sure you want to do this?"), \config\ConfAssistant::CONSORTIUM['display_name']);
577
-                    ${$outputBuffer} .= $formtext . "
577
+                    ${$outputBuffer} .= $formtext."
578 578
                                     <input type='hidden' name='userid' value='$oneUserId'/>
579 579
                                     <button type='submit' "
580 580
                             . "name='command' "
581
-                            . "value='" . \web\lib\common\FormElements::BUTTON_DEACTIVATEUSER . "' "
581
+                            . "value='".\web\lib\common\FormElements::BUTTON_DEACTIVATEUSER."' "
582 582
                             . "class='delete' "
583
-                            . ( count($validCerts) > 0 ? "onclick='return confirm(\"" . $deletionText . "\")' " : "" )
583
+                            . (count($validCerts) > 0 ? "onclick='return confirm(\"".$deletionText."\")' " : "")
584 584
                             . ">"
585 585
                             . _("Deactivate User")
586 586
                             . "</button>
587 587
                                 </form>";
588 588
                 }
589
-                ${$outputBuffer} .= "<form method='post' action='inc/userStats.inc.php?inst_id=" . $profile->institution . "&amp;profile_id=" . $profile->identifier . "&amp;user_id=$oneUserId' onsubmit='popupStatsWindow(this); return false;' accept-charset='UTF-8'>
590
-                    <button type='submit'>" . _("Show Authentication Records") . "</button>
589
+                ${$outputBuffer} .= "<form method='post' action='inc/userStats.inc.php?inst_id=".$profile->institution."&amp;profile_id=".$profile->identifier."&amp;user_id=$oneUserId' onsubmit='popupStatsWindow(this); return false;' accept-charset='UTF-8'>
590
+                    <button type='submit'>"._("Show Authentication Records")."</button>
591 591
                 </form>";
592 592
                 if (new DateTime() < new DateTime($expiryDate)) { // current user, allow sending new token
593
-                    ${$outputBuffer} .= $formtext . "
593
+                    ${$outputBuffer} .= $formtext."
594 594
                     <input type='hidden' name='userid' value='$oneUserId'/>
595
-                    <button type='submit' name='command' value='" . \web\lib\common\FormElements::BUTTON_NEWINVITATION . "'>" . _("New Invitation") . "</button>
596
-                    <label>" . _("Activations:") . "
595
+                    <button type='submit' name='command' value='".\web\lib\common\FormElements::BUTTON_NEWINVITATION."'>"._("New Invitation")."</button>
596
+                    <label>" . _("Activations:")."
597 597
                         <input type='text' name='invitationsquantity' value='5' maxlength='3' style='width: 30px;'/>
598 598
                     </label>
599 599
                     </form>";
600 600
                 } elseif (count($profile->getUserAuthRecords($oneUserId)) == 0) { // previous user; if there are NO authentication records, allow full deletion - otherwise, need to keep user trace for abuse handling
601
-                    ${$outputBuffer} .= $formtext . "
601
+                    ${$outputBuffer} .= $formtext."
602 602
                     <input type='hidden' name='userid' value='$oneUserId'/>
603
-                    <button type='submit' class='delete' name='command' value='" . \web\lib\common\FormElements::BUTTON_DELETE . "'>" . _("Delete User") . "</button>
603
+                    <button type='submit' class='delete' name='command' value='".\web\lib\common\FormElements::BUTTON_DELETE."'>"._("Delete User")."</button>
604 604
                     </form>";
605 605
                 }
606 606
                 ${$outputBuffer} .= "</div>
@@ -632,13 +632,13 @@  discard block
 block discarded – undo
632 632
                                     . ' If all accounts shown as active above are indeed still valid, please check the box below and push "Save".'
633 633
                                     . ' If any of the accounts are stale, please deactivate them by pushing the corresponding button before doing this.'), \config\ConfAssistant::SILVERBULLET['gracetime'] ?? core\ProfileSilverbullet::SB_ACKNOWLEDGEMENT_REQUIRED_DAYS);
634 634
 
635
-                    echo $formtext . "<div style='padding-bottom: 20px;'>"
635
+                    echo $formtext."<div style='padding-bottom: 20px;'>"
636 636
                     . "
637 637
                     <p>$acknowledgeText</p>
638 638
                     <input type='checkbox' name='acknowledge' value='true'>
639
-                    <label>" . sprintf(_("I have verified that all configured users are still eligible for %s."),\config\ConfAssistant::CONSORTIUM['display_name']) . "</label>
639
+                    <label>".sprintf(_("I have verified that all configured users are still eligible for %s."), \config\ConfAssistant::CONSORTIUM['display_name'])."</label>
640 640
                 </div>
641
-                <button type='submit' name='command' value='" . \web\lib\common\FormElements::BUTTON_ACKUSERELIGIBILITY . "'>" . _("Save") . "</button></form>";
641
+                <button type='submit' name='command' value='" . \web\lib\common\FormElements::BUTTON_ACKUSERELIGIBILITY."'>"._("Save")."</button></form>";
642 642
                 }
643 643
                 ?>
644 644
             </div>
Please login to merge, or discard this patch.
web/admin/edit_profile.php 1 patch
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
  */
27 27
 ?>
28 28
 <?php
29
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
29
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
30 30
 
31 31
 $deco = new \web\lib\admin\PageDecoration();
32 32
 $validator = new \web\lib\common\InputValidation();
@@ -126,8 +126,8 @@  discard block
 block discarded – undo
126 126
     <?php
127 127
     echo $uiElements->instLevelInfoBoxes($my_inst);
128 128
 
129
-    echo "<form enctype='multipart/form-data' action='edit_profile_result.php?inst_id=$my_inst->identifier" . ($my_profile !== NULL ? "&amp;profile_id=" . $my_profile->identifier : "") . "' method='post' accept-charset='UTF-8'>
130
-                <input type='hidden' name='MAX_FILE_SIZE' value='" . \config\Master::MAX_UPLOAD_SIZE . "'>";
129
+    echo "<form enctype='multipart/form-data' action='edit_profile_result.php?inst_id=$my_inst->identifier".($my_profile !== NULL ? "&amp;profile_id=".$my_profile->identifier : "")."' method='post' accept-charset='UTF-8'>
130
+                <input type='hidden' name='MAX_FILE_SIZE' value='" . \config\Master::MAX_UPLOAD_SIZE."'>";
131 131
     $optionDisplay = new \web\lib\admin\OptionDisplay($profile_options, \core\Options::LEVEL_PROFILE);
132 132
     ?>
133 133
     <fieldset class="option_container">
@@ -136,19 +136,19 @@  discard block
 block discarded – undo
136 136
         </legend>
137 137
         <?php
138 138
         if ($wizardStyle) {
139
-            echo "<p>" . _("We will now define a profile for your user group(s).  You can add as many profiles as you like by choosing the appropriate button on the end of the page. After we are done, the wizard is finished and you will be taken to the main IdP administration page.") . "</p>";
139
+            echo "<p>"._("We will now define a profile for your user group(s).  You can add as many profiles as you like by choosing the appropriate button on the end of the page. After we are done, the wizard is finished and you will be taken to the main IdP administration page.")."</p>";
140 140
         }
141 141
         ?>
142 142
         <h3><?php echo _("Profile Name and RADIUS realm"); ?></h3>
143 143
         <?php
144 144
         if ($wizardStyle) {
145
-            echo "<p>" . _("First of all we need a name for the profile. This will be displayed to end users, so you may want to choose a descriptive name like 'Professors', 'Students of the Faculty of Bioscience', etc.") . "</p>";
146
-            echo "<p>" . _("Optionally, you can provide a longer descriptive text about who this profile is for. If you specify it, it will be displayed on the download page after the user has selected the profile name in the list.") . "</p>";
147
-            echo "<p>" . _("You can also tell us your RADIUS realm. ");
145
+            echo "<p>"._("First of all we need a name for the profile. This will be displayed to end users, so you may want to choose a descriptive name like 'Professors', 'Students of the Faculty of Bioscience', etc.")."</p>";
146
+            echo "<p>"._("Optionally, you can provide a longer descriptive text about who this profile is for. If you specify it, it will be displayed on the download page after the user has selected the profile name in the list.")."</p>";
147
+            echo "<p>"._("You can also tell us your RADIUS realm. ");
148 148
             if (\config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS'] !== NULL) {
149 149
                 printf(_("This is useful if you want to use the sanity check module later, which tests reachability of your realm in the %s infrastructure. "), \config\ConfAssistant::CONSORTIUM['display_name']);
150 150
             }
151
-            echo _("It is required to enter the realm name if you want to support anonymous outer identities (see below).") . "</p>";
151
+            echo _("It is required to enter the realm name if you want to support anonymous outer identities (see below).")."</p>";
152 152
         }
153 153
 
154 154
         echo $optionDisplay->prefilledOptionTable("profile", $my_inst->federation);
@@ -203,9 +203,9 @@  discard block
 block discarded – undo
203 203
 
204 204
         <?php
205 205
         if ($wizardStyle) {
206
-            echo "<p>" . sprintf(_("Some installers support a feature called 'Anonymous outer identity'. If you don't know what this is, please read <a href='%s'>this article</a>."), "https://confluence.terena.org/display/H2eduroam/eap-types") . "</p>";
207
-            echo "<p>" . _("On some platforms, the installers can suggest username endings and/or verify the user input to contain the realm suffix.") . "</p>";
208
-            echo "<p>" . _("The realm check feature needs to know an outer ID which actually gets a chance to authenticate. If your RADIUS server lets only select usernames pass, it is useful to supply the information which of those (outer ID) username we can use for testing.") . "</p>";
206
+            echo "<p>".sprintf(_("Some installers support a feature called 'Anonymous outer identity'. If you don't know what this is, please read <a href='%s'>this article</a>."), "https://confluence.terena.org/display/H2eduroam/eap-types")."</p>";
207
+            echo "<p>"._("On some platforms, the installers can suggest username endings and/or verify the user input to contain the realm suffix.")."</p>";
208
+            echo "<p>"._("The realm check feature needs to know an outer ID which actually gets a chance to authenticate. If your RADIUS server lets only select usernames pass, it is useful to supply the information which of those (outer ID) username we can use for testing.")."</p>";
209 209
         }
210 210
         ?>
211 211
         <p>
@@ -224,37 +224,37 @@  discard block
 block discarded – undo
224 224
             <tr>
225 225
                 <!-- checkbox and input field for anonymity support, available only when realm is known-->
226 226
                 <td>
227
-                    <span id='anon_support_label' style='<?php echo ($realm == "" ? "color:#999999" : "" ); ?>'>
227
+                    <span id='anon_support_label' style='<?php echo ($realm == "" ? "color:#999999" : ""); ?>'>
228 228
                         <?php echo _("Enable Anonymous Outer Identity:"); ?>
229 229
                     </span>
230 230
                 </td>
231 231
                 <td>
232
-                    <input type='checkbox' <?php echo ($useAnon != FALSE ? "checked" : "" ) . ($realm == "" ? " disabled" : "" ); ?> name='anon_support' onclick='
232
+                    <input type='checkbox' <?php echo ($useAnon != FALSE ? "checked" : "").($realm == "" ? " disabled" : ""); ?> name='anon_support' onclick='
233 233
                             if (this.form.elements["anon_support"].checked !== true) {
234 234
                                 this.form.elements["anon_local"].setAttribute("disabled", "disabled");
235 235
                             } else {
236 236
                                 this.form.elements["anon_local"].removeAttribute("disabled");
237 237
                             }
238 238
                             ;'/>
239
-                    <input type='text' <?php echo ($useAnon == FALSE ? "disabled" : "" ); ?> name='anon_local' value='<?php echo $anonLocal; ?>'/>
239
+                    <input type='text' <?php echo ($useAnon == FALSE ? "disabled" : ""); ?> name='anon_local' value='<?php echo $anonLocal; ?>'/>
240 240
                 </td>
241 241
             </tr>
242 242
             <tr>
243 243
                 <!-- checkbox and input field for check realm outer id, available only when realm is known-->
244 244
                 <td>
245
-                    <span id='checkuser_label' style='<?php echo ($realm == "" ? "color:#999999" : "" ); ?>'>
245
+                    <span id='checkuser_label' style='<?php echo ($realm == "" ? "color:#999999" : ""); ?>'>
246 246
                         <?php echo _("Use special Outer Identity for realm checks:"); ?>
247 247
                     </span>
248 248
                 </td>
249 249
                 <td>
250
-                    <input type='checkbox' <?php echo ($checkuserOuter != FALSE ? "checked" : "" ) . ($realm == "" ? " disabled" : "" ); ?> name='checkuser_support' onclick='
250
+                    <input type='checkbox' <?php echo ($checkuserOuter != FALSE ? "checked" : "").($realm == "" ? " disabled" : ""); ?> name='checkuser_support' onclick='
251 251
                             if (this.form.elements["checkuser_support"].checked !== true) {
252 252
                                 this.form.elements["checkuser_local"].setAttribute("disabled", "disabled");
253 253
                             } else {
254 254
                                 this.form.elements["checkuser_local"].removeAttribute("disabled");
255 255
                             }
256 256
                             ;'/>
257
-                    <input type='text' <?php echo ($checkuserOuter == FALSE ? "disabled" : "" ); ?> name='checkuser_local' value='<?php echo $checkuserValue; ?>'/>
257
+                    <input type='text' <?php echo ($checkuserOuter == FALSE ? "disabled" : ""); ?> name='checkuser_local' value='<?php echo $checkuserValue; ?>'/>
258 258
                 </td>
259 259
             </tr>
260 260
             <tr>
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
                 </td>
270 270
                 <td>
271 271
                     <input type='checkbox' <?php
272
-                        echo ($verify != FALSE ? "checked" : "" );
272
+                        echo ($verify != FALSE ? "checked" : "");
273 273
                         ?> name='verify_support' onclick='
274 274
                             if (this.form.elements["verify_support"].checked !== true || this.form.elements["realm"].value.length == 0) {
275 275
                                 this.form.elements["hint_support"].setAttribute("disabled", "disabled");
@@ -281,12 +281,12 @@  discard block
 block discarded – undo
281 281
             </tr>
282 282
             <tr>
283 283
                 <td>
284
-                    <span id='hint_label' style='<?php echo ($realm == "" ? "color:#999999" : "" ); ?>'>
284
+                    <span id='hint_label' style='<?php echo ($realm == "" ? "color:#999999" : ""); ?>'>
285 285
                         <?php echo _("Enforce exact realm in username"); ?>
286 286
                     </span>
287 287
                 </td>
288 288
                 <td>
289
-                    <input type='checkbox' <?php echo ($verify == FALSE ? "disabled" : "" ); ?> name='hint_support' <?php echo ( $hint != FALSE ? "checked" : "" ); ?> />
289
+                    <input type='checkbox' <?php echo ($verify == FALSE ? "disabled" : ""); ?> name='hint_support' <?php echo ($hint != FALSE ? "checked" : ""); ?> />
290 290
                 </td>
291 291
             </tr>
292 292
         </table>
@@ -296,20 +296,20 @@  discard block
 block discarded – undo
296 296
 
297 297
     <?php
298 298
     if ($wizardStyle) {
299
-        echo "<p>" . _("The CAT has a download area for end users. There, they will, for example, learn about the support pointers you entered earlier. The CAT can also immediately offer the installers for the profile for download. If you don't want that, you can instead enter a web site location where you want your users to be redirected to. You, as the administrator, can still download the profiles to place them on that page (see the 'Compatibility Matrix' button on the dashboard).") . "</p>";
299
+        echo "<p>"._("The CAT has a download area for end users. There, they will, for example, learn about the support pointers you entered earlier. The CAT can also immediately offer the installers for the profile for download. If you don't want that, you can instead enter a web site location where you want your users to be redirected to. You, as the administrator, can still download the profiles to place them on that page (see the 'Compatibility Matrix' button on the dashboard).")."</p>";
300 300
     }
301 301
     ?>
302 302
     <p>
303 303
 
304 304
         <?php
305
-        echo "<span id='redirect_label' style='" . ($realm == "" ? "color:#999999" : "" ) . "'><label for='redirect'>" . _("Redirect end users to own web page:") . "</label></span>
306
-                          <input type='checkbox'  name='redirect' id='redirect' " . ($blacklisted === FALSE ? "" : "checked " ) . "onclick='
305
+        echo "<span id='redirect_label' style='".($realm == "" ? "color:#999999" : "")."'><label for='redirect'>"._("Redirect end users to own web page:")."</label></span>
306
+                          <input type='checkbox'  name='redirect' id='redirect' " . ($blacklisted === FALSE ? "" : "checked ")."onclick='
307 307
                               if (this.form.elements[\"redirect\"].checked != true) {
308 308
                                 this.form.elements[\"redirect_target\"].setAttribute(\"disabled\", \"disabled\");
309 309
                               } else {
310 310
                                 this.form.elements[\"redirect_target\"].removeAttribute(\"disabled\");
311 311
                               };'/>
312
-                          <input type='text' name='redirect_target' " . ($blacklisted !== FALSE ? "value='$blacklisted'" : "disabled" ) . "/>";
312
+                          <input type='text' name='redirect_target' " . ($blacklisted !== FALSE ? "value='$blacklisted'" : "disabled")."/>";
313 313
         ?>
314 314
     </p>
315 315
 
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
     <legend><strong><?php echo _("Supported EAP types"); ?></strong></legend>
319 319
     <?php
320 320
     if ($wizardStyle) {
321
-        echo "<p>" . _("Now, we need to know which EAP types your IdP supports. If you support multiple EAP types, you can assign every type a priority (1=highest). This tool will always generate an automatic installer for the EAP type with the highest priority; only if the user's device can't use that EAP type, we will use an EAP type further down in the list.") . "</p>";
321
+        echo "<p>"._("Now, we need to know which EAP types your IdP supports. If you support multiple EAP types, you can assign every type a priority (1=highest). This tool will always generate an automatic installer for the EAP type with the highest priority; only if the user's device can't use that EAP type, we will use an EAP type further down in the list.")."</p>";
322 322
     }
323 323
     ?>
324 324
     <?php
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
 <?php
352 352
 $D = [];
353 353
 foreach ($prefill_methods as $prio => $value) {
354
-    print '<li>' . $value->getPrintableRep() . "</li>\n";
354
+    print '<li>'.$value->getPrintableRep()."</li>\n";
355 355
     $D[$value->getPrintableRep()] = $prio;
356 356
 }
357 357
 ?>
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
     }
378 378
     $display = $a->getPrintableRep();
379 379
     if (!isset($D[$a->getPrintableRep()])) {
380
-        print '<li class="eap1">' . $a->getPrintableRep() . "</li>\n";
380
+        print '<li class="eap1">'.$a->getPrintableRep()."</li>\n";
381 381
     }
382 382
 }
383 383
 ?>
@@ -390,8 +390,8 @@  discard block
 block discarded – undo
390 390
 foreach ($methods as $a) {
391 391
     $display = $a->getPrintableRep();
392 392
     $v = isset($D[$display]) ? $D[$display] : '';
393
-    print '<input type="hidden" class="eapm" name="' . $display . '" id="EAP-' . $display . '" value="' . $display . '">';
394
-    print '<input type="hidden" class="eapmv" name="' . $display . '-priority" id="EAP-' . $display . '-priority" value="' . $v . '">';
393
+    print '<input type="hidden" class="eapm" name="'.$display.'" id="EAP-'.$display.'" value="'.$display.'">';
394
+    print '<input type="hidden" class="eapmv" name="'.$display.'-priority" id="EAP-'.$display.'-priority" value="'.$v.'">';
395 395
 }
396 396
 ?>
397 397
     <br style="clear:both;" />
@@ -411,11 +411,11 @@  discard block
 block discarded – undo
411 411
 foreach ($optionsAlreadySet as $optionNames) {
412 412
     if (preg_match("/^support:/", $optionNames)) {
413 413
         $has_support_options[$optionNames] = "SET";
414
-        $support_text .= "<li><strong>" . $uiElements->displayName($optionNames) . "</strong></li>";
414
+        $support_text .= "<li><strong>".$uiElements->displayName($optionNames)."</strong></li>";
415 415
     }
416 416
     if (preg_match("/^media:/", $optionNames)) {
417 417
         $has_media_options[$optionNames] = "SET";
418
-        $media_text .= "<li><strong>" . $uiElements->displayName($optionNames) . "</strong></li>";
418
+        $media_text .= "<li><strong>".$uiElements->displayName($optionNames)."</strong></li>";
419 419
     }
420 420
 }
421 421
 $fields = [
@@ -424,12 +424,12 @@  discard block
 block discarded – undo
424 424
     "media" => _("Media Properties for this profile")];
425 425
 
426 426
 foreach ($fields as $name => $description) {
427
-    echo "<fieldset class='option_container' id='" . $name . "_override'>
427
+    echo "<fieldset class='option_container' id='".$name."_override'>
428 428
     <legend><strong>$description</strong></legend>
429 429
     <p>";
430 430
 
431
-    if (count(${"has_" . $name . "_options"}) > 0) {
432
-        printf(ngettext("The option %s is already defined IdP-wide. If you set it here on profile level, this setting will override the IdP-wide one.", "The options %s are already defined IdP-wide. If you set them here on profile level, these settings will override the IdP-wide ones.", count(${"has_" . $name . "_options"})), "<ul>" . ${$name . "_text"} . "</ul>");
431
+    if (count(${"has_".$name."_options"}) > 0) {
432
+        printf(ngettext("The option %s is already defined IdP-wide. If you set it here on profile level, this setting will override the IdP-wide one.", "The options %s are already defined IdP-wide. If you set them here on profile level, these settings will override the IdP-wide ones.", count(${"has_".$name."_options"})), "<ul>".${$name."_text"}."</ul>");
433 433
     }
434 434
 
435 435
     echo "</p>";
@@ -442,7 +442,7 @@  discard block
 block discarded – undo
442 442
 }
443 443
 
444 444
 if ($wizardStyle) {
445
-    echo "<p>" . _("When you are sure that everything is correct, please click on 'Save data' and you will be taken to your IdP Dashboard page.") . "</p>";
445
+    echo "<p>"._("When you are sure that everything is correct, please click on 'Save data' and you will be taken to your IdP Dashboard page.")."</p>";
446 446
 }
447
-echo "<p><button type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_SAVE . "'>" . _("Save data") . "</button><button type='button' class='delete' name='abortbutton' value='abort' onclick='javascript:window.location = \"overview_org.php?inst_id=$my_inst->identifier\"'>" . _("Discard changes") . "</button></p></form>";
447
+echo "<p><button type='submit' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_SAVE."'>"._("Save data")."</button><button type='button' class='delete' name='abortbutton' value='abort' onclick='javascript:window.location = \"overview_org.php?inst_id=$my_inst->identifier\"'>"._("Discard changes")."</button></p></form>";
448 448
 echo $deco->footer();
Please login to merge, or discard this patch.
web/admin/overview_user.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 
22 22
 namespace core;
23 23
 
24
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
24
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
25 25
 
26 26
 $instMgmt = new \core\UserManagement();
27 27
 $deco = new \web\lib\admin\PageDecoration();
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
             <?php echo $uiElements->infoblock($user->getAttributes(), "user", "User"); ?>
62 62
             <tr>
63 63
                 <td>
64
-                    <?php echo "" . _("Unique Identifier") ?>
64
+                    <?php echo ""._("Unique Identifier") ?>
65 65
                 </td>
66 66
                 <td>
67 67
                 </td>
@@ -74,14 +74,14 @@  discard block
 block discarded – undo
74 74
     <div>
75 75
         <?php
76 76
         if (\config\Master::DB['USER']['readonly'] === FALSE) {
77
-            echo "<a href='edit_user.php'><button>" . _("Edit User Details") . "</button></a>";
77
+            echo "<a href='edit_user.php'><button>"._("Edit User Details")."</button></a>";
78 78
         }
79 79
 
80 80
         if ($user->isFederationAdmin()) {
81
-            echo "<form action='overview_federation.php' method='GET' accept-charset='UTF-8'><button type='submit'>" . sprintf(_('Click here for %s management tasks'), $uiElements->nomenclatureFed) . "</button></form>";
81
+            echo "<form action='overview_federation.php' method='GET' accept-charset='UTF-8'><button type='submit'>".sprintf(_('Click here for %s management tasks'), $uiElements->nomenclatureFed)."</button></form>";
82 82
         }
83 83
         if ($user->isSuperadmin()) {
84
-            echo "<form action='112365365321.php' method='GET' accept-charset='UTF-8'><button type='submit'>" . _('Click here to access the superadmin page') . "</button></form>";
84
+            echo "<form action='112365365321.php' method='GET' accept-charset='UTF-8'><button type='submit'>"._('Click here to access the superadmin page')."</button></form>";
85 85
         }
86 86
         ?>
87 87
     </div>
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
         if (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_SILVERBULLET'] == "LOCAL") {
95 95
             $target = "https://wiki.geant.org/x/6Zg7Bw"; // Managed IdP manual
96 96
         }
97
-        $helptext = "<h3 style='display:inline;'>" . sprintf(_("(Need help? Refer to the <a href='%s'>%s administrator manual</a>)"), $target, $uiElements->nomenclatureInst) . "</h3>";
97
+        $helptext = "<h3 style='display:inline;'>".sprintf(_("(Need help? Refer to the <a href='%s'>%s administrator manual</a>)"), $target, $uiElements->nomenclatureInst)."</h3>";
98 98
     } else {
99 99
         $helptext = "";
100 100
     }
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
         // we need to run the Federation constructor
104 104
         $cat = new \core\CAT;
105 105
         /// first parameter: number of Identity Providers; second param is the literal configured term for 'Identity Provider' (you may or may not be able to add a plural suffix for your locale)
106
-        echo "<h2>" . sprintf(ngettext("You are managing the following <span style='display:none'>%d </span>%s:", "You are managing the following <strong>%d</strong> %s:", sizeof($hasInst)), sizeof($hasInst), $uiElements->nomenclatureParticipant) . "</h2>";
106
+        echo "<h2>".sprintf(ngettext("You are managing the following <span style='display:none'>%d </span>%s:", "You are managing the following <strong>%d</strong> %s:", sizeof($hasInst)), sizeof($hasInst), $uiElements->nomenclatureParticipant)."</h2>";
107 107
         $instlist = [];
108 108
         $my_idps = [];
109 109
         $myFeds = [];
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
                                     $coadmin = new \core\User($username['ID']);
175 175
                                     $coadmin_name = $coadmin->getAttributes('user:realname');
176 176
                                     if (count($coadmin_name) > 0) {
177
-                                        echo $coadmin_name[0]['value'] . "<br/>";
177
+                                        echo $coadmin_name[0]['value']."<br/>";
178 178
                                         unset($admins[$number]);
179 179
                                     }
180 180
                                 } else { // don't list self
@@ -193,14 +193,14 @@  discard block
 block discarded – undo
193 193
                         <td>
194 194
                             <?php
195 195
                             if ($blessedUser && \config\Master::DB['INST']['readonly'] === FALSE) {
196
-                                echo "<div style='white-space: nowrap;'><form method='post' action='inc/manageAdmins.inc.php?inst_id=" . $the_inst->identifier . "' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'><button type='submit'>" . _("Add/Remove Administrators") . "</button></form></div>";
196
+                                echo "<div style='white-space: nowrap;'><form method='post' action='inc/manageAdmins.inc.php?inst_id=".$the_inst->identifier."' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'><button type='submit'>"._("Add/Remove Administrators")."</button></form></div>";
197 197
                             }
198 198
                             ?>
199 199
                         </td>
200 200
                         <td> <!-- danger zone --> 
201 201
 
202 202
                             <form action='edit_participant_result.php?inst_id=<?php echo $the_inst->identifier; ?>' method='post' accept-charset='UTF-8'>
203
-                                <button class='delete' type='submit' name='submitbutton' value='<?php echo \web\lib\common\FormElements::BUTTON_DELETE; ?>' onclick="return confirm('<?php echo ( \config\ConfAssistant::CONSORTIUM['selfservice_registration'] === NULL ? sprintf(_("After deleting the %s, you can not recreate it yourself - you need a new invitation token from the %s administrator!"), $uiElements->nomenclatureInst, $uiElements->nomenclatureFed) . " " : "" ) . sprintf(_("Do you really want to delete your %s %s?"), $uiElements->nomenclatureParticipant, $the_inst->name); ?>')"><?php echo sprintf(_("Delete %s"), $uiElements->nomenclatureParticipant); ?></button>
203
+                                <button class='delete' type='submit' name='submitbutton' value='<?php echo \web\lib\common\FormElements::BUTTON_DELETE; ?>' onclick="return confirm('<?php echo (\config\ConfAssistant::CONSORTIUM['selfservice_registration'] === NULL ? sprintf(_("After deleting the %s, you can not recreate it yourself - you need a new invitation token from the %s administrator!"), $uiElements->nomenclatureInst, $uiElements->nomenclatureFed)." " : "").sprintf(_("Do you really want to delete your %s %s?"), $uiElements->nomenclatureParticipant, $the_inst->name); ?>')"><?php echo sprintf(_("Delete %s"), $uiElements->nomenclatureParticipant); ?></button>
204 204
                             </form>
205 205
                             <form action='edit_participant_result.php?inst_id=<?php echo $the_inst->identifier; ?>' method='post' accept-charset='UTF-8'>
206 206
                                 <button class='delete' type='submit' name='submitbutton' value='<?php echo \web\lib\common\FormElements::BUTTON_FLUSH_AND_RESTART; ?>' onclick="return confirm('<?php echo sprintf(_("This action will delete all properties of the %s and start over the configuration from scratch. Do you really want to reset all settings of the %s %s?"), $uiElements->nomenclatureParticipant, $uiElements->nomenclatureParticipant, $the_inst->name); ?>')"><?php echo sprintf(_("Reset all %s settings"), $uiElements->nomenclatureParticipant); ?></button>
@@ -215,18 +215,18 @@  discard block
 block discarded – undo
215 215
             <?php
216 216
         }
217 217
     } else {
218
-        echo "<h2>" . sprintf(_("You are not managing any %s."), $uiElements->nomenclatureInst) . "</h2>";
218
+        echo "<h2>".sprintf(_("You are not managing any %s."), $uiElements->nomenclatureInst)."</h2>";
219 219
     }
220 220
     if (\config\Master::DB['INST']['readonly'] === FALSE) {
221 221
         if (\config\ConfAssistant::CONSORTIUM['selfservice_registration'] === NULL) {
222
-            echo "<p>" . sprintf(_("Please ask your %s administrator to invite you to become an %s administrator."), $uiElements->nomenclatureFed, $uiElements->nomenclatureParticipant) . "</p>";
222
+            echo "<p>".sprintf(_("Please ask your %s administrator to invite you to become an %s administrator."), $uiElements->nomenclatureFed, $uiElements->nomenclatureParticipant)."</p>";
223 223
             echo "<hr/>
224 224
              <div style='white-space: nowrap;'>
225 225
                 <form action='action_enrollment.php' method='get' accept-charset='UTF-8'>" .
226
-            sprintf(_("Did you receive an invitation token to manage an %s? Please paste it here:"), $uiElements->nomenclatureParticipant) .
226
+            sprintf(_("Did you receive an invitation token to manage an %s? Please paste it here:"), $uiElements->nomenclatureParticipant).
227 227
             "        <input type='text' id='token' name='token'/>
228 228
                     <button type='submit'>" .
229
-            _("Go!") . "
229
+            _("Go!")."
230 230
                     </button>
231 231
                 </form>
232 232
              </div>";
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
             <div style='white-space: nowrap;'>
236 236
         <form action='action_enrollment.php' method='get'><button type='submit' accept-charset='UTF-8'>
237 237
                 <input type='hidden' id='token' name='token' value='SELF-REGISTER'/>" .
238
-            sprintf(_("New %s Registration"), $uiElements->nomenclatureParticipant) . "
238
+            sprintf(_("New %s Registration"), $uiElements->nomenclatureParticipant)."
239 239
             </button>
240 240
         </form>
241 241
         </div>";
Please login to merge, or discard this patch.
web/admin/overview_org.php 2 patches
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
  */
27 27
 ?>
28 28
 <?php
29
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
29
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
30 30
 
31 31
 $deco = new \web\lib\admin\PageDecoration();
32 32
 $validator = new \web\lib\common\InputValidation();
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 } else {
39 39
     $link = 'http://';
40 40
 }
41
-$link .= $_SERVER['SERVER_NAME'] . $_SERVER['SCRIPT_NAME'];
41
+$link .= $_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME'];
42 42
 $link = htmlspecialchars($link);
43 43
 
44 44
 echo $deco->defaultPagePrelude(sprintf(_("%s: %s Dashboard"), \config\Master::APPEARANCE['productname'], $uiElements->nomenclatureParticipant));
@@ -165,14 +165,14 @@  discard block
 block discarded – undo
165 165
                                     <ul style='margin:1px'>
166 166
                                         <?php
167 167
                                         foreach ($completeness as $missing_attrib) {
168
-                                            echo "<li>" . $uiElements->displayName($missing_attrib) . "</li>";
168
+                                            echo "<li>".$uiElements->displayName($missing_attrib)."</li>";
169 169
                                         }
170 170
                                         ?>
171 171
                                     </ul>
172 172
                                 </div>
173 173
                                 <?php
174 174
                             } else {
175
-                                echo sprintf(_("You can create up to %d users."), $maxusers[0]['value']) . "<br/>" . sprintf(_("Their credentials will carry the name <strong>%s</strong>."), $profile_list->realm);
175
+                                echo sprintf(_("You can create up to %d users."), $maxusers[0]['value'])."<br/>".sprintf(_("Their credentials will carry the name <strong>%s</strong>."), $profile_list->realm);
176 176
                             }
177 177
                             ?>
178 178
                             <br/>
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
                             if ($readonly === FALSE) {
182 182
                                 ?>
183 183
                                 <form action='edit_silverbullet.php?inst_id=<?php echo $my_inst->identifier; ?>&amp;profile_id=<?php echo $profile_list->identifier; ?>' method='POST'>
184
-                                    <button <?php echo ( is_array($completeness) ? "disabled" : "" ); ?> type='submit' name='sb_action' value='sb_edit'><?php echo _("Manage User Base"); ?></button>
184
+                                    <button <?php echo (is_array($completeness) ? "disabled" : ""); ?> type='submit' name='sb_action' value='sb_edit'><?php echo _("Manage User Base"); ?></button>
185 185
                                 </form>
186 186
                                 <?php
187 187
                             }
@@ -206,21 +206,21 @@  discard block
 block discarded – undo
206 206
                                 $has_overrides = TRUE;
207 207
                             }
208 208
                         }
209
-                        $buffer_eaptypediv = "<div style='margin-bottom:40px; float:left;'>" . _("<strong>EAP Types</strong> (in order of preference):") . "<br/>";
209
+                        $buffer_eaptypediv = "<div style='margin-bottom:40px; float:left;'>"._("<strong>EAP Types</strong> (in order of preference):")."<br/>";
210 210
                         $typelist = $profile_list->getEapMethodsinOrderOfPreference();
211 211
                         $allcomplete = TRUE;
212 212
                         foreach ($typelist as $eaptype) {
213 213
                             $buffer_eaptypediv .= $eaptype->getPrintableRep();
214 214
                             $completeness = $profile_list->isEapTypeDefinitionComplete($eaptype);
215 215
                             if ($completeness === true) {
216
-                                $buffer_eaptypediv .= " <div class='acceptable'>" . _("OK") . "</div>";
216
+                                $buffer_eaptypediv .= " <div class='acceptable'>"._("OK")."</div>";
217 217
                             } else {
218 218
                                 $buffer_eaptypediv .= " <div class='notacceptable'>";
219 219
                                 $buffer_eaptypediv .= _("Information needed!");
220 220
                                 if (is_array($completeness)) {
221 221
                                     $buffer_eaptypediv .= "<ul style='margin:1px'>";
222 222
                                     foreach ($completeness as $missing_attrib) {
223
-                                        $buffer_eaptypediv .= "<li>" . $uiElements->displayName($missing_attrib) . "</li>";
223
+                                        $buffer_eaptypediv .= "<li>".$uiElements->displayName($missing_attrib)."</li>";
224 224
                                     }
225 225
                                     $buffer_eaptypediv .= "</ul>";
226 226
                                 }
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
                             foreach ($attribs as $attrib) {
233 233
                                 if ($attrib['level'] == \core\Options::LEVEL_METHOD && !preg_match("/^internal:/", $attrib['name']) && !$justOnce) {
234 234
                                     $justOnce = TRUE;
235
-                                    $buffer_eaptypediv .= "<img src='../resources/images/icons/Letter-E-blue-icon.png' alt='" . _("Options on EAP Method/Device level are in effect.") . "'>";
235
+                                    $buffer_eaptypediv .= "<img src='../resources/images/icons/Letter-E-blue-icon.png' alt='"._("Options on EAP Method/Device level are in effect.")."'>";
236 236
                                 }
237 237
                             }
238 238
                             $buffer_eaptypediv .= "<br/>";
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
                                 if (\config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS'] == "LOCAL") {
271 271
                                     $diagUrl = "../diag/";
272 272
                                 } else {
273
-                                    $diagUrl = \config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS'] . "/diag/";
273
+                                    $diagUrl = \config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS']."/diag/";
274 274
                                 }
275 275
                                 ?>
276 276
                                 <form action='<?php echo $diagUrl; ?>action_realmcheck.php?inst_id=$my_inst->identifier&amp;profile_id=$profile_list->identifier' method='post' accept-charset='UTF-8'>
@@ -307,9 +307,9 @@  discard block
 block discarded – undo
307 307
                                 ?>
308 308
                                 <div style='display: flex;'>
309 309
                                     <?php
310
-                                    $idpLevelUrl = ( isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on" ? 'https://' : 'http://') . $_SERVER['SERVER_NAME'] . dirname(dirname($_SERVER['SCRIPT_NAME'])) . "?idp=" . $my_inst->identifier;
311
-                                    $displayurl = $idpLevelUrl . "&amp;profile=" . $profile_list->identifier;
312
-                                    $QRurl = $idpLevelUrl . "&profile=" . $profile_list->identifier;
310
+                                    $idpLevelUrl = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on" ? 'https://' : 'http://').$_SERVER['SERVER_NAME'].dirname(dirname($_SERVER['SCRIPT_NAME']))."?idp=".$my_inst->identifier;
311
+                                    $displayurl = $idpLevelUrl."&amp;profile=".$profile_list->identifier;
312
+                                    $QRurl = $idpLevelUrl."&profile=".$profile_list->identifier;
313 313
                                     $qrCode = new \chillerlan\QRCode\QRCode(new \chillerlan\QRCode\QROptions([
314 314
                                                 'outputType' => \chillerlan\QRCode\QRCode::OUTPUT_IMAGE_PNG,
315 315
                                                 'eccLevel' => \chillerlan\QRCode\QRCode::ECC_H,
@@ -321,9 +321,9 @@  discard block
 block discarded – undo
321 321
                                     if (empty($rawQr)) {
322 322
                                         throw new Exception("Something went seriously wrong during QR code generation!");
323 323
                                     }
324
-                                    $uri = "data:image/png;base64," . base64_encode($uiElements->pngInjectConsortiumLogo($rawQr, web\lib\admin\UIElements::QRCODE_PIXELS_PER_SYMBOL));
324
+                                    $uri = "data:image/png;base64,".base64_encode($uiElements->pngInjectConsortiumLogo($rawQr, web\lib\admin\UIElements::QRCODE_PIXELS_PER_SYMBOL));
325 325
                                     $size = getimagesize($uri);
326
-                                    echo "<img width='" . ($size[0] / 4) . "' height='" . ($size[1] / 4) . "' src='$uri' alt='QR-code'/>";
326
+                                    echo "<img width='".($size[0] / 4)."' height='".($size[1] / 4)."' src='$uri' alt='QR-code'/>";
327 327
 
328 328
                                     //echo "<nobr>$displayurl</nobr></a>";
329 329
                                     echo "<p>$displayurl</p></a>";
@@ -373,7 +373,7 @@  discard block
 block discarded – undo
373 373
                     <div>
374 374
                         <input type="hidden" name="consortium" value="eduroam"/>
375 375
                         <button type='submit' <?php echo ($hasMail > 0 ? "" : "disabled"); ?> name='profile_action' value='new'>
376
-                            <?php echo sprintf(_("Add %s deployment ..."), \config\ConfAssistant::CONSORTIUM['name'] . " " . \core\DeploymentManaged::PRODUCTNAME); ?>
376
+                            <?php echo sprintf(_("Add %s deployment ..."), \config\ConfAssistant::CONSORTIUM['name']." ".\core\DeploymentManaged::PRODUCTNAME); ?>
377 377
                         </button>
378 378
 
379 379
                     </div>
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
     <?php
400 400
     $hotspotProfiles = $my_inst->listDeployments();
401 401
     if (count($hotspotProfiles) == 0) { // no profiles yet.
402
-        echo "<h2>" . sprintf(_("There are not yet any known deployments for your %s."), $uiElements->nomenclatureHotspot) . "</h2>";
402
+        echo "<h2>".sprintf(_("There are not yet any known deployments for your %s."), $uiElements->nomenclatureHotspot)."</h2>";
403 403
     }
404 404
 
405 405
     foreach ($hotspotProfiles as $counter => $deploymentObject) {
@@ -428,7 +428,7 @@  discard block
 block discarded – undo
428 428
                     default:
429 429
                         throw new Exception("We are supposed to operate on a roaming consortium we don't know.");
430 430
                 }
431
-                echo $displayname . " (<span style='color:" . ( $deploymentObject->status == \core\AbstractDeployment::INACTIVE ? "red;'>" . _("inactive") : "green;'>" . _("active") ) . "</span>)"; ?></h2>
431
+                echo $displayname." (<span style='color:".($deploymentObject->status == \core\AbstractDeployment::INACTIVE ? "red;'>"._("inactive") : "green;'>"._("active"))."</span>)"; ?></h2>
432 432
                 <table>
433 433
                     <caption><?php echo _("Deployment Details"); ?></caption>
434 434
                     <tr>
@@ -441,13 +441,13 @@  discard block
 block discarded – undo
441 441
                         <td><strong><?php echo _("Your primary RADIUS server") ?></strong><br/>
442 442
                             <?php
443 443
                             if ($deploymentObject->host1_v4 !== NULL) {
444
-                                echo _("IPv4") . ": " . $deploymentObject->host1_v4;
444
+                                echo _("IPv4").": ".$deploymentObject->host1_v4;
445 445
                             }
446 446
                             if ($deploymentObject->host1_v4 !== NULL && $deploymentObject->host1_v6 !== NULL) {
447 447
                                 echo "<br/>";
448 448
                             }
449 449
                             if ($deploymentObject->host1_v6 !== NULL) {
450
-                                echo _("IPv6") . ": " . $deploymentObject->host1_v6;
450
+                                echo _("IPv6").": ".$deploymentObject->host1_v6;
451 451
                             }
452 452
                             ?>
453 453
                         </td>
@@ -455,9 +455,9 @@  discard block
 block discarded – undo
455 455
                         <td><?php echo $deploymentObject->port1; ?></td>
456 456
                         <td>
457 457
                             <?php
458
-                            echo "<img src='" . $radiusMessages[$deploymentObject->radius_status_1]['icon'] .
459
-                            "' alt='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] .
460
-                            "' title='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] . "'>";
458
+                            echo "<img src='".$radiusMessages[$deploymentObject->radius_status_1]['icon'].
459
+                            "' alt='".$radiusMessages[$deploymentObject->radius_status_1]['text'].
460
+                            "' title='".$radiusMessages[$deploymentObject->radius_status_1]['text']."'>";
461 461
                             ?>
462 462
                         </td>
463 463
                     </tr>
@@ -465,22 +465,22 @@  discard block
 block discarded – undo
465 465
                         <td><strong><?php echo _("Your backup RADIUS server") ?><br/></strong>
466 466
                             <?php
467 467
                             if ($deploymentObject->host2_v4 !== NULL) {
468
-                                echo _("IPv4") . ": " . $deploymentObject->host2_v4;
468
+                                echo _("IPv4").": ".$deploymentObject->host2_v4;
469 469
                             }
470 470
                             if ($deploymentObject->host2_v4 !== NULL && $deploymentObject->host2_v6 !== NULL) {
471 471
                                 echo "<br/>";
472 472
                             }
473 473
                             if ($deploymentObject->host2_v6 !== NULL) {
474
-                                echo _("IPv6") . ": " . $deploymentObject->host2_v6;
474
+                                echo _("IPv6").": ".$deploymentObject->host2_v6;
475 475
                             }
476 476
                             ?></td>
477 477
                         <td><?php echo _("RADIUS port number: ") ?></td>
478 478
                         <td><?php echo $deploymentObject->port2; ?></td>
479 479
                         <td>
480 480
                             <?php
481
-                            echo "<img src='" . $radiusMessages[$deploymentObject->radius_status_2]['icon'] .
482
-                            "' alt='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] .
483
-                            "' title='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] . "'>";
481
+                            echo "<img src='".$radiusMessages[$deploymentObject->radius_status_2]['icon'].
482
+                            "' alt='".$radiusMessages[$deploymentObject->radius_status_2]['text'].
483
+                            "' title='".$radiusMessages[$deploymentObject->radius_status_2]['text']."'>";
484 484
                             ?>
485 485
                         </td>
486 486
                     </tr>
@@ -532,12 +532,12 @@  discard block
 block discarded – undo
532 532
                                 if (isset($res['FAILURE']) && $res['FAILURE'] > 0) {
533 533
                                     echo '<br>';
534 534
                                     if ($res['FAILURE'] == 2) {
535
-                                        echo ' <span style="color: red;">' . _("Activation failure.") . '</span>';
535
+                                        echo ' <span style="color: red;">'._("Activation failure.").'</span>';
536 536
                                     } else {
537 537
                                         if (isset($_GET['res'][1]) && $_GET['res']['1'] == 'FAILURE') {
538
-                                            echo ' <span style="color: red;">' . _("Activation failure for your primary RADIUS server.") . '</span>';
538
+                                            echo ' <span style="color: red;">'._("Activation failure for your primary RADIUS server.").'</span>';
539 539
                                         } else {
540
-                                            echo ' <span style="color: red;">' . _("Activation failure for your backup RADIUS server.") . '</span>';
540
+                                            echo ' <span style="color: red;">'._("Activation failure for your backup RADIUS server.").'</span>';
541 541
                                         }
542 542
                                     }
543 543
                                 }
@@ -557,12 +557,12 @@  discard block
 block discarded – undo
557 557
                                 if ($res['FAILURE'] > 0) {
558 558
                                     echo '<br>';
559 559
                                     if ($res['FAILURE'] == 2) {
560
-                                        echo ' <span style="color: red;">' . _("Failure during deactivation, your request is queued for handling") . '</span>';
560
+                                        echo ' <span style="color: red;">'._("Failure during deactivation, your request is queued for handling").'</span>';
561 561
                                     } else {
562 562
                                         if (isset($_GET['res'][1]) && $_GET['res']['1'] == 'FAILURE') {
563
-                                            echo ' <span style="color: red;">' . _("Deactivation failure for your primary RADIUS server, your request is queued.") . '</span>';
563
+                                            echo ' <span style="color: red;">'._("Deactivation failure for your primary RADIUS server, your request is queued.").'</span>';
564 564
                                         } else {
565
-                                            echo ' <span style="color: red;">' . _("Deactivation failure for your backup RADIUS server, your request is queued.") . '</span>';
565
+                                            echo ' <span style="color: red;">'._("Deactivation failure for your backup RADIUS server, your request is queued.").'</span>';
566 566
                                         }
567 567
                                     }
568 568
                                 }
Please login to merge, or discard this patch.
Switch Indentation   +54 added lines, -54 removed lines patch added patch discarded remove patch
@@ -190,71 +190,71 @@  discard block
 block discarded – undo
190 190
                     </div>
191 191
                     <?php
192 192
                     break;
193
-                case "core\ProfileRADIUS":
194
-                    ?>
195
-                    <div style='padding-bottom:20px;'>
193
+                    case "core\ProfileRADIUS":
194
+                        ?>
195
+                        <div style='padding-bottom:20px;'>
196 196
                         <?php
197
-                        $profile_name = $profile_list->name; ?>
198
-                        <h2 style='overflow:auto; display:inline; padding-bottom: 10px;'><?php printf(_("Profile: %s"), $profile_name); ?></h2>
197
+                            $profile_name = $profile_list->name; ?>
198
+                            <h2 style='overflow:auto; display:inline; padding-bottom: 10px;'><?php printf(_("Profile: %s"), $profile_name); ?></h2>
199 199
                         <?php
200
-                        // see if there are any profile-level overrides
201
-                        $attribs = $profile_list->getAttributes();
202
-                        // write things into a buffer; we need some function calls to determine
203
-                        // readiness - but want to display it before!
204
-                        $has_overrides = FALSE;
205
-                        foreach ($attribs as $attrib) {
206
-                            if ($attrib['level'] == \core\Options::LEVEL_PROFILE && !preg_match("/^(internal:|profile:name|profile:description|eap:)/", $attrib['name'])) {
207
-                                $has_overrides = TRUE;
200
+                            // see if there are any profile-level overrides
201
+                            $attribs = $profile_list->getAttributes();
202
+                            // write things into a buffer; we need some function calls to determine
203
+                            // readiness - but want to display it before!
204
+                            $has_overrides = FALSE;
205
+                            foreach ($attribs as $attrib) {
206
+                                if ($attrib['level'] == \core\Options::LEVEL_PROFILE && !preg_match("/^(internal:|profile:name|profile:description|eap:)/", $attrib['name'])) {
207
+                                    $has_overrides = TRUE;
208
+                                }
208 209
                             }
209
-                        }
210
-                        $buffer_eaptypediv = "<div style='margin-bottom:40px; float:left;'>" . _("<strong>EAP Types</strong> (in order of preference):") . "<br/>";
211
-                        $typelist = $profile_list->getEapMethodsinOrderOfPreference();
212
-                        $allcomplete = TRUE;
213
-                        foreach ($typelist as $eaptype) {
214
-                            $buffer_eaptypediv .= $eaptype->getPrintableRep();
215
-                            $completeness = $profile_list->isEapTypeDefinitionComplete($eaptype);
216
-                            if ($completeness === true) {
217
-                                $buffer_eaptypediv .= " <div class='acceptable'>" . _("OK") . "</div>";
218
-                            } else {
219
-                                $buffer_eaptypediv .= " <div class='notacceptable'>";
220
-                                $buffer_eaptypediv .= _("Information needed!");
221
-                                if (is_array($completeness)) {
222
-                                    $buffer_eaptypediv .= "<ul style='margin:1px'>";
223
-                                    foreach ($completeness as $missing_attrib) {
224
-                                        $buffer_eaptypediv .= "<li>" . $uiElements->displayName($missing_attrib) . "</li>";
210
+                            $buffer_eaptypediv = "<div style='margin-bottom:40px; float:left;'>" . _("<strong>EAP Types</strong> (in order of preference):") . "<br/>";
211
+                            $typelist = $profile_list->getEapMethodsinOrderOfPreference();
212
+                            $allcomplete = TRUE;
213
+                            foreach ($typelist as $eaptype) {
214
+                                $buffer_eaptypediv .= $eaptype->getPrintableRep();
215
+                                $completeness = $profile_list->isEapTypeDefinitionComplete($eaptype);
216
+                                if ($completeness === true) {
217
+                                    $buffer_eaptypediv .= " <div class='acceptable'>" . _("OK") . "</div>";
218
+                                } else {
219
+                                    $buffer_eaptypediv .= " <div class='notacceptable'>";
220
+                                    $buffer_eaptypediv .= _("Information needed!");
221
+                                    if (is_array($completeness)) {
222
+                                        $buffer_eaptypediv .= "<ul style='margin:1px'>";
223
+                                        foreach ($completeness as $missing_attrib) {
224
+                                            $buffer_eaptypediv .= "<li>" . $uiElements->displayName($missing_attrib) . "</li>";
225
+                                        }
226
+                                        $buffer_eaptypediv .= "</ul>";
225 227
                                     }
226
-                                    $buffer_eaptypediv .= "</ul>";
228
+                                    $buffer_eaptypediv .= "</div>";
229
+                                    $allcomplete = FALSE;
227 230
                                 }
228
-                                $buffer_eaptypediv .= "</div>";
229
-                                $allcomplete = FALSE;
230
-                            }
231
-                            $attribs = $profile_list->getAttributes();
232
-                            $justOnce = FALSE;
233
-                            foreach ($attribs as $attrib) {
234
-                                if ($attrib['level'] == \core\Options::LEVEL_METHOD && !preg_match("/^internal:/", $attrib['name']) && !$justOnce) {
235
-                                    $justOnce = TRUE;
236
-                                    $buffer_eaptypediv .= "<img src='../resources/images/icons/Letter-E-blue-icon.png' alt='" . _("Options on EAP Method/Device level are in effect.") . "'>";
231
+                                $attribs = $profile_list->getAttributes();
232
+                                $justOnce = FALSE;
233
+                                foreach ($attribs as $attrib) {
234
+                                    if ($attrib['level'] == \core\Options::LEVEL_METHOD && !preg_match("/^internal:/", $attrib['name']) && !$justOnce) {
235
+                                        $justOnce = TRUE;
236
+                                        $buffer_eaptypediv .= "<img src='../resources/images/icons/Letter-E-blue-icon.png' alt='" . _("Options on EAP Method/Device level are in effect.") . "'>";
237
+                                    }
237 238
                                 }
239
+                                $buffer_eaptypediv .= "<br/>";
238 240
                             }
239
-                            $buffer_eaptypediv .= "<br/>";
240
-                        }
241
-                        $buffer_eaptypediv .= "</div>";
241
+                            $buffer_eaptypediv .= "</div>";
242 242
 
243
-                        $buffer_headline = "<span style='float:right;'>";
244
-                        $readiness = $profile_list->readinessLevel();
245
-                        if ($has_overrides) {
246
-                            $buffer_headline .= $uiElements->boxRemark("", _("Option override on profile level is in effect."), TRUE);
247
-                        }
248
-                        if (!$allcomplete) {
249
-                            $buffer_headline .= $uiElements->boxError("", _("The information in this profile is incomplete."), TRUE);
250
-                        }
251
-                        switch ($readiness) {
243
+                            $buffer_headline = "<span style='float:right;'>";
244
+                            $readiness = $profile_list->readinessLevel();
245
+                            if ($has_overrides) {
246
+                                $buffer_headline .= $uiElements->boxRemark("", _("Option override on profile level is in effect."), TRUE);
247
+                            }
248
+                            if (!$allcomplete) {
249
+                                $buffer_headline .= $uiElements->boxError("", _("The information in this profile is incomplete."), TRUE);
250
+                            }
251
+                            switch ($readiness) {
252 252
                             case core\AbstractProfile::READINESS_LEVEL_SHOWTIME:
253 253
                                 $buffer_headline .= $uiElements->boxOkay("", _("This profile is shown on the user download interface."), TRUE);
254 254
                                 break;
255 255
                             case core\AbstractProfile::READINESS_LEVEL_SUFFICIENTCONFIG:
256 256
                                 $buffer_headline .= $uiElements->boxWarning("", sprintf(_("This profile is NOT shown on the user download interface, even though we have enough information to show. To enable the profile, add the attribute \"%s\" and tick the corresponding box."), $uiElements->displayName("profile:production")), TRUE);
257
-                        }
257
+                            }
258 258
 
259 259
                         $buffer_headline .= "</span></div>";
260 260
 
@@ -337,8 +337,8 @@  discard block
 block discarded – undo
337 337
                     </div>
338 338
                     <?php
339 339
                     break;
340
-                default:
341
-                    throw new Exception("We were asked to operate on something that is neither a RADIUS nor Silverbullet profile!");
340
+                    default:
341
+                        throw new Exception("We were asked to operate on something that is neither a RADIUS nor Silverbullet profile!");
342 342
             }
343 343
             ?>
344 344
             <!-- dummy width to keep a little distance -->
Please login to merge, or discard this patch.
web/admin/edit_hotspot.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
  */
27 27
 ?>
28 28
 <?php
29
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
29
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
30 30
 
31 31
 $deco = new \web\lib\admin\PageDecoration();
32 32
 $validator = new \web\lib\common\InputValidation();
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 if (!isset($_GET['deployment_id'])) {
39 39
     if (isset($_POST['consortium']) && count($myfed->getAttributes("fed:openroaming")) > 0) {
40 40
         $my_inst->newDeployment(\core\AbstractDeployment::DEPLOYMENTTYPE_MANAGED, $_POST['consortium']);
41
-        header("Location: overview_org.php?inst_id=" . $my_inst->identifier);
41
+        header("Location: overview_org.php?inst_id=".$my_inst->identifier);
42 42
         exit(0);
43 43
     } else {
44 44
         throw new Exception("Desired consortium for Managed SP needs to be specified, and allowed!");
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
         if (in_array('OK', $response)) {
54 54
             $deployment->deactivate();
55 55
         }
56
-        header("Location: overview_org.php?inst_id=" . $my_inst->identifier . '&' . urldecode(http_build_query($response)));
56
+        header("Location: overview_org.php?inst_id=".$my_inst->identifier.'&'.urldecode(http_build_query($response)));
57 57
         exit(0);
58 58
     }
59 59
 
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
         if (in_array('OK', $response)) {
63 63
             $deployment->activate();
64 64
         }
65
-        header("Location: overview_org.php?inst_id=" . $my_inst->identifier . '&' . urldecode(http_build_query($response)));
65
+        header("Location: overview_org.php?inst_id=".$my_inst->identifier.'&'.urldecode(http_build_query($response)));
66 66
         exit(0);
67 67
     }
68 68
 
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
             $deployment->status = core\DeploymentManaged::INACTIVE;
84 84
             $response = $deployment->setRADIUSconfig();
85 85
         }
86
-        header("Location: overview_org.php?inst_id=" . $my_inst->identifier . '&' . urldecode(http_build_query($response)));
86
+        header("Location: overview_org.php?inst_id=".$my_inst->identifier.'&'.urldecode(http_build_query($response)));
87 87
         exit(0);
88 88
     }
89 89
 }
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
     echo $uiElements->instLevelInfoBoxes($my_inst);
112 112
     $deploymentOptions = $deployment->getAttributes();
113 113
     echo "<form enctype='multipart/form-data' action='edit_hotspot.php?inst_id=$my_inst->identifier&amp;deployment_id=$deployment->identifier' method='post' accept-charset='UTF-8'>
114
-                <input type='hidden' name='MAX_FILE_SIZE' value='" . \config\Master::MAX_UPLOAD_SIZE . "'>";
114
+                <input type='hidden' name='MAX_FILE_SIZE' value='".\config\Master::MAX_UPLOAD_SIZE."'>";
115 115
     $optionDisplay = new \web\lib\admin\OptionDisplay($deploymentOptions, \core\Options::LEVEL_PROFILE);
116 116
     ?>
117 117
     <fieldset class='option_container' id='managedsp_override'>
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
                 <!-- input for VLAN identifier for home users-->
144 144
                 <td>
145 145
                     <span id='vlan_label'>
146
-<?php echo sprintf(_("VLAN tag for own users%s:"), ($vlan === NULL ? "" : " " . _("(unset with '0')"))); ?>
146
+<?php echo sprintf(_("VLAN tag for own users%s:"), ($vlan === NULL ? "" : " "._("(unset with '0')"))); ?>
147 147
                     </span>
148 148
                 </td>
149 149
                 <td>
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
     </fieldset>
164 164
 
165 165
     <?php
166
-    echo "<p><button type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_SAVE . "'>" . _("Save data") . "</button><button type='button' class='delete' name='abortbutton' value='abort' onclick='javascript:window.location = \"overview_org.php?inst_id=$my_inst->identifier\"'>" . _("Discard changes") . "</button></p></form>";
166
+    echo "<p><button type='submit' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_SAVE."'>"._("Save data")."</button><button type='button' class='delete' name='abortbutton' value='abort' onclick='javascript:window.location = \"overview_org.php?inst_id=$my_inst->identifier\"'>"._("Discard changes")."</button></p></form>";
167 167
     echo $deco->footer();
168 168
 
169 169
     
170 170
\ No newline at end of file
Please login to merge, or discard this patch.
core/DeploymentManaged.php 1 patch
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
                 $serverCandidates[IdPlist::geoDistance($adminLocation, ['lat' => $iterator->location_lat, 'lon' => $iterator->location_lon])] = $iterator->server_id;
271 271
             }
272 272
             if ($clients > $maxSupportedClients * 0.9) {
273
-                $this->loggerInstance->debug(1, "A RADIUS server for Managed SP (" . $iterator->server_id . ") is serving at more than 90% capacity!");
273
+                $this->loggerInstance->debug(1, "A RADIUS server for Managed SP (".$iterator->server_id.") is serving at more than 90% capacity!");
274 274
             }
275 275
         }
276 276
         if (count($serverCandidates) == 0 && $federation != "DEFAULT") {
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
             return $this->findGoodServerLocation($adminLocation, "DEFAULT", $blacklistedServers);
280 280
         }
281 281
         if (count($serverCandidates) == 0) {
282
-            throw new Exception("No available server found for new SP! $federation " . /** @scrutinizer ignore-type */ print_r($serverCandidates, true));
282
+            throw new Exception("No available server found for new SP! $federation "./** @scrutinizer ignore-type */ print_r($serverCandidates, true));
283 283
         }
284 284
         // put the nearest server on top of the list
285 285
         ksort($serverCandidates);
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
         $foundFreePort1 = 0;
308 308
         while ($foundFreePort1 == 0) {
309 309
             $portCandidate = random_int(1200, 65535);
310
-            $check = $this->databaseHandle->exec("SELECT port_instance_1 FROM deployment WHERE radius_instance_1 = '" . $ourserver . "' AND port_instance_1 = $portCandidate");
310
+            $check = $this->databaseHandle->exec("SELECT port_instance_1 FROM deployment WHERE radius_instance_1 = '".$ourserver."' AND port_instance_1 = $portCandidate");
311 311
             if (mysqli_num_rows(/** @scrutinizer ignore-type */ $check) == 0) {
312 312
                 $foundFreePort1 = $portCandidate;
313 313
             }
@@ -316,14 +316,14 @@  discard block
 block discarded – undo
316 316
         $foundFreePort2 = 0;
317 317
         while ($foundFreePort2 == 0) {
318 318
             $portCandidate = random_int(1200, 65535);
319
-            $check = $this->databaseHandle->exec("SELECT port_instance_2 FROM deployment WHERE radius_instance_2 = '" . $ourSecondServer . "' AND port_instance_2 = $portCandidate");
319
+            $check = $this->databaseHandle->exec("SELECT port_instance_2 FROM deployment WHERE radius_instance_2 = '".$ourSecondServer."' AND port_instance_2 = $portCandidate");
320 320
             if (mysqli_num_rows(/** @scrutinizer ignore-type */ $check) == 0) {
321 321
                 $foundFreePort2 = $portCandidate;
322 322
             }
323 323
         }
324 324
         // and make up a shared secret that is halfways readable
325 325
         $futureSecret = $this->randomString(16, "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ");
326
-        $this->databaseHandle->exec("UPDATE deployment SET radius_instance_1 = '" . $ourserver . "', radius_instance_2 = '" . $ourSecondServer . "', port_instance_1 = $foundFreePort1, port_instance_2 = $foundFreePort2, secret = '$futureSecret', consortium = '$this->consortium' WHERE deployment_id = $this->identifier");
326
+        $this->databaseHandle->exec("UPDATE deployment SET radius_instance_1 = '".$ourserver."', radius_instance_2 = '".$ourSecondServer."', port_instance_1 = $foundFreePort1, port_instance_2 = $foundFreePort2, secret = '$futureSecret', consortium = '$this->consortium' WHERE deployment_id = $this->identifier");
327 327
         return ["port_instance_1" => $foundFreePort1, "port_instance_2" => $foundFreePort2, "secret" => $futureSecret, "radius_instance_1" => $ourserver, "radius_instance_2" => $ourserver];
328 328
     }
329 329
 
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
      */
371 371
     public function deactivate()
372 372
     {
373
-        $this->databaseHandle->exec("UPDATE deployment SET status = " . DeploymentManaged::INACTIVE . " WHERE deployment_id = $this->identifier");
373
+        $this->databaseHandle->exec("UPDATE deployment SET status = ".DeploymentManaged::INACTIVE." WHERE deployment_id = $this->identifier");
374 374
     }
375 375
 
376 376
     /**
@@ -381,7 +381,7 @@  discard block
 block discarded – undo
381 381
      */
382 382
     public function activate()
383 383
     {
384
-        $this->databaseHandle->exec("UPDATE deployment SET status = " . DeploymentManaged::ACTIVE . " WHERE deployment_id = $this->identifier");
384
+        $this->databaseHandle->exec("UPDATE deployment SET status = ".DeploymentManaged::ACTIVE." WHERE deployment_id = $this->identifier");
385 385
     }
386 386
 
387 387
     /**
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
     {
394 394
         $customAttrib = $this->getAttributes("managedsp:operatorname");
395 395
         if (count($customAttrib) == 0) {
396
-            return "1sp." . $this->identifier . "-" . $this->institution . \config\ConfAssistant::SILVERBULLET['realm_suffix'];
396
+            return "1sp.".$this->identifier."-".$this->institution.\config\ConfAssistant::SILVERBULLET['realm_suffix'];
397 397
         }
398 398
         return $customAttrib[0]["value"];
399 399
     }
@@ -409,13 +409,13 @@  discard block
 block discarded – undo
409 409
     {
410 410
 
411 411
         $hostname = "radius_hostname_$idx";
412
-        $ch = curl_init("http://" . $this->$hostname);
412
+        $ch = curl_init("http://".$this->$hostname);
413 413
         if ($ch === FALSE) {
414 414
             $res = 'FAILURE';
415 415
         } else {
416 416
             curl_setopt($ch, CURLOPT_POST, 1);
417 417
             curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
418
-            $this->loggerInstance->debug(1, "Posting to http://" . $this->$hostname . ": $post\n");
418
+            $this->loggerInstance->debug(1, "Posting to http://".$this->$hostname.": $post\n");
419 419
             curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
420 420
             curl_setopt($ch, CURLOPT_HEADER, 0);
421 421
             curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
@@ -431,7 +431,7 @@  discard block
 block discarded – undo
431 431
             $this->loggerInstance->debug(1, $this);
432 432
         }
433 433
         $this->loggerInstance->debug(1, "Database update");
434
-        $this->databaseHandle->exec("UPDATE deployment SET radius_status_$idx = " . ($res == 'OK' ? \core\AbstractDeployment::RADIUS_OK : \core\AbstractDeployment::RADIUS_FAILURE) . " WHERE deployment_id = $this->identifier");
434
+        $this->databaseHandle->exec("UPDATE deployment SET radius_status_$idx = ".($res == 'OK' ? \core\AbstractDeployment::RADIUS_OK : \core\AbstractDeployment::RADIUS_FAILURE)." WHERE deployment_id = $this->identifier");
435 435
         return $res;
436 436
     }
437 437
 
@@ -452,19 +452,19 @@  discard block
 block discarded – undo
452 452
         } else {
453 453
             $txt = $remove ? _('Profile dectivation failed') : _('Profile activation/modification failed');
454 454
         }
455
-        $txt = $txt . ' ';
455
+        $txt = $txt.' ';
456 456
         if (array_count_values($response)[$status] == 2) {
457
-            $txt = $txt . _('on both RADIUS servers: primary and backup') . '.';
457
+            $txt = $txt._('on both RADIUS servers: primary and backup').'.';
458 458
         } else {
459 459
             if ($response['res[1]'] == $status) {
460
-                $txt = $txt . _('on primary RADIUS server') . '.';
460
+                $txt = $txt._('on primary RADIUS server').'.';
461 461
             } else {
462
-                $txt = $txt . _('on backup RADIUS server') . '.';
462
+                $txt = $txt._('on backup RADIUS server').'.';
463 463
             }
464 464
         }
465 465
         $mail = \core\common\OutsideComm::mailHandle();
466 466
         $email = $this->getAttributes("support:email")[0]['value'];
467
-        $mail->FromName = \config\Master::APPEARANCE['productname'] . " Notification System";
467
+        $mail->FromName = \config\Master::APPEARANCE['productname']." Notification System";
468 468
         $mail->addAddress($email);
469 469
         if ($status == 'OK') {
470 470
             $mail->Subject = _('RADIUS profile update problem fixed');
@@ -498,7 +498,7 @@  discard block
 block discarded – undo
498 498
             return NULL;
499 499
         }
500 500
         $timeout = 10;
501
-        curl_setopt($ch, CURLOPT_URL, 'http://' . $host);
501
+        curl_setopt($ch, CURLOPT_URL, 'http://'.$host);
502 502
         curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
503 503
         curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
504 504
         curl_exec($ch);
@@ -590,35 +590,35 @@  discard block
 block discarded – undo
590 590
     {
591 591
         $remove = ($this->status == \core\AbstractDeployment::INACTIVE) ? 0 : 1;
592 592
         $toPost = ($onlyone ? array($onlyone => '') : array(1 => '', 2 => ''));
593
-        $toPostTemplate = 'instid=' . $this->institution . '&deploymentid=' . $this->identifier . '&secret=' . $this->secret . '&country=' . $this->getAttributes("internal:country")[0]['value'] . '&';
593
+        $toPostTemplate = 'instid='.$this->institution.'&deploymentid='.$this->identifier.'&secret='.$this->secret.'&country='.$this->getAttributes("internal:country")[0]['value'].'&';
594 594
         if ($remove) {
595
-            $toPostTemplate = $toPostTemplate . 'remove=1&';
595
+            $toPostTemplate = $toPostTemplate.'remove=1&';
596 596
         } else {
597 597
             if ($this->getAttributes("managedsp:operatorname")[0]['value'] ?? NULL) {
598
-                $toPostTemplate = $toPostTemplate . 'operatorname=' . $this->getAttributes("managedsp:operatorname")[0]['value'] . '&';
598
+                $toPostTemplate = $toPostTemplate.'operatorname='.$this->getAttributes("managedsp:operatorname")[0]['value'].'&';
599 599
             }
600 600
             if ($this->getAttributes("managedsp:vlan")[0]['value'] ?? NULL) {
601 601
                 $allRealms = $this->getAllRealms();
602 602
                 if (!empty($allRealms)) {
603
-                    $toPostTemplate = $toPostTemplate . 'vlan=' . $this->getAttributes("managedsp:vlan")[0]['value'] . '&';
604
-                    $toPostTemplate = $toPostTemplate . 'realmforvlan[]=' . implode('&realmforvlan[]=', $allRealms) . '&';
603
+                    $toPostTemplate = $toPostTemplate.'vlan='.$this->getAttributes("managedsp:vlan")[0]['value'].'&';
604
+                    $toPostTemplate = $toPostTemplate.'realmforvlan[]='.implode('&realmforvlan[]=', $allRealms).'&';
605 605
                 }
606 606
             }
607 607
         }
608 608
         foreach (array_keys($toPost) as $key) {
609
-            $elem = 'port' . $key;
610
-            $toPost[$key] = $toPostTemplate . 'port=' . $this->$elem;
609
+            $elem = 'port'.$key;
610
+            $toPost[$key] = $toPostTemplate.'port='.$this->$elem;
611 611
         }
612 612
         $response = array();
613 613
         foreach ($toPost as $key => $value) {
614
-            $this->loggerInstance->debug(1, 'toPost ' . $toPost[$key] . "\n");
615
-            $response['res[' . $key . ']'] = $this->sendToRADIUS($key, $toPost[$key]);
614
+            $this->loggerInstance->debug(1, 'toPost '.$toPost[$key]."\n");
615
+            $response['res['.$key.']'] = $this->sendToRADIUS($key, $toPost[$key]);
616 616
         }
617 617
         if ($onlyone) {
618
-            $response['res[' . ($onlyone == 1) ? 2 : 1 . ']'] = \core\AbstractDeployment::RADIUS_OK;
618
+            $response['res['.($onlyone == 1) ? 2 : 1.']'] = \core\AbstractDeployment::RADIUS_OK;
619 619
         }
620 620
         foreach (array('OK', 'FAILURE') as $status) {
621
-            if ( ( ($status == 'OK' && $notify) || ($status == 'FAILURE') ) && ( in_array($status, $response) ) ) {
621
+            if ((($status == 'OK' && $notify) || ($status == 'FAILURE')) && (in_array($status, $response))) {
622 622
                 $this->sendMailtoAdmin($remove, $response, $status);
623 623
             }
624 624
         }
Please login to merge, or discard this patch.
web/lib/admin/OptionParser.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
                 $optionClass = \core\Options::instance();
102 102
                 $optionProps = $optionClass->optionType($optiontype);
103 103
                 $allowedValues = explode(',', substr($optionProps["flags"], 7));
104
-                if (in_array($incomingBinary,$allowedValues))  {
104
+                if (in_array($incomingBinary, $allowedValues)) {
105 105
                     return TRUE;
106 106
                 }
107 107
                 return FALSE;
@@ -346,14 +346,14 @@  discard block
 block discarded – undo
346 346
                 case \core\Options::TYPECODE_TEXT:
347 347
                 case \core\Options::TYPECODE_COORDINATES:
348 348
                 case \core\Options::TYPECODE_INTEGER:
349
-                    $varName = $listOfEntries["$objId-" . self::VALIDATOR_FUNCTIONS[$optioninfo['type']]['field']];
349
+                    $varName = $listOfEntries["$objId-".self::VALIDATOR_FUNCTIONS[$optioninfo['type']]['field']];
350 350
                     if (!empty($varName)) {
351 351
                         $content = call_user_func_array([$this->validator, self::VALIDATOR_FUNCTIONS[$optioninfo['type']]['function']], array_merge([$varName], self::VALIDATOR_FUNCTIONS[$optioninfo['type']]['extraarg']));
352 352
                         break;
353 353
                     }
354 354
                     continue 2;
355 355
                 case \core\Options::TYPECODE_BOOLEAN:
356
-                    $varName = $listOfEntries["$objId-" . \core\Options::TYPECODE_BOOLEAN];
356
+                    $varName = $listOfEntries["$objId-".\core\Options::TYPECODE_BOOLEAN];
357 357
                     if (!empty($varName)) {
358 358
                         $contentValid = $this->validator->boolean($varName);
359 359
                         if ($contentValid) {
@@ -366,7 +366,7 @@  discard block
 block discarded – undo
366 366
                     }
367 367
                     continue 2;
368 368
                 case \core\Options::TYPECODE_STRING:
369
-                    $previsionalContent = $listOfEntries["$objId-" . \core\Options::TYPECODE_STRING];
369
+                    $previsionalContent = $listOfEntries["$objId-".\core\Options::TYPECODE_STRING];
370 370
                     if (!empty($previsionalContent)) {
371 371
                         $content = $this->furtherStringChecks($objValue, $previsionalContent, $bad);
372 372
                         if ($content === FALSE) {
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
                     continue 2;
378 378
                     
379 379
                 case \core\Options::TYPECODE_ENUM_OPENROAMING:
380
-                    $previsionalContent = $listOfEntries["$objId-" . \core\Options::TYPECODE_ENUM_OPENROAMING];
380
+                    $previsionalContent = $listOfEntries["$objId-".\core\Options::TYPECODE_ENUM_OPENROAMING];
381 381
                     if (!empty($previsionalContent)) {
382 382
                         $content = $this->furtherStringChecks($objValue, $previsionalContent, $bad);
383 383
                         if ($content === FALSE) {
@@ -388,15 +388,15 @@  discard block
 block discarded – undo
388 388
                     continue 2;    
389 389
                 case \core\Options::TYPECODE_FILE:
390 390
                     // this is either actually an uploaded file, or a reference to a DB entry of a previously uploaded file
391
-                    $reference = $listOfEntries["$objId-" . \core\Options::TYPECODE_STRING];
391
+                    $reference = $listOfEntries["$objId-".\core\Options::TYPECODE_STRING];
392 392
                     if (!empty($reference)) { // was already in, by ROWID reference, extract
393 393
                         // ROWID means it's a multi-line string (simple strings are inline in the form; so allow whitespace)
394 394
                         $content = $this->validator->string(urldecode($reference), TRUE);
395 395
                         break;
396 396
                     }
397
-                    $fileName = $listOfEntries["$objId-" . \core\Options::TYPECODE_FILE] ?? "";
397
+                    $fileName = $listOfEntries["$objId-".\core\Options::TYPECODE_FILE] ?? "";
398 398
                     if ($fileName != "") { // let's do the download
399
-                        $rawContent = \core\common\OutsideComm::downloadFile("file:///" . $fileName);
399
+                        $rawContent = \core\common\OutsideComm::downloadFile("file:///".$fileName);
400 400
 
401 401
                         if ($rawContent === FALSE || !$this->checkUploadSanity($objValue, $rawContent)) {
402 402
                             $bad[] = $objValue;
@@ -407,7 +407,7 @@  discard block
 block discarded – undo
407 407
                     }
408 408
                     continue 2;
409 409
                 default:
410
-                    throw new Exception("Internal Error: Unknown option type " . $objValue . "!");
410
+                    throw new Exception("Internal Error: Unknown option type ".$objValue."!");
411 411
             }
412 412
             // lang can be NULL here, if it's not a multilang attribute, or a ROWID reference. Never mind that.
413 413
             $retval[] = ["$objValue" => ["lang" => $languageFlag, "content" => $content]];
Please login to merge, or discard this patch.
web/skins/modern/Divs.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
     public function divSilverbullet() {
125 125
         $retval = "
126 126
 <div id='silverbullet'>"
127
-               .$this->Gui->textTemplates->templates[user\SB_GO_AWAY] .
127
+               .$this->Gui->textTemplates->templates[user\SB_GO_AWAY].
128 128
                 "</div>
129 129
     ";
130 130
         return $retval;
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
 <div id='profiles'> <!-- this is the profile selection filled during run time -->
223 223
     <div id='profiles_h' class='sub_h'>".$this->Gui->textTemplates->templates[user\PROFILE_SELECTION]."
224 224
     </div>" .
225
-                "<select id='profile_list'></select><div id='profile_desc' class='profile_desc'></div>" .
225
+                "<select id='profile_list'></select><div id='profile_desc' class='profile_desc'></div>".
226 226
                 "</div>";
227 227
     }
228 228
 
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
     public function divInstitution($selectButton = TRUE) {
251 251
         $retval = "<div id='institution_name'>
252 252
     <span id='inst_name_span'></span> <div id='inst_extra_text'></div><!-- this will be filled with the IdP name -->" .
253
-                ($selectButton ? "<a  id='select_another' class='signin' href=\"\">".$this->Gui->textTemplates->templates[user\INSTITUTION_SELECTION]."</a>" : "") .
253
+                ($selectButton ? "<a  id='select_another' class='signin' href=\"\">".$this->Gui->textTemplates->templates[user\INSTITUTION_SELECTION]."</a>" : "").
254 254
                 "</div>";
255 255
         $retval .= $this->emptyImage('idp_logo', 'IdP Logo');
256 256
         return $retval;
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
     public function divSilverbullet() {
125 125
         $retval = "
126 126
 <div id='silverbullet'>"
127
-               .$this->Gui->textTemplates->templates[user\SB_GO_AWAY] .
127
+                .$this->Gui->textTemplates->templates[user\SB_GO_AWAY] .
128 128
                 "</div>
129 129
     ";
130 130
         return $retval;
@@ -293,8 +293,8 @@  discard block
 block discarded – undo
293 293
                 }
294 294
 
295 295
                 $retval .= "<td><button name='$d' class='other_os' id='$d'>".$D['display']."</button>"
296
-                       ."</td>"
297
-                       ."<td><button name='$d' class='more_info_b' id='info_b_$d'>i</button></td></tr>\n";
296
+                        ."</td>"
297
+                        ."<td><button name='$d' class='more_info_b' id='info_b_$d'>i</button></td></tr>\n";
298 298
                 $deviceIndex++;
299 299
             }
300 300
             $retval .= "</tbody>";
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
         <tr>
342 342
             <td>" .
343 343
                 $this->Gui->catCopyright
344
-               ."
344
+                ."
345 345
             </td>";
346 346
 
347 347
         if (!empty(\config\Master::APPEARANCE['privacy_notice_url'])) {
Please login to merge, or discard this patch.
web/lib/admin/OptionDisplay.php 1 patch
Spacing   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
      */
113 113
     public function prefilledOptionTable(string $attributePrefix, $fed)
114 114
     {
115
-        $retval = "<table id='expandable_$attributePrefix" . "_options'>";
115
+        $retval = "<table id='expandable_$attributePrefix"."_options'>";
116 116
 
117 117
         $prepopulate = [];
118 118
         foreach ($this->listOfOptions as $existingAttribute) {
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
                 $prepopulate[] = $existingAttribute;
121 121
             }
122 122
         }
123
-        if (is_array($prepopulate) && ( count($prepopulate) > 0 || $attributePrefix == "device-specific" || $attributePrefix == "eap-specific" )) { // editing... fill with values
123
+        if (is_array($prepopulate) && (count($prepopulate) > 0 || $attributePrefix == "device-specific" || $attributePrefix == "eap-specific")) { // editing... fill with values
124 124
             $retval .= $this->addOptionEdit($attributePrefix, $prepopulate);
125 125
         } else {
126 126
             $retval .= $this->addOptionNew($attributePrefix, $fed);
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
                 $optiontypearray = $optioninfo->optionType($option['name']);
154 154
                 $loggerInstance = new \core\common\Logging();
155 155
                 $loggerInstance->debug(5, "About to execute optiontext with PREFILL!\n");
156
-                $retval .= $this->optiontext([$option['name']], ($optiontypearray["type"] == "file" ? 'ROWID-' . $option['level'] . '-' . $option['row'] : $option['value']), $option['lang']);
156
+                $retval .= $this->optiontext([$option['name']], ($optiontypearray["type"] == "file" ? 'ROWID-'.$option['level'].'-'.$option['row'] : $option['value']), $option['lang']);
157 157
             }
158 158
         }
159 159
         return $retval;
@@ -252,18 +252,18 @@  discard block
 block discarded – undo
252 252
         }
253 253
         $descriptions["media:force_proxy"] = sprintf(_("The format of this option is: IPv4|IPv6|hostname:port . Forcing your users through a content filter of your own is a significant invasion of user self-determination. It also has technical issues. Please throughly read the discussion at %s before specifying a proxy with this option. This feature is currently experimental and only has an effect in Apple installers."), "https://github.com/GEANT/CAT/issues/96");
254 254
         $descriptions["managedsp:realmforvlan"] = sprintf(_("If you are also using %s, then your own realm is automatically tagged with the VLAN you choose, there is no need to add it here manually."), \core\ProfileSilverbullet::PRODUCTNAME);
255
-        $descriptions["media:openroaming"] = sprintf(_("By opting in to OpenRoaming, you agree to be bound by the %s."), "eduroam Ecosystem Broker OpenRoaming Identity Provider Policy") .
256
-                " " .
257
-                sprintf(_("Note that your requirement to inform users about the OpenRoaming End User Terms and Conditions is fulfilled when directing your end users to the %s download portal for installer download. Any other means of providing the installers needs to present this information via its own channel."), \config\Master::APPEARANCE['productname']) .
258
-                " " .
259
-                _("You are also aware that for best technical interoperability, you need to add a DNS entry into the DNS zone of your RADIUS realm.") .
260
-                " " .
255
+        $descriptions["media:openroaming"] = sprintf(_("By opting in to OpenRoaming, you agree to be bound by the %s."), "eduroam Ecosystem Broker OpenRoaming Identity Provider Policy").
256
+                " ".
257
+                sprintf(_("Note that your requirement to inform users about the OpenRoaming End User Terms and Conditions is fulfilled when directing your end users to the %s download portal for installer download. Any other means of providing the installers needs to present this information via its own channel."), \config\Master::APPEARANCE['productname']).
258
+                " ".
259
+                _("You are also aware that for best technical interoperability, you need to add a DNS entry into the DNS zone of your RADIUS realm.").
260
+                " ".
261 261
                 _("Read the instructions in the wiki.");
262 262
         \core\common\Entity::outOfThePotatoes();
263 263
         if (!isset($descriptions[$input])) {
264 264
             return "";
265 265
         }
266
-        return "<span class='tooltip' id='S$rowid-tooltip-$input' style='display:" . ($isVisible ? "block" : "none") . "' onclick='alert(\"" . $descriptions[$input] . "\")'><img src='../resources/images/icons/question-mark-icon.png" . "'></span>";
266
+        return "<span class='tooltip' id='S$rowid-tooltip-$input' style='display:".($isVisible ? "block" : "none")."' onclick='alert(\"".$descriptions[$input]."\")'><img src='../resources/images/icons/question-mark-icon.png"."'></span>";
267 267
     }
268 268
 
269 269
     /**
@@ -277,19 +277,19 @@  discard block
 block discarded – undo
277 277
     private function selectElement($rowid, $list)
278 278
     {
279 279
         $jsmagic = "onchange='
280
-                               if (/#ML#/.test(document.getElementById(\"option-S" . $rowid . "-select\").value)) {
280
+                               if (/#ML#/.test(document.getElementById(\"option-S" . $rowid."-select\").value)) {
281 281
                                    document.getElementById(\"S$rowid-input-langselect\").style.display = \"block\";
282 282
                                    } else {
283 283
                                    document.getElementById(\"S$rowid-input-langselect\").style.display = \"none\";
284 284
                                    }";
285 285
         foreach (array_keys($this->htmlDatatypeTexts) as $key) {
286
-            $jsmagic .= "if (/#" . $key . "#/.test(document.getElementById(\"option-S" . $rowid . "-select\").value)) {
287
-                                  document.getElementById(\"S$rowid-input-file\").style.display = \"" . ($key == \core\Options::TYPECODE_FILE ? "block" : "none") . "\";
288
-                                  document.getElementById(\"S$rowid-input-text\").style.display = \"" . ($key == \core\Options::TYPECODE_TEXT ? "block" : "none") . "\";
289
-                                  document.getElementById(\"S$rowid-input-string\").style.display = \"" . ($key == \core\Options::TYPECODE_STRING ? "block" : "none") . "\";
290
-                                  document.getElementById(\"S$rowid-input-enum_openroaming\").style.display = \"" . ($key == \core\Options::TYPECODE_ENUM_OPENROAMING ? "block" : "none") . "\";
291
-                                  document.getElementById(\"S$rowid-input-boolean\").style.display = \"" . ($key == \core\Options::TYPECODE_BOOLEAN ? "block" : "none") . "\";
292
-                                  document.getElementById(\"S$rowid-input-integer\").style.display = \"" . ($key == \core\Options::TYPECODE_INTEGER ? "block" : "none") . "\";
286
+            $jsmagic .= "if (/#".$key."#/.test(document.getElementById(\"option-S".$rowid."-select\").value)) {
287
+                                  document.getElementById(\"S$rowid-input-file\").style.display = \"".($key == \core\Options::TYPECODE_FILE ? "block" : "none")."\";
288
+                                  document.getElementById(\"S$rowid-input-text\").style.display = \"".($key == \core\Options::TYPECODE_TEXT ? "block" : "none")."\";
289
+                                  document.getElementById(\"S$rowid-input-string\").style.display = \"".($key == \core\Options::TYPECODE_STRING ? "block" : "none")."\";
290
+                                  document.getElementById(\"S$rowid-input-enum_openroaming\").style.display = \"".($key == \core\Options::TYPECODE_ENUM_OPENROAMING ? "block" : "none")."\";
291
+                                  document.getElementById(\"S$rowid-input-boolean\").style.display = \"".($key == \core\Options::TYPECODE_BOOLEAN ? "block" : "none")."\";
292
+                                  document.getElementById(\"S$rowid-input-integer\").style.display = \"".($key == \core\Options::TYPECODE_INTEGER ? "block" : "none")."\";
293 293
                              }
294 294
                              ";
295 295
             // hide all tooltips (each is a <span>, and there are no other <span>s)
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
                 $value = array_shift($list);
321 321
                 $listtype = $optioninfo->optionType($value);
322 322
                 $retval .= $uiElements->displayName($value);
323
-                $retval .= "<input type='hidden' name='option[S$rowid]' value='$value#" . $listtype["type"] . "#" . $listtype["flag"] . "#'/>";
323
+                $retval .= "<input type='hidden' name='option[S$rowid]' value='$value#".$listtype["type"]."#".$listtype["flag"]."#'/>";
324 324
                 $activelisttype = $listtype;
325 325
                 $tooltips = $this->tooltip($rowid, $value, TRUE);
326 326
                 break;
@@ -328,7 +328,7 @@  discard block
 block discarded – undo
328 328
                 $retval .= "<select id='option-S$rowid-select' name='option[S$rowid]' $jsmagic>";
329 329
                 foreach ($list as $value) {
330 330
                     $listtype = $optioninfo->optionType($value);
331
-                    $retval .= "<option id='option-S$rowid-v-$value' value='$value#" . $listtype["type"] . "#" . $listtype["flag"] . "#' ";
331
+                    $retval .= "<option id='option-S$rowid-v-$value' value='$value#".$listtype["type"]."#".$listtype["flag"]."#' ";
332 332
                     if ($iterator == $this->optionIterator) {
333 333
                         $retval .= "selected='selected'";
334 334
                         $activelisttype = $listtype;
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
                     } else {
337 337
                         $tooltips .= $this->tooltip($rowid, $value, FALSE);
338 338
                     }
339
-                    $retval .= ">" . $uiElements->displayName($value) . "</option>";
339
+                    $retval .= ">".$uiElements->displayName($value)."</option>";
340 340
                     $iterator++;
341 341
                 }
342 342
 
@@ -362,9 +362,9 @@  discard block
 block discarded – undo
362 362
     private function selectLanguage($rowid, $makeVisible)
363 363
     {
364 364
         \core\common\Entity::intoThePotatoes();
365
-        $retval = "<select style='display:" . ($makeVisible ? "block" : "none") . "' name='value[S$rowid-lang]' id='S" . $rowid . "-input-langselect'>
366
-            <option value='' name='select_language' selected>" . _("select language") . "</option>
367
-            <option value='C' name='all_languages'>" . _("default/other languages") . "</option>";
365
+        $retval = "<select style='display:".($makeVisible ? "block" : "none")."' name='value[S$rowid-lang]' id='S".$rowid."-input-langselect'>
366
+            <option value='' name='select_language' selected>" . _("select language")."</option>
367
+            <option value='C' name='all_languages'>" . _("default/other languages")."</option>";
368 368
         foreach (\config\Master::LANGUAGES as $langindex => $possibleLang) {
369 369
             $thislang = $possibleLang['display'];
370 370
             $retval .= "<option value='$langindex' name='$langindex'>$thislang</option>";
@@ -385,7 +385,7 @@  discard block
 block discarded – undo
385 385
     {
386 386
         $retval = "";
387 387
         foreach ($this->htmlDatatypeTexts as $key => $type) {
388
-            $retval .= "<" . $type['html'] . " style='display:" . ($activetype['type'] == $key ? "block" : "none") . "' name='value[S$rowid-$key]' id='S" . $rowid . "-input-" . $key . "'" . $type['tail'] . ">";
388
+            $retval .= "<".$type['html']." style='display:".($activetype['type'] == $key ? "block" : "none")."' name='value[S$rowid-$key]' id='S".$rowid."-input-".$key."'".$type['tail'].">";
389 389
         }
390 390
         return $retval;
391 391
     }
@@ -401,11 +401,11 @@  discard block
 block discarded – undo
401 401
     {
402 402
         // first column: the <select> element with the names of options and their field-toggling JS magic
403 403
         $selectorInfo = $this->selectElement($rowid, $list);
404
-        $retval = "<td>" . $selectorInfo["TEXT"] . "</td>";
404
+        $retval = "<td>".$selectorInfo["TEXT"]."</td>";
405 405
         // second column: the <select> element for language selection - only visible if the active option is multi-lang
406
-        $retval .= "<td>" . $this->selectLanguage($rowid, $selectorInfo['ACTIVE']['flag'] == "ML") . "</td>";
406
+        $retval .= "<td>".$this->selectLanguage($rowid, $selectorInfo['ACTIVE']['flag'] == "ML")."</td>";
407 407
         // third column: the actual input fields; the data type of the active option is visible, all others hidden
408
-        $retval .= "<td>" . $this->inputFields($rowid, $selectorInfo['ACTIVE']) . "</td>";
408
+        $retval .= "<td>".$this->inputFields($rowid, $selectorInfo['ACTIVE'])."</td>";
409 409
         return $retval;
410 410
     }
411 411
 
@@ -429,20 +429,20 @@  discard block
 block discarded – undo
429 429
         $retval .= "<td>";
430 430
         $uiElements = new UIElements();
431 431
         $listtype = $optioninfo->optionType($optionName);
432
-        $retval .= "<span style='display:flex;'>" . $uiElements->displayName($optionName);
433
-        $retval .= $this->tooltip($rowid, $optionName, TRUE) . "</span>";
434
-        $retval .= "<input type='hidden' id='option-S$rowid-select' name='option[S$rowid]' value='$optionName#" . $listtype["type"] . "#" . $listtype["flag"] . "#' ></td>";
432
+        $retval .= "<span style='display:flex;'>".$uiElements->displayName($optionName);
433
+        $retval .= $this->tooltip($rowid, $optionName, TRUE)."</span>";
434
+        $retval .= "<input type='hidden' id='option-S$rowid-select' name='option[S$rowid]' value='$optionName#".$listtype["type"]."#".$listtype["flag"]."#' ></td>";
435 435
 
436 436
         // language tag if any
437 437
         $retval .= "<td>";
438 438
         if ($listtype["flag"] == "ML") {
439 439
 
440
-            $language = "(" . strtoupper($optionLang) . ")";
440
+            $language = "(".strtoupper($optionLang).")";
441 441
             if ($optionLang == 'C') {
442 442
                 $language = _("(default/other languages)");
443 443
             }
444 444
             $retval .= $language;
445
-            $retval .= "<input type='hidden' name='value[S$rowid-lang]' id='S" . $rowid . "-input-langselect' value='" . $optionLang . "' style='display:block'>";
445
+            $retval .= "<input type='hidden' name='value[S$rowid-lang]' id='S".$rowid."-input-langselect' value='".$optionLang."' style='display:block'>";
446 446
         }
447 447
         $retval .= "</td>";
448 448
 // attribute content
@@ -452,12 +452,12 @@  discard block
 block discarded – undo
452 452
             case \core\Options::TYPECODE_COORDINATES:
453 453
                 $this->allLocationCount = $this->allLocationCount + 1;
454 454
                 // display of the locations varies by map provider
455
-                $classname = "\web\lib\admin\Map" . \config\ConfAssistant::MAPPROVIDER['PROVIDER'];
455
+                $classname = "\web\lib\admin\Map".\config\ConfAssistant::MAPPROVIDER['PROVIDER'];
456 456
                 $link = $classname::optionListDisplayCode($optionValue, $this->allLocationCount);
457
-                $retval .= "<input readonly style='display:none' type='text' name='value[S$rowid-" . \core\Options::TYPECODE_TEXT . "]' id='S$rowid-input-text' value='$optionValue'>$link";
457
+                $retval .= "<input readonly style='display:none' type='text' name='value[S$rowid-".\core\Options::TYPECODE_TEXT."]' id='S$rowid-input-text' value='$optionValue'>$link";
458 458
                 break;
459 459
             case \core\Options::TYPECODE_FILE:
460
-                $retval .= "<input readonly type='text' name='value[S$rowid-" . \core\Options::TYPECODE_STRING . "]' id='S" . $rowid . "-input-string' style='display:none' value='" . urlencode($optionValue) . "'>";
460
+                $retval .= "<input readonly type='text' name='value[S$rowid-".\core\Options::TYPECODE_STRING."]' id='S".$rowid."-input-string' style='display:none' value='".urlencode($optionValue)."'>";
461 461
                 $uiElements = new UIElements();
462 462
                 switch ($optionName) {
463 463
                     case "eap:ca_file":
@@ -479,7 +479,7 @@  discard block
 block discarded – undo
479 479
                 break;
480 480
             case \core\Options::TYPECODE_ENUM_OPENROAMING: // is a string after all
481 481
                 $displayedVariant = $this->enumPrettyPrints[$optionValue];
482
-                $retval .= "<strong>$displayedVariant</strong><input type='hidden' name='value[S$rowid-" . $listtype['type'] . "]' id='S" . $rowid . "-input-" . $listtype["type"] . "' value=\"" . htmlspecialchars($optionValue) . "\" style='display:block'>";
482
+                $retval .= "<strong>$displayedVariant</strong><input type='hidden' name='value[S$rowid-".$listtype['type']."]' id='S".$rowid."-input-".$listtype["type"]."' value=\"".htmlspecialchars($optionValue)."\" style='display:block'>";
483 483
                 break;
484 484
             case \core\Options::TYPECODE_STRING:
485 485
             // fall-thorugh is intentional; mostly identical HTML code for the three types
@@ -487,11 +487,11 @@  discard block
 block discarded – undo
487 487
             // fall-thorugh is intentional; mostly identical HTML code for the three types
488 488
             case \core\Options::TYPECODE_TEXT:
489 489
                 $displayedVariant = $optionValue; // for all three types, value tag and actual display are identical
490
-                $retval .= "<strong>$displayedVariant</strong><input type='hidden' name='value[S$rowid-" . $listtype['type'] . "]' id='S" . $rowid . "-input-" . $listtype["type"] . "' value=\"" . htmlspecialchars($optionValue) . "\" style='display:block'>";
490
+                $retval .= "<strong>$displayedVariant</strong><input type='hidden' name='value[S$rowid-".$listtype['type']."]' id='S".$rowid."-input-".$listtype["type"]."' value=\"".htmlspecialchars($optionValue)."\" style='display:block'>";
491 491
                 break;
492 492
             case \core\Options::TYPECODE_BOOLEAN:
493 493
                 $displayedVariant = ($optionValue == "on" ? _("on") : _("off"));
494
-                $retval .= "<strong>$displayedVariant</strong><input type='hidden' name='value[S$rowid-" . $listtype['type'] . "]' id='S" . $rowid . "-input-" . $listtype["type"] . "' value=\"" . htmlspecialchars($optionValue) . "\" style='display:block'>";
494
+                $retval .= "<strong>$displayedVariant</strong><input type='hidden' name='value[S$rowid-".$listtype['type']."]' id='S".$rowid."-input-".$listtype["type"]."' value=\"".htmlspecialchars($optionValue)."\" style='display:block'>";
495 495
                 break;
496 496
             default:
497 497
                 // this should never happen!
@@ -537,10 +537,10 @@  discard block
 block discarded – undo
537 537
        <td>
538 538
           <button type='button' class='delete' onclick='";
539 539
         if ($prefillValue !== NULL && $item == "general:geo_coordinates") {
540
-            $funcname = "Map" . \config\ConfAssistant::MAPPROVIDER['PROVIDER'] . 'DeleteCoord';
541
-            $retval .= 'if (typeof ' . $funcname . ' === "function") { ' . $funcname . '(' . $this->allLocationCount . '); } ';
540
+            $funcname = "Map".\config\ConfAssistant::MAPPROVIDER['PROVIDER'].'DeleteCoord';
541
+            $retval .= 'if (typeof '.$funcname.' === "function") { '.$funcname.'('.$this->allLocationCount.'); } ';
542 542
         }
543
-        $retval .= 'deleteOption("option-S' . $rowid . '")';
543
+        $retval .= 'deleteOption("option-S'.$rowid.'")';
544 544
         $retval .= "'>-</button>
545 545
        </td>
546 546
     </tr>";
Please login to merge, or discard this patch.