Passed
Push — master ( 88d8fc...0abd1f )
by Maja
08:25
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_idp.php?inst_id=" . $inst->identifier);
92
+            header("Location: overview_idp.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_user.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
  *          <base_url>/copyright.php after deploying the software
20 20
  */
21 21
 
22
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
22
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
23 23
 
24 24
 $deco = new \web\lib\admin\PageDecoration();
25 25
 $uiElements = new web\lib\admin\UIElements();
@@ -37,14 +37,14 @@  discard block
 block discarded – undo
37 37
     </h1>
38 38
     <div class='infobox'>
39 39
         <h2>
40
-            <?php $tablecaption = _("Current User Attributes"); echo $tablecaption;?>
40
+            <?php $tablecaption = _("Current User Attributes"); echo $tablecaption; ?>
41 41
         </h2>
42 42
         <table>
43
-            <caption><?php echo $tablecaption;?></caption>
43
+            <caption><?php echo $tablecaption; ?></caption>
44 44
             <tr>
45
-                <th class="wai-invisible" scope="col"><?php echo _("Property Type");?></th>
46
-                <th class="wai-invisible" scope="col"><?php echo _("Language if applicable");?></th>
47
-                <th class="wai-invisible" scope="col"><?php echo _("Property Value");?></th>
45
+                <th class="wai-invisible" scope="col"><?php echo _("Property Type"); ?></th>
46
+                <th class="wai-invisible" scope="col"><?php echo _("Language if applicable"); ?></th>
47
+                <th class="wai-invisible" scope="col"><?php echo _("Property Value"); ?></th>
48 48
             </tr>
49 49
             <?php echo $uiElements->infoblock($user->getAttributes(), "user", "User"); ?>
50 50
         </table>
Please login to merge, or discard this patch.
web/admin/edit_user_result.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
  *          <base_url>/copyright.php after deploying the software
20 20
  */
21 21
 
22
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
22
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
23 23
 
24 24
 $loggerInstance = new \core\common\Logging();
25 25
 $deco = new \web\lib\admin\PageDecoration();
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 
30 30
 $user = new \core\User($_SESSION['user']);
31 31
 if (!isset($_POST['submitbutton']) || $_POST['submitbutton'] != web\lib\common\FormElements::BUTTON_SAVE) { // what are we supposed to do?
32
-    echo "<p>" . _("The page was called with insufficient data. Please report this as an error.") . "</p>";
32
+    echo "<p>"._("The page was called with insufficient data. Please report this as an error.")."</p>";
33 33
     echo $deco->footer();
34 34
     exit(0);
35 35
 }
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 if (isset($_POST['option'])) {
47 47
     foreach ($_POST['option'] as $opt_id => $optname) {
48 48
         if ($optname == "user:fedadmin") {
49
-            echo "Security violation: user tried to make himself " . \config\ConfAssistant::CONSORTIUM['nomenclature_federation'] . " administrator!";
49
+            echo "Security violation: user tried to make himself ".\config\ConfAssistant::CONSORTIUM['nomenclature_federation']." administrator!";
50 50
             exit(1);
51 51
         }
52 52
     }
@@ -71,11 +71,11 @@  discard block
 block discarded – undo
71 71
 ?>
72 72
 <h1><?php $tablecaption = _("Submitted attributes for this user"); echo $tablecaption; ?></h1>
73 73
 <table>
74
-            <caption><?php echo $tablecaption;?></caption>
74
+            <caption><?php echo $tablecaption; ?></caption>
75 75
             <tr>
76 76
                             <tr>
77
-                <th class="wai-invisible" scope="col"><?php echo _("Overall Result");?></th>
78
-                <th class="wai-invisible" scope="col"><?php echo _("Details");?></th>
77
+                <th class="wai-invisible" scope="col"><?php echo _("Overall Result"); ?></th>
78
+                <th class="wai-invisible" scope="col"><?php echo _("Details"); ?></th>
79 79
             </tr>
80 80
     <?php
81 81
     echo $optionParser->processSubmittedFields($user, $_POST, $_FILES);
Please login to merge, or discard this patch.
web/admin/edit_hotspot.php 1 patch
Spacing   +14 added lines, -14 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();
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 
37 37
 if (!isset($_GET['deployment_id'])) {
38 38
     $my_inst->newDeployment(\core\AbstractDeployment::DEPLOYMENTTYPE_MANAGED);
39
-    header("Location: overview_sp.php?inst_id=" . $my_inst->identifier);
39
+    header("Location: overview_sp.php?inst_id=".$my_inst->identifier);
40 40
     exit(0);
41 41
 }
42 42
 // if we have come this far, we are editing an existing deployment
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
         if (in_array('OK', $response)) {
49 49
             $deployment->deactivate();
50 50
         }
51
-        header("Location: overview_sp.php?inst_id=" . $my_inst->identifier . '&' . urldecode(http_build_query($response)));
51
+        header("Location: overview_sp.php?inst_id=".$my_inst->identifier.'&'.urldecode(http_build_query($response)));
52 52
         exit(0);
53 53
     }
54 54
 
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
         if (in_array('OK', $response)) {
58 58
             $deployment->activate();
59 59
         }
60
-        header("Location: overview_sp.php?inst_id=" . $my_inst->identifier . '&' . urldecode(http_build_query($response)));
60
+        header("Location: overview_sp.php?inst_id=".$my_inst->identifier.'&'.urldecode(http_build_query($response)));
61 61
         exit(0);
62 62
     }
63 63
     
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
             $deployment->status = core\DeploymentManaged::INACTIVE;
79 79
             $response = $deployment->setRADIUSconfig();
80 80
         }
81
-        header("Location: overview_sp.php?inst_id=" . $my_inst->identifier . '&' . urldecode(http_build_query($response)));
81
+        header("Location: overview_sp.php?inst_id=".$my_inst->identifier.'&'.urldecode(http_build_query($response)));
82 82
         exit(0);
83 83
     }
84 84
 }
@@ -106,21 +106,21 @@  discard block
 block discarded – undo
106 106
     echo $uiElements->instLevelInfoBoxes($my_inst);
107 107
     $deploymentOptions = $deployment->getAttributes();
108 108
     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'>
109
-                <input type='hidden' name='MAX_FILE_SIZE' value='" . \config\Master::MAX_UPLOAD_SIZE . "'>";
109
+                <input type='hidden' name='MAX_FILE_SIZE' value='".\config\Master::MAX_UPLOAD_SIZE."'>";
110 110
     $optionDisplay = new \web\lib\admin\OptionDisplay($deploymentOptions, \core\Options::LEVEL_PROFILE);
111 111
     ?>
112 112
     <fieldset class='option_container' id='managedsp_override'>
