Test Failed
Push — master ( b04c89...467893 )
by Maja
10:42
created
web/diag/action_realmcheck.php 2 patches
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -567,9 +567,9 @@  discard block
 block discarded – undo
567 567
                     $naptr = $rfc7585suite->relevantNAPTR();
568 568
                     if ($naptr == \core\diag\RADIUSTests::RETVAL_NOTCONFIGURED) {
569 569
                         if ($dynType == "") {
570
-                        	echo "<tr><td>" . _("Dynamic discovery test is not configured") . "</td><td>";
570
+                            echo "<tr><td>" . _("Dynamic discovery test is not configured") . "</td><td>";
571 571
                         } else {
572
-                        	echo "<tr><td>" . _("OpenRoaming connectivity test is not configured") . "</td><td>";
572
+                            echo "<tr><td>" . _("OpenRoaming connectivity test is not configured") . "</td><td>";
573 573
                         }
574 574
                     } else {
575 575
                         echo "<table>";
@@ -673,7 +673,7 @@  discard block
 block discarded – undo
673 673
                         echo "}
674 674
               </script>";
675 675
                         } else {
676
-                   echo ' 
676
+                    echo ' 
677 677
               function run_openroaming() {
678 678
                  running_ajax_openroaming = 0;
679 679
                  $("#main_openroaming_ico").attr("src",icon_loading);
@@ -695,10 +695,10 @@  discard block
 block discarded – undo
695 695
                         } 
696 696
                     }
697 697
                     if ($dynType == '') {
698
-                         $naptrs[0] = $naptr;
699
-                     } else {
700
-                         $naptrs[1] = $naptr;
701
-                     }
698
+                            $naptrs[0] = $naptr;
699
+                        } else {
700
+                            $naptrs[1] = $naptr;
701
+                        }
702 702
                 }
703 703
                     echo "<strong>" . _("Static connectivity tests") . "</strong>
704 704
          <table><tr>
@@ -711,7 +711,7 @@  discard block
 block discarded – undo
711 711
          </tr></table>";
712 712
                     }
