Test Setup Failed
Push — master ( 9eb532...fb4178 )
by Maja
07:13
created
web/diag/action_realmcheck.php 3 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -566,9 +566,9 @@  discard block
 block discarded – undo
566 566
                     $naptr = $rfc7585suite->relevantNAPTR();
567 567
                     if ($naptr == \core\diag\RADIUSTests::RETVAL_NOTCONFIGURED) {
568 568
                         if ($dynType == "") {
569
-                        	echo "<tr><td>" . _("Dynamic discovery test is not configured") . "</td><td>";
569
+                            echo "<tr><td>" . _("Dynamic discovery test is not configured") . "</td><td>";
570 570
                         } else {
571
-                        	echo "<tr><td>" . _("OpenRoaming connectivity test is not configured") . "</td><td>";
571
+                            echo "<tr><td>" . _("OpenRoaming connectivity test is not configured") . "</td><td>";
572 572
                         }
573 573
                     } else {
574 574
                         echo "<table>";
@@ -672,7 +672,7 @@  discard block
 block discarded – undo
672 672
                         echo "}
673 673
               </script>";
674 674
                         } else {
675
-                   echo ' 
675
+                    echo ' 
676 676
               function run_openroaming() {
677 677
                  running_ajax_openroaming = 0;
678 678
                  $("#main_openroaming_ico").attr("src",icon_loading);
@@ -705,7 +705,7 @@  discard block
 block discarded – undo
705 705
          </tr></table>";
706 706
                     }
707 707
                     if (count($orrealm)) {
708
-                      echo "<hr><strong>" . _("OpenRoaming connectivity tests") . "</strong>
708
+                        echo "<hr><strong>" . _("OpenRoaming connectivity tests") . "</strong>
709 709
          <table><tr>
710 710
          <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>
711 711
          </tr></table>";
@@ -743,10 +743,10 @@  discard block
 block discarded – undo
743 743
             <?php
744 744
             for ($i=3; $i<5; $i++) {
745 745
                 if ($i == 3 && $naptr == 0) {
746
-                   continue;
746
+                    continue;
747 747
                 }
748 748
                 if ($i == 4 && count($orrealm) == 0) {
749
-                   continue;
749
+                    continue;
750 750
                 }
751 751
                 if ($i == 3) {
752 752
                     $rfc7585suite = $dnsChecks;
@@ -763,16 +763,16 @@  discard block
 block discarded – undo
763 763
                     echo "_tests'><fieldset class='option_container'>
764 764
                 <legend><strong>";
765 765
                     if ($i==3) {
766
-                     echo _("DYNAMIC connectivity tests");
766
+                        echo _("DYNAMIC connectivity tests");
767 767
                     } else {
768
-                     echo _("OpenRoaming connectivity tests");
768
+                        echo _("OpenRoaming connectivity tests");
769 769
                     }
770 770
                     echo  "</strong></legend>";
771 771
                     $prefix1 = 'dynamic';
772 772
                     $prefix2 = '';
773 773
                     if ($i == 4) {
774
-                    	$prefix1 = 'openroaming';
775
-                    	$prefix2 = $prefix1;
774
+                        $prefix1 = 'openroaming';
775
+                        $prefix2 = $prefix1;
776 776
                     }
777 777
                     $resultstoprint = [];
778 778
                     if (count($rfc7585suite->NAPTR_hostname_records) > 0) {
Please login to merge, or discard this patch.
Spacing   +74 added lines, -74 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
 
@@ -69,13 +69,13 @@  discard block
 block discarded – undo
69 69
             $dnsChecksOR = new \core\diag\RFC7585Tests($check_realm, "aaa+auth:radius.tls.tcp");
70 70
         }
71 71
     } else {
72
-        $error_message = _("You asked for a realm check, but we don't know the realm for this profile!") . "</p>";
72
+        $error_message = _("You asked for a realm check, but we don't know the realm for this profile!")."</p>";
73 73
     }
74 74
 } else { // someone else's realm, and we don't know anything about it... only shallow checks
75 75
     $check_realm = $validator->realm($realm ?? $_SESSION['check_realm'] ?? "");
76 76
     if ($check_realm !== FALSE) {
77 77
         $_SESSION['check_realm'] = $check_realm;
78
-        $testsuite = new \core\diag\RADIUSTests($check_realm, "@" . $check_realm);
78
+        $testsuite = new \core\diag\RADIUSTests($check_realm, "@".$check_realm);
79 79
         $dnsChecks = new \core\diag\RFC7585Tests($check_realm);
80 80
     } else {
81 81
         $error_message = _("No valid realm name given, cannot execute any checks!");
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
     var listofcas = "<?php echo _("You should update your list of accredited CAs") ?>";
123 123
     var getitfrom = "<?php echo _("Get it from here.") ?>";
124 124
     var listsource = "<?php echo \config\Diagnostics::RADIUSTESTS['accreditedCAsURL'] ?>";
125
-    var moretext = "<?php echo _("more") . "&raquo;" ?>";
125
+    var moretext = "<?php echo _("more")."&raquo;" ?>";
126 126
     var lesstext = "<?php echo "&laquo" ?>";
127 127
     var morealltext = "<?php echo _("Show detailed information for all tests") ?>";
128 128
     var unknownca_code = "<?php echo \core\diag\RADIUSTests::CERTPROB_UNKNOWN_CA ?>";
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
                         }
266 266
                     }
267 267
                     cliinfo = cliinfo + '<li><table><tbody><tr><td class="icon_td"><img class="icon" src="' + icons[level] + '" style="width: 24px;"></td><td>' + state;
268
-                    cliinfo = cliinfo + ' <?php echo "(" . sprintf(_("elapsed time: %sms."), "'+data.ca[key].certificate[c].time_millisec+'&nbsp;") . ")"; ?>' + add + '</td></tr>';
268
+                    cliinfo = cliinfo + ' <?php echo "(".sprintf(_("elapsed time: %sms."), "'+data.ca[key].certificate[c].time_millisec+'&nbsp;").")"; ?>' + add + '</td></tr>';
269 269
                     cliinfo = cliinfo + '</tbody></table></ul></li>';
270 270
                     if (data.ca[key].certificate[c].finalerror === 1) {
271 271
                         cliinfo = cliinfo + '<li>' + restskipped + '</li>';
@@ -468,8 +468,8 @@  discard block
 block discarded – undo
468 468
 <?php
469 469
 foreach (\config\Diagnostics::RADIUSTESTS['UDP-hosts'] as $hostindex => $host) {
470 470
     print "
471
-$(\"#live_src" . $hostindex . "_img\").attr('src',icon_loading);
472
-$(\"#live_src" . $hostindex . "_img\").show();
471
+$(\"#live_src" . $hostindex."_img\").attr('src',icon_loading);
472
+$(\"#live_src" . $hostindex."_img\").show();
473 473
 $.ajax({
474 474
     url: 'radius_tests.php?src=0&hostindex=$hostindex&realm='+realm,
475 475
     type: 'POST',
@@ -499,15 +499,15 @@  discard block
 block discarded – undo
499 499
 <?php
500 500
 foreach (\config\Diagnostics::RADIUSTESTS['UDP-hosts'] as $hostindex => $host) {
501 501
     if ($testedProfile !== NULL) {
502
-        $extraarg = "profile_id: " . $testedProfile->identifier . ", ";
502
+        $extraarg = "profile_id: ".$testedProfile->identifier.", ";
503 503
     } else {
504 504
         $extraarg = "";
505 505
     }
506 506
     print "
507
-$(\"#src" . $hostindex . "_img\").attr('src',icon_loading);
507
+$(\"#src" . $hostindex."_img\").attr('src',icon_loading);
508 508
 $(\"#src$hostindex\").html('');
509 509
 running_ajax_stat++;
510
-$.get('radius_tests.php',{test_type: 'udp', $extraarg realm: realm, src: $hostindex, lang: '" . $gui->languageInstance->getLang() . "', hostindex: '$hostindex'  }, udp, 'json');
510
+$.get('radius_tests.php',{test_type: 'udp', $extraarg realm: realm, src: $hostindex, lang: '".$gui->languageInstance->getLang()."', hostindex: '$hostindex'  }, udp, 'json');
511 511
 
512 512
 ";
513 513
 }
@@ -534,7 +534,7 @@  discard block
 block discarded – undo
534 534
     if ($check_realm === FALSE) {
535 535
         print "<p>$error_message</p>";
536 536
     } else {
537
-        print "<h1>" . sprintf(_("Realm testing for: %s"), $check_realm) . "</h1>\n";
537
+        print "<h1>".sprintf(_("Realm testing for: %s"), $check_realm)."</h1>\n";
538 538
         ?>
539 539
         <div id="debug_out" style="display: none"></div>
540 540
         <div id="tabs" style="min-width: 600px; max-width:1000px">
@@ -555,25 +555,25 @@  discard block
 block discarded – undo
555 555
                     // NAPTR existence check
556 556
                     if ($dynType == "") {
557 557
                         $rfc7585suite = $dnsChecks;
558
-                        echo "<strong>" . _("DNS checks") . "</strong><div>";
558
+                        echo "<strong>"._("DNS checks")."</strong><div>";
559 559
                     } else {
560 560
                         if (count($orrealm) == 0) {
561 561
                             continue;
562 562
                         }
563 563
                         $rfc7585suite = $dnsChecksOR;
564
-                        echo "<strong>" . _("OpenRoaming DNS checks") . "</strong><div>";
564
+                        echo "<strong>"._("OpenRoaming DNS checks")."</strong><div>";
565 565
                     }
566 566
                     $naptr = $rfc7585suite->relevantNAPTR();
567 567
                     if ($naptr == \core\diag\RADIUSTests::RETVAL_NOTCONFIGURED) {
568 568
                         if ($dynType == "") {
569
-                        	echo "<tr><td>" . _("Dynamic discovery test is not configured") . "</td><td>";
569
+                        	echo "<tr><td>"._("Dynamic discovery test is not configured")."</td><td>";
570 570
                         } else {
571
-                        	echo "<tr><td>" . _("OpenRoaming connectivity test is not configured") . "</td><td>";
571
+                        	echo "<tr><td>"._("OpenRoaming connectivity test is not configured")."</td><td>";
572 572
                         }
573 573
                     } else {
574 574
                         echo "<table>";
575 575
                         // output in friendly words
576
-                        echo "<tr><td>" . _("Checking NAPTR existence:") . "</td><td>";
576
+                        echo "<tr><td>"._("Checking NAPTR existence:")."</td><td>";
577 577
                         switch ($naptr) {
578 578
                             case \core\diag\RFC7585Tests::RETVAL_NONAPTR:
579 579
                                 echo _("This realm has no NAPTR records.");
@@ -588,7 +588,7 @@  discard block
 block discarded – undo
588 588
 
589 589
                         // compliance checks for NAPTRs
590 590
                         if ($naptr > 0) {
591
-                            echo "<tr><td>" . _("Checking NAPTR compliance (flag = S and regex = {empty}):") . "</td><td>";
591
+                            echo "<tr><td>"._("Checking NAPTR compliance (flag = S and regex = {empty}):")."</td><td>";
592 592
                             $naptr_valid = $rfc7585suite->relevantNAPTRcompliance();
593 593
                             switch ($naptr_valid) {
594 594
                                 case \core\diag\RADIUSTests::RETVAL_OK:
@@ -603,7 +603,7 @@  discard block
 block discarded – undo
603 603
                         // SRV resolution
604 604
                         if ($naptr > 0 && $naptr_valid == \core\diag\RADIUSTests::RETVAL_OK) {
605 605
                             $srv = $rfc7585suite->relevantNAPTRsrvResolution();
606
-                            echo "<tr><td>" . _("Checking SRVs:") . "</td><td>";
606
+                            echo "<tr><td>"._("Checking SRVs:")."</td><td>";
607 607
                             switch ($srv) {
608 608
                                 case \core\diag\RADIUSTests::RETVAL_SKIPPED:
609 609
                                     echo _("This check was skipped.");
@@ -619,7 +619,7 @@  discard block
 block discarded – undo
619 619
                         // IP addresses for the hosts
620 620
                         if ($naptr > 0 && $naptr_valid == \core\diag\RADIUSTests::RETVAL_OK && $srv > 0) {
621 621
                             $hosts = $rfc7585suite->relevantNAPTRhostnameResolution();
622
-                            echo "<tr><td>" . _("Checking IP address resolution:") . "</td><td>";
622
+                            echo "<tr><td>"._("Checking IP address resolution:")."</td><td>";
623 623
                             switch ($srv) {
624 624
                                 case \core\diag\RADIUSTests::RETVAL_SKIPPED:
625 625
                                     echo _("This check was skipped.");
@@ -636,12 +636,12 @@  discard block
 block discarded – undo
636 636
                         echo "</table><br/>";
637 637
                         if ($dynType == "") {
638 638
                             if (count($testsuite->listerrors()) == 0) {
639
-                                echo sprintf(_("Realm is <strong>%s</strong> "), _(($naptr > 0 ? "DYNAMIC" : "STATIC"))) . _("with no DNS errors encountered. Congratulations!");
639
+                                echo sprintf(_("Realm is <strong>%s</strong> "), _(($naptr > 0 ? "DYNAMIC" : "STATIC")))._("with no DNS errors encountered. Congratulations!");
640 640
                             } else {
641
-                                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.");
641
+                                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.");
642 642
                                 echo "<div class='notacceptable'><table>";
643 643
                                 foreach ($testsuite->listerrors() as $details) {
644
-                                    echo "<tr><td>" . $details['TYPE'] . "</td><td>" . $details['TARGET'] . "</td></tr>";
644
+                                    echo "<tr><td>".$details['TYPE']."</td><td>".$details['TARGET']."</td></tr>";
645 645
                                 }
646 646
                                 echo "</table></div>";
647 647
                             }
@@ -660,13 +660,13 @@  discard block
 block discarded – undo
660 660
                  $("#dynamic_tests").show();
661 661
               ';
662 662
                         foreach ($rfc7585suite->NAPTR_hostname_records as $hostindex => $addr) {
663
-                            $host = ($addr['family'] == "IPv6" ? "[" : "") . $addr['IP'] . ($addr['family'] == "IPv6" ? "]" : "") . ":" . $addr['port'];
663
+                            $host = ($addr['family'] == "IPv6" ? "[" : "").$addr['IP'].($addr['family'] == "IPv6" ? "]" : "").":".$addr['port'];
664 664
                             $expectedName = $addr['hostname'];
665 665
                             print "
666 666
                             running_ajax_dyn++;
667
-                            $.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'}); 
667
+                            $.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'}); 
668 668
                             running_ajax_dyn++;
669
-                            $.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'}); 
669
+                            $.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'}); 
670 670
                        ";
671 671
                         }
672 672
                         echo "}
@@ -682,11 +682,11 @@  discard block
 block discarded – undo
682 682
                  $("#openroaming_tests").show();
683 683
               ';
684 684
                         foreach ($rfc7585suite->NAPTR_hostname_records as $hostindex => $addr) {
685
-                            $host = ($addr['family'] == "IPv6" ? "[" : "") . $addr['IP'] . ($addr['family'] == "IPv6" ? "]" : "") . ":" . $addr['port'];
685
+                            $host = ($addr['family'] == "IPv6" ? "[" : "").$addr['IP'].($addr['family'] == "IPv6" ? "]" : "").":".$addr['port'];
686 686
                             $expectedName = $addr['hostname'];
687 687
                             print "
688 688
                             running_ajax_openroaming++;
689
-                            $.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'}); 
689
+                            $.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'}); 
690 690
                        ";
691 691
                         }
692 692
                         echo "}
@@ -694,18 +694,18 @@  discard block
 block discarded – undo
694 694
                         } 
695 695
                     }
696 696
                 }
697
-                    echo "<strong>" . _("Static connectivity tests") . "</strong>
697
+                    echo "<strong>"._("Static connectivity tests")."</strong>
698 698
          <table><tr>
699 699
          <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>
700 700
          </tr></table>";
701 701
                     if ($naptr > 0) {
702
-                        echo "<hr><strong>" . _("Dynamic connectivity tests") . "</strong>
702
+                        echo "<hr><strong>"._("Dynamic connectivity tests")."</strong>
703 703
          <table><tr>
704 704
          <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>
705 705
          </tr></table>";
706 706
                     }
707 707
                     if (count($orrealm)) {
708
-                      echo "<hr><strong>" . _("OpenRoaming connectivity tests") . "</strong>
708
+                      echo "<hr><strong>"._("OpenRoaming connectivity tests")."</strong>
709 709
          <table><tr>
710 710
          <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>
711 711
          </tr></table>";
@@ -725,12 +725,12 @@  discard block
 block discarded – undo
725 725
                     print "<p>";
726 726
                     foreach (\config\Diagnostics::RADIUSTESTS['UDP-hosts'] as $hostindex => $host) {
727 727
                         print "<hr>";
728
-                        printf(_("Testing from: %s"), "<strong>" . \config\Diagnostics::RADIUSTESTS['UDP-hosts'][$hostindex]['display_name'] . "</strong>");
728
+                        printf(_("Testing from: %s"), "<strong>".\config\Diagnostics::RADIUSTESTS['UDP-hosts'][$hostindex]['display_name']."</strong>");
729 729
                         print "<table id='results$hostindex'  style='width:100%' class='udp_results'>
730 730
 <tr>
731
-<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='src" . $hostindex . "_img'></td>
731
+<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='src".$hostindex."_img'></td>
732 732
 <td id='src$hostindex' colspan=2>
733
-" . _("testing...") . "
733
+"._("testing...")."
734 734
 </td>
735 735
 </tr>
736 736
 </table>";
@@ -741,7 +741,7 @@  discard block
 block discarded – undo
741 741
 
742 742
             </div>
743 743
             <?php
744
-            for ($i=3; $i<5; $i++) {
744
+            for ($i = 3; $i < 5; $i++) {
745 745
                 if ($i == 3 && $naptr == 0) {
746 746
                    continue;
747 747
                 }
@@ -754,15 +754,15 @@  discard block
 block discarded – undo
754 754
                     $rfc7585suite = $dnsChecksOR;
755 755
                 }
756 756
             ?>
757
-                <div id="tabs-<?php echo $i;?>">
758
-                    <button id="run_<?php if ($i==3) echo 'd'; else echo 'o';?>_tests"; onclick="run_<?php if ($i==3) echo 'dynamic'; else echo 'openroaming';?>()"><?php if ($i==3) echo _("Repeat dynamic connectivity tests"); else echo _("Repeat OpenRoaming connectivity tests");?></button>
757
+                <div id="tabs-<?php echo $i; ?>">
758
+                    <button id="run_<?php if ($i == 3) echo 'd'; else echo 'o'; ?>_tests"; onclick="run_<?php if ($i == 3) echo 'dynamic'; else echo 'openroaming'; ?>()"><?php if ($i == 3) echo _("Repeat dynamic connectivity tests"); else echo _("Repeat OpenRoaming connectivity tests"); ?></button>
759 759
 
760 760
                 <?php
761 761
                     echo "<div id='";
762
-                    if ($i==3) { echo 'dynamic'; } else { echo 'openroaming'; }
762
+                    if ($i == 3) { echo 'dynamic'; } else { echo 'openroaming'; }
763 763
                     echo "_tests'><fieldset class='option_container'>
764 764
                 <legend><strong>";
765
-                    if ($i==3) {
765
+                    if ($i == 3) {
766 766
                      echo _("DYNAMIC connectivity tests");
767 767
                     } else {
768 768
                      echo _("OpenRoaming connectivity tests");
@@ -776,17 +776,17 @@  discard block
 block discarded – undo
776 776
                     }
777 777
                     $resultstoprint = [];
778 778
                     if (count($rfc7585suite->NAPTR_hostname_records) > 0) {
779
-                        $resultstoprint[] = '<div style="align:right; display: none;" id="' . $prefix1 . '_result_fail">' . _("Some errors were found during the tests, see below") . '</div><div style="align:right; display: none;" id="' . $prefix1 . '_result_pass">' . _("All tests passed, congratulations!") . '</div>';
780
-                        $resultstoprint[] = '<div style="align:right;"><a href="" class="moreall">' . _('Show detailed information for all tests') . '</a></div>' . '<p><strong>' . _("Checking server handshake...") . "</strong><p>";
779
+                        $resultstoprint[] = '<div style="align:right; display: none;" id="'.$prefix1.'_result_fail">'._("Some errors were found during the tests, see below").'</div><div style="align:right; display: none;" id="'.$prefix1.'_result_pass">'._("All tests passed, congratulations!").'</div>';
780
+                        $resultstoprint[] = '<div style="align:right;"><a href="" class="moreall">'._('Show detailed information for all tests').'</a></div>'.'<p><strong>'._("Checking server handshake...")."</strong><p>";
781 781
                         foreach ($rfc7585suite->NAPTR_hostname_records as $hostindex => $addr) {
782
-                            $bracketaddr = ($addr["family"] == "IPv6" ? "[" . $addr["IP"] . "]" : $addr["IP"]);
783
-                            $resultstoprint[] = '<p><strong>' . $bracketaddr . ' TCP/' . $addr['port'] . '</strong>';
782
+                            $bracketaddr = ($addr["family"] == "IPv6" ? "[".$addr["IP"]."]" : $addr["IP"]);
783
+                            $resultstoprint[] = '<p><strong>'.$bracketaddr.' TCP/'.$addr['port'].'</strong>';
784 784
                             $resultstoprint[] = '<ul style="list-style-type: none;" class="caresult"><li>';
785
-                            $resultstoprint[] = "<table id='" . $prefix2 . "caresults$hostindex'  style='width:100%'>
785
+                            $resultstoprint[] = "<table id='".$prefix2."caresults$hostindex'  style='width:100%'>
786 786
 <tr>
787
-<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='" . $prefix2 . "srcca$hostindex" . "_img'></td>
788
-<td id='" . $prefix2 . "srcca$hostindex'>
789
-" . _("testing...") . "
787
+<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='".$prefix2."srcca$hostindex"."_img'></td>
788
+<td id='" . $prefix2."srcca$hostindex'>
789
+"._("testing...")."
790 790
 </td>
791 791
 </tr>
792 792
 </table>";
@@ -794,26 +794,26 @@  discard block
 block discarded – undo
794 794
                         }
795 795
                         $clientstest = [];
796 796
                         foreach ($rfc7585suite->NAPTR_hostname_records as $hostindex => $addr) {
797
-                            $clientstest[] = '<p><strong>' . $addr['IP'] . ' TCP/' . $addr['port'] . '</strong></p><ol>';
798
-                            $clientstest[] = "<span id='" . $prefix2 . "clientresults$hostindex$clinx'><table style='width:100%'>
797
+                            $clientstest[] = '<p><strong>'.$addr['IP'].' TCP/'.$addr['port'].'</strong></p><ol>';
798
+                            $clientstest[] = "<span id='".$prefix2."clientresults$hostindex$clinx'><table style='width:100%'>
799 799
 <tr>
800 800
 <td class='icon_td'>";
801
-                            if ($i == 4 ) {
801
+                            if ($i == 4) {
802 802
                                 $clientstest[] = "<!--";
803 803
                             }
804
-                            $clientstest[] = "<img src='../resources/images/icons/loading51.gif' id='" . $prefix2 . "srcclient$hostindex" . "_img'></td>
805
-<td id='" . $prefix2 . "srcclient$hostindex'>
806
-" . _("testing...");
804
+                            $clientstest[] = "<img src='../resources/images/icons/loading51.gif' id='".$prefix2."srcclient$hostindex"."_img'></td>
805
+<td id='" . $prefix2."srcclient$hostindex'>
806
+"._("testing...");
807 807
 
808
-                            if ($i == 4 ) {
809
-                                $clientstest[] = "-->" . _("not implemented yet");
808
+                            if ($i == 4) {
809
+                                $clientstest[] = "-->"._("not implemented yet");
810 810
                             }
811 811
                             $clientstest[] = "</td></tr></table></span>";
812 812
                             $clientstest[] = '</ol>';
813 813
                         }
814 814
                         echo '<div style="align:right;">';
815 815
                         echo join('', $resultstoprint);
816
-                        echo '<span id="' . $prefix2 . '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>';
816
+                        echo '<span id="'.$prefix2.'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>';
817 817
                         print join('', $clientstest);
818 818
                         echo '</span>';
819 819
                         echo '</div>';
@@ -827,7 +827,7 @@  discard block
 block discarded – undo
827 827
                 //     check if truncates/dies on Operator-Name
828 828
                 if ($my_profile !== NULL) {
829 829
                     echo "<div id='tabs-n'><fieldset class='option_container'>
830
-                <legend><strong>" . _("Live login test") . "</strong></legend>";
830
+                <legend><strong>" . _("Live login test")."</strong></legend>";
831 831
                     $prof_compl = $my_profile->getEapMethodsinOrderOfPreference(1);
832 832
                     if (count($prof_compl) > 0) {
833 833
                         $passwordReqired = FALSE;
@@ -840,34 +840,34 @@  discard block
 block discarded – undo
840 840
                                 $clientCertRequired = TRUE;
841 841
                             }
842 842
                         }
843
-                        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>
844
-                    <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>
845
-                    <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>
843
+                        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>
844
+                    <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>
845
+                    <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>
846 846
                     <form enctype='multipart/form-data' id='live_form' accept-charset='UTF-8'>
847 847
                     <input type='hidden' name='test_type' value='udp_login'>
848
-                    <input type='hidden' name='lang' value='" . $gui->languageInstance->getLang() . "'>
849
-                    <input type='hidden' name='profile_id' value='" . $my_profile->identifier . "'>
848
+                    <input type='hidden' name='lang' value='" . $gui->languageInstance->getLang()."'>
849
+                    <input type='hidden' name='profile_id' value='" . $my_profile->identifier."'>
850 850
                     <table id='live_tests'>";
851 851
 // if any password based EAP methods are available enable this section
852 852
                         if ($passwordReqired) {
853
-                            echo "<tr><td colspan='2'><strong>" . _("Password-based EAP types") . "</strong></td></tr>
854
-                        <tr><td>" . _("Real (inner) username:") . "</td><td><input type='text' id='username' class='mandatory' name='username'/></td></tr>";
855
-                            echo "<tr><td>" . _("Anonymous outer ID (optional):") . "</td><td><input type='text' id='outer_username' name='outer_username'/></td></tr>";
856
-                            echo "<tr><td>" . _("Password:") . "</td><td><input type='text' id='password' class='mandatory' name='password'/></td></tr>";
853
+                            echo "<tr><td colspan='2'><strong>"._("Password-based EAP types")."</strong></td></tr>
854
+                        <tr><td>" . _("Real (inner) username:")."</td><td><input type='text' id='username' class='mandatory' name='username'/></td></tr>";
855
+                            echo "<tr><td>"._("Anonymous outer ID (optional):")."</td><td><input type='text' id='outer_username' name='outer_username'/></td></tr>";
856
+                            echo "<tr><td>"._("Password:")."</td><td><input type='text' id='password' class='mandatory' name='password'/></td></tr>";
857 857
                         }
858 858
                         // ask for cert + privkey if TLS-based method is active
859 859
                         if ($clientCertRequired) {
860
-                            echo "<tr><td colspan='2'><strong>" . _("Certificate-based EAP types") . "</strong></td></tr>
861
-                        <tr><td>" . _("Certificate file (.p12 or .pfx):") . "</td><td><input type='file' id='cert' accept='application/x-pkcs12' name='cert'/></td></tr>
862
-                        <tr><td>" . _("Certificate password, if any:") . "</td><td><input type='text' id='privkey' name='privkey_pass'/></td></tr>
863
-                        <tr><td>" . _("Username, if different from certificate Subject:") . "</td><td><input type='text' id='tls_username' name='tls_username'/></td></tr>";
860
+                            echo "<tr><td colspan='2'><strong>"._("Certificate-based EAP types")."</strong></td></tr>
861
+                        <tr><td>" . _("Certificate file (.p12 or .pfx):")."</td><td><input type='file' id='cert' accept='application/x-pkcs12' name='cert'/></td></tr>
862
+                        <tr><td>" . _("Certificate password, if any:")."</td><td><input type='text' id='privkey' name='privkey_pass'/></td></tr>
863
+                        <tr><td>" . _("Username, if different from certificate Subject:")."</td><td><input type='text' id='tls_username' name='tls_username'/></td></tr>";
864 864
                         }
865
-                        echo "<tr><td colspan='2'><button id='submit_credentials'>" . _("Submit credentials") . "</button></td></tr></table></form>";
865
+                        echo "<tr><td colspan='2'><button id='submit_credentials'>"._("Submit credentials")."</button></td></tr></table></form>";
866 866
                         echo "<div id='live_login_results' style='display:none'>";
867 867
                         foreach (\config\Diagnostics::RADIUSTESTS['UDP-hosts'] as $hostindex => $host) {
868 868
                             print "<hr>";
869
-                            printf(_("Testing from: %s"), "<strong>" . \config\Diagnostics::RADIUSTESTS['UDP-hosts'][$hostindex]['display_name'] . "</strong>");
870
-                            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>";
869
+                            printf(_("Testing from: %s"), "<strong>".\config\Diagnostics::RADIUSTESTS['UDP-hosts'][$hostindex]['display_name']."</strong>");
870
+                            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>";
871 871
                             print "<div id='eap_test$hostindex' class='eap_test_results'></div>";
872 872
                         }
873 873
                         echo "</div>";
@@ -882,9 +882,9 @@  discard block
 block discarded – undo
882 882
             }
883 883
 
884 884
             if (isset($_POST['comefrom'])) {
885
-                $return = htmlspecialchars_decode($_POST['comefrom']) . ( $inst_id ? "?inst_id=" . $inst_id : "" );
885
+                $return = htmlspecialchars_decode($_POST['comefrom']).($inst_id ? "?inst_id=".$inst_id : "");
886 886
                 echo "<form method='post' action='$return' accept-charset='UTF-8'>
887
-                    <button type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_CLOSE . "'>" . sprintf(_("Return to %s administrator area"), core\common\Entity::$nomenclature_inst) . "</button>"
887
+                    <button type='submit' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_CLOSE."'>".sprintf(_("Return to %s administrator area"), core\common\Entity::$nomenclature_inst)."</button>"
888 888
                 . "</form>";
889 889
             }
890 890
             if ($check_realm !== FALSE) {
Please login to merge, or discard this patch.
Braces   +16 added lines, -1 removed lines patch added patch discarded remove patch
@@ -755,7 +755,22 @@
 block discarded – undo
755 755
                 }
756 756
             ?>
757 757
                 <div id="tabs-<?php echo $i;?>">
758
-                    <button id="run_<?php if ($i==3) echo 'd'; else echo 'o';?>_tests"; onclick="run_<?php if ($i==3) echo 'dynamic'; else echo 'openroaming';?>()"><?php if ($i==3) echo _("Repeat dynamic connectivity tests"); else echo _("Repeat OpenRoaming connectivity tests");?></button>
758
+                    <button id="run_<?php if ($i==3) {
759
+    echo 'd';
760
+} else {
761
+    echo 'o';
762
+}
763
+?>_tests"; onclick="run_<?php if ($i==3) {
764
+    echo 'dynamic';
765
+} else {
766
+    echo 'openroaming';
767
+}
768
+?>()"><?php if ($i==3) {
769
+    echo _("Repeat dynamic connectivity tests");
770
+} else {
771
+    echo _("Repeat OpenRoaming connectivity tests");
772
+}
773
+?></button>
759 774
 
760 775
                 <?php
761 776
                     echo "<div id='";
Please login to merge, or discard this patch.