113 113
     <legend>
114 114
         <strong>
115
-    <?php $tablecaption = _("Options for this deployment"); echo $tablecaption;?>
115
+    <?php $tablecaption = _("Options for this deployment"); echo $tablecaption; ?>
116 116
         </strong>
117 117
     </legend>
118 118
     <table>
119
-            <caption><?php echo $tablecaption;?></caption>
119
+            <caption><?php echo $tablecaption; ?></caption>
120 120
             <tr>
121
-                <th class="wai-invisible" scope="col"><?php echo _("Property Type");?></th>
122
-                <th class="wai-invisible" scope="col"><?php echo _("Language if applicable");?></th>
123
-                <th class="wai-invisible" scope="col"><?php echo _("Property Value");?></th>
121
+                <th class="wai-invisible" scope="col"><?php echo _("Property Type"); ?></th>
122
+                <th class="wai-invisible" scope="col"><?php echo _("Language if applicable"); ?></th>
123
+                <th class="wai-invisible" scope="col"><?php echo _("Property Value"); ?></th>
124 124
             </tr>
125 125
         <tr>
126 126
             <!-- input for Operator-Name override-->
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
             <!-- input for VLAN identifier for home users-->
138 138
             <td>
139 139
                 <span id='vlan_label'>
140
-                    <?php echo sprintf(_("VLAN tag for own users%s:"), ($vlan === NULL ? "" : " " . _("(unset with '0')"))); ?>
140
+                    <?php echo sprintf(_("VLAN tag for own users%s:"), ($vlan === NULL ? "" : " "._("(unset with '0')"))); ?>
141 141
                 </span>
142 142
             </td>
143 143
             <td>
@@ -153,10 +153,10 @@  discard block
 block discarded – undo
153 153
     <?php
154 154
     echo $optionDisplay->prefilledOptionTable("managedsp");
155 155
     ?>
156
-    <button type='button' class='newoption' onclick='getXML("managedsp")'><?php echo _("Add new option");?></button>
156
+    <button type='button' class='newoption' onclick='getXML("managedsp")'><?php echo _("Add new option"); ?></button>
157 157
     </fieldset>
158 158
 
159 159
 <?php
160
-    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_sp.php?inst_id=$my_inst->identifier\"'>" . _("Discard changes") . "</button></p></form>";
160
+    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_sp.php?inst_id=$my_inst->identifier\"'>"._("Discard changes")."</button></p></form>";
161 161
     echo $deco->footer();
162 162
     
Please login to merge, or discard this patch.
web/admin/overview_federation.php 1 patch
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
  *          <base_url>/copyright.php after deploying the software
20 20
  */
21 21
 
22
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
22
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
23 23
 
24 24
 $deco = new \web\lib\admin\PageDecoration();
25 25
 $uiElements = new web\lib\admin\UIElements();
@@ -50,16 +50,16 @@  discard block
 block discarded – undo
50 50
     <div class="infobox">
51 51
         <h2><?php $tablecaption = _("Your Personal Information"); echo $tablecaption; ?></h2>
52 52
         <table>
53
-            <caption><?php echo $tablecaption;?></caption>
53
+            <caption><?php echo $tablecaption; ?></caption>
54 54
             <tr>
55
-                <th class="wai-invisible" scope="col"><?php echo _("Property Type");?></th>
56
-                <th class="wai-invisible" scope="col"><?php echo _("Language if applicable");?></th>
57
-                <th class="wai-invisible" scope="col"><?php echo _("Property Value");?></th>
55
+                <th class="wai-invisible" scope="col"><?php echo _("Property Type"); ?></th>
56
+                <th class="wai-invisible" scope="col"><?php echo _("Language if applicable"); ?></th>
57
+                <th class="wai-invisible" scope="col"><?php echo _("Property Value"); ?></th>
58 58
             </tr>            
59 59
             <?php echo $uiElements->infoblock($user->getAttributes(), "user", "User"); ?>
60 60
             <tr>
61 61
                 <td>
62
-                    <?php echo "" . _("Unique Identifier") ?>
62
+                    <?php echo ""._("Unique Identifier") ?>
63 63
                 </td>
64 64
                 <td>
65 65
                 </td>
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
     $mgmt = new \core\UserManagement();
75 75
 
76 76
     if (!$user->isFederationAdmin()) {
77
-        echo "<p>" . sprintf(_("You are not a %s manager."), $uiElements->nomenclatureFed) . "</p>";
77
+        echo "<p>".sprintf(_("You are not a %s manager."), $uiElements->nomenclatureFed)."</p>";
78 78
         echo $deco->footer();
79 79
         exit(0);
80 80
     }
@@ -88,16 +88,16 @@  discard block
 block discarded – undo
88 88
                 <?php $tablecaption2 = sprintf(_("%s Properties: %s"), $uiElements->nomenclatureFed, $thefed->name); echo $tablecaption2; ?>
89 89
             </h2>
90 90
             <table>
91
-            <caption><?php echo $tablecaption2;?></caption>
91
+            <caption><?php echo $tablecaption2; ?></caption>
92 92
             <tr>
93
-                <th class="wai-invisible" scope="col"><?php echo _("Property Type");?></th>
94
-                <th class="wai-invisible" scope="col"><?php echo _("Language if applicable");?></th>
95
-                <th class="wai-invisible" scope="col"><?php echo _("Property Value");?></th>
93
+                <th class="wai-invisible" scope="col"><?php echo _("Property Type"); ?></th>
94
+                <th class="wai-invisible" scope="col"><?php echo _("Language if applicable"); ?></th>
95
+                <th class="wai-invisible" scope="col"><?php echo _("Property Value"); ?></th>
96 96
             </tr>
97 97
                 <!-- fed properties -->
98 98
                 <tr>
99 99
                     <td>
100
-                        <?php echo "" . _("Country") ?>
100
+                        <?php echo ""._("Country") ?>
101 101
                     </td>
102 102
                     <td>
103 103
                     </td>
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
                     default:
179 179
                         throw new Exception("Error: unknown encryption status of invitation!?!");
180 180
                 }
181
-                echo $uiElements->boxRemark(ngettext("The invitation email was sent successfully.", "All invitation emails were sent successfully.", $counter) . " " . $cryptText, _("Sent successfully."));
181
+                echo $uiElements->boxRemark(ngettext("The invitation email was sent successfully.", "All invitation emails were sent successfully.", $counter)." ".$cryptText, _("Sent successfully."));
182 182
                 break;
183 183
             case "FAILURE":
184 184
                 echo $uiElements->boxError(_("No invitation email could be sent!"), _("Sending failure!"));
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
                     default:
199 199
                         throw new Exception("Error: unknown encryption status of invitation!?!");
200 200
                 }
