Passed
Push — master ( 2fc2c9...83b4cf )
by Tomasz
07:48
created
web/diag/action_realmcheck.php 1 patch
Spacing   +58 added lines, -58 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(__DIR__)) . "/config/_config.php";
22
+require_once dirname(dirname(__DIR__))."/config/_config.php";
23 23
 
24 24
 $loggerInstance = new \core\common\Logging();
25 25
 
@@ -65,13 +65,13 @@  discard block
 block discarded – undo
65 65
         $testsuite = new \core\diag\RADIUSTests($check_realm, $testedProfile->getRealmCheckOuterUsername(), $testedProfile->getEapMethodsinOrderOfPreference(1), $testedProfile->getCollapsedAttributes()['eap:server_name'], $testedProfile->getCollapsedAttributes()["eap:ca_file"]);
66 66
         $rfc7585suite = new \core\diag\RFC7585Tests($check_realm);
67 67
     } else {
68
-        $error_message = _("You asked for a realm check, but we don't know the realm for this profile!") . "</p>";
68
+        $error_message = _("You asked for a realm check, but we don't know the realm for this profile!")."</p>";
69 69
     }
70 70
 } else { // someone else's realm, and we don't know anything about it... only shallow checks
71 71
     $check_realm = $validator->realm($realm ?? $_SESSION['check_realm'] ?? "");
72 72
     if ($check_realm !== FALSE) {
73 73
         $_SESSION['check_realm'] = $check_realm;
74
-        $testsuite = new \core\diag\RADIUSTests($check_realm, "@" . $check_realm);
74
+        $testsuite = new \core\diag\RADIUSTests($check_realm, "@".$check_realm);
75 75
         $rfc7585suite = new \core\diag\RFC7585Tests($check_realm);
76 76
     } else {
77 77
         $error_message = _("No valid realm name given, cannot execute any checks!");
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
     var listofcas = "<?php echo _("You should update your list of accredited CAs") ?>";
120 120
     var getitfrom = "<?php echo _("Get it from here.") ?>";
121 121
     var listsource = "<?php echo \config\Diagnostics::RADIUSTESTS['accreditedCAsURL'] ?>";
122
-    var moretext = "<?php echo _("more") . "&raquo;" ?>";
122
+    var moretext = "<?php echo _("more")."&raquo;" ?>";
123 123
     var lesstext = "<?php echo "&laquo" ?>";
124 124
     var morealltext = "<?php echo _("Show detailed information for all tests") ?>";
125 125
     var unknownca_code = "<?php echo \core\diag\RADIUSTests::CERTPROB_UNKNOWN_CA ?>";
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
                         }
257 257
                     }
258 258
                     cliinfo = cliinfo + '<li><table><tbody><tr><td class="icon_td"><img class="icon" src="' + icons[level] + '" style="width: 24px;"></td><td>' + state;
259
-                    cliinfo = cliinfo + ' <?php echo "(" . sprintf(_("elapsed time: %sms."), "'+data.ca[key].certificate[c].time_millisec+'&nbsp;") . ")"; ?>' + add + '</td></tr>';
259
+                    cliinfo = cliinfo + ' <?php echo "(".sprintf(_("elapsed time: %sms."), "'+data.ca[key].certificate[c].time_millisec+'&nbsp;").")"; ?>' + add + '</td></tr>';
260 260
                     cliinfo = cliinfo + '</tbody></table></ul></li>';
