Test Setup Failed
Push — master ( faa6f2...9eb532 )
by Maja
05:05
created
web/diag/action_realmcheck.php 1 patch
Spacing   +79 added lines, -79 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
 
@@ -66,13 +66,13 @@  discard block
 block discarded – undo
66 66
         $testsuite = new \core\diag\RADIUSTests($check_realm, $testedProfile->getRealmCheckOuterUsername(), $testedProfile->getEapMethodsinOrderOfPreference(1), $testedProfile->getCollapsedAttributes()['eap:server_name'], $testedProfile->getCollapsedAttributes()["eap:ca_file"]);
67 67
         $rfc7585suite = new \core\diag\RFC7585Tests($check_realm);
68 68
     } else {
69
-        $error_message = _("You asked for a realm check, but we don't know the realm for this profile!") . "</p>";
69
+        $error_message = _("You asked for a realm check, but we don't know the realm for this profile!")."</p>";
70 70
     }
71 71
 } else { // someone else's realm, and we don't know anything about it... only shallow checks
72 72
     $check_realm = $validator->realm($realm ?? $_SESSION['check_realm'] ?? "");
73 73
     if ($check_realm !== FALSE) {
74 74
         $_SESSION['check_realm'] = $check_realm;
75
-        $testsuite = new \core\diag\RADIUSTests($check_realm, "@" . $check_realm);
75
+        $testsuite = new \core\diag\RADIUSTests($check_realm, "@".$check_realm);
76 76
         $rfc7585suite = new \core\diag\RFC7585Tests($check_realm);
77 77
     } else {
78 78
         $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 ?>";
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
                         }
263 263
                     }
264 264
                     cliinfo = cliinfo + '<li><table><tbody><tr><td class="icon_td"><img class="icon" src="' + icons[level] + '" style="width: 24px;"></td><td>' + state;
265
-                    cliinfo = cliinfo + ' <?php echo "(" . sprintf(_("elapsed time: %sms."), "'+data.ca[key].certificate[c].time_millisec+'&nbsp;") . ")"; ?>' + add + '</td></tr>';
265
+                    cliinfo = cliinfo + ' <?php echo "(".sprintf(_("elapsed time: %sms."), "'+data.ca[key].certificate[c].time_millisec+'&nbsp;").")"; ?>' + add + '</td></tr>';
266 266
                     cliinfo = cliinfo + '</tbody></table></ul></li>';