201
-                echo $uiElements->boxWarning(sprintf(_("Some invitation emails were sent successfully (%s in total), the others failed."), $counter) . " " . $cryptText, _("Partial success."));
201
+                echo $uiElements->boxWarning(sprintf(_("Some invitation emails were sent successfully (%s in total), the others failed."), $counter)." ".$cryptText, _("Partial success."));
202 202
                 break;
203 203
             case "INVALIDSYNTAX":
204 204
                 echo $uiElements->boxError(_("The invitation email address was malformed, no invitation was sent!"), _("The invitation email address was malformed, no invitation was sent!"));
@@ -214,27 +214,27 @@  discard block
 block discarded – undo
214 214
     } else {
215 215
         $link = 'http://';
216 216
     }
217
-    $link .= $_SERVER['SERVER_NAME'] . $_SERVER['SCRIPT_NAME'];
217
+    $link .= $_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME'];
218 218
     $link = htmlspecialchars($link);
219 219
     if (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_RADIUS'] == 'LOCAL' && \config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS'] == 'LOCAL') {
220 220
         echo "<table><tr>
221
-                        <td>" . sprintf(_("Diagnose reachability and connection parameters of any %s %s"), \config\ConfAssistant::CONSORTIUM['display_name'], $uiElements->nomenclatureInst) . "</td>
221
+                        <td>" . sprintf(_("Diagnose reachability and connection parameters of any %s %s"), \config\ConfAssistant::CONSORTIUM['display_name'], $uiElements->nomenclatureInst)."</td>
222 222
                         <td><form method='post' action='../diag/action_realmcheck.php' accept-charset='UTF-8'>
223 223
                               <input type='hidden' name='comefrom' id='comefrom' value='$link'/>
224
-                              <button id='realmcheck' style='cursor:pointer;' type='submit'>" . _("Go!") . "</button>
224
+                              <button id='realmcheck' style='cursor:pointer;' type='submit'>"._("Go!")."</button>
225 225
                             </form>
226 226
                         </td>
227 227
                     </tr>
228 228
                     </table>";
229 229
     }
230 230
     if (\config\ConfAssistant::CONSORTIUM['name'] == 'eduroam') {
231
-        $helptext = "<h3>" . sprintf(_("Need help? Refer to the <a href='%s'>%s manual</a>"), "https://wiki.geant.org/x/qJg7Bw", $uiElements->nomenclatureFed) . "</h3>";
231
+        $helptext = "<h3>".sprintf(_("Need help? Refer to the <a href='%s'>%s manual</a>"), "https://wiki.geant.org/x/qJg7Bw", $uiElements->nomenclatureFed)."</h3>";
232 232
     } else {
233 233
         $helptext = "";
234 234
     }
235 235
     ?>
236 236
     <table class='user_overview' style='border:0px;'>
237
-        <caption><?php echo _("Participant Details");?></caption>
237
+        <caption><?php echo _("Participant Details"); ?></caption>
238 238
         <tr>
239 239
             <th scope='col'><?php echo _("Deployment Status"); ?></th>
240 240
             <th scope='col'><?php echo sprintf(_("%s Name"), $uiElements->nomenclatureInst); ?></th>
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
             $pending_invites = $mgmt->listPendingInvitations();
244 244
 
245 245
             if (\config\Master::DB['enforce-external-sync']) {
246
-                echo "<th scope='col'>" . sprintf(_("%s Database Sync Status"), \config\ConfAssistant::CONSORTIUM['display_name']) . "</th>";
246
+                echo "<th scope='col'>".sprintf(_("%s Database Sync Status"), \config\ConfAssistant::CONSORTIUM['display_name'])."</th>";
247 247
             }
248 248
             ?>
249 249
             <th scope='col'>
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
         foreach ($feds as $onefed) {
259 259
             $thefed = new \core\Federation(strtoupper($onefed['value']));
260 260
             /// nomenclature for 'federation', federation name, nomenclature for 'inst'
261
-            echo "<tr><td colspan='8'><strong>" . sprintf(_("The following %s are in your %s %s:"), $uiElements->nomenclatureInst, $uiElements->nomenclatureFed, '<span style="color:green">' . $thefed->name . '</span>') . "</strong></td></tr>";
261
+            echo "<tr><td colspan='8'><strong>".sprintf(_("The following %s are in your %s %s:"), $uiElements->nomenclatureInst, $uiElements->nomenclatureFed, '<span style="color:green">'.$thefed->name.'</span>')."</strong></td></tr>";
262 262
 
263 263
             // extract only pending invitations for *this* fed
264 264
             $display_pendings = FALSE;
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
                 // deployment status; need to dive into profiles for this
284 284
                 // show happy eyeballs if at least one profile is configured/showtime                    
285 285
                 echo "<td>";
286
-                echo ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_CONFIGURED ? "C" : "" ) . " " . ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_SHOWTIME ? "V" : "" );
286
+                echo ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_CONFIGURED ? "C" : "")." ".($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_SHOWTIME ? "V" : "");
287 287
                 echo "</td>";
288 288
                 // name; and realm of silverbullet profiles if any
289 289
                 // instantiating all profiles is costly, so we only do this if
@@ -297,23 +297,23 @@  discard block
 block discarded – undo
297 297
                     }
298 298
                 }
299 299
                 echo "<td style='vertical-align:top;'>
300
-                         <input type='hidden' name='inst' value='" . $index . "'>" . $idp_instance->name . (empty($listOfSilverbulletRealms) ? "" : "<ul><li>" ) . implode("</li><li>", $listOfSilverbulletRealms) . (empty($listOfSilverbulletRealms) ? "" : "</li><ul>" ) . "
300
+                         <input type='hidden' name='inst' value='" . $index."'>".$idp_instance->name.(empty($listOfSilverbulletRealms) ? "" : "<ul><li>").implode("</li><li>", $listOfSilverbulletRealms).(empty($listOfSilverbulletRealms) ? "" : "</li><ul>")."
301 301
                       </td>";
302 302
                 // external DB sync, if configured as being necessary