261 261
                     if (data.ca[key].certificate[c].finalerror === 1) {
262 262
                         cliinfo = cliinfo + '<li>' + restskipped + '</li>';
@@ -426,8 +426,8 @@  discard block
 block discarded – undo
426 426
 <?php
427 427
 foreach (\config\Diagnostics::RADIUSTESTS['UDP-hosts'] as $hostindex => $host) {
428 428
     print "
429
-$(\"#live_src" . $hostindex . "_img\").attr('src',icon_loading);
430
-$(\"#live_src" . $hostindex . "_img\").show();
429
+$(\"#live_src" . $hostindex."_img\").attr('src',icon_loading);
430
+$(\"#live_src" . $hostindex."_img\").show();
431 431
 $.ajax({
432 432
     url: 'radius_tests.php?src=0&hostindex=$hostindex&realm='+realm,
433 433
     type: 'POST',
@@ -457,15 +457,15 @@  discard block
 block discarded – undo
457 457
 <?php
458 458
 foreach (\config\Diagnostics::RADIUSTESTS['UDP-hosts'] as $hostindex => $host) {
459 459
     if ($testedProfile !== NULL) {
460
-        $extraarg = "profile_id: " . $testedProfile->identifier . ", ";
460
+        $extraarg = "profile_id: ".$testedProfile->identifier.", ";
461 461
     } else {
462 462
         $extraarg = "";
463 463
     }
464 464
     print "
465
-$(\"#src" . $hostindex . "_img\").attr('src',icon_loading);
465
+$(\"#src" . $hostindex."_img\").attr('src',icon_loading);
466 466
 $(\"#src$hostindex\").html('');
467 467
 running_ajax_stat++;
468
-$.get('radius_tests.php',{test_type: 'udp', $extraarg realm: realm, src: $hostindex, lang: '" . $gui->languageInstance->getLang() . "', hostindex: '$hostindex'  }, udp, 'json');
468
+$.get('radius_tests.php',{test_type: 'udp', $extraarg realm: realm, src: $hostindex, lang: '".$gui->languageInstance->getLang()."', hostindex: '$hostindex'  }, udp, 'json');
469 469
 
470 470
 ";
471 471
 }
@@ -492,7 +492,7 @@  discard block
 block discarded – undo
492 492
     if ($check_realm === FALSE) {
493 493
         print "<p>$error_message</p>";
494 494
     } else {
495
-        print "<h1>" . sprintf(_("Realm testing for: %s"), $check_realm) . "</h1>\n";
495
+        print "<h1>".sprintf(_("Realm testing for: %s"), $check_realm)."</h1>\n";
496 496
         ?>
497 497
         <div id="debug_out" style="display: none"></div>
498 498
         <div id="tabs" style="min-width: 600px; max-width:800px">
@@ -509,12 +509,12 @@  discard block
 block discarded – undo
509 509
                     </legend>
510 510
                     <?php
511 511
                     // NAPTR existence check
512
-                    echo "<strong>" . _("DNS chekcs") . "</strong><div>";
512
+                    echo "<strong>"._("DNS chekcs")."</strong><div>";
513 513
                     $naptr = $rfc7585suite->relevantNAPTR();
514 514
                     if ($naptr != \core\diag\RADIUSTests::RETVAL_NOTCONFIGURED) {
515 515
                         echo "<table>";
516 516
                         // output in friendly words
517
-                        echo "<tr><td>" . _("Checking NAPTR existence:") . "</td><td>";
517
+                        echo "<tr><td>"._("Checking NAPTR existence:")."</td><td>";
518 518
                         switch ($naptr) {
519 519
                             case \core\diag\RFC7585Tests::RETVAL_NONAPTR:
520 520
                                 echo _("This realm has no NAPTR records.");
@@ -529,7 +529,7 @@  discard block
 block discarded – undo
529 529
 
530 530
                         // compliance checks for NAPTRs
531 531
                         if ($naptr > 0) {
532
-                            echo "<tr><td>" . _("Checking NAPTR compliance (flag = S and regex = {empty}):") . "</td><td>";
532
+                            echo "<tr><td>"._("Checking NAPTR compliance (flag = S and regex = {empty}):")."</td><td>";
533 533
                             $naptr_valid = $rfc7585suite->relevantNAPTRcompliance();
534 534
                             switch ($naptr_valid) {
535 535
                                 case \core\diag\RADIUSTests::RETVAL_OK:
@@ -546,7 +546,7 @@  discard block
 block discarded – undo
546 546
 
547 547
                         if ($naptr > 0 && $naptr_valid == \core\diag\RADIUSTests::RETVAL_OK) {
548 548
                             $srv = $rfc7585suite->relevantNAPTRsrvResolution();
549
-                            echo "<tr><td>" . _("Checking SRVs:") . "</td><td>";
549
+                            echo "<tr><td>"._("Checking SRVs:")."</td><td>";
550 550
                             switch ($srv) {
551 551
                                 case \core\diag\RADIUSTests::RETVAL_SKIPPED:
552 552
                                     echo _("This check was skipped.");
@@ -562,7 +562,7 @@  discard block
 block discarded – undo
562 562
                         // IP addresses for the hosts
563 563
                         if ($naptr > 0 && $naptr_valid == \core\diag\RADIUSTests::RETVAL_OK && $srv > 0) {
564 564
                             $hosts = $rfc7585suite->relevantNAPTRhostnameResolution();
565
-                            echo "<tr><td>" . _("Checking IP address resolution:") . "</td><td>";
565
+                            echo "<tr><td>"._("Checking IP address resolution:")."</td><td>";
566 566
                             switch ($srv) {
567 567
                                 case \core\diag\RADIUSTests::RETVAL_SKIPPED:
568 568
                                     echo _("This check was skipped.");
@@ -578,12 +578,12 @@  discard block
 block discarded – undo
578 578
 
579 579
                         echo "</table><br/><br/>";
580 580
                         if (count($testsuite->listerrors()) == 0) {
581
-                            echo sprintf(_("Realm is <strong>%s</strong> "), _(($naptr > 0 ? "DYNAMIC" : "STATIC"))) . _("with no DNS errors encountered. Congratulations!");
581
+                            echo sprintf(_("Realm is <strong>%s</strong> "), _(($naptr > 0 ? "DYNAMIC" : "STATIC")))._("with no DNS errors encountered. Congratulations!");
582 582
                         } else {
583
-                            echo sprintf(_("Realm is <strong>%s</strong> "), _(($naptr > 0 ? "DYNAMIC" : "STATIC"))) . _("but there were DNS errors! Check them!") . " " . _("You should re-run the tests after fixing the errors; more errors might be uncovered at that point. The exact error causes are listed below.");
583
+                            echo sprintf(_("Realm is <strong>%s</strong> "), _(($naptr > 0 ? "DYNAMIC" : "STATIC")))._("but there were DNS errors! Check them!")." "._("You should re-run the tests after fixing the errors; more errors might be uncovered at that point. The exact error causes are listed below.");
584 584
                             echo "<div class='notacceptable'><table>";
585 585
                             foreach ($testsuite->listerrors() as $details) {
586
-                                echo "<tr><td>" . $details['TYPE'] . "</td><td>" . $details['TARGET'] . "</td></tr>";
586
+                                echo "<tr><td>".$details['TYPE']."</td><td>".$details['TARGET']."</td></tr>";
587 587
                             }
588 588
                             echo "</table></div>";
589 589
                         }
@@ -599,26 +599,26 @@  discard block
 block discarded – undo
599 599
                  $("#dynamic_tests").show();
600 600
               ';
601 601
                         foreach ($rfc7585suite->NAPTR_hostname_records as $hostindex => $addr) {
602
-                            $host = ($addr['family'] == "IPv6" ? "[" : "") . $addr['IP'] . ($addr['family'] == "IPv6" ? "]" : "") . ":" . $addr['port'];
602
+                            $host = ($addr['family'] == "IPv6" ? "[" : "").$addr['IP'].($addr['family'] == "IPv6" ? "]" : "").":".$addr['port'];
603 603
                             $expectedName = $addr['hostname'];
604 604
                             print "
605 605
                             running_ajax_dyn++;
606
-                            $.ajax({url:'radius_tests.php', data:{test_type: 'capath', realm: realm, src: '$host', lang: '" . $gui->languageInstance->getLang() . "', hostindex: '$hostindex', expectedname: '$expectedName' }, error: eee, success: capath, dataType: 'json'}); 
606
+                            $.ajax({url:'radius_tests.php', data:{test_type: 'capath', realm: realm, src: '$host', lang: '".$gui->languageInstance->getLang()."', hostindex: '$hostindex', expectedname: '$expectedName' }, error: eee, success: capath, dataType: 'json'}); 
607 607
                             running_ajax_dyn++;
608
-                            $.ajax({url:'radius_tests.php', data:{test_type: 'clients', realm: realm, src: '$host', lang: '" . $gui->languageInstance->getLang() . "', hostindex: '$hostindex' }, error: eee, success: clients, dataType: 'json'}); 
608
+                            $.ajax({url:'radius_tests.php', data:{test_type: 'clients', realm: realm, src: '$host', lang: '".$gui->languageInstance->getLang()."', hostindex: '$hostindex' }, error: eee, success: clients, dataType: 'json'}); 
609 609
                        ";
610 610
                         }
611 611
                         echo "}
612 612
               </script><hr>";
613 613
                     } else {
614
-                        echo "<tr><td>" . _("Dynamic discovery test is not configured") . "</td><td>";
614
+                        echo "<tr><td>"._("Dynamic discovery test is not configured")."</td><td>";
615 615
                     }
616
-                    echo "<strong>" . _("Static connectivity tests") . "</strong>
616
+                    echo "<strong>"._("Static connectivity tests")."</strong>
617 617
          <table><tr>
618 618
          <td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='main_static_ico' class='icon'></td><td id='main_static_result' style='display:none'>&nbsp;</td>
619 619
          </tr></table>";
620 620
                     if ($naptr > 0) {
621
-                        echo "<hr><strong>" . _("Dynamic connectivity tests") . "</strong>
621
+                        echo "<hr><strong>"._("Dynamic connectivity tests")."</strong>
622 622
          <table><tr>
623 623
          <td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='main_dynamic_ico' class='icon'></td><td id='main_dynamic_result' style='display:none'>&nbsp;</td>
624 624
          </tr></table>";
@@ -638,12 +638,12 @@  discard block
 block discarded – undo
638 638
                     print "<p>";
639 639
                     foreach (\config\Diagnostics::RADIUSTESTS['UDP-hosts'] as $hostindex => $host) {
640 640
                         print "<hr>";
641
-                        printf(_("Testing from: %s"), "<strong>" . \config\Diagnostics::RADIUSTESTS['UDP-hosts'][$hostindex]['display_name'] . "</strong>");
641
+                        printf(_("Testing from: %s"), "<strong>".\config\Diagnostics::RADIUSTESTS['UDP-hosts'][$hostindex]['display_name']."</strong>");
642 642
                         print "<table id='results$hostindex'  style='width:100%' class='udp_results'>
643 643
 <tr>
644
-<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='src" . $hostindex . "_img'></td>
644
+<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='src".$hostindex."_img'></td>
645 645
 <td id='src$hostindex' colspan=2>
646
-" . _("testing...") . "
646
+"._("testing...")."
647 647
 </td>
648 648
 </tr>
649 649
 </table>";
@@ -662,21 +662,21 @@  discard block
 block discarded – undo
662 662
 
663 663
                     <?php
664 664
                     echo "<div id='dynamic_tests'><fieldset class='option_container'>
665
-                <legend><strong>" . _("DYNAMIC connectivity tests") . "</strong></legend>";
665
+                <legend><strong>" . _("DYNAMIC connectivity tests")."</strong></legend>";
666 666
 
667 667
                     $resultstoprint = [];
668 668
                     if (count($rfc7585suite->NAPTR_hostname_records) > 0) {
669
-                        $resultstoprint[] = '<div style="align:right; display: none;" id="dynamic_result_fail">' . _("Some errors were found during the tests, see below") . '</div><div style="align:right; display: none;" id="dynamic_result_pass">' . _("All tests passed, congratulations!") . '</div>';
670
-                        $resultstoprint[] = '<div style="align:right;"><a href="" class="moreall">' . _('Show detailed information for all tests') . '</a></div>' . '<p><strong>' . _("Checking server handshake...") . "</strong><p>";
669
+                        $resultstoprint[] = '<div style="align:right; display: none;" id="dynamic_result_fail">'._("Some errors were found during the tests, see below").'</div><div style="align:right; display: none;" id="dynamic_result_pass">'._("All tests passed, congratulations!").'</div>';
670
+                        $resultstoprint[] = '<div style="align:right;"><a href="" class="moreall">'._('Show detailed information for all tests').'</a></div>'.'<p><strong>'._("Checking server handshake...")."</strong><p>";
671 671
                         foreach ($rfc7585suite->NAPTR_hostname_records as $hostindex => $addr) {
672
-                            $bracketaddr = ($addr["family"] == "IPv6" ? "[" . $addr["IP"] . "]" : $addr["IP"]);
673
-                            $resultstoprint[] = '<p><strong>' . $bracketaddr . ' TCP/' . $addr['port'] . '</strong>';
672
+                            $bracketaddr = ($addr["family"] == "IPv6" ? "[".$addr["IP"]."]" : $addr["IP"]);
673
+                            $resultstoprint[] = '<p><strong>'.$bracketaddr.' TCP/'.$addr['port'].'</strong>';
674 674
                             $resultstoprint[] = '<ul style="list-style-type: none;" class="caresult"><li>';
675 675
                             $resultstoprint[] = "<table id='caresults$hostindex'  style='width:100%'>
676 676
 <tr>
677
-<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='srcca" . $hostindex . "_img'></td>
677
+<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='srcca".$hostindex."_img'></td>
678 678
 <td id='srcca$hostindex'>
679
-" . _("testing...") . "
679
+"._("testing...")."
680 680
 </td>
681 681
 </tr>
682 682
 </table>";
@@ -684,12 +684,12 @@  discard block
 block discarded – undo
684 684
                         }
685 685
                         $clientstest = [];
686 686
                         foreach ($rfc7585suite->NAPTR_hostname_records as $hostindex => $addr) {
687
-                            $clientstest[] = '<p><strong>' . $addr['IP'] . ' TCP/' . $addr['port'] . '</strong></p><ol>';
687
+                            $clientstest[] = '<p><strong>'.$addr['IP'].' TCP/'.$addr['port'].'</strong></p><ol>';
688 688
                             $clientstest[] = "<span id='clientresults$hostindex$clinx'><table style='width:100%'>
689 689
 <tr>
690
-<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='srcclient" . $hostindex . "_img'></td>
690
+<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='srcclient".$hostindex."_img'></td>
691 691
 <td id='srcclient$hostindex'>
692
-" . _("testing...") . "
692
+"._("testing...")."
693 693
 </td>
694 694
 </tr>
695 695
 </table></span>";
@@ -697,7 +697,7 @@  discard block
 block discarded – undo
697 697
                         }
698 698
                         echo '<div style="align:right;">';
699 699
                         echo join('', $resultstoprint);
700
-                        echo '<span id="clientstest" style="display: none;"><p><hr><b>' . _('Checking if certificates from  CAs are accepted...') . '</b><p>' . _('A few client certificates will be tested to check if servers are resistant to some certificate problems.') . '<p>';
700
+                        echo '<span id="clientstest" style="display: none;"><p><hr><b>'._('Checking if certificates from  CAs are accepted...').'</b><p>'._('A few client certificates will be tested to check if servers are resistant to some certificate problems.').'<p>';
701 701
                         print join('', $clientstest);
702 702
                         echo '</span>';
703 703
                         echo '</div>';
@@ -711,7 +711,7 @@  discard block
 block discarded – undo
711 711
                 //     check if truncates/dies on Operator-Name
712 712
                 if ($my_profile !== NULL) {
713 713
                     echo "<div id='tabs-4'><fieldset class='option_container'>
714
-                <legend><strong>" . _("Live login test") . "</strong></legend>";
714
+                <legend><strong>" . _("Live login test")."</strong></legend>";
715 715
                     $prof_compl = $my_profile->getEapMethodsinOrderOfPreference(1);
716 716
                     if (count($prof_compl) > 0) {
717 717
                         $passwordReqired = FALSE;
@@ -724,34 +724,34 @@  discard block
 block discarded – undo
724 724
                                 $clientCertRequired = TRUE;
725 725
                             }
726 726
                         }
727
-                        echo "<div id='disposable_credential_container'><p>" . _("If you enter an existing login credential here, you can test the actual authentication from various checkpoints all over the world.") . "</p>
728
-                    <p>" . _("The test will use all EAP types you have set in your profile information to check whether the right CAs and server names are used, and of course whether the login with these credentials and the given EAP type actually worked. If you have set anonymous outer ID, the test will use that.") . "</p>
729
-                    <p>" . _("Note: the tool purposefully does not offer you to save these credentials, and they will never be saved in any way on the server side. Please use only <strong>temporary test accounts</strong> here; permanently valid test accounts in the wild are considered harmful!") . "</p></div>
727
+                        echo "<div id='disposable_credential_container'><p>"._("If you enter an existing login credential here, you can test the actual authentication from various checkpoints all over the world.")."</p>
728
+                    <p>" . _("The test will use all EAP types you have set in your profile information to check whether the right CAs and server names are used, and of course whether the login with these credentials and the given EAP type actually worked. If you have set anonymous outer ID, the test will use that.")."</p>
729
+                    <p>" . _("Note: the tool purposefully does not offer you to save these credentials, and they will never be saved in any way on the server side. Please use only <strong>temporary test accounts</strong> here; permanently valid test accounts in the wild are considered harmful!")."</p></div>
730 730
                     <form enctype='multipart/form-data' id='live_form' accept-charset='UTF-8'>
731 731
                     <input type='hidden' name='test_type' value='udp_login'>
732
-                    <input type='hidden' name='lang' value='" . $gui->languageInstance->getLang() . "'>
733
-                    <input type='hidden' name='profile_id' value='" . $my_profile->identifier . "'>
732
+                    <input type='hidden' name='lang' value='" . $gui->languageInstance->getLang()."'>
733
+                    <input type='hidden' name='profile_id' value='" . $my_profile->identifier."'>
734 734
                     <table id='live_tests'>";
735 735
 // if any password based EAP methods are available enable this section
736 736
                         if ($passwordReqired) {
737
-                            echo "<tr><td colspan='2'><strong>" . _("Password-based EAP types") . "</strong></td></tr>
738
-                        <tr><td>" . _("Real (inner) username:") . "</td><td><input type='text' id='username' class='mandatory' name='username'/></td></tr>";
739
-                            echo "<tr><td>" . _("Anonymous outer ID (optional):") . "</td><td><input type='text' id='outer_username' name='outer_username'/></td></tr>";
740
-                            echo "<tr><td>" . _("Password:") . "</td><td><input type='text' id='password' class='mandatory' name='password'/></td></tr>";
737
+                            echo "<tr><td colspan='2'><strong>"._("Password-based EAP types")."</strong></td></tr>
738
+                        <tr><td>" . _("Real (inner) username:")."</td><td><input type='text' id='username' class='mandatory' name='username'/></td></tr>";
739
+                            echo "<tr><td>"._("Anonymous outer ID (optional):")."</td><td><input type='text' id='outer_username' name='outer_username'/></td></tr>";
740
+                            echo "<tr><td>"._("Password:")."</td><td><input type='text' id='password' class='mandatory' name='password'/></td></tr>";
741 741
                         }
742 742
                         // ask for cert + privkey if TLS-based method is active
743 743
                         if ($clientCertRequired) {
744
-                            echo "<tr><td colspan='2'><strong>" . _("Certificate-based EAP types") . "</strong></td></tr>
745
-                        <tr><td>" . _("Certificate file (.p12 or .pfx):") . "</td><td><input type='file' id='cert' accept='application/x-pkcs12' name='cert'/></td></tr>
746
-                        <tr><td>" . _("Certificate password, if any:") . "</td><td><input type='text' id='privkey' name='privkey_pass'/></td></tr>
747
-                        <tr><td>" . _("Username, if different from certificate Subject:") . "</td><td><input type='text' id='tls_username' name='tls_username'/></td></tr>";
744
+                            echo "<tr><td colspan='2'><strong>"._("Certificate-based EAP types")."</strong></td></tr>
745
+                        <tr><td>" . _("Certificate file (.p12 or .pfx):")."</td><td><input type='file' id='cert' accept='application/x-pkcs12' name='cert'/></td></tr>
746
+                        <tr><td>" . _("Certificate password, if any:")."</td><td><input type='text' id='privkey' name='privkey_pass'/></td></tr>
747
+                        <tr><td>" . _("Username, if different from certificate Subject:")."</td><td><input type='text' id='tls_username' name='tls_username'/></td></tr>";
748 748
                         }
749
-                        echo "<tr><td colspan='2'><button id='submit_credentials'>" . _("Submit credentials") . "</button></td></tr></table></form>";
749
+                        echo "<tr><td colspan='2'><button id='submit_credentials'>"._("Submit credentials")."</button></td></tr></table></form>";
750 750
                         echo "<div id='live_login_results' style='display:none'>";
751 751
                         foreach (\config\Diagnostics::RADIUSTESTS['UDP-hosts'] as $hostindex => $host) {
752 752
                             print "<hr>";
753
-                            printf(_("Testing from: %s"), "<strong>" . \config\Diagnostics::RADIUSTESTS['UDP-hosts'][$hostindex]['display_name'] . "</strong>");
754
-                            print "<span style='position:relative'><img src='../resources/images/icons/loading51.gif' id='live_src" . $hostindex . "_img' style='width:24px; position: absolute; left: 20px; bottom: 0px; '></span>";
753
+                            printf(_("Testing from: %s"), "<strong>".\config\Diagnostics::RADIUSTESTS['UDP-hosts'][$hostindex]['display_name']."</strong>");
754
+                            print "<span style='position:relative'><img src='../resources/images/icons/loading51.gif' id='live_src".$hostindex."_img' style='width:24px; position: absolute; left: 20px; bottom: 0px; '></span>";
755 755
                             print "<div id='eap_test$hostindex' class='eap_test_results'></div>";
756 756
                         }
757 757
                         echo "</div>";
@@ -766,9 +766,9 @@  discard block
 block discarded – undo
766 766
             }
767 767
 
768 768
             if (isset($_POST['comefrom'])) {
769
-                $return = htmlspecialchars_decode($_POST['comefrom']) . "?inst_id=" . $my_inst->identifier;
769
+                $return = htmlspecialchars_decode($_POST['comefrom'])."?inst_id=".$my_inst->identifier;
770 770
                 echo "<form method='post' action='$return' accept-charset='UTF-8'>
771
-                    <button type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_CLOSE . "'>" . sprintf(_("Return to %s administrator area"), core\common\Entity::$nomenclature_inst) . "</button>"
771
+                    <button type='submit' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_CLOSE."'>".sprintf(_("Return to %s administrator area"), core\common\Entity::$nomenclature_inst)."</button>"
772 772
                 . "</form>";
773 773
             }
774 774
             if ($check_realm !== FALSE) {
Please login to merge, or discard this patch.
web/admin/edit_profile_result.php 1 patch
Spacing   +22 added lines, -22 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();
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
             echo $deco->pageheader(sprintf(_("%s: Edit Profile - Result"), \config\Master::APPEARANCE['productname']), "ADMIN-IDP");
53 53
         } else {
54 54
             $profile = $my_inst->newProfile(core\AbstractProfile::PROFILETYPE_RADIUS);
55
-            $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP " . $my_inst->identifier . " - Profile created");
55
+            $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP ".$my_inst->identifier." - Profile created");
56 56
             echo $deco->pageheader(sprintf(_("%s: Profile wizard (step 3 completed)"), \config\Master::APPEARANCE['productname']), "ADMIN-IDP");
57 57
         }
58 58
         if (!$profile instanceof \core\ProfileRADIUS) {
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
             $uiElements = new web\lib\admin\UIElements();
114 114
             // set realm info, if submitted
115 115
             if ($realm !== FALSE) {
116
-                $profile->setRealm($anonLocal . "@" . $realm);
116
+                $profile->setRealm($anonLocal."@".$realm);
117 117
                 echo $uiElements->boxOkay(sprintf(_("Realm: <strong>%s</strong>"), $realm));
118 118
             } else {
119 119
                 $profile->setRealm("");
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
                     echo $uiElements->boxError(_("Realm check username cannot be configured: realm is missing!"));
137 137
                 } else {
138 138
                     $profile->setRealmcheckUser(true, $checkuser_name);
139
-                    echo $uiElements->boxOkay(sprintf(_("Special username for realm check is <strong>%s</strong>, the value is <strong>%s</strong>"), _("ON"), $checkuser_name . "@" . $realm));
139
+                    echo $uiElements->boxOkay(sprintf(_("Special username for realm check is <strong>%s</strong>, the value is <strong>%s</strong>"), _("ON"), $checkuser_name."@".$realm));
140 140
                 }
141 141
             } else {
142 142
                 $profile->setRealmCheckUser(false);
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
                 } else {
150 150
                     $profile->setInputVerificationPreference($verify, $hint);
151 151
                     if ($hint !== FALSE) {
152
-                        $extratext = " " . sprintf(_("and the input field will be prefilled with '<strong>@%s</strong>'."), $realm);
152
+                        $extratext = " ".sprintf(_("and the input field will be prefilled with '<strong>@%s</strong>'."), $realm);
153 153
                     } else {
154 154
                         $extratext = ".";
155 155
                     }
@@ -186,29 +186,29 @@  discard block
 block discarded – undo
186 186
                 echo $uiElements->boxOkay(_("Redirection is <strong>OFF</strong>"));
187 187
             }
188 188
 
189
-            $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile " . $profile->identifier . " - attributes changed");
189
+            $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile ".$profile->identifier." - attributes changed");
190 190
 
191 191
             foreach (\core\common\EAP::listKnownEAPTypes() as $a) {
192 192
                 if ($a->getIntegerRep() == \core\common\EAP::INTEGER_SILVERBULLET) { // do not allow adding silverbullet via the backdoor
193 193
                     continue;
194 194
                 }
195
-                if (isset($_POST[$a->getPrintableRep()]) && isset($_POST[$a->getPrintableRep() . "-priority"]) && is_numeric($_POST[$a->getPrintableRep() . "-priority"])) {
196
-                    $priority = (int) $_POST[$a->getPrintableRep() . "-priority"];
195
+                if (isset($_POST[$a->getPrintableRep()]) && isset($_POST[$a->getPrintableRep()."-priority"]) && is_numeric($_POST[$a->getPrintableRep()."-priority"])) {
196
+                    $priority = (int) $_POST[$a->getPrintableRep()."-priority"];
197 197
                     // add EAP type to profile as requested, but ...
198 198
                     $profile->addSupportedEapMethod($a, $priority);
199
-                    $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile " . $profile->identifier . " - supported EAP types changed");
199
+                    $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile ".$profile->identifier." - supported EAP types changed");
200 200
                     // see if we can enable the EAP type, or if info is missing
201 201
                     $eapcompleteness = $profile->isEapTypeDefinitionComplete($a);
202 202
                     if ($eapcompleteness === true) {
203
-                        echo $uiElements->boxOkay(_("Supported EAP Type: ") . "<strong>" . $a->getPrintableRep() . "</strong>");
203
+                        echo $uiElements->boxOkay(_("Supported EAP Type: ")."<strong>".$a->getPrintableRep()."</strong>");
204 204
                     } else {
205 205
                         $warntext = "";
206 206
                         if (is_array($eapcompleteness)) {
207 207
                             foreach ($eapcompleteness as $item) {
208
-                                $warntext .= "<strong>" . $uiElements->displayName($item) . "</strong> ";
208
+                                $warntext .= "<strong>".$uiElements->displayName($item)."</strong> ";
209 209
                             }
210 210
                         }
211
-                        echo $uiElements->boxWarning(sprintf(_("Supported EAP Type: <strong>%s</strong> is missing required information %s !"), $a->getPrintableRep(), $warntext) . "<br/>" . _("The EAP type was added to the profile, but you need to complete the missing information before we can produce installers for you."));
211
+                        echo $uiElements->boxWarning(sprintf(_("Supported EAP Type: <strong>%s</strong> is missing required information %s !"), $a->getPrintableRep(), $warntext)."<br/>"._("The EAP type was added to the profile, but you need to complete the missing information before we can produce installers for you."));
212 212
                     }
213 213
                 }
214 214
             }
@@ -218,23 +218,23 @@  discard block
 block discarded – undo
218 218
             if (count($significantChanges) > 0) {
219 219
                 $myInstOriginal = new \core\IdP($profile->institution);
220 220
                 // send a notification/alert mail to someone we know is in charge
221
-                $text = _("To whom it may concern,") . "\n\n";
221
+                $text = _("To whom it may concern,")."\n\n";
222 222
                 /// were made to the *Identity Provider* *LU* / integer number of IdP / (previously known as) Name
223
-                $text .= sprintf(_("significant changes were made to a RADIUS deployment profile of the %s %s / %s / '%s'."), $ui->nomenclatureInst, strtoupper($myInstOriginal->federation), $myInstOriginal->identifier, $myInstOriginal->name) . "\n\n";
223
+                $text .= sprintf(_("significant changes were made to a RADIUS deployment profile of the %s %s / %s / '%s'."), $ui->nomenclatureInst, strtoupper($myInstOriginal->federation), $myInstOriginal->identifier, $myInstOriginal->name)."\n\n";
224 224
                 if (isset($significantChanges[\core\AbstractProfile::CA_CLASH_ADDED])) {
225
-                    $text .= _("WARNING! A new trusted root CA was added, and it has the exact same name as a previously existing root CA. This may (but does not necessarily) mean that this is an attempt to insert an unauthorised trust root by disguising as the genuine one. The details are below:") . "\n\n";
226
-                    $text .= $significantChanges[\core\AbstractProfile::CA_CLASH_ADDED] . "\n\n";
225
+                    $text .= _("WARNING! A new trusted root CA was added, and it has the exact same name as a previously existing root CA. This may (but does not necessarily) mean that this is an attempt to insert an unauthorised trust root by disguising as the genuine one. The details are below:")."\n\n";
226
+                    $text .= $significantChanges[\core\AbstractProfile::CA_CLASH_ADDED]."\n\n";
227 227
                 }
228 228
                 if (isset($significantChanges[\core\AbstractProfile::CA_ADDED])) {
229 229
                     $text .= _("A new trusted root CA was added. The details are below:\n\n");
230
-                    $text .= $significantChanges[\core\AbstractProfile::CA_ADDED] . "\n\n";
230
+                    $text .= $significantChanges[\core\AbstractProfile::CA_ADDED]."\n\n";
231 231
                 }
232 232
                 if (isset($significantChanges[\core\AbstractProfile::SERVERNAME_ADDED])) {
233
-                    $text .= _("A new acceptable server name for the authentication server was added. The details are below:") . "\n\n";
234
-                    $text .= $significantChanges[\core\AbstractProfile::SERVERNAME_ADDED] . "\n\n";
233
+                    $text .= _("A new acceptable server name for the authentication server was added. The details are below:")."\n\n";
234
+                    $text .= $significantChanges[\core\AbstractProfile::SERVERNAME_ADDED]."\n\n";
235 235
                 }
236
-                $text .= _("This mail is merely a cross-check because these changes can be security-relevant. If the change was expected, you do not need to take any action.") . "\n\n";
237
-                $text .= _("Greetings, ") . "\n\n" . \config\Master::APPEARANCE['productname_long'];
236
+                $text .= _("This mail is merely a cross-check because these changes can be security-relevant. If the change was expected, you do not need to take any action.")."\n\n";
237
+                $text .= _("Greetings, ")."\n\n".\config\Master::APPEARANCE['productname_long'];
238 238
                 // (currently, send hard-wired to NRO - future: for linked insts, check eduroam DBv2 and send to registered admins directly)
239 239
                 $fed = new core\Federation($myInstOriginal->federation);
240 240
                 foreach ($fed->listFederationAdmins() as $id) {
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
         <?php
254 254
         if (count($reloadedProfile->getEapMethodsinOrderOfPreference(1)) > 0) {
255 255
             echo "<form method='post' action='overview_installers.php?inst_id=$my_inst->identifier&profile_id=$reloadedProfile->identifier' accept-charset='UTF-8'>
256
-        <button type='submit'>" . _("Continue to Installer Fine-Tuning and Download") . "</button>
256
+        <button type='submit'>"._("Continue to Installer Fine-Tuning and Download")."</button>
257 257
     </form>";
258 258
         }
259 259
         echo $deco->footer();
Please login to merge, or discard this patch.
web/admin/edit_participant_result.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
  *          <base_url>/copyright.php after deploying the software
21 21
  */
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
 $loggerInstance = new \core\common\Logging();
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     $instId = $my_inst->identifier;
36 36
     // delete the IdP and send user to enrollment
37 37
     $my_inst->destroy();
38
-    $loggerInstance->writeAudit($_SESSION['user'], "DEL", "IdP " . $instId);
38
+    $loggerInstance->writeAudit($_SESSION['user'], "DEL", "IdP ".$instId);
39 39
     header("Location: overview_user.php");
40 40
     exit;
41 41
 }
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
     }
52 52
     // flush all IdP attributes and send user to creation wizard
53 53
     $my_inst->flushAttributes();
54
-    $loggerInstance->writeAudit($_SESSION['user'], "DEL", "IdP starting over" . $instId);
54
+    $loggerInstance->writeAudit($_SESSION['user'], "DEL", "IdP starting over".$instId);
55 55
     header("Location: edit_participant.php?inst_id=$instId&wizard=true");
56 56
     exit;
57 57
 }
@@ -77,15 +77,15 @@  discard block
 block discarded – undo
77 77
 $myInstOriginal = $validator->existingIdP($_GET['inst_id'], $_SESSION['user']);
78 78
 $instId = $myInstOriginal->identifier;
79 79
 
80
-$hello = _("To whom it may concern,") . "\n\n";
81
-$bye = _("This mail is merely a cross-check because these changes can be security-relevant. If the change was expected, you do not need to take any action.") . "\n\n" .
82
-        _("Greetings, ") . "\n\n" .
80
+$hello = _("To whom it may concern,")."\n\n";
81
+$bye = _("This mail is merely a cross-check because these changes can be security-relevant. If the change was expected, you do not need to take any action.")."\n\n".
82
+        _("Greetings, ")."\n\n".
83 83
         \config\Master::APPEARANCE['productname_long'];
84 84
 
85 85
 switch ($_POST['submitbutton']) {
86 86
     case web\lib\common\FormElements::BUTTON_DELETE:
87 87
         $myInstOriginal->destroy();
88
-        $loggerInstance->writeAudit($_SESSION['user'], "DEL", "IdP " . $instId);
88
+        $loggerInstance->writeAudit($_SESSION['user'], "DEL", "IdP ".$instId);
89 89
         header("Location: overview_user.php");
90 90
         exit;
91 91
     case web\lib\common\FormElements::BUTTON_FLUSH_AND_RESTART:
@@ -95,9 +95,9 @@  discard block
 block discarded – undo
95 95
         }
96 96
         // flush all IdP attributes and send user to creation wizard
97 97
         $myInstOriginal->flushAttributes();
98
-        $loggerInstance->writeAudit($_SESSION['user'], "DEL", "IdP starting over" . $instId);
99
-        $text = $hello .
100
-                sprintf(_("the %s %s / %s / (previously known as) '%s' has deleted all properties and is starting over freshly. This means that its not recognisable by its name any more, and it may assume a different name in the future. You will get another mail if and when the name change happens."), $ui->nomenclatureInst, strtoupper($myInstOriginal->federation), $myInstOriginal->identifier, $myInstOriginal->name) . "\n\n" .
98
+        $loggerInstance->writeAudit($_SESSION['user'], "DEL", "IdP starting over".$instId);
99
+        $text = $hello.
100
+                sprintf(_("the %s %s / %s / (previously known as) '%s' has deleted all properties and is starting over freshly. This means that its not recognisable by its name any more, and it may assume a different name in the future. You will get another mail if and when the name change happens."), $ui->nomenclatureInst, strtoupper($myInstOriginal->federation), $myInstOriginal->identifier, $myInstOriginal->name)."\n\n".
101 101
                 $bye;
102 102
         $fed = new core\Federation($myInstOriginal->federation);
103 103
         foreach ($fed->listFederationAdmins() as $id) {
@@ -116,19 +116,19 @@  discard block
 block discarded – undo
116 116
             exit(0);
117 117
         }
118 118
         $inst_name = $myInstOriginal->name;
119
-        echo "<h1>" . sprintf(_("Submitted attributes for IdP '%s'"), $inst_name) . "</h1>";
119
+        echo "<h1>".sprintf(_("Submitted attributes for IdP '%s'"), $inst_name)."</h1>";
120 120
         echo "<table>";
121 121
         echo $optionParser->processSubmittedFields($myInstOriginal, $_POST, $_FILES);
122 122
         echo "</table>";
123 123
 // delete cached logo, if present
124
-        $dir = ROOT . '/web/downloads/logos/';
125
-        $globResult = glob($dir . $myInstOriginal->identifier . "_*.png");
124
+        $dir = ROOT.'/web/downloads/logos/';
125
+        $globResult = glob($dir.$myInstOriginal->identifier."_*.png");
126 126
         if ($globResult === FALSE) { // we should catch the improbable error condition
127 127
             $globResult = [];
128 128
         }
129 129
         array_map('unlink', $globResult);
130 130
         $loggerInstance->debug(4, "UNLINK from $dir\n");
131
-        $loggerInstance->writeAudit($_SESSION['user'], "MOD", "IdP " . $myInstOriginal->identifier . " - attributes changed");
131
+        $loggerInstance->writeAudit($_SESSION['user'], "MOD", "IdP ".$myInstOriginal->identifier." - attributes changed");
132 132
 
133 133
 // re-instantiate ourselves... profiles need fresh data
134 134
         $myInstReinstantiated = $validator->existingIdP($_GET['inst_id'], $_SESSION['user']);
@@ -137,10 +137,10 @@  discard block
 block discarded – undo
137 137
         if (count($significantChanges) > 0) {
138 138
             // send a notification/alert mail to someone we know is in charge
139 139
             /// were made to the *Identity Provider* *LU* / integer number of IdP / (previously known as) Name
140
-            $text = $hello . sprintf(_("significant changes were made to the %s %s / %s / (previously known as) '%s'."), $ui->nomenclatureInst, strtoupper($myInstOriginal->federation), $myInstOriginal->identifier, $myInstOriginal->name) . "\n\n";
140
+            $text = $hello.sprintf(_("significant changes were made to the %s %s / %s / (previously known as) '%s'."), $ui->nomenclatureInst, strtoupper($myInstOriginal->federation), $myInstOriginal->identifier, $myInstOriginal->name)."\n\n";
141 141
             if (isset($significantChanges[\core\IdP::INSTNAME_CHANGED])) {
142
-                $text .= sprintf(_("The %s has changed its name. The details are below:"), $ui->nomenclatureInst) . "\n\n";
143
-                $text .= $significantChanges[\core\IdP::INSTNAME_CHANGED] . "\n\n";
142
+                $text .= sprintf(_("The %s has changed its name. The details are below:"), $ui->nomenclatureInst)."\n\n";
143
+                $text .= $significantChanges[\core\IdP::INSTNAME_CHANGED]."\n\n";
144 144
             }
145 145
             $text .= $bye;
146 146
             // (currently, send hard-wired to NRO - future: for linked insts, check eduroam DBv2 and send to registered admins directly)
@@ -156,12 +156,12 @@  discard block
 block discarded – undo
156 156
 
157 157
         if (isset(\config\ConfAssistant::CONSORTIUM['ssid']) && count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0) {
158 158
             foreach (\config\ConfAssistant::CONSORTIUM['ssid'] as $ssidname) {
159
-                $ssids[] = $ssidname . " " . (isset(\config\ConfAssistant::CONSORTIUM['tkipsupport']) && \config\ConfAssistant::CONSORTIUM['tkipsupport'] === TRUE ? _("(WPA2/AES and WPA/TKIP)") : _("(WPA2/AES)") );
159
+                $ssids[] = $ssidname." ".(isset(\config\ConfAssistant::CONSORTIUM['tkipsupport']) && \config\ConfAssistant::CONSORTIUM['tkipsupport'] === TRUE ? _("(WPA2/AES and WPA/TKIP)") : _("(WPA2/AES)"));
160 160
             }
161 161
         }
162 162
 
163 163
         foreach ($myInstReinstantiated->getAttributes("media:SSID") as $ssidname) {
164
-            $ssids[] = $ssidname['value'] . " " . _("(WPA2/AES)");
164
+            $ssids[] = $ssidname['value']." "._("(WPA2/AES)");
165 165
         }
166 166
 
167 167
         echo "<table>";
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
         if (count($ssids) > 0) {
170 170
             $printedlist = "";
171 171
             foreach ($ssids as $names) {
172
-                $printedlist = $printedlist . "$names ";
172
+                $printedlist = $printedlist."$names ";
173 173
             }
174 174
             echo $uiElements->boxOkay(sprintf(_("Your installers will configure the following SSIDs: <strong>%s</strong>"), $printedlist), _("SSIDs configured"));
175 175
         }
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
                 // did we get an email address? then, show the silverbullet jumpstart button
198 198
                 // otherwise, issue a smartass comment
199 199
                 if (count($my_inst->getAttributes("support:email")) > 0) {
200
-                    echo "<form method='post' action='edit_silverbullet.php?inst_id=$my_inst->identifier' accept-charset='UTF-8'><button type='submit'>" . sprintf(_("Continue to %s properties"), \core\ProfileSilverbullet::PRODUCTNAME) . "</button></form>";
200
+                    echo "<form method='post' action='edit_silverbullet.php?inst_id=$my_inst->identifier' accept-charset='UTF-8'><button type='submit'>".sprintf(_("Continue to %s properties"), \core\ProfileSilverbullet::PRODUCTNAME)."</button></form>";
201 201
                 } else {
202 202
                     echo "<table>";
203 203
                     echo $uiElements->boxError(sprintf(_("You did not submit an e-mail address. This is required for %s. Please go to the %s dashboard and edit your helpdesk settings to include a helpdesk e-mail address."), core\ProfileSilverbullet::PRODUCTNAME, $ui->nomenclatureInst), _("No support e-mail!"));
@@ -205,10 +205,10 @@  discard block
 block discarded – undo
205 205
                 }
206 206
             }
207 207
             if (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_RADIUS'] == "LOCAL") {
208
-                echo "<br/><form method='post' action='edit_profile.php?inst_id=$my_inst->identifier' accept-charset='UTF-8'><button type='submit'>" . _("Continue to RADIUS/EAP profile definition") . "</button></form>";
208
+                echo "<br/><form method='post' action='edit_profile.php?inst_id=$my_inst->identifier' accept-charset='UTF-8'><button type='submit'>"._("Continue to RADIUS/EAP profile definition")."</button></form>";
209 209
             }
210 210
         }
211
-        echo "<br/><form method='post' action='overview_user.php?inst_id=$my_inst->identifier' accept-charset='UTF-8'><button type='submit'>" . _("Continue to dashboard") . "</button></form>";
211
+        echo "<br/><form method='post' action='overview_user.php?inst_id=$my_inst->identifier' accept-charset='UTF-8'><button type='submit'>"._("Continue to dashboard")."</button></form>";
212 212
 
213 213
         break;
214 214
     default:
Please login to merge, or discard this patch.
web/admin/edit_participant.php 1 patch
Spacing   +31 added lines, -31 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
 }
@@ -94,12 +94,12 @@  discard block
 block discarded – undo
94 94
         </table>
95 95
     </div>
96 96
     <?php
97
-    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'>
98
-              <input type='hidden' name='MAX_FILE_SIZE' value='" . \config\Master::MAX_UPLOAD_SIZE . "'>";
97
+    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'>
98
+              <input type='hidden' name='MAX_FILE_SIZE' value='" . \config\Master::MAX_UPLOAD_SIZE."'>";
99 99
 
100 100
     if ($wizardStyle) {
101
-        echo "<p>" .
102
-        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>";
101
+        echo "<p>".
102
+        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>";
103 103
     }
104 104
     $optionDisplay = new web\lib\admin\OptionDisplay($idpoptions, "IdP");
105 105
     ?>
@@ -107,11 +107,11 @@  discard block
 block discarded – undo
107 107
         <legend><strong><?php echo _("General Information"); ?></strong></legend>
108 108
         <?php
109 109
         if ($wizardStyle) {
110
-            echo "<p>" .
111
-            _("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>
110
+            echo "<p>".
111
+            _("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>
112 112
                       <ul>
113
-                         <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>
114
-                         <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>";
113
+                         <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>
114
+                         <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>";
115 115
             echo "</ul>";
116 116
         }
117 117
         echo $optionDisplay->prefilledOptionTable("general");
@@ -125,47 +125,47 @@  discard block
 block discarded – undo
125 125
         <legend><strong><?php echo _("Media Properties"); ?></strong></legend>
126 126
         <?php
127 127
         if ($wizardStyle) {
128
-            echo "<p>" .
129
-            sprintf(_("In this section, you define on which media %s should be configured on user devices."), \config\ConfAssistant::CONSORTIUM['display_name']) . "</p>
128
+            echo "<p>".
129
+            sprintf(_("In this section, you define on which media %s should be configured on user devices."), \config\ConfAssistant::CONSORTIUM['display_name'])."</p>
130 130
           <ul>";
131 131
             echo "<li>";
132
-            echo "<strong>" . ( count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0 ? _("Additional SSIDs:") : _("SSIDs:")) . " </strong>";
132
+            echo "<strong>".(count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0 ? _("Additional SSIDs:") : _("SSIDs:"))." </strong>";
133 133
             if (count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0) {
134 134
                 $ssidlist = "";
135 135
                 foreach (\config\ConfAssistant::CONSORTIUM['ssid'] as $ssid) {
136
-                    $ssidlist .= ", '<strong>" . $ssid . "</strong>'";
136
+                    $ssidlist .= ", '<strong>".$ssid."</strong>'";
137 137
                 }
138 138
                 $ssidlist = substr($ssidlist, 2);
139 139
                 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);
140 140
                 if (\config\ConfAssistant::CONSORTIUM['tkipsupport']) {
141
-                    echo " " . _("They will also be configured for WPA/TKIP if the device supports multiple encryption types.");
141
+                    echo " "._("They will also be configured for WPA/TKIP if the device supports multiple encryption types.");
142 142
                 }
143
-                echo "<br/>" . sprintf(_("It is also possible to define custom additional SSIDs with the option '%s' below."), $uiElements->displayName("media:SSID"));
143
+                echo "<br/>".sprintf(_("It is also possible to define custom additional SSIDs with the option '%s' below."), $uiElements->displayName("media:SSID"));
144 144
             } else {
145 145
                 echo _("Please configure which SSIDs should be configured in the installers.");
146 146
             }
147
-            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.");
147
+            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.");
148 148
             echo "</li>";
149 149
 
150 150
             echo "<li>";
151
-            echo "<strong>" . ( count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0 ? _("Additional Hotspot 2.0 / Passpoint Consortia:") : _("Hotspot 2.0 / Passpoint Consortia:")) . " </strong>";
151
+            echo "<strong>".(count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0 ? _("Additional Hotspot 2.0 / Passpoint Consortia:") : _("Hotspot 2.0 / Passpoint Consortia:"))." </strong>";
152 152
             if (count(\config\ConfAssistant::CONSORTIUM['interworking-consortium-oi']) > 0) {
153 153
                 $consortiumlist = "";
154 154
                 foreach (\config\ConfAssistant::CONSORTIUM['interworking-consortium-oi'] as $oi) {
155
-                    $consortiumlist .= ", '<strong>" . $oi . "</strong>'";
155
+                    $consortiumlist .= ", '<strong>".$oi."</strong>'";
156 156
                 }
157 157
                 $consortiumlist = substr($consortiumlist, 2);
158 158
                 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);
159 159
 
160
-                echo "<br/>" . sprintf(_("It is also possible to define custom additional OIs with the option '%s' below."), $uiElements->displayName("media:consortium_OI"));
160
+                echo "<br/>".sprintf(_("It is also possible to define custom additional OIs with the option '%s' below."), $uiElements->displayName("media:consortium_OI"));
161 161
             } else {
162 162
                 echo _("Please configure which Consortium OIs should be configured in the installers.");
163 163
             }
164 164
             echo "</li>";
165
-            echo "<li><strong>" . _("Support for wired IEEE 802.1X:") . " </strong>"
166
-            . _("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).") .
165
+            echo "<li><strong>"._("Support for wired IEEE 802.1X:")." </strong>"
166
+            . _("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).").
167 167
             "</li>";
168
-            echo "<li><strong>" . _("Removal of bootstrap/onboarding SSIDs:") . " </strong>"
168
+            echo "<li><strong>"._("Removal of bootstrap/onboarding SSIDs:")." </strong>"
169 169
             . _("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'.")
170 170
             . "</li>";
171 171
             echo "</ul>";
@@ -181,16 +181,16 @@  discard block
 block discarded – undo
181 181
             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>";
182 182
             
183 183
             if (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_RADIUS'] == "LOCAL") {
184
-                echo "<p>" .
184
+                echo "<p>".
185 185
                         
186
-                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>" .
187
-                "<p>" .
188
-                _("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>";
186
+                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>".
187
+                "<p>".
188
+                _("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>";
189 189
                 if (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_SILVERBULLET'] == "LOCAL") {
190
-                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>";
190
+                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>";
191 191
                 }
192 192
             } elseif (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_SILVERBULLET'] == "LOCAL") {
193
-                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>";
193
+                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>";
194 194
             }
195 195
             
196 196
         }
@@ -200,8 +200,8 @@  discard block
 block discarded – undo
200 200
         <button type='button' class='newoption' onclick='getXML("support")'><?php echo _("Add new option"); ?></button></fieldset>
201 201
     <?php
202 202
     if ($wizardStyle) {
203
-        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>";
203
+        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>";
204 204
     } else {
205
-        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>";
205
+        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>";
206 206
     }
207 207
     echo $deco->footer();
Please login to merge, or discard this patch.
web/diag/adminQuery.php 1 patch
Spacing   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
  * License: see the web/copyright.inc.php file in the file structure or
20 20
  *          <base_url>/copyright.php after deploying the software
21 21
  */
22
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
22
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
23 23
 $languageInstance = new \core\common\Language();
24 24
 $languageInstance->setTextDomain("diagnostics");
25 25
 $loggerInstance = new \core\common\Logging();
@@ -61,43 +61,43 @@  discard block
 block discarded – undo
61 61
     $select = "<div id='sp_abuse_problem'>
62 62
 <select style='margin-left: 0px;' id='select_sp_problem'>";
63 63
     foreach ($sp_problem as $pname => $pdesc) {
64
-        $select = $select . "<option value='$pname'>$pdesc</option>\n";
64
+        $select = $select."<option value='$pname'>$pdesc</option>\n";
65 65
     }
66
-    $select = $select . "</select></div>";
66
+    $select = $select."</select></div>";
67 67
     $res = "
68 68
 <input type='hidden' name='token' id='token' value=''>
69 69
 <input type='hidden' name='tests_result' id='tests_result' value=''>
70 70
 <table id='sp_questions'>
71 71
     <tr>
72
-        <td>" . _("Select your problem") . "</td>
72
+        <td>" . _("Select your problem")."</td>
73 73
         <td>$select</td>
74 74
     </tr>
75 75
     <tr>
76
-        <td>" . _("What is the realm of the IdP in question?") . "</td>
76
+        <td>"._("What is the realm of the IdP in question?")."</td>
77 77
         <td>
78 78
                 <input type='text' name='admin_realm' id='admin_realm' value='$realmFromURL'>
79
-                <button class='diag_button' id='realm_in_db_admin' style='display: none;' accesskey='R' type='button'>" .
80
-                _("Check this realm") .
79
+                <button class='diag_button' id='realm_in_db_admin' style='display: none;' accesskey='R' type='button'>".
80
+                _("Check this realm").
81 81
                 "</button>
82 82
                 <div id='tests_info_area'></div>
83 83
         </td>
84 84
     </tr>
85 85
     <tr class='hidden_row'>
86
-        <td>" . _("What is the authentication timestamp of the user session in question?") . "</td>
86
+        <td>" . _("What is the authentication timestamp of the user session in question?")."</td>
87 87
         <td><input type='text' id='timestamp' name='timestamp'>
88 88
             <div id='datepicker'></div>
89 89
         </td>
90 90
     </tr>
91 91
     <tr class='hidden_row'>
92
-        <td>" . _("What is the MAC address of the user session in question?") . "</td>
92
+        <td>" . _("What is the MAC address of the user session in question?")."</td>
93 93
         <td><input type='text' id='mac' name='mac'></td>
94 94
     </tr>
95 95
     <tr class='hidden_row'>
96
-        <td>" . _("Additional comments") . "</td>
96
+        <td>" . _("Additional comments")."</td>
97 97
         <td><textarea id='freetext' name='freetext' cols='60' rows='5'></textarea></td>
98 98
     </tr>
99 99
     <tr class='hidden_row'>
100
-        <td>" . _("Please specify an email address on which the IdP can contact you") . "</td>
100
+        <td>" . _("Please specify an email address on which the IdP can contact you")."</td>
101 101
         <td><input type='text' id='email' name='email'></td>
102 102
     </tr>
103 103
     <tr>
@@ -105,82 +105,82 @@  discard block
 block discarded – undo
105 105
         <td></td>
106 106
     </tr>
107 107
     <tr class='hidden_row' id='send_query_to_idp'>
108
-        <td>" . _("Now you can send your query") . "</td>
109
-        <td><button type='submit' class='diag_button' id='submit_idp_query' name='go'>" . _("Send") . "</button></td>
108
+        <td>" . _("Now you can send your query")."</td>
109
+        <td><button type='submit' class='diag_button' id='submit_idp_query' name='go'>" . _("Send")."</button></td>
110 110
     </tr>
111 111
  </table>";
112
-    $res = $res . $javascript;
112
+    $res = $res.$javascript;
113 113
 }
114 114
 if ($queryType == 'idp') {
115 115
     $select = "<div id='idp_reported_problem' style='display:;'>
116 116
 <select style='margin-left:0px;' id='select_idp_problem'>";
117 117
     foreach ($idp_problem as $pname => $pdesc) {
118
-        $select = $select . "<option value='$pname'>$pdesc</option>\n";
118
+        $select = $select."<option value='$pname'>$pdesc</option>\n";
119 119
     }
120
-    $select = $select . "</select></div>";
120
+    $select = $select."</select></div>";
121 121
     $res = "
122 122
 <table id='idp_questions'>
123 123
     <tr>
124
-        <td>" . _("Select your problem") . "</td>
124
+        <td>" . _("Select your problem")."</td>
125 125
         <td>$select</td>
126 126
     </tr>
127 127
     <tr>
128
-        <td>" . _("Identify the SP by one of following means") . "</td>
128
+        <td>"._("Identify the SP by one of following means")."</td>
129 129
         <td></td>
130 130
     </tr>
131 131
     <tr id='by_opname'>
132
-        <td>" . _("SP Operator-Name attribute") . "</td>
132
+        <td>" . _("SP Operator-Name attribute")."</td>
133 133
         <td><input type='text' id='opname' name='opname' value=''></td>
134 134
     </tr>
135 135
     <tr id='spmanually'>
136
-        <td>" . _("Select the SP manually:") . "</td>
136
+        <td>" . _("Select the SP manually:")."</td>
137 137
         <td>
138 138
             <div id='select_asp_country'><a href='' id='asp_countries_list'>
139
-            <span id='opnameselect'>" . _("click to select country and organisation") . "</a></span>
139
+            <span id='opnameselect'>" . _("click to select country and organisation")."</a></span>
140 140
             </div>
141 141
             <div id='select_asp_area'></div>
142 142
         </td>
143 143
     </tr>
144 144
     <tr id='asp_desc' style='display: none;'>
145
-        <td>" . _("or") . ' ' . _("at least describe the SP location") . "</td>
145
+        <td>" . _("or").' '._("at least describe the SP location")."</td>
146 146
         <td><input type='text' id='asp_location' name='asp_location' value=''></td>
147 147
     </tr>
148 148
     <tr>
149
-        <td>" . _("What is the outer ID of the user session in question?") . "</td>
149
+        <td>" . _("What is the outer ID of the user session in question?")."</td>
150 150
         <td><input type='text' id='outer_id' name='outer_id' value=''></td>
151 151
     </tr>
152 152
     <tr>
153
-        <td>" . _("What is the authentication timestamp of the user session in question?") . "</td>
153
+        <td>" . _("What is the authentication timestamp of the user session in question?")."</td>
154 154
         <td>
155 155
             <input type='text' id='timestamp' name='timestamp'>
156 156
             <div id='datepicker'></div>
157 157
         </td>
158 158
     </tr>
159 159
     <tr>
160
-        <td>" . _("What is the MAC address of the user session in question?") . "</td>
160
+        <td>" . _("What is the MAC address of the user session in question?")."</td>
161 161
         <td><input type='text' id='mac' name='mac'></td>
162 162
     </tr>
163 163
     <tr>
164
-        <td>" . _("Additional comments about the problem") . "</td>
164
+        <td>" . _("Additional comments about the problem")."</td>
165 165
         <td><textarea id='freetext' name='freetext' cols='60' rows='5'></textarea></td>
166 166
     </tr>
167 167
     <tr>
168
-        <td>" . _("Do you have any contact details by which the user wishes to be contacted by the SP?") . "</td>
168
+        <td>" . _("Do you have any contact details by which the user wishes to be contacted by the SP?")."</td>
169 169
         <td><textarea id='c_details' name='c_details' cols='60' rows='5'></textarea></td>
170 170
     </tr>
171 171
     <tr>
172
-        <td>" . _("Please specify an email address on which the SP can contact you") . "</td>
172
+        <td>" . _("Please specify an email address on which the SP can contact you")."</td>
173 173
         <td><input type='text' id='email' name='email'></td>
174 174
     </tr>
175 175
     <tr class='hidden_row' id='send_query_to_sp'>
176
-        <td>" . _("Now you can send your query") . "</td>
177
-        <td><button type='submit' class='diag_button' id='submit_sp_query' name='go'>" . _("Send") . "</button></td>
176
+        <td>" . _("Now you can send your query")."</td>
177
+        <td><button type='submit' class='diag_button' id='submit_sp_query' name='go'>" . _("Send")."</button></td>
178 178
     </tr>
179 179
 </table>";
180
-    $res = $res . $javascript;
180
+    $res = $res.$javascript;
181 181
 }
182 182
 if ($queryType == 'idp_send' || $queryType == 'sp_send') {
183
-    include_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
183
+    include_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
184 184
     $cat = new \core\CAT();
185 185
     $returnArray = array();
186 186
     if (count((array) $o) > 0) {
@@ -189,8 +189,8 @@  discard block
 block discarded – undo
189 189
             switch ($key) {
190 190
                 case 'realm':
191 191
                     $pos = strpos($value, '@');
192
-                    if ($pos !== FALSE ) {
193
-                        $value = substr($value, $pos+1);
192
+                    if ($pos !== FALSE) {
193
+                        $value = substr($value, $pos + 1);
194 194
                     }
195 195
                 case 'email':
196 196
                 case 'mac':
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
         $mail = \core\common\OutsideComm::mailHandle();
227 227
         $emails = ['[email protected]'];
228 228
         //$emails = explode(',', $returnArray['idpcontact']);
229
-        $mail->FromName = \config\Master::APPEARANCE['productname'] . " Notification System";
229
+        $mail->FromName = \config\Master::APPEARANCE['productname']." Notification System";
230 230
         foreach ($emails as $email) {
231 231
             $mail->addAddress($email);
232 232
         }
@@ -236,11 +236,11 @@  discard block
 block discarded – undo
236 236
         } else {
237 237
             $link = 'http://';
238 238
         }
239
-        $link .= $_SERVER['SERVER_NAME'] . \core\CAT::getRootUrlPath() . '/diag/show_realmcheck.php?token=' . $returnArray['token'];
239
+        $link .= $_SERVER['SERVER_NAME'].\core\CAT::getRootUrlPath().'/diag/show_realmcheck.php?token='.$returnArray['token'];
240 240
         $returnArray['testurl'] = $link;
241 241
         $mail->Subject = _('Suspected a technical problem with the IdP');
242
-        $txt = _("We suspect a technical problem with the IdP handling the realm") . ' ' . 
243
-                $returnArray['realm'] . ".\n";
242
+        $txt = _("We suspect a technical problem with the IdP handling the realm").' '. 
243
+                $returnArray['realm'].".\n";
244 244
         $txt .= _("The CAT diagnostic test was run for this realm during reporting.\n");
245 245
         $txt .= _("The overall result was ");
246 246
         if ($returnArray['tests_result'] == 0) {
@@ -248,15 +248,15 @@  discard block
 block discarded – undo
248 248
         } else {
249 249
             $txt .= _("failure");
250 250
         }
251
-        $txt .= ".\n" . _("To see details go to ");
251
+        $txt .= ".\n"._("To see details go to ");
252 252
         $txt .= "$link\n\n";
253
-        $txt .= _("The reported problem details are as follows") . "\n";
254
-        $txt .= _("timestamp") . ": " . $returnArray['timestamp'] . "\n";
255
-        $txt .= _("client MAC address") . ": " . $returnArray['mac'] . "\n";
253
+        $txt .= _("The reported problem details are as follows")."\n";
254
+        $txt .= _("timestamp").": ".$returnArray['timestamp']."\n";
255
+        $txt .= _("client MAC address").": ".$returnArray['mac']."\n";
256 256
         if ($returnArray['freetext']) {
257
-            $txt .= _("additional comments") . ': ' . $returnArray['freetext'] . "\n";
257
+            $txt .= _("additional comments").': '.$returnArray['freetext']."\n";
258 258
         }
259
-        $txt .= "\n" . _("You can contact the incident reporter at") . ' ' . $returnArray['email'];
259
+        $txt .= "\n"._("You can contact the incident reporter at").' '.$returnArray['email'];
260 260
         
261 261
         $mail->Body = $txt;
262 262
         $sent = $mail->send();
Please login to merge, or discard this patch.
web/diag/findRealm.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -30,12 +30,12 @@  discard block
 block discarded – undo
30 30
  */
31 31
 
32 32
 
33
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
33
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
34 34
 
35 35
 // we are referring to $_SESSION later in the file
36 36
 \core\CAT::sessionStart();
37 37
 
38
-$jsonDir = dirname(dirname(dirname(dirname(__FILE__)))) . "/CAT/var/json_cache";
38
+$jsonDir = dirname(dirname(dirname(dirname(__FILE__))))."/CAT/var/json_cache";
39 39
 
40 40
 $loggerInstance = new \core\common\Logging();
41 41
 $returnArray = [];
@@ -49,8 +49,8 @@  discard block
 block discarded – undo
49 49
 $realmOu = filter_input(INPUT_GET, 'ou', FILTER_SANITIZE_STRING);
50 50
 $forTests = filter_input(INPUT_GET, 'addtest', FILTER_SANITIZE_STRING);
51 51
 $token = filter_input(INPUT_GET, 'token', FILTER_SANITIZE_STRING) ?? filter_input(INPUT_POST, 'token', FILTER_SANITIZE_STRING);
52
-if ($token && !is_dir($jsonDir . '/' . $token)) {
53
-    mkdir($jsonDir . '/' . $token, 0777, true);
52
+if ($token && !is_dir($jsonDir.'/'.$token)) {
53
+    mkdir($jsonDir.'/'.$token, 0777, true);
54 54
 }
55 55
 if (!is_null($givenRealm)) {
56 56
     $realmElems = explode('.', $givenRealm);
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
         }
83 83
         $admins = array();
84 84
         if ($allRealms[$found]['contact']) {
85
-            $elems =  explode(', ', $allRealms[$found]['contact']);
85
+            $elems = explode(', ', $allRealms[$found]['contact']);
86 86
             foreach ($elems as $admin) {
87 87
                 if (substr($admin, 0, 2) == 'e:') {
88 88
                     $admins[] = substr($admin, 3);
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
     }
106 106
     if ($forTests) {
107 107
         $rfc7585suite = new \core\diag\RFC7585Tests($givenRealm);
108
-        $testsuite = new \core\diag\RADIUSTests($givenRealm, "@" . $givenRealm);
108
+        $testsuite = new \core\diag\RADIUSTests($givenRealm, "@".$givenRealm);
109 109
         $naptr = $rfc7585suite->relevantNAPTR();
110 110
         if ($naptr != \core\diag\RADIUSTests::RETVAL_NOTCONFIGURED && $naptr > 0) {
111 111
             $naptr_valid = $rfc7585suite->relevantNAPTRcompliance();
@@ -119,12 +119,12 @@  discard block
 block discarded – undo
119 119
         $loggerInstance->debug(4, "findRealm rfc7585suite end\n");
120 120
         $toTest = array();
121 121
         foreach ($rfc7585suite->NAPTR_hostname_records as $hostindex => $addr) {
122
-            $host = ($addr['family'] == "IPv6" ? "[" : "") . $addr['IP'] . ($addr['family'] == "IPv6" ? "]" : "") . ":" . $addr['port'];
122
+            $host = ($addr['family'] == "IPv6" ? "[" : "").$addr['IP'].($addr['family'] == "IPv6" ? "]" : "").":".$addr['port'];
123 123
             $expectedName = $addr['hostname'];
124 124
             $toTest[$hostindex] = array(
125 125
                                         'host' => $host,
126 126
                                         'name' => $expectedName,
127
-                                        'bracketaddr' => ($addr["family"] == "IPv6" ? "[" . $addr["IP"] . "]" : $addr["IP"]) . ' TCP/' . $addr['port']
127
+                                        'bracketaddr' => ($addr["family"] == "IPv6" ? "[".$addr["IP"]."]" : $addr["IP"]).' TCP/'.$addr['port']
128 128
             );
129 129
         }
130 130
         $details['totest'] = $toTest;
@@ -196,8 +196,8 @@  discard block
 block discarded – undo
196 196
 $loggerInstance->debug(4, "findRealm return end\n");
197 197
 $json_data = json_encode($returnArray);
198 198
 if ($token) {
199
-    $loggerInstance->debug(4, $jsonDir . '/' . $token);
200
-    file_put_contents($jsonDir . '/' . $token . '/realm' , $json_data);
199
+    $loggerInstance->debug(4, $jsonDir.'/'.$token);
200
+    file_put_contents($jsonDir.'/'.$token.'/realm', $json_data);
201 201
 }
202 202
 echo($json_data);
203 203
 
Please login to merge, or discard this patch.
web/diag/show_realmcheck.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
  * 
25 25
  * @author Maja Górecka-Wolniewicz <[email protected]>
26 26
  */
27
-require_once dirname(dirname(__DIR__)) . "/config/_config.php";
27
+require_once dirname(dirname(__DIR__))."/config/_config.php";
28 28
 
29 29
 $loggerInstance = new \core\common\Logging();
30 30
 
@@ -53,9 +53,9 @@  discard block
 block discarded – undo
53 53
 <script type="text/javascript" src="../external/jquery/jquery.js"></script>
54 54
 <script type="text/javascript" src="../external/jquery/jquery-ui.js"></script>
55 55
 <script type="text/javascript">
56
-var morealltext = "<?php echo '<i>' . _("Show detailed information for all tests") . '&raquo;</i>' ?>";
57
-var lessalltext = "<?php echo '<i>' . _("Hide detailed information for all tests") . '&raquo;</i>' ?>";
58
-var moretext = "<?php echo _("more") . "&raquo;" ?>";
56
+var morealltext = "<?php echo '<i>'._("Show detailed information for all tests").'&raquo;</i>' ?>";
57
+var lessalltext = "<?php echo '<i>'._("Hide detailed information for all tests").'&raquo;</i>' ?>";
58
+var moretext = "<?php echo _("more")."&raquo;" ?>";
59 59
 var lesstext = "<?php echo "&laquo" ?>";
60 60
     $(document).ready(function () {
61 61
         $('.caresult, .eap_test_results, .udp_results').on('click', '.morelink', function () {
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 </head>
100 100
 <body>
101 101
 <?php
102
-require dirname(__DIR__) . '/skins/modern/diag/js/diag_js.php';
102
+require dirname(__DIR__).'/skins/modern/diag/js/diag_js.php';
103 103
 echo $deco->productheader("ADMIN");
104 104
 $check_realm = FALSE;
105 105
 $token = filter_input(INPUT_GET, 'token', FILTER_SANITIZE_STRING);
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
     </h1>
118 118
     <div id="debug_out" style="display: none"></div>
119 119
     <div id="timestamp" style="min-width: 600px; max-width:800px" align="right">
120
-        <?php echo _("Tests timestamp: ") . $realmTests->getTimeStamp() . ' UTC'; ?>
120
+        <?php echo _("Tests timestamp: ").$realmTests->getTimeStamp().' UTC'; ?>
121 121
     </div>
122 122
     <div id="tabs" style="min-width: 600px; max-width:800px">
123 123
         <ul>
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
             <div id="tabs-1">
135 135
                 <button id="run_tests" onclick="runRealmCheck('<?php echo $check_realm; ?>','<?php echo $ourlocale; ?>')"><?php echo _("Repeat connectivity tests") ?></button>
136 136
                 <div id="test_area"></div>
137
-                <?php print $realmTests->printOverview();?>
137
+                <?php print $realmTests->printOverview(); ?>
138 138
 
139 139
             </div>
140 140
             <div id="tabs-2">
@@ -157,9 +157,9 @@  discard block
 block discarded – undo
157 157
             }
158 158
 } else {
159 159
         if (is_null($token)) {
160
-            echo '<p><h1>' . _("Token missing, no data can be presented") . '</h1>';
160
+            echo '<p><h1>'._("Token missing, no data can be presented").'</h1>';
161 161
         } else {
162
-            echo '<p><h1>' . _("The token given in the request does not exists, no data can be presented") . '</h1>';
162
+            echo '<p><h1>'._("The token given in the request does not exists, no data can be presented").'</h1>';
163 163
         }
164 164
 }
165 165
 echo $deco->footer();
Please login to merge, or discard this patch.
web/diag/radius_tests.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -20,14 +20,14 @@  discard block
 block discarded – undo
20 20
  *          <base_url>/copyright.php after deploying the software
21 21
  */
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
 $loggerInstance = new \core\common\Logging();
26 26
 $validator = new \web\lib\common\InputValidation();
27 27
 $languageInstance = new \core\common\Language();
28 28
 $languageInstance->setTextDomain("diagnostics");
29 29
 
30
-$jsonDir = dirname(dirname(dirname(dirname(__FILE__)))) . "/CAT/var/json_cache";
30
+$jsonDir = dirname(dirname(dirname(dirname(__FILE__))))."/CAT/var/json_cache";
31 31
 
32 32
 $additional_message = [
33 33
     \core\common\Entity::L_OK => '',
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 function disp_name($eap)
46 46
 {
47 47
     $displayName = \core\common\EAP::eapDisplayName($eap);
48
-    return $displayName['OUTER'] . ( $displayName['INNER'] != '' ? '-' . $displayName['INNER'] : '');
48
+    return $displayName['OUTER'].($displayName['INNER'] != '' ? '-'.$displayName['INNER'] : '');
49 49
 }
50 50
 
51 51
 if (!isset($_REQUEST['test_type']) || !$_REQUEST['test_type']) {
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
     $testsuite = new \core\diag\RADIUSTests($check_realm, $my_profile->getRealmCheckOuterUsername(), $my_profile->getEapMethodsinOrderOfPreference(1), $my_profile->getCollapsedAttributes()['eap:server_name'], $my_profile->getCollapsedAttributes()['eap:ca_file']);
69 69
 } else {
70 70
     $my_profile = NULL;
71
-    $testsuite = new \core\diag\RADIUSTests($check_realm, "@" . $check_realm);
71
+    $testsuite = new \core\diag\RADIUSTests($check_realm, "@".$check_realm);
72 72
 }
73 73
 
74 74
 
@@ -163,10 +163,10 @@  discard block
 block discarded – undo
163 163
                             break;
164 164
                         case \core\common\Entity::L_REMARK:
165 165
                         case \core\common\Entity::L_WARN:
166
-                            $message = _("<strong>Test partially successful</strong>: authentication succeded.") . ' ' . $additional_message[$level];
166
+                            $message = _("<strong>Test partially successful</strong>: authentication succeded.").' '.$additional_message[$level];
167 167
                             break;
168 168
                         case \core\common\Entity::L_ERROR:
169
-                            $message = _("<strong>Test FAILED</strong>: authentication succeded.") . ' ' . $additional_message[$level];
169
+                            $message = _("<strong>Test FAILED</strong>: authentication succeded.").' '.$additional_message[$level];
170 170
                             break;
171 171
                     }
172 172
                     break;
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
             case \core\diag\RADIUSTests::RETVAL_CONVERSATION_REJECT:
218 218
                 $level = $returnarray['result'][$i]['level'];
219 219
                 if ($level > \core\common\Entity::L_OK) {
220
-                    $message = _("<strong>Test partially successful</strong>: a bidirectional RADIUS conversation with multiple round-trips was carried out, and ended in an Access-Reject as planned.") . ' ' . $additional_message[$level];
220
+                    $message = _("<strong>Test partially successful</strong>: a bidirectional RADIUS conversation with multiple round-trips was carried out, and ended in an Access-Reject as planned.").' '.$additional_message[$level];
221 221
                 } else {
222 222
                     $message = _("<strong>Test successful</strong>: a bidirectional RADIUS conversation with multiple round-trips was carried out, and ended in an Access-Reject as planned.");
223 223
                 }
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
                 $level = \core\common\Entity::L_ERROR;
241 241
                 break;
242 242
         }
243
-        $loggerInstance->debug(4, "SERVER=" . $returnarray['result'][$i]['server'] . "\n");
243
+        $loggerInstance->debug(4, "SERVER=".$returnarray['result'][$i]['server']."\n");
244 244
         $returnarray['result'][$i]['level'] = $level;
245 245
         $returnarray['result'][$i]['message'] = $message;
246 246
         break;
@@ -257,9 +257,9 @@  discard block
 block discarded – undo
257 257
         }
258 258
         // we tried to contact someone, and know how long that took
259 259
         $returnarray['time_millisec'] = sprintf("%d", $rfc6614suite->TLS_CA_checks_result[$host]['time_millisec']);
260
-        $timeDisplay = ' (' . sprintf(_("elapsed time: %d"), $rfc6614suite->TLS_CA_checks_result[$host]['time_millisec']) . '&nbsp;ms)';
260
+        $timeDisplay = ' ('.sprintf(_("elapsed time: %d"), $rfc6614suite->TLS_CA_checks_result[$host]['time_millisec']).'&nbsp;ms)';
261 261
         if (isset($rfc6614suite->TLS_CA_checks_result[$host]['cert_oddity']) && ($rfc6614suite->TLS_CA_checks_result[$host]['cert_oddity'] == \core\diag\RADIUSTests::CERTPROB_UNKNOWN_CA)) {
262
-            $returnarray['message'] = _("<strong>ERROR</strong>: the server presented a certificate which is from an unknown authority!") . $timeDisplay;
262
+            $returnarray['message'] = _("<strong>ERROR</strong>: the server presented a certificate which is from an unknown authority!").$timeDisplay;
263 263
             $returnarray['level'] = \core\common\Entity::L_ERROR;
264 264
             $returnarray['result'] = $testresult;
265 265
             break;
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
         $returnarray['level'] = \core\common\Entity::L_OK;
270 270
         // override if the connection was with a mismatching server name
271 271
         if (isset($rfc6614suite->TLS_CA_checks_result[$host]['cert_oddity']) && ($rfc6614suite->TLS_CA_checks_result[$host]['cert_oddity'] == \core\diag\RADIUSTests::CERTPROB_DYN_SERVER_NAME_MISMATCH)) {
272
-            $returnarray['message'] = _("<strong>WARNING</strong>: the server name as discovered in the SRV record does not match any name in the server certificate!") . $timeDisplay;
272
+            $returnarray['message'] = _("<strong>WARNING</strong>: the server name as discovered in the SRV record does not match any name in the server certificate!").$timeDisplay;
273 273
             $returnarray['level'] = \core\common\Entity::L_WARN;
274 274
         }
275 275
         switch ($rfc6614suite->TLS_CA_checks_result[$host]['status']) {
@@ -327,13 +327,13 @@  discard block
 block discarded – undo
327 327
         throw new Exception("Unknown test requested: default case reached!");
328 328
 }
329 329
 $returnarray['datetime'] = date("Y-m-d H:i:s");
330
-if (!is_dir($jsonDir . '/' . $token)) {
331
-    mkdir($jsonDir . '/' . $token, 0777, true);
330
+if (!is_dir($jsonDir.'/'.$token)) {
331
+    mkdir($jsonDir.'/'.$token, 0777, true);
332 332
 }
333 333
 $json_data = json_encode($returnarray);
334 334
 if ($token != '') {
335
-    $loggerInstance->debug(4, $jsonDir . '/' . $returnarray['token']);
336
-    file_put_contents($jsonDir . '/' . $token . '/' . $test_type . '_' . $hostindex, $json_data);
335
+    $loggerInstance->debug(4, $jsonDir.'/'.$returnarray['token']);
336
+    file_put_contents($jsonDir.'/'.$token.'/'.$test_type.'_'.$hostindex, $json_data);
337 337
 }
338 338
 echo($json_data);
339 339
 
Please login to merge, or discard this patch.
core/diag/RADIUSTestsUI.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
             if ($this->allReachabilityResults['realm'][0]->realm) {
126 126
                 $this->realm = $this->allReachabilityResults['realm'][0]->realm;
127 127
                 foreach ($this->allReachabilityResults['realm'][0]->totest as $totest) {
128
-                  $this->hostMap[$totest->host] = $totest->bracketaddr;
128
+                    $this->hostMap[$totest->host] = $totest->bracketaddr;
129 129
                 }
130 130
                 $this->rfc7585suite = unserialize($this->allReachabilityResults['realm'][0]->rfc7585suite);
131 131
                 $this->srv = $this->allReachabilityResults['realm'][0]->srv;
@@ -460,7 +460,7 @@  discard block
 block discarded – undo
460 460
                                     } else {
461 461
                                         if (property_exists($certificate, 'reason') && $certificate->reason == \core\diag\RADIUSTests::CERTPROB_UNKNOWN_CA) {
462 462
                                             $add = '<br>' . _('You should update your list of accredited CAs') .
463
-                                                           ' <a href=\"' . \config\Diagnostics::RADIUSTESTS['accreditedCAsURL'] . '\">' .
463
+                                                            ' <a href=\"' . \config\Diagnostics::RADIUSTESTS['accreditedCAsURL'] . '\">' .
464 464
                                                             _('Get it from here.') . '</a>';
465 465
                                         }
466 466
                                         $state = _('Server did not accept this client certificate - reason') . ': ' .
@@ -471,8 +471,8 @@  discard block
 block discarded – undo
471 471
                                         $level = \core\common\Entity::L_WARN;
472 472
                                         $state = _('Server accepted this client certificate, but should not have');
473 473
                                     } else {
474
-                                       $level = \core\common\Entity::L_OK;
475
-                                       $state = _('Server did not accept this client certificate') . ': ' . $certificate->resultcomment;
474
+                                        $level = \core\common\Entity::L_OK;
475
+                                        $state = _('Server did not accept this client certificate') . ': ' . $certificate->resultcomment;
476 476
                                     }
477 477
                                 }
478 478
                                 $cliinfo .= '<li><table><tbody><tr><td class="icon_td"><img class="icon" src="' . $this->stateIcons[$level] . '" style="width: 24px;"></td><td>' . $state;
@@ -489,7 +489,7 @@  discard block
 block discarded – undo
489 489
                         if ($srefused > 0) {
490 490
                             $cliinfo = _('Connection refused');
491 491
                             $clientstest[] = "<table><tr><td class='icon_td' id='srcclient$hostindex_img'><img src='" . $this->stateIcons[\core\common\Entity::L_ERROR] . "'></td>" .
492
-                                     "<td id='srcclient$hostname'><p>$cliinfo</p></td></tr></table>";
492
+                                        "<td id='srcclient$hostname'><p>$cliinfo</p></td></tr></table>";
493 493
                         } else {
494 494
                             $clientstest[] = "<p>$cliinfo</p>";
495 495
                         }
Please login to merge, or discard this patch.
Spacing   +70 added lines, -70 removed lines patch added patch discarded remove patch
@@ -111,8 +111,8 @@  discard block
 block discarded – undo
111 111
             'authorityinfoaccess' => _("authorityInfoAccess"),
112 112
             'subjectaltname' => _("SubjectAltName"),
113 113
         ];
114
-        $jsondir = dirname(dirname(dirname(__FILE__))) . "/var/json_cache";
115
-        if ($token && is_dir($jsondir . '/' . $token)) {
114
+        $jsondir = dirname(dirname(dirname(__FILE__)))."/var/json_cache";
115
+        if ($token && is_dir($jsondir.'/'.$token)) {
116 116
             foreach (['realm', 'udp', 'clients', 'capath'] as $test_type) {
117 117
                 foreach (glob("$jsondir/$token/$test_type*") as $filename) {
118 118
                     $this->loggerInstance->debug(4, "\nIS_DIR $filename\n");
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
                 $this->rfc7585suite = unserialize($this->allReachabilityResults['realm'][0]->rfc7585suite);
131 131
                 $this->srv = $this->allReachabilityResults['realm'][0]->srv;
132 132
                 $this->naptr = $this->allReachabilityResults['realm'][0]->naptr;
133
-                $this->naptrValid= $this->allReachabilityResults['realm'][0]->naptr_valid;
133
+                $this->naptrValid = $this->allReachabilityResults['realm'][0]->naptr_valid;
134 134
                 $this->hosts = $this->allReachabilityResults['realm'][0]->hosts;
135 135
                 $this->testSuite = unserialize($this->allReachabilityResults['realm'][0]->testsuite);
136 136
             }
@@ -189,9 +189,9 @@  discard block
 block discarded – undo
189 189
         }
190 190
     }           
191 191
 
192
-    public function isDynamic ()
192
+    public function isDynamic()
193 193
     {
194
-        if ($this->naptr> 0) {
194
+        if ($this->naptr > 0) {
195 195
             return TRUE;
196 196
         }
197 197
         return FALSE;
@@ -201,17 +201,17 @@  discard block
 block discarded – undo
201 201
      * 
202 202
      * 
203 203
      */
204
-    public function printOverview ()
204
+    public function printOverview()
205 205
     {
206 206
         $out = [];
207 207
         $out[] = "<fieldset class='option_container'>
208 208
         <legend>
209
-        <strong>" . _("Overview") . '</strong> 
209
+        <strong>" . _("Overview").'</strong> 
210 210
         </legend>';
211
-        $out[] = "<strong>" . _("DNS chekcs") . "</strong><div>";
211
+        $out[] = "<strong>"._("DNS chekcs")."</strong><div>";
212 212
         if ($this->naptr != \core\diag\RADIUSTests::RETVAL_NOTCONFIGURED) {
213 213
             $out[] = "<table>";
214
-            $out[] = "<tr><td>" . _("Checking NAPTR existence:") . "</td><td>";
214
+            $out[] = "<tr><td>"._("Checking NAPTR existence:")."</td><td>";
215 215
             switch ($this->naptr) {
216 216
                 case \core\diag\RFC7585Tests::RETVAL_NONAPTR:
217 217
                     $out[] = _("This realm has no NAPTR records.");
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
             //print '<pre>'; print_r($out); print '</pre>'; exit;
227 227
             // compliance checks for NAPTRs
228 228
             if ($this->naptr > 0) {
229
-                $out[] = "<tr><td>" . _("Checking NAPTR compliance (flag = S and regex = {empty}):") . "</td><td>";
229
+                $out[] = "<tr><td>"._("Checking NAPTR compliance (flag = S and regex = {empty}):")."</td><td>";
230 230
                 switch ($this->naptrValid) {
231 231
                     case \core\diag\RADIUSTests::RETVAL_OK:
232 232
                         $out[] = "No issues found.";
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
             }
240 240
             // SRV resolution
241 241
             if ($this->naptr > 0 && $this->naptrValid == \core\diag\RADIUSTests::RETVAL_OK) {
242
-                $out[] = "<tr><td>" . _("Checking SRVs:") . "</td><td>";
242
+                $out[] = "<tr><td>"._("Checking SRVs:")."</td><td>";
243 243
                 switch ($this->srv) {
244 244
                     case \core\diag\RADIUSTests::RETVAL_SKIPPED:
245 245
                         $out[] = _("This check was skipped.");
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
             }
255 255
             // IP addresses for the hosts
256 256
             if ($this->naptr > 0 && $this->naptrValid == \core\diag\RADIUSTests::RETVAL_OK && $this->srv > 0) {
257
-                $out[] = "<tr><td>" . _("Checking IP address resolution:") . "</td><td>";
257
+                $out[] = "<tr><td>"._("Checking IP address resolution:")."</td><td>";
258 258
                 switch ($this->srv) {
259 259
                     case \core\diag\RADIUSTests::RETVAL_SKIPPED:
260 260
                         $out[] = _("This check was skipped.");
@@ -273,33 +273,33 @@  discard block
 block discarded – undo
273 273
             if (count($this->testSuite->listerrors()) == 0) {
274 274
                 $out[] = _("with no DNS errors encountered. Congratulations!");
275 275
             } else {
276
-                $out[] = _("but there were DNS errors! Check them!") . " " . _("You should re-run the tests after fixing the errors; more errors might be uncovered at that point. The exact error causes are listed below.");
276
+                $out[] = _("but there were DNS errors! Check them!")." "._("You should re-run the tests after fixing the errors; more errors might be uncovered at that point. The exact error causes are listed below.");
277 277
                 $out[] = "<div class='notacceptable'><table>";
278 278
                 foreach ($this->testSuite->listerrors() as $details) {
279
-                    $out[] = "<tr><td>" . $details['TYPE'] . "</td><td>" . $details['TARGET'] . "</td></tr>";
279
+                    $out[] = "<tr><td>".$details['TYPE']."</td><td>".$details['TARGET']."</td></tr>";
280 280
                 }
281 281
                 $out[] = "</table></div>";
282 282
             }
283 283
             $out[] = '</div>';
284 284
 
285 285
             foreach ($this->rfc7585suite->NAPTR_hostname_records as $hostindex => $addr) {
286
-                $host = ($addr['family'] == "IPv6" ? "[" : "") . $addr['IP'] . ($addr['family'] == "IPv6" ? "]" : "") . ":" . $addr['port'];
286
+                $host = ($addr['family'] == "IPv6" ? "[" : "").$addr['IP'].($addr['family'] == "IPv6" ? "]" : "").":".$addr['port'];
287 287
                 $expectedName = $addr['hostname'];
288 288
             }
289 289
         } else {
290
-            $out[] = "<tr><td>" . _("Dynamic discovery test is not configured") . "</td><td>";
290
+            $out[] = "<tr><td>"._("Dynamic discovery test is not configured")."</td><td>";
291 291
         }
292
-        $out[] = "<hr><strong>" . _("Static connectivity tests") . "</strong>
292
+        $out[] = "<hr><strong>"._("Static connectivity tests")."</strong>
293 293
          <table><tr>
294 294
          <td class='icon_td'>";
295
-        $out[] = "<img src='" . $this->stateIcons[$this->globalLevelStatic] . "' id='main_static_ico' class='icon'></td><td id='main_static_result'>" .
296
-                            $this->globalInfo[$this->globalLevelStatic] . ' ' .  _("See the appropriate tab for details.") . '</td>
295
+        $out[] = "<img src='".$this->stateIcons[$this->globalLevelStatic]."' id='main_static_ico' class='icon'></td><td id='main_static_result'>".
296
+                            $this->globalInfo[$this->globalLevelStatic].' '._("See the appropriate tab for details.").'</td>
297 297
          </tr></table>';
298 298
         if ($this->naptr > 0) {
299
-            $out[] = "<hr><strong>" . _("Dynamic connectivity tests") . "</strong>
299
+            $out[] = "<hr><strong>"._("Dynamic connectivity tests")."</strong>
300 300
             <table><tr>
301
-            <td class='icon_td'><img src='" . $this->stateIcons[$this->globalLevelDynamic] . "' id='main_dynamic_ico' class='icon'></td><td id='main_dynamic_result'>" .
302
-            $this->globalInfo[$this->globalLevelDynamic] . ' ' . _("See the appropriate tab for details.") . '</td></tr></table>';
301
+            <td class='icon_td'><img src='" . $this->stateIcons[$this->globalLevelDynamic]."' id='main_dynamic_ico' class='icon'></td><td id='main_dynamic_result'>".
302
+            $this->globalInfo[$this->globalLevelDynamic].' '._("See the appropriate tab for details.").'</td></tr></table>';
303 303
         }
304 304
         $out[] = '</fieldset>';
305 305
         //print '<pre>'; print_r($out); print '</pre>'; exit;
@@ -320,27 +320,27 @@  discard block
 block discarded – undo
320 320
             $result = $udp->result[0];
321 321
             //print '<pre>'; print_r($result); print '</pre>';
322 322
             $out[] = '<hr>';
323
-            $out[] = '<strong>' . sprintf(_("Testing from: %s"), \config\Diagnostics::RADIUSTESTS['UDP-hosts'][$hostindex]['display_name']) . '</strong>';
323
+            $out[] = '<strong>'.sprintf(_("Testing from: %s"), \config\Diagnostics::RADIUSTESTS['UDP-hosts'][$hostindex]['display_name']).'</strong>';
324 324
             $out[] = "<table id='results$hostindex'  style='width:100%' class='udp_results'>
325 325
 <tr>
326
-<td class='icon_td'><img src='" . $this->stateIcons[$result->level] . "' id='src" . $hostindex . "_img'></td>
326
+<td class='icon_td'><img src='".$this->stateIcons[$result->level]."' id='src".$hostindex."_img'></td>
327 327
 <td id='src$hostindex' colspan=2>
328 328
 ";
329
-            $out[] = '<strong>' . ($result->server? $result->server : _("Connected to undetermined server")) . '</strong><br/>' . sprintf (_("elapsed time: %sms."), $result->time_millisec) . '<p>' . $result->message . '</p>';
329
+            $out[] = '<strong>'.($result->server ? $result->server : _("Connected to undetermined server")).'</strong><br/>'.sprintf(_("elapsed time: %sms."), $result->time_millisec).'<p>'.$result->message.'</p>';
330 330
                     
331 331
             if ($result->level > \core\common\Entity::L_OK && property_exists($result, 'cert_oddities')) {
332 332
                 foreach ($result->cert_oddities as $oddities) {
333
-                    $out[] = '<tr class="results_tr"><td>&nbsp;</td><td class="icon_td"><img src="' . $icons[$oddities->level] . '"></td><td>' . $oddities->message . '</td></tr>';
333
+                    $out[] = '<tr class="results_tr"><td>&nbsp;</td><td class="icon_td"><img src="'.$icons[$oddities->level].'"></td><td>'.$oddities->message.'</td></tr>';
334 334
                 }
335 335
             }
336 336
             $cert_data = '';
337 337
             foreach ($result->server_cert as $sckey => $sc) {
338 338
                 if (array_key_exists($sckey, $this->certFields)) {
339
-                    $cert_data .= '<dt>' . $this->certFields[$sckey] . '</dt><dd>' . $sc . '</dd>';
339
+                    $cert_data .= '<dt>'.$this->certFields[$sckey].'</dt><dd>'.$sc.'</dd>';
340 340
                 }
341 341
             }
342 342
             $out[] = "<tr class='server_cert' style='display: ";
343
-            $out[] = ($result->server_cert? 'table-row' : 'none') . ";'><td>&nbsp;</td><td colspan=2><div><dl class='server_cert_list' style='display: none;'>";
343
+            $out[] = ($result->server_cert ? 'table-row' : 'none').";'><td>&nbsp;</td><td colspan=2><div><dl class='server_cert_list' style='display: none;'>";
344 344
             $out[] = $cert_data;
345 345
                         
346 346
             $ext = '';
@@ -348,12 +348,12 @@  discard block
 block discarded – undo
348 348
                 if ($ext) {
349 349
                     $ext .= '<br>';
350 350
                 }
351
-                $ext .= '<strong>' . $extkey . ': </strong>' . '<i>' . $extval . '</i>';   
351
+                $ext .= '<strong>'.$extkey.': </strong>'.'<i>'.$extval.'</i>';   
352 352
             }
353 353
             if ($ext != '') {
354
-                $out[] = '<dt>' . _('Extensions') . '</dt></dd><dd>' . $ext . '</dd>';
354
+                $out[] = '<dt>'._('Extensions').'</dt></dd><dd>'.$ext.'</dd>';
355 355
             }
356
-            $out[] = "</dl><a href='' class='morelink'>" . _("show server certificate details") . "&raquo;</a></div></tr>";
356
+            $out[] = "</dl><a href='' class='morelink'>"._("show server certificate details")."&raquo;</a></div></tr>";
357 357
                         
358 358
             $out[] = "</td></tr></table>";
359 359
         }
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
     private function collectCAPath()
365 365
     {
366 366
         $capathtest = [];
367
-        $capathtest[] = '<p><strong>' . _("Checking server handshake...") . "</strong><p>";
367
+        $capathtest[] = '<p><strong>'._("Checking server handshake...")."</strong><p>";
368 368
         foreach ($this->allReachabilityResults['capath'] as $capath) {
369 369
             //print '<pre>'; print_r($capath); print '<pre>';
370 370
             $hostindex = $capath->hostindex;
@@ -372,46 +372,46 @@  discard block
 block discarded – undo
372 372
             if ($capath->level == \core\common\Entity::L_OK && $capath->result == \core\diag\RADIUSTests::RETVAL_INVALID) {
373 373
                 $level = \core\common\Entity::L_WARN;
374 374
             }
375
-            $capathtest[] = '<p><strong>' . $this->hostMap[$capath->IP] . '</strong>';
375
+            $capathtest[] = '<p><strong>'.$this->hostMap[$capath->IP].'</strong>';
376 376
             $capathtest[] = '<ul style="list-style-type: none;" class="caresult"><li>';
377 377
             $capathtest[] = "<table id='caresults$hostindex'  style='width:100%'>
378 378
 <tr>
379 379
 <td class='icon_td'><img src='";
380
-            $capathtest[] = $this->stateIcons[$level] . "' id='srcca" . $hostindex . "_img'></td>
380
+            $capathtest[] = $this->stateIcons[$level]."' id='srcca".$hostindex."_img'></td>
381 381
 <td id='srcca$hostindex'>";
382 382
             $more = '';
383 383
             //print '<pre>'; print_r($server_cert); print '</pre>';print $server_cert['title'].'<br>';
384 384
             if ($capath->certdata && $capath->certdata->subject != '') {
385 385
                 $more .= '<div class="more">';
386
-                $certdesc = '<br>' . $this->certFields['title'] . '<ul>';
386
+                $certdesc = '<br>'.$this->certFields['title'].'<ul>';
387 387
                 if ($capath->certdata->subject) {
388
-                    $certdesc .= '<li>' . $this->certFields['c_subject'] . ': ' . $capath->certdata->subject;
388
+                    $certdesc .= '<li>'.$this->certFields['c_subject'].': '.$capath->certdata->subject;
389 389
                 }
390 390
                 if ($capath->certdata->issuer) {
391
-                    $certdesc .= '<li>' . $this->certFields['c_issuer'] . ': ' . $capath->certdata->issuer;
391
+                    $certdesc .= '<li>'.$this->certFields['c_issuer'].': '.$capath->certdata->issuer;
392 392
                 }
393 393
                 if ($capath->certdata->extensions) {
394 394
                     if ($capath->certdata->extensions->subjectaltname) {
395
-                        $certdesc .= '<li>' . $this->certFields['subjectaltname'] . ': ' . $capath->certdata->extensions->subjectaltname;
395
+                        $certdesc .= '<li>'.$this->certFields['subjectaltname'].': '.$capath->certdata->extensions->subjectaltname;
396 396
                     }
397 397
                 }
398 398
                 if ($capath->certdata->extensions->policies) {
399
-                    $certdesc .= '<li>' . $this->certFields['policies'] . ': ' . $capath->certdata->extensions->policies;
399
+                    $certdesc .= '<li>'.$this->certFields['policies'].': '.$capath->certdata->extensions->policies;
400 400
                 }
401 401
                 if ($capath->certdata->extensions->crldistributionpoints) {
402
-                    $certdesc .= '<li>' . $this->certFields['crldistributionpoints'] . ': ' . $capath->certdata->extensions->crldistributionpoints;
402
+                    $certdesc .= '<li>'.$this->certFields['crldistributionpoints'].': '.$capath->certdata->extensions->crldistributionpoints;
403 403
                 }
404 404
                 if ($capath->certdata->extensions->authorityinfoaccess) {
405
-                    $certdesc .= '<li>' . $this->certFields['authorityinfoaccess'] . ': ' . $capath->certdata->extensions->authorityinfoaccess;
405
+                    $certdesc .= '<li>'.$this->certFields['authorityinfoaccess'].': '.$capath->certdata->extensions->authorityinfoaccess;
406 406
                 }
407 407
                             
408 408
                 $certdesc .= '</ul>';
409
-                $more .= '<span class="morecontent"><span>' . $certdesc .
410
-                        '</span>&nbsp;&nbsp;<a href="" class="morelink">' . _("more") . '&raquo;</a></span></td></tr>';
409
+                $more .= '<span class="morecontent"><span>'.$certdesc.
410
+                        '</span>&nbsp;&nbsp;<a href="" class="morelink">'._("more").'&raquo;</a></span></td></tr>';
411 411
             } else {
412 412
                 $certdesc = '<br>';
413 413
             }
414
-            $capathtest[] = '<div>' . ($capath->message!=''? $capath->message : _('Test failed')) . '</div>' . $more;
414
+            $capathtest[] = '<div>'.($capath->message != '' ? $capath->message : _('Test failed')).'</div>'.$more;
415 415
             $capathtest[] = '</td>
416 416
 </tr>
417 417
 </table>';
@@ -426,7 +426,7 @@  discard block
 block discarded – undo
426 426
         foreach ($this->allReachabilityResults['clients'] as $clients) {
427 427
             //print '<pre>'; print_r($clients); print '</pre>';
428 428
             $hostindex = $clients->hostindex; 
429
-            $clientstest[] = '<p><strong>' . $this->hostMap[$clients->IP] . '</strong></p>';
429
+            $clientstest[] = '<p><strong>'.$this->hostMap[$clients->IP].'</strong></p>';
430 430
             $clientstest[] = "<span id='clientresults$hostindex'>";
431 431
             $clientstest[] = '<p></p>';
432 432
             if ($this->globalLevelDynamic != \core\common\Entity::L_ERROR) {
@@ -436,9 +436,9 @@  discard block
 block discarded – undo
436 436
                         //print '<pre>'; print_r($ca); print '</pre>';
437 437
                         $srefused = 0;
438 438
                         $cliinfo = '';
439
-                        $cliinfo .= '<li>' . _('Client certificate') . ' <b>' . $ca->clientcertinfo->from .
440
-                                    '</b>' . ', ' . $ca->clientcertinfo->message .
441
-                                    '<br> (CA: ' . $ca->clientcertinfo->issuer . ')<ul>';
439
+                        $cliinfo .= '<li>'._('Client certificate').' <b>'.$ca->clientcertinfo->from.
440
+                                    '</b>'.', '.$ca->clientcertinfo->message.
441
+                                    '<br> (CA: '.$ca->clientcertinfo->issuer.')<ul>';
442 442
                         foreach ($ca->certificate as $certificate) {
443 443
                             if ($certificate->returncode == \core\diag\RADIUSTests::RETVAL_CONNECTION_REFUSED) {
444 444
                                 $srefused = 1;
@@ -446,8 +446,8 @@  discard block
 block discarded – undo
446 446
                         }
447 447
                         if ($srefused == 0) {
448 448
                             foreach ($ca->certificate as $certificate) { 
449
-                                $cliinfo .= '<li><i>' . $certificate->message .  
450
-                                            ', ' . _("expected result: ") . $this->states[$certificate->expected] . '</i>';
449
+                                $cliinfo .= '<li><i>'.$certificate->message.  
450
+                                            ', '._("expected result: ").$this->states[$certificate->expected].'</i>';
451 451
                                 $cliinfo .= '<ul style="list-style-type: none;">';
452 452
                                 $level = $certificate->returncode;
453 453
                                 if ($level < 0) {
@@ -459,11 +459,11 @@  discard block
 block discarded – undo
459 459
                                         $state = _("Server accepted this client certificate");
460 460
                                     } else {
461 461
                                         if (property_exists($certificate, 'reason') && $certificate->reason == \core\diag\RADIUSTests::CERTPROB_UNKNOWN_CA) {
462
-                                            $add = '<br>' . _('You should update your list of accredited CAs') .
463
-                                                           ' <a href=\"' . \config\Diagnostics::RADIUSTESTS['accreditedCAsURL'] . '\">' .
464
-                                                            _('Get it from here.') . '</a>';
462
+                                            $add = '<br>'._('You should update your list of accredited CAs').
463
+                                                           ' <a href=\"'.\config\Diagnostics::RADIUSTESTS['accreditedCAsURL'].'\">'.
464
+                                                            _('Get it from here.').'</a>';
465 465
                                         }
466
-                                        $state = _('Server did not accept this client certificate - reason') . ': ' .
466
+                                        $state = _('Server did not accept this client certificate - reason').': '.
467 467
                                                     $certificate->resultcomment;
468 468
                                     }
469 469
                                 } else {
@@ -472,14 +472,14 @@  discard block
 block discarded – undo
472 472
                                         $state = _('Server accepted this client certificate, but should not have');
473 473
                                     } else {
474 474
                                        $level = \core\common\Entity::L_OK;
475
-                                       $state = _('Server did not accept this client certificate') . ': ' . $certificate->resultcomment;
475
+                                       $state = _('Server did not accept this client certificate').': '.$certificate->resultcomment;
476 476
                                     }
477 477
                                 }
478
-                                $cliinfo .= '<li><table><tbody><tr><td class="icon_td"><img class="icon" src="' . $this->stateIcons[$level] . '" style="width: 24px;"></td><td>' . $state;
479
-                                $cliinfo .= ' (' . sprintf(_('elapsed time: %sms.'), $certificate->time_millisec) . '&nbsp;) ' . $add . '</td></tr>';
478
+                                $cliinfo .= '<li><table><tbody><tr><td class="icon_td"><img class="icon" src="'.$this->stateIcons[$level].'" style="width: 24px;"></td><td>'.$state;
479
+                                $cliinfo .= ' ('.sprintf(_('elapsed time: %sms.'), $certificate->time_millisec).'&nbsp;) '.$add.'</td></tr>';
480 480
                                 $cliinfo .= '</tbody></table></ul></li>';
481 481
                                 if (property_exists($certificate, 'finalerror') && $certificate->finalerror == 1) {
482
-                                    $cliinfo = '<li>' . _('Rest of tests for this CA skipped') . '</li>';
482
+                                    $cliinfo = '<li>'._('Rest of tests for this CA skipped').'</li>';
483 483
                                 }
484 484
                             }
485 485
                             $clients_level = max($clients_level, $level);
@@ -488,7 +488,7 @@  discard block
 block discarded – undo
488 488
                                     
489 489
                         if ($srefused > 0) {
490 490
                             $cliinfo = _('Connection refused');
491
-                            $clientstest[] = "<table><tr><td class='icon_td' id='srcclient$hostindex_img'><img src='" . $this->stateIcons[\core\common\Entity::L_ERROR] . "'></td>" .
491
+                            $clientstest[] = "<table><tr><td class='icon_td' id='srcclient$hostindex_img'><img src='".$this->stateIcons[\core\common\Entity::L_ERROR]."'></td>".
492 492
                                      "<td id='srcclient$hostname'><p>$cliinfo</p></td></tr></table>";
493 493
                         } else {
494 494
                             $clientstest[] = "<p>$cliinfo</p>";
@@ -497,9 +497,9 @@  discard block
 block discarded – undo
497 497
                     $cliinfo .= '</ol>';
498 498
                 } else {
499 499
                     $clients_level = \core\common\Entity::L_WARN;
500
-                    $cliinfo = _('Test failed') ;
501
-                    $clientstest[] = "<table><tr><td class='icon_td' id='srcclient$hostindex_img'><img src='" .
502
-                                    $this->stateIcons[\core\common\Entity::L_WARN] . "'></td>" .
500
+                    $cliinfo = _('Test failed');
501
+                    $clientstest[] = "<table><tr><td class='icon_td' id='srcclient$hostindex_img'><img src='".
502
+                                    $this->stateIcons[\core\common\Entity::L_WARN]."'></td>".
503 503
                                     "<td id='srcclient$hostname'>$cliinfo</td></tr></table>";
504 504
                 }
505 505
             } else {
@@ -507,9 +507,9 @@  discard block
 block discarded – undo
507 507
                 $clientstest[] = "<table id='clientsresults$hostindex'  style='width:100%'>
508 508
 <tr>
509 509
 <td class='icon_td'><img src='";
510
-                $clientstest[] = $this->stateIcons[\core\common\Entity::L_ERROR] . "' id='srcclients" . $hostindex . "_img'></td>
510
+                $clientstest[] = $this->stateIcons[\core\common\Entity::L_ERROR]."' id='srcclients".$hostindex."_img'></td>
511 511
 <td id='srcclient$hostindex'>";
512
-                $clientstest[] =  _("These tests were skipped because of previous errors.") . '</td></tr></table></ul>';
512
+                $clientstest[] = _("These tests were skipped because of previous errors.").'</td></tr></table></ul>';
513 513
             }
514 514
             $clientstest[] = '</ol><p></p>';
515 515
         }
@@ -520,7 +520,7 @@  discard block
 block discarded – undo
520 520
     {
521 521
         $out = [];
522 522
         $out[] = "<div id='dynamic_tests'><fieldset class='option_container'>
523
-            <legend><strong>" . _("DYNAMIC connectivity tests") . "</strong></legend>";
523
+            <legend><strong>" . _("DYNAMIC connectivity tests")."</strong></legend>";
524 524
         
525 525
         if (count($this->rfc7585suite->NAPTR_hostname_records) > 0) {    
526 526
             $capathtest = $this->collectCAPath();
@@ -531,17 +531,17 @@  discard block
 block discarded – undo
531 531
             if ($this->globalLevelDynamic == \core\common\Entity::L_OK && !$this->areFailed) {
532 532
                 $out[] = 'none';
533 533
             }
534
-            $out[] = ';" id="dynamic_result_fail"><b>' . _("Some errors were found during the tests, see below") . '</b></div>';
534
+            $out[] = ';" id="dynamic_result_fail"><b>'._("Some errors were found during the tests, see below").'</b></div>';
535 535
             $out[] = '<div style="align:right; display: ';
536 536
             if ($this->globalLevelDynamic != \core\common\Entity::L_OK || $this->areFailed) {
537 537
                 $out[] = 'none';
538 538
             }
539
-            $out[] = '" id="dynamic_result_pass"><b>' .
540
-                                _("All tests passed, congratulations!") . '</b></div>' .
541
-                                '<div style="align:left;"><a href="" class="moreall"><i>' . _('Show detailed information for all tests') . '&raquo;</i></a></div>';
539
+            $out[] = '" id="dynamic_result_pass"><b>'.
540
+                                _("All tests passed, congratulations!").'</b></div>'.
541
+                                '<div style="align:left;"><a href="" class="moreall"><i>'._('Show detailed information for all tests').'&raquo;</i></a></div>';
542 542
             //print '<pre>'; print_r($clientstest); print '</pre>';
543 543
             $out[] = join('', $capathtest);
544
-            $out[] = '<span id="clientstest" style="display: ;"><p><hr><b>' . _('Checking if certificates from  CAs are accepted...') . '</b><p>' . _('A few client certificates will be tested to check if servers are resistant to some certificate problems.') . '<p>';
544
+            $out[] = '<span id="clientstest" style="display: ;"><p><hr><b>'._('Checking if certificates from  CAs are accepted...').'</b><p>'._('A few client certificates will be tested to check if servers are resistant to some certificate problems.').'<p>';
545 545
             $out[] = join('', $clientstest);
546 546
             $out[] = '</span>';
547 547
             $out[] = '</div>';
Please login to merge, or discard this patch.