267 267
                     if (data.ca[key].certificate[c].finalerror === 1) {
268 268
                         cliinfo = cliinfo + '<li>' + restskipped + '</li>';
@@ -465,8 +465,8 @@  discard block
 block discarded – undo
465 465
 <?php
466 466
 foreach (\config\Diagnostics::RADIUSTESTS['UDP-hosts'] as $hostindex => $host) {
467 467
     print "
468
-$(\"#live_src" . $hostindex . "_img\").attr('src',icon_loading);
469
-$(\"#live_src" . $hostindex . "_img\").show();
468
+$(\"#live_src" . $hostindex."_img\").attr('src',icon_loading);
469
+$(\"#live_src" . $hostindex."_img\").show();
470 470
 $.ajax({
471 471
     url: 'radius_tests.php?src=0&hostindex=$hostindex&realm='+realm,
472 472
     type: 'POST',
@@ -496,15 +496,15 @@  discard block
 block discarded – undo
496 496
 <?php
497 497
 foreach (\config\Diagnostics::RADIUSTESTS['UDP-hosts'] as $hostindex => $host) {
498 498
     if ($testedProfile !== NULL) {
499
-        $extraarg = "profile_id: " . $testedProfile->identifier . ", ";
499
+        $extraarg = "profile_id: ".$testedProfile->identifier.", ";
500 500
     } else {
501 501
         $extraarg = "";
502 502
     }
503 503
     print "
504
-$(\"#src" . $hostindex . "_img\").attr('src',icon_loading);
504
+$(\"#src" . $hostindex."_img\").attr('src',icon_loading);
505 505
 $(\"#src$hostindex\").html('');
506 506
 running_ajax_stat++;
507
-$.get('radius_tests.php',{test_type: 'udp', $extraarg realm: realm, src: $hostindex, lang: '" . $gui->languageInstance->getLang() . "', hostindex: '$hostindex'  }, udp, 'json');
507
+$.get('radius_tests.php',{test_type: 'udp', $extraarg realm: realm, src: $hostindex, lang: '".$gui->languageInstance->getLang()."', hostindex: '$hostindex'  }, udp, 'json');
508 508
 
509 509
 ";
510 510
 }
@@ -531,7 +531,7 @@  discard block
 block discarded – undo
531 531
     if ($check_realm === FALSE) {
532 532
         print "<p>$error_message</p>";
533 533
     } else {
534
-        print "<h1>" . sprintf(_("Realm testing for: %s"), $check_realm) . "</h1>\n";
534
+        print "<h1>".sprintf(_("Realm testing for: %s"), $check_realm)."</h1>\n";
535 535
         ?>
536 536
         <div id="debug_out" style="display: none"></div>
537 537
         <div id="tabs" style="min-width: 600px; max-width:1000px">
@@ -549,12 +549,12 @@  discard block
 block discarded – undo
549 549
                     </legend>
550 550
                     <?php
551 551
                     // NAPTR existence check
552
-                    echo "<strong>" . _("DNS checks") . "</strong><div>";
552
+                    echo "<strong>"._("DNS checks")."</strong><div>";
553 553
                     $naptr = $rfc7585suite->relevantNAPTR();
554 554
                     if ($naptr != \core\diag\RADIUSTests::RETVAL_NOTCONFIGURED) {
555 555
                         echo "<table>";
556 556
                         // output in friendly words
557
-                        echo "<tr><td>" . _("Checking NAPTR existence:") . "</td><td>";
557
+                        echo "<tr><td>"._("Checking NAPTR existence:")."</td><td>";
558 558
                         switch ($naptr) {
559 559
                             case \core\diag\RFC7585Tests::RETVAL_NONAPTR:
560 560
                                 echo _("This realm has no NAPTR records.");
@@ -569,7 +569,7 @@  discard block
 block discarded – undo
569 569
 
570 570
                         // compliance checks for NAPTRs
571 571
                         if ($naptr > 0) {
572
-                            echo "<tr><td>" . _("Checking NAPTR compliance (flag = S and regex = {empty}):") . "</td><td>";
572
+                            echo "<tr><td>"._("Checking NAPTR compliance (flag = S and regex = {empty}):")."</td><td>";
573 573
                             $naptr_valid = $rfc7585suite->relevantNAPTRcompliance();
574 574
                             switch ($naptr_valid) {
575 575
                                 case \core\diag\RADIUSTests::RETVAL_OK:
@@ -586,7 +586,7 @@  discard block
 block discarded – undo
586 586
 
587 587
                         if ($naptr > 0 && $naptr_valid == \core\diag\RADIUSTests::RETVAL_OK) {
588 588
                             $srv = $rfc7585suite->relevantNAPTRsrvResolution();
589
-                            echo "<tr><td>" . _("Checking SRVs:") . "</td><td>";
589
+                            echo "<tr><td>"._("Checking SRVs:")."</td><td>";
590 590
                             switch ($srv) {
591 591
                                 case \core\diag\RADIUSTests::RETVAL_SKIPPED:
592 592
                                     echo _("This check was skipped.");
@@ -602,7 +602,7 @@  discard block
 block discarded – undo
602 602
                         // IP addresses for the hosts
603 603
                         if ($naptr > 0 && $naptr_valid == \core\diag\RADIUSTests::RETVAL_OK && $srv > 0) {
604 604
                             $hosts = $rfc7585suite->relevantNAPTRhostnameResolution();
605
-                            echo "<tr><td>" . _("Checking IP address resolution:") . "</td><td>";
605
+                            echo "<tr><td>"._("Checking IP address resolution:")."</td><td>";
606 606
                             switch ($srv) {
607 607
                                 case \core\diag\RADIUSTests::RETVAL_SKIPPED:
608 608
                                     echo _("This check was skipped.");
@@ -618,12 +618,12 @@  discard block
 block discarded – undo
618 618
 
619 619
                         echo "</table><br/><br/>";
620 620
                         if (count($testsuite->listerrors()) == 0) {
621
-                            echo sprintf(_("Realm is <strong>%s</strong> "), _(($naptr > 0 ? "DYNAMIC" : "STATIC"))) . _("with no DNS errors encountered. Congratulations!");
621
+                            echo sprintf(_("Realm is <strong>%s</strong> "), _(($naptr > 0 ? "DYNAMIC" : "STATIC")))._("with no DNS errors encountered. Congratulations!");
622 622
                         } else {
623
-                            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.");
623
+                            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.");
624 624
                             echo "<div class='notacceptable'><table>";
625 625
                             foreach ($testsuite->listerrors() as $details) {
626
-                                echo "<tr><td>" . $details['TYPE'] . "</td><td>" . $details['TARGET'] . "</td></tr>";
626
+                                echo "<tr><td>".$details['TYPE']."</td><td>".$details['TARGET']."</td></tr>";
627 627
                             }
628 628
                             echo "</table></div>";
629 629
                         }
@@ -639,29 +639,29 @@  discard block
 block discarded – undo
639 639
                  $("#dynamic_tests").show();
640 640
               ';
641 641
                         foreach ($rfc7585suite->NAPTR_hostname_records as $hostindex => $addr) {
642
-                            $host = ($addr['family'] == "IPv6" ? "[" : "") . $addr['IP'] . ($addr['family'] == "IPv6" ? "]" : "") . ":" . $addr['port'];
642
+                            $host = ($addr['family'] == "IPv6" ? "[" : "").$addr['IP'].($addr['family'] == "IPv6" ? "]" : "").":".$addr['port'];
643 643
                             $expectedName = $addr['hostname'];
644 644
                             print "
645 645
                             running_ajax_dyn++;
646
-                            $.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'}); 
646
+                            $.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'}); 
647 647
                             running_ajax_dyn++;
648
-                            $.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'}); 
648
+                            $.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'}); 
649 649
                        ";
650 650
                         }
651 651
                         echo "}
652 652
               </script>";
653 653
                     } else {
654
-                        echo "<tr><td>" . _("Dynamic discovery test is not configured") . "</td><td>";
654
+                        echo "<tr><td>"._("Dynamic discovery test is not configured")."</td><td>";
655 655
                     }
656 656
 #### OpenRoaming
657 657
                     if (count($orrealm)) {
658
-                    echo "<br><strong>" . _("OpenRoaming DNS checks") . "</strong><div>";
658
+                    echo "<br><strong>"._("OpenRoaming DNS checks")."</strong><div>";
659 659
                     $dnsChecks = new \core\diag\RFC7585Tests($check_realm, "aaa+auth:radius.tls.tcp");
660 660
                     $ornaptr = $dnsChecks->relevantNAPTR();
661 661
                     if ($ornaptr != \core\diag\RADIUSTests::RETVAL_NOTCONFIGURED) {
662 662
                         echo "<table>";
663 663
                         // output in friendly words
664
-                        echo "<tr><td>" . _("Checking NAPTR existence:") . "</td><td>";
664
+                        echo "<tr><td>"._("Checking NAPTR existence:")."</td><td>";
665 665
                         switch ($ornaptr) {
666 666
                             case \core\diag\RFC7585Tests::RETVAL_NONAPTR:
667 667
                                 echo _("This realm has no NAPTR records.");
@@ -676,7 +676,7 @@  discard block
 block discarded – undo
676 676
 
677 677
                         // compliance checks for NAPTRs
678 678
                         if ($ornaptr > 0) {
679
-                            echo "<tr><td>" . _("Checking NAPTR compliance (flag = S and regex = {empty}):") . "</td><td>";
679
+                            echo "<tr><td>"._("Checking NAPTR compliance (flag = S and regex = {empty}):")."</td><td>";
680 680
                             $naptr_valid = $dnsChecks->relevantNAPTRcompliance();
681 681
                             switch ($naptr_valid) {
682 682
                                 case \core\diag\RADIUSTests::RETVAL_OK:
@@ -693,7 +693,7 @@  discard block
 block discarded – undo
693 693
 
694 694
                         if ($ornaptr > 0 && $naptr_valid == \core\diag\RADIUSTests::RETVAL_OK) {
695 695
                             $srv = $dnsChecks->relevantNAPTRsrvResolution();
696
-                            echo "<tr><td>" . _("Checking SRVs:") . "</td><td>";
696
+                            echo "<tr><td>"._("Checking SRVs:")."</td><td>";
697 697
                             switch ($srv) {
698 698
                                 case \core\diag\RADIUSTests::RETVAL_SKIPPED:
699 699
                                     echo _("This check was skipped.");
@@ -709,7 +709,7 @@  discard block
 block discarded – undo
709 709
                         // IP addresses for the hosts
710 710
                         if ($ornaptr > 0 && $naptr_valid == \core\diag\RADIUSTests::RETVAL_OK && $srv > 0) {
711 711
                             $hosts = $dnsChecks->relevantNAPTRhostnameResolution();
712
-                            echo "<tr><td>" . _("Checking IP address resolution:") . "</td><td>";
712
+                            echo "<tr><td>"._("Checking IP address resolution:")."</td><td>";
713 713
                             switch ($srv) {
714 714
                                 case \core\diag\RADIUSTests::RETVAL_SKIPPED:
715 715
                                     echo _("This check was skipped.");
@@ -726,7 +726,7 @@  discard block
 block discarded – undo
726 726
                         echo "</table><br/><br/>";
727 727
                         echo '</div>';
728 728
             foreach ($dnsChecks->NAPTR_hostname_records as $hostindex => $addr) {
729
-                            $host = ($addr['family'] == "IPv6" ? "[" : "") . $addr['IP'] . ($addr['family'] == "IPv6" ? "]" : "") . ":" . $addr['port'];
729
+                            $host = ($addr['family'] == "IPv6" ? "[" : "").$addr['IP'].($addr['family'] == "IPv6" ? "]" : "").":".$addr['port'];
730 730
                             $expectedName = $addr['hostname'];
731 731
             }
732 732
                         echo '<script type="text/javascript">
@@ -739,32 +739,32 @@  discard block
 block discarded – undo
739 739
                  $("#openroaming_tests").show();
740 740
               ';
741 741
                         foreach ($dnsChecks->NAPTR_hostname_records as $hostindex => $addr) {
742
-                            $host = ($addr['family'] == "IPv6" ? "[" : "") . $addr['IP'] . ($addr['family'] == "IPv6" ? "]" : "") . ":" . $addr['port'];
742
+                            $host = ($addr['family'] == "IPv6" ? "[" : "").$addr['IP'].($addr['family'] == "IPv6" ? "]" : "").":".$addr['port'];
743 743
                             $expectedName = $addr['hostname'];
744 744
                             print "
745 745
                             running_ajax_openroaming++;
746
-                            $.ajax({url:'radius_tests.php', data:{test_type: 'openroamingcapath', realm: realm, src: '$host', lang: '" . $gui->languageInstance->getLang() . "', hostindex: '$hostindex', expectedname: '$expectedName' }, error: eee, success: capath, dataType: 'json'}); 
746
+                            $.ajax({url:'radius_tests.php', data:{test_type: 'openroamingcapath', realm: realm, src: '$host', lang: '".$gui->languageInstance->getLang()."', hostindex: '$hostindex', expectedname: '$expectedName' }, error: eee, success: capath, dataType: 'json'}); 
747 747
                        ";
748 748
                         }
749 749
                         echo "}
750 750
               </script><hr>";
751 751
                     } else {
752
-                        echo "<tr><td>" . _("OpenRoaming connectivity test is not configured") . "</td><td>";
752
+                        echo "<tr><td>"._("OpenRoaming connectivity test is not configured")."</td><td>";
753 753
                     }
754 754
                     }
755 755
 #### OpenRoaming
756
-                    echo "<strong>" . _("Static connectivity tests") . "</strong>
756
+                    echo "<strong>"._("Static connectivity tests")."</strong>
757 757
          <table><tr>
758 758
          <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>
759 759
          </tr></table>";
760 760
                     if ($naptr > 0) {
761
-                        echo "<hr><strong>" . _("Dynamic connectivity tests") . "</strong>
761
+                        echo "<hr><strong>"._("Dynamic connectivity tests")."</strong>
762 762
          <table><tr>
763 763
          <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>
764 764
          </tr></table>";
765 765
                     }
766 766
                     if (count($orrealm)) {
767
-                      echo "<hr><strong>" . _("OpenRoaming connectivity tests") . "</strong>
767
+                      echo "<hr><strong>"._("OpenRoaming connectivity tests")."</strong>
768 768
          <table><tr>
769 769
          <td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='main_openroaming_ico' class='icon'></td><td id='main_openroaming_result' style='display:none'>&nbsp;</td>
770 770
          </tr></table>";
@@ -784,12 +784,12 @@  discard block
 block discarded – undo
784 784
                     print "<p>";
785 785
                     foreach (\config\Diagnostics::RADIUSTESTS['UDP-hosts'] as $hostindex => $host) {
786 786
                         print "<hr>";
787
-                        printf(_("Testing from: %s"), "<strong>" . \config\Diagnostics::RADIUSTESTS['UDP-hosts'][$hostindex]['display_name'] . "</strong>");
787
+                        printf(_("Testing from: %s"), "<strong>".\config\Diagnostics::RADIUSTESTS['UDP-hosts'][$hostindex]['display_name']."</strong>");
788 788
                         print "<table id='results$hostindex'  style='width:100%' class='udp_results'>
789 789
 <tr>
790
-<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='src" . $hostindex . "_img'></td>
790
+<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='src".$hostindex."_img'></td>
791 791
 <td id='src$hostindex' colspan=2>
792
-" . _("testing...") . "
792
+"._("testing...")."
793 793
 </td>
794 794
 </tr>
795 795
 </table>";
@@ -808,21 +808,21 @@  discard block
 block discarded – undo
808 808
 
809 809
                     <?php
810 810
                     echo "<div id='dynamic_tests'><fieldset class='option_container'>
811
-                <legend><strong>" . _("DYNAMIC connectivity tests") . "</strong></legend>";
811
+                <legend><strong>" . _("DYNAMIC connectivity tests")."</strong></legend>";
812 812
 
813 813
                     $resultstoprint = [];
814 814
                     if (count($rfc7585suite->NAPTR_hostname_records) > 0) {
815
-                        $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>';
816
-                        $resultstoprint[] = '<div style="align:right;"><a href="" class="moreall">' . _('Show detailed information for all tests') . '</a></div>' . '<p><strong>' . _("Checking server handshake...") . "</strong><p>";
815
+                        $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>';
816
+                        $resultstoprint[] = '<div style="align:right;"><a href="" class="moreall">'._('Show detailed information for all tests').'</a></div>'.'<p><strong>'._("Checking server handshake...")."</strong><p>";
817 817
                         foreach ($rfc7585suite->NAPTR_hostname_records as $hostindex => $addr) {
818
-                            $bracketaddr = ($addr["family"] == "IPv6" ? "[" . $addr["IP"] . "]" : $addr["IP"]);
819
-                            $resultstoprint[] = '<p><strong>' . $bracketaddr . ' TCP/' . $addr['port'] . '</strong>';
818
+                            $bracketaddr = ($addr["family"] == "IPv6" ? "[".$addr["IP"]."]" : $addr["IP"]);
819
+                            $resultstoprint[] = '<p><strong>'.$bracketaddr.' TCP/'.$addr['port'].'</strong>';
820 820
                             $resultstoprint[] = '<ul style="list-style-type: none;" class="caresult"><li>';
821 821
                             $resultstoprint[] = "<table id='caresults$hostindex'  style='width:100%'>
822 822
 <tr>
823
-<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='srcca" . $hostindex . "_img'></td>
823
+<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='srcca".$hostindex."_img'></td>
824 824
 <td id='srcca$hostindex'>
825
-" . _("testing...") . "
825
+"._("testing...")."
826 826
 </td>
827 827
 </tr>
828 828
 </table>";
@@ -830,12 +830,12 @@  discard block
 block discarded – undo
830 830
                         }
831 831
                         $clientstest = [];
832 832
                         foreach ($rfc7585suite->NAPTR_hostname_records as $hostindex => $addr) {
833
-                            $clientstest[] = '<p><strong>' . $addr['IP'] . ' TCP/' . $addr['port'] . '</strong></p><ol>';
833
+                            $clientstest[] = '<p><strong>'.$addr['IP'].' TCP/'.$addr['port'].'</strong></p><ol>';
834 834
                             $clientstest[] = "<span id='clientresults$hostindex$clinx'><table style='width:100%'>
835 835
 <tr>
836
-<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='srcclient" . $hostindex . "_img'></td>
836
+<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='srcclient".$hostindex."_img'></td>
837 837
 <td id='srcclient$hostindex'>
838
-" . _("testing...") . "
838
+"._("testing...")."
839 839
 </td>
840 840
 </tr>
841 841
 </table></span>";
@@ -843,7 +843,7 @@  discard block
 block discarded – undo
843 843
                         }
844 844
                         echo '<div style="align:right;">';
845 845
                         echo join('', $resultstoprint);
846
-                        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>';
846
+                        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>';
847 847
                         print join('', $clientstest);
848 848
                         echo '</span>';
849 849
                         echo '</div>';
@@ -860,17 +860,17 @@  discard block
 block discarded – undo
860 860
                     echo _("OpenRoaming connectivity tests").'</strong></legend>';
861 861
                     $resultstoprint = [];
862 862
                     if (count($dnsChecks->NAPTR_hostname_records) > 0) {
863
-                        $resultstoprint[] = '<div style="align:right; display: none;" id="openroaming_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>';
864
-                        $resultstoprint[] = '<div style="align:right;"><a href="" class="moreall">' . _('Show detailed information for all tests') . '</a></div>' . '<p><strong>' . _("Checking server handshake...") . "</strong><p>";
863
+                        $resultstoprint[] = '<div style="align:right; display: none;" id="openroaming_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>';
864
+                        $resultstoprint[] = '<div style="align:right;"><a href="" class="moreall">'._('Show detailed information for all tests').'</a></div>'.'<p><strong>'._("Checking server handshake...")."</strong><p>";
865 865
                         foreach ($dnsChecks->NAPTR_hostname_records as $hostindex => $addr) {
866
-                            $bracketaddr = ($addr["family"] == "IPv6" ? "[" . $addr["IP"] . "]" : $addr["IP"]);
867
-                            $resultstoprint[] = '<p><strong>' . $bracketaddr . ' TCP/' . $addr['port'] . '</strong>';
866
+                            $bracketaddr = ($addr["family"] == "IPv6" ? "[".$addr["IP"]."]" : $addr["IP"]);
867
+                            $resultstoprint[] = '<p><strong>'.$bracketaddr.' TCP/'.$addr['port'].'</strong>';
868 868
                             $resultstoprint[] = '<ul style="list-style-type: none;" class="caresult"><li>';
869 869
                             $resultstoprint[] = "<table id='openroamingcaresults$hostindex'  style='width:100%'>
870 870
 <tr>
871
-<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='openroamingsrcca" . $hostindex . "_img'></td>
871
+<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='openroamingsrcca".$hostindex."_img'></td>
872 872
 <td id='openroamingsrcca$hostindex'>
873
-" . _("testing...") . "
873
+"._("testing...")."
874 874
 </td>
875 875
 </tr>
876 876
 </table>";
@@ -878,20 +878,20 @@  discard block
 block discarded – undo
878 878
                         }
879 879
                         $clientstest = [];
880 880
                         foreach ($dnsChecks->NAPTR_hostname_records as $hostindex => $addr) {
881
-                            $clientstest[] = '<p><strong>' . $addr['IP'] . ' TCP/' . $addr['port'] . '</strong></p><ol>';
881
+                            $clientstest[] = '<p><strong>'.$addr['IP'].' TCP/'.$addr['port'].'</strong></p><ol>';
882 882
                             $clientstest[] = "<span id='openroamingclientresults$hostindex$clinx'><table style='width:100%'>
883 883
 <tr>
884
-<td class='icon_td'><!--<img src='../resources/images/icons/loading51.gif' id='openroamingsrcclient" . $hostindex . "_img'></td>
884
+<td class='icon_td'><!--<img src='../resources/images/icons/loading51.gif' id='openroamingsrcclient".$hostindex."_img'></td>
885 885
 <td id='srcclient$hostindex'>
886
-" . _("testing...") . "
887
--->" . _("not implemented yet") ."</td>
886
+"._("testing...")."
887
+-->" . _("not implemented yet")."</td>
888 888
 </tr>
889 889
 </table></span>";
890 890
                             $clientstest[] = '</ol>';
891 891
                         }
892 892
                         echo '<div style="align:right;">';
893 893
                         echo join('', $resultstoprint);
894
-                        echo '<span id="openroamingclientstest" 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>';
894
+                        echo '<span id="openroamingclientstest" 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>';
895 895
                         print join('', $clientstest);
896 896
                         echo '</span>';
897 897
                         echo '</div>';
@@ -905,7 +905,7 @@  discard block
 block discarded – undo
905 905
                 //     check if truncates/dies on Operator-Name
906 906
                 if ($my_profile !== NULL) {
907 907
                     echo "<div id='tabs-n'><fieldset class='option_container'>
908
-                <legend><strong>" . _("Live login test") . "</strong></legend>";
908
+                <legend><strong>" . _("Live login test")."</strong></legend>";
909 909
                     $prof_compl = $my_profile->getEapMethodsinOrderOfPreference(1);
910 910
                     if (count($prof_compl) > 0) {
911 911
                         $passwordReqired = FALSE;
@@ -918,34 +918,34 @@  discard block
 block discarded – undo
918 918
                                 $clientCertRequired = TRUE;
919 919
                             }
920 920
                         }
921
-                        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>
922
-                    <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>
923
-                    <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>
921
+                        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>
922
+                    <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>
923
+                    <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>
924 924
                     <form enctype='multipart/form-data' id='live_form' accept-charset='UTF-8'>
925 925
                     <input type='hidden' name='test_type' value='udp_login'>
926
-                    <input type='hidden' name='lang' value='" . $gui->languageInstance->getLang() . "'>
927
-                    <input type='hidden' name='profile_id' value='" . $my_profile->identifier . "'>
926
+                    <input type='hidden' name='lang' value='" . $gui->languageInstance->getLang()."'>
927
+                    <input type='hidden' name='profile_id' value='" . $my_profile->identifier."'>
928 928
                     <table id='live_tests'>";
929 929
 // if any password based EAP methods are available enable this section
930 930
                         if ($passwordReqired) {
931
-                            echo "<tr><td colspan='2'><strong>" . _("Password-based EAP types") . "</strong></td></tr>
932
-                        <tr><td>" . _("Real (inner) username:") . "</td><td><input type='text' id='username' class='mandatory' name='username'/></td></tr>";
933
-                            echo "<tr><td>" . _("Anonymous outer ID (optional):") . "</td><td><input type='text' id='outer_username' name='outer_username'/></td></tr>";
934
-                            echo "<tr><td>" . _("Password:") . "</td><td><input type='text' id='password' class='mandatory' name='password'/></td></tr>";
931
+                            echo "<tr><td colspan='2'><strong>"._("Password-based EAP types")."</strong></td></tr>
932
+                        <tr><td>" . _("Real (inner) username:")."</td><td><input type='text' id='username' class='mandatory' name='username'/></td></tr>";
933
+                            echo "<tr><td>"._("Anonymous outer ID (optional):")."</td><td><input type='text' id='outer_username' name='outer_username'/></td></tr>";
934
+                            echo "<tr><td>"._("Password:")."</td><td><input type='text' id='password' class='mandatory' name='password'/></td></tr>";
935 935
                         }
936 936
                         // ask for cert + privkey if TLS-based method is active
937 937
                         if ($clientCertRequired) {
938
-                            echo "<tr><td colspan='2'><strong>" . _("Certificate-based EAP types") . "</strong></td></tr>
939
-                        <tr><td>" . _("Certificate file (.p12 or .pfx):") . "</td><td><input type='file' id='cert' accept='application/x-pkcs12' name='cert'/></td></tr>
940
-                        <tr><td>" . _("Certificate password, if any:") . "</td><td><input type='text' id='privkey' name='privkey_pass'/></td></tr>
941
-                        <tr><td>" . _("Username, if different from certificate Subject:") . "</td><td><input type='text' id='tls_username' name='tls_username'/></td></tr>";
938
+                            echo "<tr><td colspan='2'><strong>"._("Certificate-based EAP types")."</strong></td></tr>
939
+                        <tr><td>" . _("Certificate file (.p12 or .pfx):")."</td><td><input type='file' id='cert' accept='application/x-pkcs12' name='cert'/></td></tr>
940
+                        <tr><td>" . _("Certificate password, if any:")."</td><td><input type='text' id='privkey' name='privkey_pass'/></td></tr>
941
+                        <tr><td>" . _("Username, if different from certificate Subject:")."</td><td><input type='text' id='tls_username' name='tls_username'/></td></tr>";
942 942
                         }
943
-                        echo "<tr><td colspan='2'><button id='submit_credentials'>" . _("Submit credentials") . "</button></td></tr></table></form>";
943
+                        echo "<tr><td colspan='2'><button id='submit_credentials'>"._("Submit credentials")."</button></td></tr></table></form>";
944 944
                         echo "<div id='live_login_results' style='display:none'>";
945 945
                         foreach (\config\Diagnostics::RADIUSTESTS['UDP-hosts'] as $hostindex => $host) {
946 946
                             print "<hr>";
947
-                            printf(_("Testing from: %s"), "<strong>" . \config\Diagnostics::RADIUSTESTS['UDP-hosts'][$hostindex]['display_name'] . "</strong>");
948
-                            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>";
947
+                            printf(_("Testing from: %s"), "<strong>".\config\Diagnostics::RADIUSTESTS['UDP-hosts'][$hostindex]['display_name']."</strong>");
948
+                            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>";
949 949
                             print "<div id='eap_test$hostindex' class='eap_test_results'></div>";
950 950
                         }
951 951
                         echo "</div>";
@@ -960,9 +960,9 @@  discard block
 block discarded – undo
960 960
             }
961 961
 
962 962
             if (isset($_POST['comefrom'])) {
963
-                $return = htmlspecialchars_decode($_POST['comefrom']) . ( $inst_id ? "?inst_id=" . $inst_id : "" );
963
+                $return = htmlspecialchars_decode($_POST['comefrom']).($inst_id ? "?inst_id=".$inst_id : "");
964 964
                 echo "<form method='post' action='$return' accept-charset='UTF-8'>
965
-                    <button type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_CLOSE . "'>" . sprintf(_("Return to %s administrator area"), core\common\Entity::$nomenclature_inst) . "</button>"
965
+                    <button type='submit' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_CLOSE."'>".sprintf(_("Return to %s administrator area"), core\common\Entity::$nomenclature_inst)."</button>"
966 966
                 . "</form>";
967 967
             }
968 968
             if ($check_realm !== FALSE) {
Please login to merge, or discard this patch.