303 303
                 if (\config\Master::DB['enforce-external-sync']) {
304 304
                     echo "<td style='display: ruby;'>";
305 305
                     if ($readonly === FALSE) {
306
-                        echo "<form method='post' action='inc/manageDBLink.inc.php?inst_id=" . $idp_instance->identifier . "' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'>
307
-                                    <button type='submit'>" . _("Manage DB Link") . "</button></form>&nbsp;&nbsp;";
306
+                        echo "<form method='post' action='inc/manageDBLink.inc.php?inst_id=".$idp_instance->identifier."' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'>
307
+                                    <button type='submit'>" . _("Manage DB Link")."</button></form>&nbsp;&nbsp;";
308 308
                     }
309 309
                     switch ($idp_instance->getExternalDBSyncState()) {
310 310
                         case \core\IdP::EXTERNAL_DB_SYNCSTATE_NOTSUBJECTTOSYNCING:
311 311
                             break;
312 312
                         case \core\IdP::EXTERNAL_DB_SYNCSTATE_SYNCED:
313
-                            echo "<div class='acceptable'>" . _("Linked") . "</div>";
313
+                            echo "<div class='acceptable'>"._("Linked")."</div>";
314 314
                             break;
315 315
                         case \core\IdP::EXTERNAL_DB_SYNCSTATE_NOT_SYNCED:
316
-                            echo "<div class='notacceptable'>" . _("NOT linked") . "</div>";
316
+                            echo "<div class='notacceptable'>"._("NOT linked")."</div>";
317 317
 
318 318
 
319 319
                             break;
@@ -326,9 +326,9 @@  discard block
 block discarded – undo
326 326
                 echo "<td style='vertical-align: top;'>";
327 327
                 if ($readonly === FALSE) {
328 328
                     echo "<div style='white-space: nowrap;'>
329
-                                  <form method='post' action='inc/manageAdmins.inc.php?inst_id=" . $index . "' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'>
329
+                                  <form method='post' action='inc/manageAdmins.inc.php?inst_id=" . $index."' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'>
330 330
                                       <button type='submit'>" .
331
-                    _("Add/Remove Administrators") . "
331
+                    _("Add/Remove Administrators")."
332 332
                                       </button>
333 333
                                   </form>
334 334
                                 </div>";
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
                 echo "<tr>
342 342
                             <td colspan='2'>
343 343
                                <strong>" .
344
-                sprintf(_("Pending invitations in the %s:"), $uiElements->nomenclatureFed) . "
344
+                sprintf(_("Pending invitations in the %s:"), $uiElements->nomenclatureFed)."
345 345
                                </strong>
346 346
                             </td>
347 347
                          </tr>";
@@ -349,16 +349,16 @@  discard block
 block discarded – undo
349 349
                     if (strtoupper($oneinvite['country']) == strtoupper($thefed->tld)) {
350 350
                         echo "<tr>
351 351
                                     <td>" .
352
-                        $oneinvite['name'] . "
352
+                        $oneinvite['name']."
353 353
                                     </td>
354 354
                                     <td>" .
355
-                        $oneinvite['mail'] . "
355
+                        $oneinvite['mail']."
356 356
                                     </td>
357 357
                                     <td colspan=2>";
358 358
                         if ($readonly === FALSE) {
359 359
                             echo "<form method='post' action='overview_federation.php' accept-charset='UTF-8'>
360
-                                <input type='hidden' name='invitation_id' value='" . $oneinvite['token'] . "'/>
361
-                                <button class='delete' type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_DELETE . "'>" . _("Revoke Invitation") . "</button> "
360
+                                <input type='hidden' name='invitation_id' value='" . $oneinvite['token']."'/>
361
+                                <button class='delete' type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_DELETE."'>"._("Revoke Invitation")."</button> "
362 362
                             . sprintf(_("(expires %s)"), $oneinvite['expiry'])
363 363
                             . "</form>";
364 364
                         }
Please login to merge, or discard this patch.
web/admin/edit_participant.php 1 patch
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
  *          <base_url>/copyright.php after deploying the software
20 20
  */
21 21
 
22
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
22
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
23 23
 
24 24
 $auth = new \web\lib\admin\Authentication();
25 25
 $deco = new \web\lib\admin\PageDecoration();
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 $inst_name = $my_inst->name;
40 40
 
41 41
 if ($wizardStyle) {
42
-    echo $deco->defaultPagePrelude(sprintf(_("%s: %s enrollment wizard (step 2)"), \config\Master::APPEARANCE['productname'],  $uiElements->nomenclatureParticipant));
42
+    echo $deco->defaultPagePrelude(sprintf(_("%s: %s enrollment wizard (step 2)"), \config\Master::APPEARANCE['productname'], $uiElements->nomenclatureParticipant));
43 43
 } else {
44 44
     echo $deco->defaultPagePrelude(sprintf(_("%s: Editing %s '%s'"), \config\Master::APPEARANCE['productname'], $uiElements->nomenclatureParticipant, $inst_name));
45 45
 }
@@ -80,13 +80,13 @@  discard block
 block discarded – undo
80 80
         ?>
81 81
     </h1>
82 82
     <div class='infobox'>
83
-        <h2><?php $tablecaption = sprintf(_("%s general properties"), $uiElements->nomenclatureParticipant); echo $tablecaption;?></h2>
83
+        <h2><?php $tablecaption = sprintf(_("%s general properties"), $uiElements->nomenclatureParticipant); echo $tablecaption; ?></h2>
84 84
         <table>
85
-            <caption><?php echo $tablecaption;?></caption>
85
+            <caption><?php echo $tablecaption; ?></caption>
86 86
             <tr>
87
-                <th class="wai-invisible" scope="col"><?php echo _("Property Type");?></th>
88
-                <th class="wai-invisible" scope="col"><?php echo _("Language if applicable");?></th>
89
-                <th class="wai-invisible" scope="col"><?php echo _("Property Value");?></th>
87
+                <th class="wai-invisible" scope="col"><?php echo _("Property Type"); ?></th>
88
+                <th class="wai-invisible" scope="col"><?php echo _("Language if applicable"); ?></th>
89
+                <th class="wai-invisible" scope="col"><?php echo _("Property Value"); ?></th>
90 90
             </tr>
91 91
 
92 92
             <tr>
@@ -101,12 +101,12 @@  discard block
 block discarded – undo
101 101
         </table>
102 102
     </div>
103 103
     <?php
104
-    echo "<form enctype='multipart/form-data' action='edit_participant_result.php?inst_id=$my_inst->identifier" . ($wizardStyle ? "&wizard=true" : "") . "' method='post' accept-charset='UTF-8'>
105
-              <input type='hidden' name='MAX_FILE_SIZE' value='" . \config\Master::MAX_UPLOAD_SIZE . "'>";
104
+    echo "<form enctype='multipart/form-data' action='edit_participant_result.php?inst_id=$my_inst->identifier".($wizardStyle ? "&wizard=true" : "")."' method='post' accept-charset='UTF-8'>
105
+              <input type='hidden' name='MAX_FILE_SIZE' value='" . \config\Master::MAX_UPLOAD_SIZE."'>";
106 106
 
107 107
     if ($wizardStyle) {
108
-        echo "<p>" .
109
-        sprintf(_("Hello, newcomer. The %s is new to us. This wizard will ask you several questions about it, so that we can generate beautiful profiles for you in the end. All of the information below is optional, but it is important to fill out as many fields as possible for the benefit of your end users."), $uiElements->nomenclatureParticipant) . "</p>";
108
+        echo "<p>".
109
+        sprintf(_("Hello, newcomer. The %s is new to us. This wizard will ask you several questions about it, so that we can generate beautiful profiles for you in the end. All of the information below is optional, but it is important to fill out as many fields as possible for the benefit of your end users."), $uiElements->nomenclatureParticipant)."</p>";
110 110
     }
111 111
     $optionDisplay = new web\lib\admin\OptionDisplay($idpoptions, \core\Options::LEVEL_IDP);
112 112
     ?>
@@ -114,11 +114,11 @@  discard block
 block discarded – undo
114 114
         <legend><strong><?php echo _("General Information"); ?></strong></legend>
115 115
         <?php
116 116
         if ($wizardStyle) {
117
-            echo "<p>" .
118
-            _("Some properties are valid across all deployment profiles. This is the place where you can describe those properties in a fine-grained way. The solicited information is used as follows:") . "</p>
117
+            echo "<p>".
118
+            _("Some properties are valid across all deployment profiles. This is the place where you can describe those properties in a fine-grained way. The solicited information is used as follows:")."</p>
119 119
                       <ul>
120
-                         <li>" . _("<strong>Logo</strong>: When you submit a logo, we will embed this logo into all installers where a custom logo is possible. We accept any image format, but for best results, we suggest SVG. If you don't upload a logo, we will use the generic logo instead (see top-right corner of this page).") . "</li>
121
-                         <li>" . sprintf(_("<strong>Name</strong>: The %s may have names in multiple languages. It is recommended to always populate at least the 'default/other' language, as it is used as a fallback if the system does not have a name in the exact language the user requests a download in."),$uiElements->nomenclatureParticipant) . "</li>";
120
+                         <li>" . _("<strong>Logo</strong>: When you submit a logo, we will embed this logo into all installers where a custom logo is possible. We accept any image format, but for best results, we suggest SVG. If you don't upload a logo, we will use the generic logo instead (see top-right corner of this page).")."</li>
121
+                         <li>" . sprintf(_("<strong>Name</strong>: The %s may have names in multiple languages. It is recommended to always populate at least the 'default/other' language, as it is used as a fallback if the system does not have a name in the exact language the user requests a download in."), $uiElements->nomenclatureParticipant)."</li>";
122 122
             echo "</ul>";
123 123
         }
124 124
         echo $optionDisplay->prefilledOptionTable("general");
@@ -132,47 +132,47 @@  discard block
 block discarded – undo
132 132
         <legend><strong><?php echo _("Media Properties"); ?></strong></legend>
133 133
         <?php
134 134
         if ($wizardStyle) {
135
-            echo "<p>" .
136
-            sprintf(_("In this section, you define on which media %s should be configured on user devices."), \config\ConfAssistant::CONSORTIUM['display_name']) . "</p>
135
+            echo "<p>".
136
+            sprintf(_("In this section, you define on which media %s should be configured on user devices."), \config\ConfAssistant::CONSORTIUM['display_name'])."</p>
137 137
           <ul>";
138 138
             echo "<li>";
139
-            echo "<strong>" . ( count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0 ? _("Additional SSIDs:") : _("SSIDs:")) . " </strong>";
139
+            echo "<strong>".(count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0 ? _("Additional SSIDs:") : _("SSIDs:"))." </strong>";
140 140
             if (count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0) {
141 141
                 $ssidlist = "";
142 142
                 foreach (\config\ConfAssistant::CONSORTIUM['ssid'] as $ssid) {
143
-                    $ssidlist .= ", '<strong>" . $ssid . "</strong>'";
143
+                    $ssidlist .= ", '<strong>".$ssid."</strong>'";
144 144
                 }
145 145
                 $ssidlist = substr($ssidlist, 2);
146 146
                 echo sprintf(ngettext("We will always configure this SSID for WPA2/AES: %s.", "We will always configure these SSIDs for WPA2/AES: %s.", count(\config\ConfAssistant::CONSORTIUM['ssid'])), $ssidlist);
147 147
                 if (\config\ConfAssistant::CONSORTIUM['tkipsupport']) {
148
-                    echo " " . _("They will also be configured for WPA/TKIP if the device supports multiple encryption types.");
148
+                    echo " "._("They will also be configured for WPA/TKIP if the device supports multiple encryption types.");
149 149
                 }
150
-                echo "<br/>" . sprintf(_("It is also possible to define custom additional SSIDs with the option '%s' below."), $uiElements->displayName("media:SSID"));
150
+                echo "<br/>".sprintf(_("It is also possible to define custom additional SSIDs with the option '%s' below."), $uiElements->displayName("media:SSID"));
151 151
             } else {
152 152
                 echo _("Please configure which SSIDs should be configured in the installers.");
153 153
             }
154
-            echo " " . _("By default, we will only configure the SSIDs with WPA2/AES encryption. By using the '(with WPA/TKIP)' option you can specify that we should include legacy support for WPA/TKIP where possible.");
154
+            echo " "._("By default, we will only configure the SSIDs with WPA2/AES encryption. By using the '(with WPA/TKIP)' option you can specify that we should include legacy support for WPA/TKIP where possible.");
155 155
             echo "</li>";
156 156
 
157 157
             echo "<li>";
158
-            echo "<strong>" . ( count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0 ? _("Additional Hotspot 2.0 / Passpoint Consortia:") : _("Hotspot 2.0 / Passpoint Consortia:")) . " </strong>";
158
+            echo "<strong>".(count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0 ? _("Additional Hotspot 2.0 / Passpoint Consortia:") : _("Hotspot 2.0 / Passpoint Consortia:"))." </strong>";
159 159
             if (count(\config\ConfAssistant::CONSORTIUM['interworking-consortium-oi']) > 0) {
160 160
                 $consortiumlist = "";
161 161
                 foreach (\config\ConfAssistant::CONSORTIUM['interworking-consortium-oi'] as $oi) {
162
-                    $consortiumlist .= ", '<strong>" . $oi . "</strong>'";
162
+                    $consortiumlist .= ", '<strong>".$oi."</strong>'";
163 163
                 }
164 164
                 $consortiumlist = substr($consortiumlist, 2);
165 165
                 echo sprintf(ngettext("We will always configure this Consortium OI: %s.", "We will always configure these Consortium OIs: %s.", count(\config\ConfAssistant::CONSORTIUM['interworking-consortium-oi'])), $consortiumlist);
166 166
 
167
-                echo "<br/>" . sprintf(_("It is also possible to define custom additional OIs with the option '%s' below."), $uiElements->displayName("media:consortium_OI"));
167
+                echo "<br/>".sprintf(_("It is also possible to define custom additional OIs with the option '%s' below."), $uiElements->displayName("media:consortium_OI"));
168 168
             } else {
169 169
                 echo _("Please configure which Consortium OIs should be configured in the installers.");
170 170
             }
171 171
             echo "</li>";
172
-            echo "<li><strong>" . _("Support for wired IEEE 802.1X:") . " </strong>"
173
-            . _("If you want to configure your users' devices with IEEE 802.1X support for wired ethernet, please check the corresponding box. Note that this makes the installation process a bit more difficult on some platforms (Windows: needs administrator privileges; Apple: attempting to install a profile with wired support on a device without an active wired ethernet card will fail).") .
172
+            echo "<li><strong>"._("Support for wired IEEE 802.1X:")." </strong>"
173
+            . _("If you want to configure your users' devices with IEEE 802.1X support for wired ethernet, please check the corresponding box. Note that this makes the installation process a bit more difficult on some platforms (Windows: needs administrator privileges; Apple: attempting to install a profile with wired support on a device without an active wired ethernet card will fail).").
174 174
             "</li>";
175
-            echo "<li><strong>" . _("Removal of bootstrap/onboarding SSIDs:") . " </strong>"
175
+            echo "<li><strong>"._("Removal of bootstrap/onboarding SSIDs:")." </strong>"
176 176
             . _("If you use a captive portal to distribute configurations, you may want to unconfigure/disable that SSID after the bootstrap process. With this option, the SSID will either be removed, or be defined as 'Only connect manually'.")
177 177
             . "</li>";
178 178
             echo "</ul>";
@@ -188,16 +188,16 @@  discard block
 block discarded – undo
188 188
             echo "<p>"._("This section can be used to upload specific Terms of Use for your users and to display details of how your users can reach your local helpdesk.")."</p>";
189 189
             
190 190
             if (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_RADIUS'] == "LOCAL") {
191
-                echo "<p>" .
191
+                echo "<p>".
192 192
                         
193
-                sprintf(_("Do you provide helpdesk services for your users? If so, it would be nice if you would tell us the pointers to this helpdesk."),$uiElements->nomenclatureParticipant)  . "</p>" .
194
-                "<p>" .
195
-                _("If you enter a value here, it will be added to the installers for all your users, and will be displayed on the download page. If you operate separate helpdesks for different user groups (we call this 'profiles') specify per-profile helpdesk information later in this wizard. If you operate no help desk at all, just leave these fields empty.") . "</p>";
193
+                sprintf(_("Do you provide helpdesk services for your users? If so, it would be nice if you would tell us the pointers to this helpdesk."), $uiElements->nomenclatureParticipant)."</p>".
194
+                "<p>".
195
+                _("If you enter a value here, it will be added to the installers for all your users, and will be displayed on the download page. If you operate separate helpdesks for different user groups (we call this 'profiles') specify per-profile helpdesk information later in this wizard. If you operate no help desk at all, just leave these fields empty.")."</p>";
196 196
                 if (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_SILVERBULLET'] == "LOCAL") {
197
-                echo "<p>" . sprintf(_("For %s deployments, providing at least a local e-mail contact is required."), core\ProfileSilverbullet::PRODUCTNAME) ." " . _("This is the contact point for your end users' level 1 support.") . "</p>";
197
+                echo "<p>".sprintf(_("For %s deployments, providing at least a local e-mail contact is required."), core\ProfileSilverbullet::PRODUCTNAME)." "._("This is the contact point for your end users' level 1 support.")."</p>";
198 198
                 }
199 199
             } elseif (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_SILVERBULLET'] == "LOCAL") {
200
-                echo "<p>". _("Providing at least a local support e-mail contact is required.")." "._("This is the contact point for your end users' level 1 support.")."</p>";
200
+                echo "<p>"._("Providing at least a local support e-mail contact is required.")." "._("This is the contact point for your end users' level 1 support.")."</p>";
201 201
             }
202 202
             
203 203
         }
@@ -207,8 +207,8 @@  discard block
 block discarded – undo
207 207
         <button type='button' class='newoption' onclick='getXML("support")'><?php echo _("Add new option"); ?></button></fieldset>
208 208
     <?php
209 209
     if ($wizardStyle) {
210
-        echo "<p>" . sprintf(_("When you are sure that everything is correct, please click on %sContinue ...%s"), "<button type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_CONTINUE . "'>", "</button>") . "</p></form>";
210
+        echo "<p>".sprintf(_("When you are sure that everything is correct, please click on %sContinue ...%s"), "<button type='submit' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_CONTINUE."'>", "</button>")."</p></form>";
211 211
     } else {
212
-        echo "<div><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_user.php\"'>" . _("Discard changes") . "</button></div></form>";
212
+        echo "<div><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_user.php\"'>"._("Discard changes")."</button></div></form>";
213 213
     }
214 214
     echo $deco->footer();
Please login to merge, or discard this patch.
web/admin/edit_federation.php 1 patch
Spacing   +10 added lines, -10 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
 $auth = new \web\lib\admin\Authentication();
32 32
 $deco = new \web\lib\admin\PageDecoration();
@@ -61,13 +61,13 @@  discard block
 block discarded – undo
61 61
         ?>
62 62
     </h1>
63 63
     <div class='infobox'>
64
-        <h2><?php $tablecaption = sprintf(_("%s Properties"),$uiElements->nomenclatureFed); echo $tablecaption?></h2>
64
+        <h2><?php $tablecaption = sprintf(_("%s Properties"), $uiElements->nomenclatureFed); echo $tablecaption?></h2>
65 65
         <table>
66
-            <caption><?php echo $tablecaption;?></caption>
66
+            <caption><?php echo $tablecaption; ?></caption>
67 67
             <tr>
68
-                <th class="wai-invisible" scope="col"><?php echo _("Property Type");?></th>
69
-                <th class="wai-invisible" scope="col"><?php echo _("Language if applicable");?></th>
70
-                <th class="wai-invisible" scope="col"><?php echo _("Property Value");?></th>
68
+                <th class="wai-invisible" scope="col"><?php echo _("Property Type"); ?></th>
69
+                <th class="wai-invisible" scope="col"><?php echo _("Language if applicable"); ?></th>
70
+                <th class="wai-invisible" scope="col"><?php echo _("Property Value"); ?></th>
71 71
             </tr>
72 72
             <tr>
73 73
                 <td><?php echo _("Country:"); ?></td>
@@ -78,11 +78,11 @@  discard block
 block discarded – undo
78 78
         </table>
79 79
     </div>
80 80
     <?php
81
-    echo "<form enctype='multipart/form-data' action='edit_federation_result.php?fed_id=$my_fed->tld" . "' method='post' accept-charset='UTF-8'>
82
-              <input type='hidden' name='MAX_FILE_SIZE' value='" . \config\Master::MAX_UPLOAD_SIZE . "'>";
81
+    echo "<form enctype='multipart/form-data' action='edit_federation_result.php?fed_id=$my_fed->tld"."' method='post' accept-charset='UTF-8'>
82
+              <input type='hidden' name='MAX_FILE_SIZE' value='" . \config\Master::MAX_UPLOAD_SIZE."'>";
83 83
     ?>
84 84
     <fieldset class="option_container">
85
-        <legend><strong><?php echo sprintf(_("%s Properties"),$uiElements->nomenclatureFed); ?></strong></legend>
85
+        <legend><strong><?php echo sprintf(_("%s Properties"), $uiElements->nomenclatureFed); ?></strong></legend>
86 86
         <?php
87 87
         $optionDisplay = new \web\lib\admin\OptionDisplay($fed_options, \core\Options::LEVEL_FED);
88 88
         echo $optionDisplay->prefilledOptionTable("fed");
@@ -90,5 +90,5 @@  discard block
 block discarded – undo
90 90
         <button type='button' class='newoption' onclick='getXML("fed")'><?php echo _("Add new option"); ?></button>
91 91
     </fieldset>
92 92
     <?php
93
-    echo "<div><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_federation.php\"'>" . _("Discard changes") . "</button></div></form>";
93
+    echo "<div><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_federation.php\"'>"._("Discard changes")."</button></div></form>";
94 94
     echo $deco->footer();
Please login to merge, or discard this patch.
web/admin/inc/manageAdmins.inc.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
  */
21 21
 ?>
22 22
 <?php
23
-require_once dirname(dirname(dirname(dirname(__FILE__)))) . "/config/_config.php";
23
+require_once dirname(dirname(dirname(dirname(__FILE__))))."/config/_config.php";
24 24
 
25 25
 $auth = new \web\lib\admin\Authentication();
26 26
 $languageInstance = new \core\common\Language();
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
                 $ownermgmt = new \core\UserManagement();
83 83
                 $ownermgmt->addAdminToIdp($my_inst, $_SESSION['user']);
84 84
             } else {
85
-                echo "Fatal Error: you wanted to take control over an " . \config\ConfAssistant::CONSORTIUM['nomenclature_institution'] . ", but are not a " . \config\ConfAssistant::CONSORTIUM['nomenclature_federation'] . " operator!";
85
+                echo "Fatal Error: you wanted to take control over an ".\config\ConfAssistant::CONSORTIUM['nomenclature_institution'].", but are not a ".\config\ConfAssistant::CONSORTIUM['nomenclature_federation']." operator!";
86 86
                 exit(1);
87 87
             }
88 88
             break;
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
                 default:
119 119
                     throw new Exception("Error: unknown encryption status of invitation!?!");
120 120
             }
121
-            echo $uiElements->boxRemark(ngettext("The invitation email was sent successfully.", "All invitation emails were sent successfully.", $counter) . " " . $cryptText, _("Sent successfully."));
121
+            echo $uiElements->boxRemark(ngettext("The invitation email was sent successfully.", "All invitation emails were sent successfully.", $counter)." ".$cryptText, _("Sent successfully."));
122 122
             break;
123 123
         case "FAILURE":
124 124
             echo $uiElements->boxError(_("No invitation email could be sent!"), _("Sending failure!"));
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
                 default:
139 139
                     throw new Exception("Error: unknown encryption status of invitation!?!");
140 140
             }
141
-            echo $uiElements->boxWarning(sprintf(_("Some invitation emails were sent successfully (%s in total), the others failed."), $counter) . " " . $cryptText, _("Partial success."));
141
+            echo $uiElements->boxWarning(sprintf(_("Some invitation emails were sent successfully (%s in total), the others failed."), $counter)." ".$cryptText, _("Partial success."));
142 142
             break;
143 143
         case "INVALIDSYNTAX":
144 144
             echo $uiElements->boxError(_("The invitation email address was malformed, no invitation was sent!"), _("The invitation email address was malformed, no invitation was sent!"));
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
                 <?php echo $invite; ?>
191 191
             </td>
192 192
             <td>
193
-                <form action='inc/manageAdmins.inc.php?inst_id=<?php echo $my_inst->identifier ?>' method='post' <?php echo ( $oneowner['ID'] != $_SESSION['user'] ? "onsubmit='popupRedirectWindow(this); return false;'" : "" ); ?> accept-charset='UTF-8'>
193
+                <form action='inc/manageAdmins.inc.php?inst_id=<?php echo $my_inst->identifier ?>' method='post' <?php echo ($oneowner['ID'] != $_SESSION['user'] ? "onsubmit='popupRedirectWindow(this); return false;'" : ""); ?> accept-charset='UTF-8'>
194 194
                     <input type='hidden' name='admin_id' value='<?php echo $oneowner['ID']; ?>'></input>
195 195
                     <button type='submit' name='submitbutton' class='delete' value='<?php echo web\lib\common\FormElements::BUTTON_DELETE; ?>'><?php echo _("Delete Administrator") ?></button>
196 196
                 </form>
@@ -207,10 +207,10 @@  discard block
 block discarded – undo
207 207
 $loggerInstance = new \core\common\Logging();
208 208
 $loggerInstance->debug(4, "Displaying pending invitations for $my_inst->identifier.\n");
209 209
 if (count($pending_invites) > 0) {
210
-    echo "<strong>" . _("Pending invitations for this IdP") . "</strong>";
210
+    echo "<strong>"._("Pending invitations for this IdP")."</strong>";
211 211
     echo "<table>";
212 212
     foreach ($pending_invites as $invitee) {
213
-        echo "<tr><td>" . $invitee['mail'] . "</td><td>" . sprintf(_("(expires %s)"), $invitee['expiry']) . "</td></tr>";
213
+        echo "<tr><td>".$invitee['mail']."</td><td>".sprintf(_("(expires %s)"), $invitee['expiry'])."</td></tr>";
214 214
     }
215 215
     echo "</table>";
216 216
 }
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
 
233 233
     if (!$is_admin_himself) {
234 234
         echo "<form action='inc/manageAdmins.inc.php?inst_id=$my_inst->identifier' method='post' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'>
235
-    <button type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_TAKECONTROL . "'>" . sprintf(_("Take control of this %s"), $uiElements->nomenclatureInst) . "</button>
235
+    <button type='submit' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_TAKECONTROL."'>".sprintf(_("Take control of this %s"), $uiElements->nomenclatureInst)."</button>
236 236
 </form>";
237 237
     }
238 238
 }
Please login to merge, or discard this patch.
web/admin/inc/manageNewInst.inc.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
  */
21 21
 ?>
22 22
 <?php
23
-require_once dirname(dirname(dirname(dirname(__FILE__)))) . "/config/_config.php";
23
+require_once dirname(dirname(dirname(dirname(__FILE__))))."/config/_config.php";
24 24
 
25 25
 $auth = new \web\lib\admin\Authentication();
26 26
 $uiElements = new \web\lib\admin\UIElements();
@@ -57,30 +57,30 @@  discard block
 block discarded – undo
57 57
 <?php
58 58
 echo sprintf(_("On this page, you can add a new %s to your %s. Please fill out the form below to send out an email invitation to the new %s administrator."), $uiElements->nomenclatureInst, $uiElements->nomenclatureFed, $uiElements->nomenclatureInst);
59 59
 if (\config\Master::DB['enforce-external-sync']) {
60
-    echo "<p>" . sprintf(_("You can either register a known %s (as defined in the %s database) or create a totally new %s."), $uiElements->nomenclatureInst, \config\ConfAssistant::CONSORTIUM['display_name'], $uiElements->nomenclatureInst) . "</p>";
61
-    echo "<p>" . sprintf(_("The latter one is typically for an %s which is yet in a testing phase and therefore doesn't appear in the %s database yet."), $uiElements->nomenclatureInst, \config\ConfAssistant::CONSORTIUM['display_name']) . "</p>";    
60
+    echo "<p>".sprintf(_("You can either register a known %s (as defined in the %s database) or create a totally new %s."), $uiElements->nomenclatureInst, \config\ConfAssistant::CONSORTIUM['display_name'], $uiElements->nomenclatureInst)."</p>";
61
+    echo "<p>".sprintf(_("The latter one is typically for an %s which is yet in a testing phase and therefore doesn't appear in the %s database yet."), $uiElements->nomenclatureInst, \config\ConfAssistant::CONSORTIUM['display_name'])."</p>";    
62 62
 }
63 63
 ?>
64 64
 <hr/>
65 65
 <img alt='Loading ...' src='../resources/images/icons/loading51.gif' id='spin' style='position:absolute;left: 50%; top: 50%; transform: translate(-100px, -50px); display:none;'>
66 66
 <form name='sendinvite' action='inc/sendinvite.inc.php' method='post' accept-charset='UTF-8'>
67 67
     <table>
68
-            <caption><?php echo _("Invitation Details");?></caption>
68
+            <caption><?php echo _("Invitation Details"); ?></caption>
69 69
             <tr>
70
-                <th class="wai-invisible" scope="col"><?php echo _("From database or ad-hoc?");?></th>
71
-                <th class="wai-invisible" scope="col"><?php echo _("Name");?></th>
72
-                <th class="wai-invisible" scope="col"><?php echo _("Type");?></th>
73
-                <th class="wai-invisible" scope="col"><?php echo _("Country");?></th>
70
+                <th class="wai-invisible" scope="col"><?php echo _("From database or ad-hoc?"); ?></th>
71
+                <th class="wai-invisible" scope="col"><?php echo _("Name"); ?></th>
72
+                <th class="wai-invisible" scope="col"><?php echo _("Type"); ?></th>
73
+                <th class="wai-invisible" scope="col"><?php echo _("Country"); ?></th>
74 74
             </tr>
75 75
         <?php
76 76
         if (\config\Master::DB['enforce-external-sync']) {
77 77
             echo "<tr><td>
78
-                <input type='radio' name='creation' value='existing'>" . sprintf(_("Existing %s:"), $uiElements->nomenclatureParticipant) . "</input>
78
+                <input type='radio' name='creation' value='existing'>" . sprintf(_("Existing %s:"), $uiElements->nomenclatureParticipant)."</input>
79 79
                      </td>";
80 80
 
81 81
             echo "<td colspan='3'>
82 82
                 <select id='externals' name='externals' onchange='document.sendinvite.creation[0].checked=true; document.sendinvite.mailaddr.value=this.options[this.selectedIndex].id;'>
83
-                    <option value='FREETEXT'>" . sprintf(_("--- select %s here ---"),$uiElements->nomenclatureParticipant) . "</option>";
83
+                    <option value='FREETEXT'>" . sprintf(_("--- select %s here ---"), $uiElements->nomenclatureParticipant)."</option>";
84 84
 
85 85
             foreach ($feds as $fed_value) {
86 86
                 $thefed = new \core\Federation(strtoupper($fed_value['value']));
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
                 $entities = $thefed->listExternalEntities(TRUE, NULL);
90 90
 
91 91
                 foreach ($entities as $v) {
92
-                    echo "<option id='" . $v['contactlist'] . "' value='" . $v['ID'] . "'>[" . $fed_value['value'] . "] " . $v['name'] . "</option>";
92
+                    echo "<option id='".$v['contactlist']."' value='".$v['ID']."'>[".$fed_value['value']."] ".$v['name']."</option>";
93 93
                 }
94 94
             }
95 95
 
@@ -98,16 +98,16 @@  discard block
 block discarded – undo
98 98
         ?>
99 99
         <tr>
100 100
             <td>
101
-                <input type='radio' name='creation' value='new'><?php echo sprintf(_("New %s"),$uiElements->nomenclatureParticipant); ?></input>
101
+                <input type='radio' name='creation' value='new'><?php echo sprintf(_("New %s"), $uiElements->nomenclatureParticipant); ?></input>
102 102
             </td>
103 103
             <td>
104 104
                 <?php echo _("Name"); ?><input type='text' size='30' id='name' name='name' onchange='document.sendinvite.creation[1].checked = true'/>
105 105
             </td>
106 106
             <td>
107 107
                 <select name="participant_type">
108
-                    <option value="IdPSP" selected><?php printf(_("%s and %s"),$uiElements->nomenclatureInst, $uiElements->nomenclatureHotspot)?></option>
109
-                    <option value="IdP"><?php printf(_("%s"),$uiElements->nomenclatureInst)?></option>
110
-                    <option value="SP"><?php printf(_("%s"),$uiElements->nomenclatureHotspot)?></option>
108
+                    <option value="IdPSP" selected><?php printf(_("%s and %s"), $uiElements->nomenclatureInst, $uiElements->nomenclatureHotspot)?></option>
109
+                    <option value="IdP"><?php printf(_("%s"), $uiElements->nomenclatureInst)?></option>
110
+                    <option value="SP"><?php printf(_("%s"), $uiElements->nomenclatureHotspot)?></option>
111 111
                 </select>
112 112
             </td>
113 113
             <td><?php echo $uiElements->nomenclatureFed; ?>
Please login to merge, or discard this patch.