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