713 713
                     if (count($orrealm) && ($naptrs[1] > 0)) {
714
-                      echo "<hr><strong>" . _("OpenRoaming connectivity tests") . "</strong>
714
+                        echo "<hr><strong>" . _("OpenRoaming connectivity tests") . "</strong>
715 715
          <table><tr>
716 716
          <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>
717 717
          </tr></table>";
@@ -749,12 +749,12 @@  discard block
 block discarded – undo
749 749
             <?php
750 750
             for ($i=3; $i<5; $i++) {
751 751
                 if ($i == 3 && $naptrs[0] <= 0) {
752
-                   continue;
752
+                    continue;
753 753
                 }
754 754
                 if ($i == 4) {
755
-                   if ((count($orrealm) == 0) || ($naptrs[1] <= 0)) {
756
-                       continue;
757
-                   }
755
+                    if ((count($orrealm) == 0) || ($naptrs[1] <= 0)) {
756
+                        continue;
757
+                    }
758 758
                 }
759 759
                 if ($i == 3) {
760 760
                     $rfc7585suite = $dnsChecks;
@@ -771,16 +771,16 @@  discard block
 block discarded – undo
771 771
                     echo "_tests'><fieldset class='option_container'>
772 772
                 <legend><strong>";
773 773
                     if ($i==3) {
774
-                     echo _("DYNAMIC connectivity tests");
774
+                        echo _("DYNAMIC connectivity tests");
775 775
                     } else {
776
-                     echo _("OpenRoaming connectivity tests");
776
+                        echo _("OpenRoaming connectivity tests");
777 777
                     }
778 778
                     echo  "</strong></legend>";
779 779
                     $prefix1 = 'dynamic';
780 780
                     $prefix2 = '';
781 781
                     if ($i == 4) {
782
-                    	$prefix1 = 'openroaming';
783
-                    	$prefix2 = $prefix1;
782
+                        $prefix1 = 'openroaming';
783
+                        $prefix2 = $prefix1;
784 784
                     }
785 785
                     $resultstoprint = [];
786 786
                     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">
@@ -556,25 +556,25 @@  discard block
 block discarded – undo
556 556
                     // NAPTR existence check
557 557
                     if ($dynType == "") {
558 558
                         $rfc7585suite = $dnsChecks;
559
-                        echo "<strong>" . _("DNS checks") . "</strong><div>";
559
+                        echo "<strong>"._("DNS checks")."</strong><div>";
560 560
                     } else {
561 561
                         if (count($orrealm) == 0) {
562 562
                             continue;
563 563
                         }
564 564
                         $rfc7585suite = $dnsChecksOR;
565
-                        echo "<strong>" . _("OpenRoaming DNS checks") . "</strong><div>";
565
+                        echo "<strong>"._("OpenRoaming DNS checks")."</strong><div>";
566 566
                     }
567 567
                     $naptr = $rfc7585suite->relevantNAPTR();
568 568
                     if ($naptr == \core\diag\RADIUSTests::RETVAL_NOTCONFIGURED) {
569 569
                         if ($dynType == "") {
570
-                        	echo "<tr><td>" . _("Dynamic discovery test is not configured") . "</td><td>";
570
+                        	echo "<tr><td>"._("Dynamic discovery test is not configured")."</td><td>";
571 571
                         } else {
572
-                        	echo "<tr><td>" . _("OpenRoaming connectivity test is not configured") . "</td><td>";
572
+                        	echo "<tr><td>"._("OpenRoaming connectivity test is not configured")."</td><td>";
573 573
                         }
574 574
                     } else {
575 575
                         echo "<table>";
576 576
                         // output in friendly words
577
-                        echo "<tr><td>" . _("Checking NAPTR existence:") . "</td><td>";
577
+                        echo "<tr><td>"._("Checking NAPTR existence:")."</td><td>";
578 578
                         switch ($naptr) {
579 579
                             case \core\diag\RFC7585Tests::RETVAL_NONAPTR:
580 580
                                 echo _("This realm has no NAPTR records.");
@@ -589,7 +589,7 @@  discard block
 block discarded – undo
589 589
 
590 590
                         // compliance checks for NAPTRs
591 591
                         if ($naptr > 0) {
592
-                            echo "<tr><td>" . _("Checking NAPTR compliance (flag = S and regex = {empty}):") . "</td><td>";
592
+                            echo "<tr><td>"._("Checking NAPTR compliance (flag = S and regex = {empty}):")."</td><td>";
593 593
                             $naptr_valid = $rfc7585suite->relevantNAPTRcompliance();
594 594
                             switch ($naptr_valid) {
595 595
                                 case \core\diag\RADIUSTests::RETVAL_OK:
@@ -604,7 +604,7 @@  discard block
 block discarded – undo
604 604
                         // SRV resolution
605 605
                         if ($naptr > 0 && $naptr_valid == \core\diag\RADIUSTests::RETVAL_OK) {
606 606
                             $srv = $rfc7585suite->relevantNAPTRsrvResolution();
607
-                            echo "<tr><td>" . _("Checking SRVs:") . "</td><td>";
607
+                            echo "<tr><td>"._("Checking SRVs:")."</td><td>";
608 608
                             switch ($srv) {
609 609
                                 case \core\diag\RADIUSTests::RETVAL_SKIPPED:
610 610
                                     echo _("This check was skipped.");
@@ -620,7 +620,7 @@  discard block
 block discarded – undo
620 620
                         // IP addresses for the hosts
621 621
                         if ($naptr > 0 && $naptr_valid == \core\diag\RADIUSTests::RETVAL_OK && $srv > 0) {
622 622
                             $hosts = $rfc7585suite->relevantNAPTRhostnameResolution();
623
-                            echo "<tr><td>" . _("Checking IP address resolution:") . "</td><td>";
623
+                            echo "<tr><td>"._("Checking IP address resolution:")."</td><td>";
624 624
                             switch ($srv) {
625 625
                                 case \core\diag\RADIUSTests::RETVAL_SKIPPED:
626 626
                                     echo _("This check was skipped.");
@@ -637,12 +637,12 @@  discard block
 block discarded – undo
637 637
                         echo "</table><br/>";
638 638
                         if ($dynType == "") {
639 639
                             if (count($testsuite->listerrors()) == 0) {
640
-                                echo sprintf(_("Realm is <strong>%s</strong> "), _(($naptr > 0 ? "DYNAMIC" : "STATIC"))) . _("with no DNS errors encountered. Congratulations!");
640
+                                echo sprintf(_("Realm is <strong>%s</strong> "), _(($naptr > 0 ? "DYNAMIC" : "STATIC")))._("with no DNS errors encountered. Congratulations!");
641 641
                             } else {
642
-                                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
+                                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.");
643 643
                                 echo "<div class='notacceptable'><table>";
644 644
                                 foreach ($testsuite->listerrors() as $details) {
645
-                                    echo "<tr><td>" . $details['TYPE'] . "</td><td>" . $details['TARGET'] . "</td></tr>";
645
+                                    echo "<tr><td>".$details['TYPE']."</td><td>".$details['TARGET']."</td></tr>";
646 646
                                 }
647 647
                                 echo "</table></div>";
648 648
                             }
@@ -661,13 +661,13 @@  discard block
 block discarded – undo
661 661
                  $("#dynamic_tests").show();
662 662
               ';
663 663
                         foreach ($rfc7585suite->NAPTR_hostname_records as $hostindex => $addr) {
664
-                            $host = ($addr['family'] == "IPv6" ? "[" : "") . $addr['IP'] . ($addr['family'] == "IPv6" ? "]" : "") . ":" . $addr['port'];
664
+                            $host = ($addr['family'] == "IPv6" ? "[" : "").$addr['IP'].($addr['family'] == "IPv6" ? "]" : "").":".$addr['port'];
665 665
                             $expectedName = $addr['hostname'];
666 666
                             print "
667 667
                             running_ajax_dyn++;
668
-                            $.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
+                            $.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'}); 
669 669
                             running_ajax_dyn++;
670
-                            $.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
+                            $.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'}); 
671 671
                        ";
672 672
                         }
673 673
                         echo "}
@@ -683,11 +683,11 @@  discard block
 block discarded – undo
683 683
                  $("#openroaming_tests").show();
684 684
               ';
685 685
                         foreach ($rfc7585suite->NAPTR_hostname_records as $hostindex => $addr) {
686
-                            $host = ($addr['family'] == "IPv6" ? "[" : "") . $addr['IP'] . ($addr['family'] == "IPv6" ? "]" : "") . ":" . $addr['port'];
686
+                            $host = ($addr['family'] == "IPv6" ? "[" : "").$addr['IP'].($addr['family'] == "IPv6" ? "]" : "").":".$addr['port'];
687 687
                             $expectedName = $addr['hostname'];
688 688
                             print "
689 689
                             running_ajax_openroaming++;
690
-                            $.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
+                            $.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'}); 
691 691
                        ";
692 692
                         }
693 693
                         echo "}
@@ -700,18 +700,18 @@  discard block
 block discarded – undo
700 700
                          $naptrs[1] = $naptr;
701 701
                      }
702 702
                 }
703
-                    echo "<strong>" . _("Static connectivity tests") . "</strong>
703
+                    echo "<strong>"._("Static connectivity tests")."</strong>
704 704
          <table><tr>
705 705
          <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>
706 706
          </tr></table>";
707 707
                     if ($naptrs[0] > 0) {
708
-                        echo "<hr><strong>" . _("Dynamic connectivity tests") . "</strong>
708
+                        echo "<hr><strong>"._("Dynamic connectivity tests")."</strong>
709 709
          <table><tr>
710 710
          <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>
711 711
          </tr></table>";
712 712
                     }
713 713
                     if (count($orrealm) && ($naptrs[1] > 0)) {
714
-                      echo "<hr><strong>" . _("OpenRoaming connectivity tests") . "</strong>
714
+                      echo "<hr><strong>"._("OpenRoaming connectivity tests")."</strong>
715 715
          <table><tr>
716 716
          <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>
717 717
          </tr></table>";
@@ -731,12 +731,12 @@  discard block
 block discarded – undo
731 731
                     print "<p>";
732 732
                     foreach (\config\Diagnostics::RADIUSTESTS['UDP-hosts'] as $hostindex => $host) {
733 733
                         print "<hr>";
734
-                        printf(_("Testing from: %s"), "<strong>" . \config\Diagnostics::RADIUSTESTS['UDP-hosts'][$hostindex]['display_name'] . "</strong>");
734
+                        printf(_("Testing from: %s"), "<strong>".\config\Diagnostics::RADIUSTESTS['UDP-hosts'][$hostindex]['display_name']."</strong>");
735 735
                         print "<table id='results$hostindex'  style='width:100%' class='udp_results'>
736 736
 <tr>
737
-<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='src" . $hostindex . "_img'></td>
737
+<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='src".$hostindex."_img'></td>
738 738
 <td id='src$hostindex' colspan=2>
739
-" . _("testing...") . "
739
+"._("testing...")."
740 740
 </td>
741 741
 </tr>
742 742
 </table>";
@@ -747,7 +747,7 @@  discard block
 block discarded – undo
747 747
 
748 748
             </div>
749 749
             <?php
750
-            for ($i=3; $i<5; $i++) {
750
+            for ($i = 3; $i < 5; $i++) {
751 751
                 if ($i == 3 && $naptrs[0] <= 0) {
752 752
                    continue;
753 753
                 }
@@ -762,15 +762,15 @@  discard block
 block discarded – undo
762 762
                     $rfc7585suite = $dnsChecksOR;
763 763
                 }
764 764
             ?>
765
-                <div id="tabs-<?php echo $i;?>">
766
-                    <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>
765
+                <div id="tabs-<?php echo $i; ?>">
766
+                    <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>
767 767
 
768 768
                 <?php
769 769
                     echo "<div id='";
770
-                    if ($i==3) { echo 'dynamic'; } else { echo 'openroaming'; }
770
+                    if ($i == 3) { echo 'dynamic'; } else { echo 'openroaming'; }
771 771
                     echo "_tests'><fieldset class='option_container'>
772 772
                 <legend><strong>";
773
-                    if ($i==3) {
773
+                    if ($i == 3) {
774 774
                      echo _("DYNAMIC connectivity tests");
775 775
                     } else {
776 776
                      echo _("OpenRoaming connectivity tests");
@@ -784,17 +784,17 @@  discard block
 block discarded – undo
784 784
                     }
785 785
                     $resultstoprint = [];
786 786
                     if (count($rfc7585suite->NAPTR_hostname_records) > 0) {
787
-                        $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>';
788
-                        $resultstoprint[] = '<div style="align:right;"><a href="" class="moreall">' . _('Show detailed information for all tests') . '</a></div>' . '<p><strong>' . _("Checking server handshake...") . "</strong><p>";
787
+                        $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>';
788
+                        $resultstoprint[] = '<div style="align:right;"><a href="" class="moreall">'._('Show detailed information for all tests').'</a></div>'.'<p><strong>'._("Checking server handshake...")."</strong><p>";
789 789
                         foreach ($rfc7585suite->NAPTR_hostname_records as $hostindex => $addr) {
790
-                            $bracketaddr = ($addr["family"] == "IPv6" ? "[" . $addr["IP"] . "]" : $addr["IP"]);
791
-                            $resultstoprint[] = '<p><strong>' . $bracketaddr . ' TCP/' . $addr['port'] . '</strong>';
790
+                            $bracketaddr = ($addr["family"] == "IPv6" ? "[".$addr["IP"]."]" : $addr["IP"]);
791
+                            $resultstoprint[] = '<p><strong>'.$bracketaddr.' TCP/'.$addr['port'].'</strong>';
792 792
                             $resultstoprint[] = '<ul style="list-style-type: none;" class="caresult"><li>';
793
-                            $resultstoprint[] = "<table id='" . $prefix2 . "caresults$hostindex'  style='width:100%'>
793
+                            $resultstoprint[] = "<table id='".$prefix2."caresults$hostindex'  style='width:100%'>
794 794
 <tr>
795
-<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='" . $prefix2 . "srcca$hostindex" . "_img'></td>
796
-<td id='" . $prefix2 . "srcca$hostindex'>
797
-" . _("testing...") . "
795
+<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='".$prefix2."srcca$hostindex"."_img'></td>
796
+<td id='" . $prefix2."srcca$hostindex'>
797
+"._("testing...")."
798 798
 </td>
799 799
 </tr>
800 800
 </table>";
@@ -802,26 +802,26 @@  discard block
 block discarded – undo
802 802
                         }
803 803
                         $clientstest = [];
804 804
                         foreach ($rfc7585suite->NAPTR_hostname_records as $hostindex => $addr) {
805
-                            $clientstest[] = '<p><strong>' . $addr['IP'] . ' TCP/' . $addr['port'] . '</strong></p><ol>';
806
-                            $clientstest[] = "<span id='" . $prefix2 . "clientresults$hostindex$clinx'><table style='width:100%'>
805
+                            $clientstest[] = '<p><strong>'.$addr['IP'].' TCP/'.$addr['port'].'</strong></p><ol>';
806
+                            $clientstest[] = "<span id='".$prefix2."clientresults$hostindex$clinx'><table style='width:100%'>
807 807
 <tr>
808 808
 <td class='icon_td'>";
809
-                            if ($i == 4 ) {
809
+                            if ($i == 4) {
810 810
                                 $clientstest[] = "<!--";
811 811
                             }
812
-                            $clientstest[] = "<img src='../resources/images/icons/loading51.gif' id='" . $prefix2 . "srcclient$hostindex" . "_img'></td>
813
-<td id='" . $prefix2 . "srcclient$hostindex'>
814
-" . _("testing...");
812
+                            $clientstest[] = "<img src='../resources/images/icons/loading51.gif' id='".$prefix2."srcclient$hostindex"."_img'></td>
813
+<td id='" . $prefix2."srcclient$hostindex'>
814
+"._("testing...");
815 815
 
816
-                            if ($i == 4 ) {
817
-                                $clientstest[] = "-->" . _("not implemented yet");
816
+                            if ($i == 4) {
817
+                                $clientstest[] = "-->"._("not implemented yet");
818 818
                             }
819 819
                             $clientstest[] = "</td></tr></table></span>";
820 820
                             $clientstest[] = '</ol>';
821 821
                         }
822 822
                         echo '<div style="align:right;">';
823 823
                         echo join('', $resultstoprint);
824
-                        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>';
824
+                        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>';
825 825
                         print join('', $clientstest);
826 826
                         echo '</span>';
827 827
                         echo '</div>';
@@ -835,7 +835,7 @@  discard block
 block discarded – undo
835 835
                 //     check if truncates/dies on Operator-Name
836 836
                 if ($my_profile !== NULL) {
837 837
                     echo "<div id='tabs-n'><fieldset class='option_container'>
838
-                <legend><strong>" . _("Live login test") . "</strong></legend>";
838
+                <legend><strong>" . _("Live login test")."</strong></legend>";
839 839
                     $prof_compl = $my_profile->getEapMethodsinOrderOfPreference(1);
840 840
                     if (count($prof_compl) > 0) {
841 841
                         $passwordReqired = FALSE;
@@ -848,34 +848,34 @@  discard block
 block discarded – undo
848 848
                                 $clientCertRequired = TRUE;
849 849
                             }
850 850
                         }
851
-                        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>
852
-                    <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>
853
-                    <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>
851
+                        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>
852
+                    <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>
853
+                    <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>
854 854
                     <form enctype='multipart/form-data' id='live_form' accept-charset='UTF-8'>
855 855
                     <input type='hidden' name='test_type' value='udp_login'>
856
-                    <input type='hidden' name='lang' value='" . $gui->languageInstance->getLang() . "'>
857
-                    <input type='hidden' name='profile_id' value='" . $my_profile->identifier . "'>
856
+                    <input type='hidden' name='lang' value='" . $gui->languageInstance->getLang()."'>
857
+                    <input type='hidden' name='profile_id' value='" . $my_profile->identifier."'>
858 858
                     <table id='live_tests'>";
859 859
 // if any password based EAP methods are available enable this section
860 860
                         if ($passwordReqired) {
861
-                            echo "<tr><td colspan='2'><strong>" . _("Password-based EAP types") . "</strong></td></tr>
862
-                        <tr><td>" . _("Real (inner) username:") . "</td><td><input type='text' id='username' class='mandatory' name='username'/></td></tr>";
863
-                            echo "<tr><td>" . _("Anonymous outer ID (optional):") . "</td><td><input type='text' id='outer_username' name='outer_username'/></td></tr>";
864
-                            echo "<tr><td>" . _("Password:") . "</td><td><input type='text' id='password' class='mandatory' name='password'/></td></tr>";
861
+                            echo "<tr><td colspan='2'><strong>"._("Password-based EAP types")."</strong></td></tr>
862
+                        <tr><td>" . _("Real (inner) username:")."</td><td><input type='text' id='username' class='mandatory' name='username'/></td></tr>";
863
+                            echo "<tr><td>"._("Anonymous outer ID (optional):")."</td><td><input type='text' id='outer_username' name='outer_username'/></td></tr>";
864
+                            echo "<tr><td>"._("Password:")."</td><td><input type='text' id='password' class='mandatory' name='password'/></td></tr>";
865 865
                         }
866 866
                         // ask for cert + privkey if TLS-based method is active
867 867
                         if ($clientCertRequired) {
868
-                            echo "<tr><td colspan='2'><strong>" . _("Certificate-based EAP types") . "</strong></td></tr>
869
-                        <tr><td>" . _("Certificate file (.p12 or .pfx):") . "</td><td><input type='file' id='cert' accept='application/x-pkcs12' name='cert'/></td></tr>
870
-                        <tr><td>" . _("Certificate password, if any:") . "</td><td><input type='text' id='privkey' name='privkey_pass'/></td></tr>
871
-                        <tr><td>" . _("Username, if different from certificate Subject:") . "</td><td><input type='text' id='tls_username' name='tls_username'/></td></tr>";
868
+                            echo "<tr><td colspan='2'><strong>"._("Certificate-based EAP types")."</strong></td></tr>
869
+                        <tr><td>" . _("Certificate file (.p12 or .pfx):")."</td><td><input type='file' id='cert' accept='application/x-pkcs12' name='cert'/></td></tr>
870
+                        <tr><td>" . _("Certificate password, if any:")."</td><td><input type='text' id='privkey' name='privkey_pass'/></td></tr>
871
+                        <tr><td>" . _("Username, if different from certificate Subject:")."</td><td><input type='text' id='tls_username' name='tls_username'/></td></tr>";
872 872
                         }
873
-                        echo "<tr><td colspan='2'><button id='submit_credentials'>" . _("Submit credentials") . "</button></td></tr></table></form>";
873
+                        echo "<tr><td colspan='2'><button id='submit_credentials'>"._("Submit credentials")."</button></td></tr></table></form>";
874 874
                         echo "<div id='live_login_results' style='display:none'>";
875 875
                         foreach (\config\Diagnostics::RADIUSTESTS['UDP-hosts'] as $hostindex => $host) {
876 876
                             print "<hr>";
877
-                            printf(_("Testing from: %s"), "<strong>" . \config\Diagnostics::RADIUSTESTS['UDP-hosts'][$hostindex]['display_name'] . "</strong>");
878
-                            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>";
877
+                            printf(_("Testing from: %s"), "<strong>".\config\Diagnostics::RADIUSTESTS['UDP-hosts'][$hostindex]['display_name']."</strong>");
878
+                            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>";
879 879
                             print "<div id='eap_test$hostindex' class='eap_test_results'></div>";
880 880
                         }
881 881
                         echo "</div>";
@@ -890,9 +890,9 @@  discard block
 block discarded – undo
890 890
             }
891 891
 
892 892
             if (isset($_POST['comefrom'])) {
893
-                $return = htmlspecialchars_decode($_POST['comefrom']) . ( $inst_id ? "?inst_id=" . $inst_id : "" );
893
+                $return = htmlspecialchars_decode($_POST['comefrom']).($inst_id ? "?inst_id=".$inst_id : "");
894 894
                 echo "<form method='post' action='$return' accept-charset='UTF-8'>
895
-                    <button type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_CLOSE . "'>" . sprintf(_("Return to %s administrator area"), core\common\Entity::$nomenclature_idp) . "</button>"
895
+                    <button type='submit' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_CLOSE."'>".sprintf(_("Return to %s administrator area"), core\common\Entity::$nomenclature_idp)."</button>"
896 896
                 . "</form>";
897 897
             }
898 898
             if ($check_realm !== FALSE) {
Please login to merge, or discard this patch.