@@ -19,7 +19,7 @@ |
||
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 | - ?> |
|
22 | + ?> |
|
23 | 23 | <script> |
24 | 24 | var L_OK = <?php echo \core\common\Entity::L_OK ?>; |
25 | 25 | var L_WARN = <?php echo \core\common\Entity::L_WARN ?>; |
@@ -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>'; |
@@ -425,8 +425,8 @@ discard block |
||
425 | 425 | <?php |
426 | 426 | foreach (\config\Diagnostics::RADIUSTESTS['UDP-hosts'] as $hostindex => $host) { |
427 | 427 | print " |
428 | -$(\"#live_src" . $hostindex . "_img\").attr('src',icon_loading); |
|
429 | -$(\"#live_src" . $hostindex . "_img\").show(); |
|
428 | +$(\"#live_src" . $hostindex."_img\").attr('src',icon_loading); |
|
429 | +$(\"#live_src" . $hostindex."_img\").show(); |
|
430 | 430 | $.ajax({ |
431 | 431 | url: 'radius_tests.php?src=0&hostindex=$hostindex&realm='+realm, |
432 | 432 | type: 'POST', |
@@ -456,15 +456,15 @@ discard block |
||
456 | 456 | <?php |
457 | 457 | foreach (\config\Diagnostics::RADIUSTESTS['UDP-hosts'] as $hostindex => $host) { |
458 | 458 | if ($testedProfile !== NULL) { |
459 | - $extraarg = "profile_id: " . $testedProfile->identifier . ", "; |
|
459 | + $extraarg = "profile_id: ".$testedProfile->identifier.", "; |
|
460 | 460 | } else { |
461 | 461 | $extraarg = ""; |
462 | 462 | } |
463 | 463 | print " |
464 | -$(\"#src" . $hostindex . "_img\").attr('src',icon_loading); |
|
464 | +$(\"#src" . $hostindex."_img\").attr('src',icon_loading); |
|
465 | 465 | $(\"#src$hostindex\").html(''); |
466 | 466 | running_ajax_stat++; |
467 | -$.get('radius_tests.php',{test_type: 'udp', $extraarg realm: realm, src: $hostindex, lang: '" . $gui->languageInstance->getLang() . "', hostindex: '$hostindex' }, udp, 'json'); |
|
467 | +$.get('radius_tests.php',{test_type: 'udp', $extraarg realm: realm, src: $hostindex, lang: '".$gui->languageInstance->getLang()."', hostindex: '$hostindex' }, udp, 'json'); |
|
468 | 468 | |
469 | 469 | "; |
470 | 470 | } |
@@ -491,7 +491,7 @@ discard block |
||
491 | 491 | if ($check_realm === FALSE) { |
492 | 492 | print "<p>$error_message</p>"; |
493 | 493 | } else { |
494 | - print "<h1>" . sprintf(_("Realm testing for: %s"), $check_realm) . "</h1>\n"; |
|
494 | + print "<h1>".sprintf(_("Realm testing for: %s"), $check_realm)."</h1>\n"; |
|
495 | 495 | ?> |
496 | 496 | <div id="debug_out" style="display: none"></div> |
497 | 497 | <div id="tabs" style="min-width: 600px; max-width:800px"> |
@@ -508,12 +508,12 @@ discard block |
||
508 | 508 | </legend> |
509 | 509 | <?php |
510 | 510 | // NAPTR existence check |
511 | - echo "<strong>" . _("DNS chekcs") . "</strong><div>"; |
|
511 | + echo "<strong>"._("DNS chekcs")."</strong><div>"; |
|
512 | 512 | $naptr = $rfc7585suite->relevantNAPTR(); |
513 | 513 | if ($naptr != \core\diag\RADIUSTests::RETVAL_NOTCONFIGURED) { |
514 | 514 | echo "<table>"; |
515 | 515 | // output in friendly words |
516 | - echo "<tr><td>" . _("Checking NAPTR existence:") . "</td><td>"; |
|
516 | + echo "<tr><td>"._("Checking NAPTR existence:")."</td><td>"; |
|
517 | 517 | switch ($naptr) { |
518 | 518 | case \core\diag\RFC7585Tests::RETVAL_NONAPTR: |
519 | 519 | echo _("This realm has no NAPTR records."); |
@@ -528,7 +528,7 @@ discard block |
||
528 | 528 | |
529 | 529 | // compliance checks for NAPTRs |
530 | 530 | if ($naptr > 0) { |
531 | - echo "<tr><td>" . _("Checking NAPTR compliance (flag = S and regex = {empty}):") . "</td><td>"; |
|
531 | + echo "<tr><td>"._("Checking NAPTR compliance (flag = S and regex = {empty}):")."</td><td>"; |
|
532 | 532 | $naptr_valid = $rfc7585suite->relevantNAPTRcompliance(); |
533 | 533 | switch ($naptr_valid) { |
534 | 534 | case \core\diag\RADIUSTests::RETVAL_OK: |
@@ -545,7 +545,7 @@ discard block |
||
545 | 545 | |
546 | 546 | if ($naptr > 0 && $naptr_valid == \core\diag\RADIUSTests::RETVAL_OK) { |
547 | 547 | $srv = $rfc7585suite->relevantNAPTRsrvResolution(); |
548 | - echo "<tr><td>" . _("Checking SRVs:") . "</td><td>"; |
|
548 | + echo "<tr><td>"._("Checking SRVs:")."</td><td>"; |
|
549 | 549 | switch ($srv) { |
550 | 550 | case \core\diag\RADIUSTests::RETVAL_SKIPPED: |
551 | 551 | echo _("This check was skipped."); |
@@ -561,7 +561,7 @@ discard block |
||
561 | 561 | // IP addresses for the hosts |
562 | 562 | if ($naptr > 0 && $naptr_valid == \core\diag\RADIUSTests::RETVAL_OK && $srv > 0) { |
563 | 563 | $hosts = $rfc7585suite->relevantNAPTRhostnameResolution(); |
564 | - echo "<tr><td>" . _("Checking IP address resolution:") . "</td><td>"; |
|
564 | + echo "<tr><td>"._("Checking IP address resolution:")."</td><td>"; |
|
565 | 565 | switch ($srv) { |
566 | 566 | case \core\diag\RADIUSTests::RETVAL_SKIPPED: |
567 | 567 | echo _("This check was skipped."); |
@@ -577,12 +577,12 @@ discard block |
||
577 | 577 | |
578 | 578 | echo "</table><br/><br/>"; |
579 | 579 | if (count($testsuite->listerrors()) == 0) { |
580 | - echo sprintf(_("Realm is <strong>%s</strong> "), _(($naptr > 0 ? "DYNAMIC" : "STATIC"))) . _("with no DNS errors encountered. Congratulations!"); |
|
580 | + echo sprintf(_("Realm is <strong>%s</strong> "), _(($naptr > 0 ? "DYNAMIC" : "STATIC")))._("with no DNS errors encountered. Congratulations!"); |
|
581 | 581 | } else { |
582 | - 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."); |
|
582 | + 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 | 583 | echo "<div class='notacceptable'><table>"; |
584 | 584 | foreach ($testsuite->listerrors() as $details) { |
585 | - echo "<tr><td>" . $details['TYPE'] . "</td><td>" . $details['TARGET'] . "</td></tr>"; |
|
585 | + echo "<tr><td>".$details['TYPE']."</td><td>".$details['TARGET']."</td></tr>"; |
|
586 | 586 | } |
587 | 587 | echo "</table></div>"; |
588 | 588 | } |
@@ -598,26 +598,26 @@ discard block |
||
598 | 598 | $("#dynamic_tests").show(); |
599 | 599 | '; |
600 | 600 | foreach ($rfc7585suite->NAPTR_hostname_records as $hostindex => $addr) { |
601 | - $host = ($addr['family'] == "IPv6" ? "[" : "") . $addr['IP'] . ($addr['family'] == "IPv6" ? "]" : "") . ":" . $addr['port']; |
|
601 | + $host = ($addr['family'] == "IPv6" ? "[" : "").$addr['IP'].($addr['family'] == "IPv6" ? "]" : "").":".$addr['port']; |
|
602 | 602 | $expectedName = $addr['hostname']; |
603 | 603 | print " |
604 | 604 | running_ajax_dyn++; |
605 | - $.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'}); |
|
605 | + $.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 | 606 | running_ajax_dyn++; |
607 | - $.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'}); |
|
607 | + $.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 | 608 | "; |
609 | 609 | } |
610 | 610 | echo "} |
611 | 611 | </script><hr>"; |
612 | 612 | } else { |
613 | - echo "<tr><td>" . _("Dynamic discovery test is not configured") . "</td><td>"; |
|
613 | + echo "<tr><td>"._("Dynamic discovery test is not configured")."</td><td>"; |
|
614 | 614 | } |
615 | - echo "<strong>" . _("Static connectivity tests") . "</strong> |
|
615 | + echo "<strong>"._("Static connectivity tests")."</strong> |
|
616 | 616 | <table><tr> |
617 | 617 | <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> |
618 | 618 | </tr></table>"; |
619 | 619 | if ($naptr > 0) { |
620 | - echo "<hr><strong>" . _("Dynamic connectivity tests") . "</strong> |
|
620 | + echo "<hr><strong>"._("Dynamic connectivity tests")."</strong> |
|
621 | 621 | <table><tr> |
622 | 622 | <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> |
623 | 623 | </tr></table>"; |
@@ -637,12 +637,12 @@ discard block |
||
637 | 637 | print "<p>"; |
638 | 638 | foreach (\config\Diagnostics::RADIUSTESTS['UDP-hosts'] as $hostindex => $host) { |
639 | 639 | print "<hr>"; |
640 | - printf(_("Testing from: %s"), "<strong>" . \config\Diagnostics::RADIUSTESTS['UDP-hosts'][$hostindex]['display_name'] . "</strong>"); |
|
640 | + printf(_("Testing from: %s"), "<strong>".\config\Diagnostics::RADIUSTESTS['UDP-hosts'][$hostindex]['display_name']."</strong>"); |
|
641 | 641 | print "<table id='results$hostindex' style='width:100%' class='udp_results'> |
642 | 642 | <tr> |
643 | -<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='src" . $hostindex . "_img'></td> |
|
643 | +<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='src".$hostindex."_img'></td> |
|
644 | 644 | <td id='src$hostindex' colspan=2> |
645 | -" . _("testing...") . " |
|
645 | +"._("testing...")." |
|
646 | 646 | </td> |
647 | 647 | </tr> |
648 | 648 | </table>"; |
@@ -661,21 +661,21 @@ discard block |
||
661 | 661 | |
662 | 662 | <?php |
663 | 663 | echo "<div id='dynamic_tests'><fieldset class='option_container'> |
664 | - <legend><strong>" . _("DYNAMIC connectivity tests") . "</strong></legend>"; |
|
664 | + <legend><strong>" . _("DYNAMIC connectivity tests")."</strong></legend>"; |
|
665 | 665 | |
666 | 666 | $resultstoprint = []; |
667 | 667 | if (count($rfc7585suite->NAPTR_hostname_records) > 0) { |
668 | - $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>'; |
|
669 | - $resultstoprint[] = '<div style="align:right;"><a href="" class="moreall">' . _('Show detailed information for all tests') . '</a></div>' . '<p><strong>' . _("Checking server handshake...") . "</strong><p>"; |
|
668 | + $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>'; |
|
669 | + $resultstoprint[] = '<div style="align:right;"><a href="" class="moreall">'._('Show detailed information for all tests').'</a></div>'.'<p><strong>'._("Checking server handshake...")."</strong><p>"; |
|
670 | 670 | foreach ($rfc7585suite->NAPTR_hostname_records as $hostindex => $addr) { |
671 | - $bracketaddr = ($addr["family"] == "IPv6" ? "[" . $addr["IP"] . "]" : $addr["IP"]); |
|
672 | - $resultstoprint[] = '<p><strong>' . $bracketaddr . ' TCP/' . $addr['port'] . '</strong>'; |
|
671 | + $bracketaddr = ($addr["family"] == "IPv6" ? "[".$addr["IP"]."]" : $addr["IP"]); |
|
672 | + $resultstoprint[] = '<p><strong>'.$bracketaddr.' TCP/'.$addr['port'].'</strong>'; |
|
673 | 673 | $resultstoprint[] = '<ul style="list-style-type: none;" class="caresult"><li>'; |
674 | 674 | $resultstoprint[] = "<table id='caresults$hostindex' style='width:100%'> |
675 | 675 | <tr> |
676 | -<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='srcca" . $hostindex . "_img'></td> |
|
676 | +<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='srcca".$hostindex."_img'></td> |
|
677 | 677 | <td id='srcca$hostindex'> |
678 | -" . _("testing...") . " |
|
678 | +"._("testing...")." |
|
679 | 679 | </td> |
680 | 680 | </tr> |
681 | 681 | </table>"; |
@@ -683,12 +683,12 @@ discard block |
||
683 | 683 | } |
684 | 684 | $clientstest = []; |
685 | 685 | foreach ($rfc7585suite->NAPTR_hostname_records as $hostindex => $addr) { |
686 | - $clientstest[] = '<p><strong>' . $addr['IP'] . ' TCP/' . $addr['port'] . '</strong></p><ol>'; |
|
686 | + $clientstest[] = '<p><strong>'.$addr['IP'].' TCP/'.$addr['port'].'</strong></p><ol>'; |
|
687 | 687 | $clientstest[] = "<span id='clientresults$hostindex$clinx'><table style='width:100%'> |
688 | 688 | <tr> |
689 | -<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='srcclient" . $hostindex . "_img'></td> |
|
689 | +<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='srcclient".$hostindex."_img'></td> |
|
690 | 690 | <td id='srcclient$hostindex'> |
691 | -" . _("testing...") . " |
|
691 | +"._("testing...")." |
|
692 | 692 | </td> |
693 | 693 | </tr> |
694 | 694 | </table></span>"; |
@@ -696,7 +696,7 @@ discard block |
||
696 | 696 | } |
697 | 697 | echo '<div style="align:right;">'; |
698 | 698 | echo join('', $resultstoprint); |
699 | - 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>'; |
|
699 | + 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 | 700 | print join('', $clientstest); |
701 | 701 | echo '</span>'; |
702 | 702 | echo '</div>'; |
@@ -710,7 +710,7 @@ discard block |
||
710 | 710 | // check if truncates/dies on Operator-Name |
711 | 711 | if ($my_profile !== NULL) { |
712 | 712 | echo "<div id='tabs-4'><fieldset class='option_container'> |
713 | - <legend><strong>" . _("Live login test") . "</strong></legend>"; |
|
713 | + <legend><strong>" . _("Live login test")."</strong></legend>"; |
|
714 | 714 | $prof_compl = $my_profile->getEapMethodsinOrderOfPreference(1); |
715 | 715 | if (count($prof_compl) > 0) { |
716 | 716 | $passwordReqired = FALSE; |
@@ -723,34 +723,34 @@ discard block |
||
723 | 723 | $clientCertRequired = TRUE; |
724 | 724 | } |
725 | 725 | } |
726 | - 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> |
|
727 | - <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> |
|
728 | - <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> |
|
726 | + 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> |
|
727 | + <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> |
|
728 | + <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> |
|
729 | 729 | <form enctype='multipart/form-data' id='live_form' accept-charset='UTF-8'> |
730 | 730 | <input type='hidden' name='test_type' value='udp_login'> |
731 | - <input type='hidden' name='lang' value='" . $gui->languageInstance->getLang() . "'> |
|
732 | - <input type='hidden' name='profile_id' value='" . $my_profile->identifier . "'> |
|
731 | + <input type='hidden' name='lang' value='" . $gui->languageInstance->getLang()."'> |
|
732 | + <input type='hidden' name='profile_id' value='" . $my_profile->identifier."'> |
|
733 | 733 | <table id='live_tests'>"; |
734 | 734 | // if any password based EAP methods are available enable this section |
735 | 735 | if ($passwordReqired) { |
736 | - echo "<tr><td colspan='2'><strong>" . _("Password-based EAP types") . "</strong></td></tr> |
|
737 | - <tr><td>" . _("Real (inner) username:") . "</td><td><input type='text' id='username' class='mandatory' name='username'/></td></tr>"; |
|
738 | - echo "<tr><td>" . _("Anonymous outer ID (optional):") . "</td><td><input type='text' id='outer_username' name='outer_username'/></td></tr>"; |
|
739 | - echo "<tr><td>" . _("Password:") . "</td><td><input type='text' id='password' class='mandatory' name='password'/></td></tr>"; |
|
736 | + echo "<tr><td colspan='2'><strong>"._("Password-based EAP types")."</strong></td></tr> |
|
737 | + <tr><td>" . _("Real (inner) username:")."</td><td><input type='text' id='username' class='mandatory' name='username'/></td></tr>"; |
|
738 | + echo "<tr><td>"._("Anonymous outer ID (optional):")."</td><td><input type='text' id='outer_username' name='outer_username'/></td></tr>"; |
|
739 | + echo "<tr><td>"._("Password:")."</td><td><input type='text' id='password' class='mandatory' name='password'/></td></tr>"; |
|
740 | 740 | } |
741 | 741 | // ask for cert + privkey if TLS-based method is active |
742 | 742 | if ($clientCertRequired) { |
743 | - echo "<tr><td colspan='2'><strong>" . _("Certificate-based EAP types") . "</strong></td></tr> |
|
744 | - <tr><td>" . _("Certificate file (.p12 or .pfx):") . "</td><td><input type='file' id='cert' accept='application/x-pkcs12' name='cert'/></td></tr> |
|
745 | - <tr><td>" . _("Certificate password, if any:") . "</td><td><input type='text' id='privkey' name='privkey_pass'/></td></tr> |
|
746 | - <tr><td>" . _("Username, if different from certificate Subject:") . "</td><td><input type='text' id='tls_username' name='tls_username'/></td></tr>"; |
|
743 | + echo "<tr><td colspan='2'><strong>"._("Certificate-based EAP types")."</strong></td></tr> |
|
744 | + <tr><td>" . _("Certificate file (.p12 or .pfx):")."</td><td><input type='file' id='cert' accept='application/x-pkcs12' name='cert'/></td></tr> |
|
745 | + <tr><td>" . _("Certificate password, if any:")."</td><td><input type='text' id='privkey' name='privkey_pass'/></td></tr> |
|
746 | + <tr><td>" . _("Username, if different from certificate Subject:")."</td><td><input type='text' id='tls_username' name='tls_username'/></td></tr>"; |
|
747 | 747 | } |
748 | - echo "<tr><td colspan='2'><button id='submit_credentials'>" . _("Submit credentials") . "</button></td></tr></table></form>"; |
|
748 | + echo "<tr><td colspan='2'><button id='submit_credentials'>"._("Submit credentials")."</button></td></tr></table></form>"; |
|
749 | 749 | echo "<div id='live_login_results' style='display:none'>"; |
750 | 750 | foreach (\config\Diagnostics::RADIUSTESTS['UDP-hosts'] as $hostindex => $host) { |
751 | 751 | print "<hr>"; |
752 | - printf(_("Testing from: %s"), "<strong>" . \config\Diagnostics::RADIUSTESTS['UDP-hosts'][$hostindex]['display_name'] . "</strong>"); |
|
753 | - 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>"; |
|
752 | + printf(_("Testing from: %s"), "<strong>".\config\Diagnostics::RADIUSTESTS['UDP-hosts'][$hostindex]['display_name']."</strong>"); |
|
753 | + 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>"; |
|
754 | 754 | print "<div id='eap_test$hostindex' class='eap_test_results'></div>"; |
755 | 755 | } |
756 | 756 | echo "</div>"; |
@@ -765,9 +765,9 @@ discard block |
||
765 | 765 | } |
766 | 766 | |
767 | 767 | if (isset($_POST['comefrom'])) { |
768 | - $return = htmlspecialchars_decode($_POST['comefrom']) . ( $inst_id ? "?inst_id=" . $inst_id : "" ); |
|
768 | + $return = htmlspecialchars_decode($_POST['comefrom']).($inst_id ? "?inst_id=".$inst_id : ""); |
|
769 | 769 | echo "<form method='post' action='$return' accept-charset='UTF-8'> |
770 | - <button type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_CLOSE . "'>" . sprintf(_("Return to %s administrator area"), core\common\Entity::$nomenclature_inst) . "</button>" |
|
770 | + <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 | 771 | . "</form>"; |
772 | 772 | } |
773 | 773 | if ($check_realm !== FALSE) { |
@@ -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 id='sp_problem_selector'> |
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(); |
@@ -118,11 +118,11 @@ discard block |
||
118 | 118 | $this->possibleFailureReasons = $_SESSION["SUSPECTS"] ?? []; // if we know nothing, don't talk to anyone |
119 | 119 | $this->additionalFindings = $_SESSION["EVIDENCE"] ?? []; |
120 | 120 | |
121 | - $this->subjectPrefix = _("[eduroam Diagnostics]") . " "; |
|
121 | + $this->subjectPrefix = _("[eduroam Diagnostics]")." "; |
|
122 | 122 | $this->finalGreeting = "\n" |
123 | 123 | . _("(This service is in an early stage. We apologise if this is a false alert. If this is the case, please send an email report to [email protected], forwarding the entire message (including the 'SUSPECTS' and 'EVIDENCE' data at the end), and explain why this is a false positive.)") |
124 | 124 | . "\n" |
125 | - . _("Yours sincerely,") . "\n" |
|
125 | + . _("Yours sincerely,")."\n" |
|
126 | 126 | . "\n" |
127 | 127 | . _("Ed U. Roam, the eduroam diagnostics algorithm"); |
128 | 128 | |
@@ -133,13 +133,13 @@ discard block |
||
133 | 133 | "bcc" => [], |
134 | 134 | "reply-to" => [Logopath::TARGET_EDUROAM_OT], |
135 | 135 | "subject" => _("[POLICYVIOLATION NATIONAL] IdP with no entry in eduroam database"), |
136 | - "body" => _("Dear NRO administrator,") . "\n" |
|
136 | + "body" => _("Dear NRO administrator,")."\n" |
|
137 | 137 | . "\n" |
138 | - . wordwrap(sprintf(_("an end-user requested diagnostics for realm %s. Real-time connectivity checks determined that the realm exists, but we were unable to find an IdP with that realm in the eduroam database."), $this->additionalFindings['REALM'])) . "\n" |
|
138 | + . wordwrap(sprintf(_("an end-user requested diagnostics for realm %s. Real-time connectivity checks determined that the realm exists, but we were unable to find an IdP with that realm in the eduroam database."), $this->additionalFindings['REALM']))."\n" |
|
139 | 139 | . "\n" |
140 | - . _("By not listing IdPs in the eduroam database, you are violating the eduroam policy.") . "\n" |
|
140 | + . _("By not listing IdPs in the eduroam database, you are violating the eduroam policy.")."\n" |
|
141 | 141 | . "\n" |
142 | - . _("Additionally, this creates operational issues. In particular, we are unable to direct end users to their IdP for further diagnosis/instructions because there are no contact points for that IdP in the database.") . "\n" |
|
142 | + . _("Additionally, this creates operational issues. In particular, we are unable to direct end users to their IdP for further diagnosis/instructions because there are no contact points for that IdP in the database.")."\n" |
|
143 | 143 | . "\n" |
144 | 144 | . _("Please stop the policy violation ASAP by listing the IdP which is associated to this realm.") |
145 | 145 | . "\n", |
@@ -150,11 +150,11 @@ discard block |
||
150 | 150 | "bcc" => [], |
151 | 151 | "reply-to" => [Logopath::TARGET_ENDUSER], |
152 | 152 | "subject" => _("[TECHNICAL PROBLEM] Administrator suspects technical problem with your IdP"), |
153 | - "body" => _("Dear IdP administrator,") . "\n" |
|
153 | + "body" => _("Dear IdP administrator,")."\n" |
|
154 | 154 | . "\n" |
155 | 155 | . sprintf(_("an organisation administrator requested diagnostics for realm %s. "), $this->additionalFindings['REALM']) |
156 | 156 | . "\n" |
157 | - . _("Real-time connectivity checks determined that the realm appears to be working in acceptable parameters, but the administrator insisted to contact you with the supplemental information below.") . "\n" |
|
157 | + . _("Real-time connectivity checks determined that the realm appears to be working in acceptable parameters, but the administrator insisted to contact you with the supplemental information below.")."\n" |
|
158 | 158 | . "\n", |
159 | 159 | ], |
160 | 160 | Logopath::IDP_SUSPECTED_PROBLEM_INTERACTIVE_EVIDENCED => [ |
@@ -163,11 +163,11 @@ discard block |
||
163 | 163 | "bcc" => [], |
164 | 164 | "reply-to" => [Logopath::TARGET_ENDUSER], |
165 | 165 | "subject" => _("[TECHNICAL PROBLEM] Administrator suspects technical problem with your IdP"), |
166 | - "body" => _("Dear IdP administrator,") . "\n" |
|
166 | + "body" => _("Dear IdP administrator,")."\n" |
|
167 | 167 | . "\n" |
168 | 168 | . sprintf(_("an organisation administrator requested diagnostics for realm %s. "), $this->additionalFindings['REALM']) |
169 | 169 | . "\n" |
170 | - . _("Real-time connectivity checks determined that the realm indeed has an operational problem at this point in time. Please see the supplemental information below.") . "\n" |
|
170 | + . _("Real-time connectivity checks determined that the realm indeed has an operational problem at this point in time. Please see the supplemental information below.")."\n" |
|
171 | 171 | . "\n", |
172 | 172 | ], |
173 | 173 | ]; |
@@ -175,13 +175,13 @@ discard block |
||
175 | 175 | // add exalted human-readable information to main mail body |
176 | 176 | foreach ($this->mailStack as $oneEntry) |
177 | 177 | if (isset($this->additionalFindings['INTERACTIVE_ENDUSER_AUTH_TIMESTAMP'])) { |
178 | - $oneEntry["body"] .= _("Authentication/Attempt Timestamp of user session:") ." ".$this->additionalFindings['INTERACTIVE_ENDUSER_AUTH_TIMESTAMP']."\n"; |
|
178 | + $oneEntry["body"] .= _("Authentication/Attempt Timestamp of user session:")." ".$this->additionalFindings['INTERACTIVE_ENDUSER_AUTH_TIMESTAMP']."\n"; |
|
179 | 179 | } |
180 | 180 | if (isset($this->additionalFindings['INTERACTIVE_ENDUSER_MAC'])) { |
181 | - $oneEntry["body"] .= _("MAC address of end user in question:") ." ".$this->additionalFindings['INTERACTIVE_ENDUSER_MAC']."\n"; |
|
181 | + $oneEntry["body"] .= _("MAC address of end user in question:")." ".$this->additionalFindings['INTERACTIVE_ENDUSER_MAC']."\n"; |
|
182 | 182 | } |
183 | 183 | if (isset($this->additionalFindings['INTERACTIVE_ADDITIONAL_COMMENTS'])) { |
184 | - $oneEntry["body"] .= _("Additional Comments:") ." ".$this->additionalFindings['INTERACTIVE_ADDITIONAL_COMMENTS']."\n"; |
|
184 | + $oneEntry["body"] .= _("Additional Comments:")." ".$this->additionalFindings['INTERACTIVE_ADDITIONAL_COMMENTS']."\n"; |
|
185 | 185 | } |
186 | 186 | |
187 | 187 | |
@@ -352,7 +352,7 @@ discard block |
||
352 | 352 | |
353 | 353 | $handle = \core\common\OutsideComm::mailHandle(); |
354 | 354 | // let's identify outselves |
355 | - $handle->FromName = \config\Master::APPEARANCE['productname'] . " Real-Time Diagnostics System"; |
|
355 | + $handle->FromName = \config\Master::APPEARANCE['productname']." Real-Time Diagnostics System"; |
|
356 | 356 | // add recipients |
357 | 357 | foreach (Logopath::CATEGORYBINDING as $arrayName => $functionName) { |
358 | 358 | foreach ($theMail[$arrayName] as $onePrincipal) { |
@@ -173,10 +173,11 @@ |
||
173 | 173 | ]; |
174 | 174 | |
175 | 175 | // add exalted human-readable information to main mail body |
176 | - foreach ($this->mailStack as $oneEntry) |
|
177 | - if (isset($this->additionalFindings['INTERACTIVE_ENDUSER_AUTH_TIMESTAMP'])) { |
|
176 | + foreach ($this->mailStack as $oneEntry) { |
|
177 | + if (isset($this->additionalFindings['INTERACTIVE_ENDUSER_AUTH_TIMESTAMP'])) { |
|
178 | 178 | $oneEntry["body"] .= _("Authentication/Attempt Timestamp of user session:") ." ".$this->additionalFindings['INTERACTIVE_ENDUSER_AUTH_TIMESTAMP']."\n"; |
179 | 179 | } |
180 | + } |
|
180 | 181 | if (isset($this->additionalFindings['INTERACTIVE_ENDUSER_MAC'])) { |
181 | 182 | $oneEntry["body"] .= _("MAC address of end user in question:") ." ".$this->additionalFindings['INTERACTIVE_ENDUSER_MAC']."\n"; |
182 | 183 | } |
@@ -4,12 +4,12 @@ |
||
4 | 4 | define('OPNAME_SUFFIX', '.hosted.eduroam.org'); |
5 | 5 | |
6 | 6 | function cat_socket($obj) { |
7 | - $sock = socket_create(AF_UNIX, SOCK_STREAM, 0); |
|
8 | - $conn = socket_connect($sock, SOCKET); |
|
9 | - if ( $conn ) { |
|
10 | - socket_write ($sock, $obj, strlen($obj)); |
|
11 | - $out = socket_read ($sock, 2048); |
|
12 | - return $out; |
|
13 | - } |
|
14 | - return 'FAILURE'; |
|
7 | + $sock = socket_create(AF_UNIX, SOCK_STREAM, 0); |
|
8 | + $conn = socket_connect($sock, SOCKET); |
|
9 | + if ( $conn ) { |
|
10 | + socket_write ($sock, $obj, strlen($obj)); |
|
11 | + $out = socket_read ($sock, 2048); |
|
12 | + return $out; |
|
13 | + } |
|
14 | + return 'FAILURE'; |
|
15 | 15 | } |
@@ -6,9 +6,9 @@ |
||
6 | 6 | function cat_socket($obj) { |
7 | 7 | $sock = socket_create(AF_UNIX, SOCK_STREAM, 0); |
8 | 8 | $conn = socket_connect($sock, SOCKET); |
9 | - if ( $conn ) { |
|
10 | - socket_write ($sock, $obj, strlen($obj)); |
|
11 | - $out = socket_read ($sock, 2048); |
|
9 | + if ($conn) { |
|
10 | + socket_write($sock, $obj, strlen($obj)); |
|
11 | + $out = socket_read($sock, 2048); |
|
12 | 12 | return $out; |
13 | 13 | } |
14 | 14 | return 'FAILURE'; |
@@ -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(dirname(__FILE__)))) . "/config/_config.php"; |
|
22 | +require_once dirname(dirname(dirname(dirname(__FILE__))))."/config/_config.php"; |
|
23 | 23 | |
24 | 24 | $auth = new \web\lib\admin\Authentication(); |
25 | 25 | $loggerInstance = new \core\common\Logging(); |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | $remaining_attribs = $my_profile->beginFlushMethodLevelAttributes($eaptype->getIntegerRep(), NULL); |
86 | 86 | $optionParser->processSubmittedFields($my_profile, $_POST, $_FILES, $eaptype->getIntegerRep(), NULL); |
87 | 87 | } |
88 | - $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile " . $my_profile->identifier . " - device/EAP-Type settings changed"); |
|
88 | + $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile ".$my_profile->identifier." - device/EAP-Type settings changed"); |
|
89 | 89 | header("Location: ../overview_installers.php?inst_id=$my_inst->identifier&profile_id=$my_profile->identifier"); |
90 | 90 | exit; |
91 | 91 | } |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | } |
100 | 100 | $captiontext = sprintf(_("device <strong>%s</strong>"), $device['display']); |
101 | 101 | $keyword = "device-specific"; |
102 | - $extrainput = "<input type='hidden' name='device' value='" . $device_key . "'/>"; |
|
102 | + $extrainput = "<input type='hidden' name='device' value='".$device_key."'/>"; |
|
103 | 103 | } elseif ($eaptype !== NULL) { |
104 | 104 | foreach ($my_profile->getAttributes() as $attrib) { |
105 | 105 | if (isset($attrib['eapmethod']) && $attrib['eapmethod'] == $eaptype->getArrayRep()) { |
@@ -109,12 +109,12 @@ discard block |
||
109 | 109 | |
110 | 110 | $captiontext = sprintf(_("EAP-Type <strong>%s</strong>"), $eaptype->getPrintableRep()); |
111 | 111 | $keyword = "eap-specific"; |
112 | - $extrainput = "<input type='hidden' name='eaptype' value='" . $eaptype->getIntegerRep() . "'>"; |
|
112 | + $extrainput = "<input type='hidden' name='eaptype' value='".$eaptype->getIntegerRep()."'>"; |
|
113 | 113 | } else { |
114 | 114 | throw new Exception("previous type checks make it impossible to reach this code path."); |
115 | 115 | } |
116 | 116 | ?> |
117 | -<p><?php echo _("Fine-tuning options for ") . $captiontext; ?></p> |
|
117 | +<p><?php echo _("Fine-tuning options for ").$captiontext; ?></p> |
|
118 | 118 | <hr/> |
119 | 119 | |
120 | 120 | <form action='inc/toggleRedirect.inc.php?inst_id=<?php echo $my_inst->identifier; ?>&profile_id=<?php echo $my_profile->identifier; ?>' method='post' accept-charset='UTF-8'><?php echo $extrainput; ?> |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | $interesting_attribs = []; |
124 | 124 | |
125 | 125 | foreach ($attribs as $attrib) { |
126 | - if ($attrib['level'] == \core\Options::LEVEL_METHOD && preg_match('/^' . $keyword . ':/', $attrib['name'])) { |
|
126 | + if ($attrib['level'] == \core\Options::LEVEL_METHOD && preg_match('/^'.$keyword.':/', $attrib['name'])) { |
|
127 | 127 | $interesting_attribs[] = $attrib; |
128 | 128 | } |
129 | 129 | } |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | public function htmlHeadCode() { |
48 | 48 | $cat = new \core\CAT(); |
49 | 49 | \core\common\Entity::intoThePotatoes(); |
50 | - $retval = "<script type='text/javascript' src='https://maps.googleapis.com/maps/api/js?key=" . \config\Master::APPEARANCE['google_maps_api_key'] . "'></script> |
|
50 | + $retval = "<script type='text/javascript' src='https://maps.googleapis.com/maps/api/js?key=".\config\Master::APPEARANCE['google_maps_api_key']."'></script> |
|
51 | 51 | <script type='text/javascript'> |
52 | 52 | // some global variables; |
53 | 53 | var center_lat=49.6114885608729; |
@@ -103,19 +103,19 @@ discard block |
||
103 | 103 | * |
104 | 104 | */ |
105 | 105 | function locator_magic() { |
106 | - geocoder.geocode({'address':\"" . preg_replace("/\"/", """, $this->instName) . "\", 'region':\"" . strtolower($this->fedName) . "\"}, |
|
106 | + geocoder.geocode({'address':\"" . preg_replace("/\"/", """, $this->instName)."\", 'region':\"".strtolower($this->fedName)."\"}, |
|
107 | 107 | function(r,status) { |
108 | 108 | if(status != google.maps.GeocoderStatus.OK) { |
109 | - locate_country(\"" . $cat->knownFederations[strtoupper($this->fedName)] . "\"); |
|
109 | + locate_country(\"" . $cat->knownFederations[strtoupper($this->fedName)]."\"); |
|
110 | 110 | } else { |
111 | 111 | var i; |
112 | 112 | for(i = 0; i < r.length; i++) { |
113 | 113 | Addr = getAddressElements(r[i].address_components); |
114 | - if(Addr.country == \"" . strtoupper($this->fedName) . "\") |
|
114 | + if(Addr.country == \"" . strtoupper($this->fedName)."\") |
|
115 | 115 | break; |
116 | 116 | } |
117 | - if(Addr.country != \"" . strtoupper($this->fedName) . "\") |
|
118 | - locate_country(\"" . $cat->knownFederations[strtoupper($this->fedName)] . "\"); |
|
117 | + if(Addr.country != \"" . strtoupper($this->fedName)."\") |
|
118 | + locate_country(\"" . $cat->knownFederations[strtoupper($this->fedName)]."\"); |
|
119 | 119 | else { |
120 | 120 | addMarker(r[i].geometry.location,15,null); |
121 | 121 | } |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | */ |
129 | 129 | function markerClicked(m) { |
130 | 130 | info_window.close(); |
131 | - var t = \"" . _("This is location ") . "\"+m.info; |
|
131 | + var t = \"" . _("This is location ")."\"+m.info; |
|
132 | 132 | info_window.setContent(t); |
133 | 133 | info_window.setPosition(m.getPosition()); |
134 | 134 | info_window.open(map,m); |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | function getAddressLocation() { |
208 | 208 | var city = $('#address').val(); |
209 | 209 | if(city == '') { |
210 | - alert(\"" . _("nothing entered in the address field") . "\"); |
|
210 | + alert(\"" . _("nothing entered in the address field")."\"); |
|
211 | 211 | return false; |
212 | 212 | } |
213 | 213 | geocoder.geocode( { 'address': city}, function(results, status) { |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | * trigger geolocation |
228 | 228 | */ |
229 | 229 | function locateMe() { |
230 | - $('#address').val(\"" . _("locating") . "\"); |
|
230 | + $('#address').val(\"" . _("locating")."\"); |
|
231 | 231 | navigator.geolocation.getCurrentPosition(locate_succes,locate_fail,{maximumAge:3600000, timeout:5000}); |
232 | 232 | } |
233 | 233 | |
@@ -345,7 +345,7 @@ discard block |
||
345 | 345 | if ($this->readOnly) { |
346 | 346 | return "<div id='map' class='googlemap'></div>"; |
347 | 347 | } else { |
348 | - return $this->htmlPreEdit($wizard, $additional) . $this->findLocationHtml() . "<div id='map' class='googlemap'></div>" . $this->htmlPostEdit(FALSE); |
|
348 | + return $this->htmlPreEdit($wizard, $additional).$this->findLocationHtml()."<div id='map' class='googlemap'></div>".$this->htmlPostEdit(FALSE); |
|
349 | 349 | } |
350 | 350 | } |
351 | 351 | |
@@ -358,11 +358,11 @@ discard block |
||
358 | 358 | */ |
359 | 359 | public static function optionListDisplayCode($coords, $number) { |
360 | 360 | // quiesce warnings about unused variable |
361 | - if (strlen(sprintf("%s", $coords)) <0) { |
|
361 | + if (strlen(sprintf("%s", $coords)) < 0) { |
|
362 | 362 | throw new \Exception("A miracle! A string with negative length!"); |
363 | 363 | }; |
364 | 364 | \core\common\Entity::intoThePotatoes(); |
365 | - $retval = "<button id='location_b_" . $number . "' class='location_button'>" . _("Click to see location") . " $number</button>"; |
|
365 | + $retval = "<button id='location_b_".$number."' class='location_button'>"._("Click to see location")." $number</button>"; |
|
366 | 366 | \core\common\Entity::outOfThePotatoes(); |
367 | 367 | return $retval; |
368 | 368 | } |
@@ -373,7 +373,7 @@ discard block |
||
373 | 373 | * @return string |
374 | 374 | */ |
375 | 375 | public function bodyTagCode() { |
376 | - return "onload='load(" . ($this->readOnly ? "0" : "1") . ")'"; |
|
376 | + return "onload='load(".($this->readOnly ? "0" : "1").")'"; |
|
377 | 377 | } |
378 | 378 | |
379 | 379 | /** |
@@ -383,7 +383,7 @@ discard block |
||
383 | 383 | */ |
384 | 384 | private function findLocationHtml() { |
385 | 385 | \core\common\Entity::intoThePotatoes(); |
386 | - $retval = "<p>" . _("Address:") . " <input name='address' id='address' /><button type='button' onclick='getAddressLocation()'>" . _("Find address") . "</button> <button type='button' onclick='locateMe()'>" . _("Locate Me!") . "</button></p>"; |
|
386 | + $retval = "<p>"._("Address:")." <input name='address' id='address' /><button type='button' onclick='getAddressLocation()'>"._("Find address")."</button> <button type='button' onclick='locateMe()'>"._("Locate Me!")."</button></p>"; |
|
387 | 387 | \core\common\Entity::outOfThePotatoes(); |
388 | 388 | return $retval; |
389 | 389 | } |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | |
28 | 28 | ?> |
29 | 29 | <?php |
30 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
30 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
31 | 31 | |
32 | 32 | $deco = new \web\lib\admin\PageDecoration(); |
33 | 33 | $validator = new \web\lib\common\InputValidation(); |
@@ -127,8 +127,8 @@ discard block |
||
127 | 127 | <?php |
128 | 128 | echo $uiElements->instLevelInfoBoxes($my_inst); |
129 | 129 | |
130 | - echo "<form enctype='multipart/form-data' action='edit_profile_result.php?inst_id=$my_inst->identifier" . ($my_profile !== NULL ? "&profile_id=" . $my_profile->identifier : "") . "' method='post' accept-charset='UTF-8'> |
|
131 | - <input type='hidden' name='MAX_FILE_SIZE' value='" . \config\Master::MAX_UPLOAD_SIZE . "'>"; |
|
130 | + echo "<form enctype='multipart/form-data' action='edit_profile_result.php?inst_id=$my_inst->identifier".($my_profile !== NULL ? "&profile_id=".$my_profile->identifier : "")."' method='post' accept-charset='UTF-8'> |
|
131 | + <input type='hidden' name='MAX_FILE_SIZE' value='" . \config\Master::MAX_UPLOAD_SIZE."'>"; |
|
132 | 132 | $optionDisplay = new \web\lib\admin\OptionDisplay($profile_options, \core\Options::LEVEL_PROFILE); |
133 | 133 | ?> |
134 | 134 | <fieldset class="option_container"> |
@@ -137,29 +137,29 @@ discard block |
||
137 | 137 | </legend> |
138 | 138 | <?php |
139 | 139 | if ($wizardStyle) { |
140 | - echo "<p>" . _("We will now define a profile for your user group(s). You can add as many profiles as you like by choosing the appropriate button on the end of the page. After we are done, the wizard is finished and you will be taken to the main IdP administration page.") . "</p>"; |
|
140 | + echo "<p>"._("We will now define a profile for your user group(s). You can add as many profiles as you like by choosing the appropriate button on the end of the page. After we are done, the wizard is finished and you will be taken to the main IdP administration page.")."</p>"; |
|
141 | 141 | } |
142 | 142 | ?> |
143 | 143 | <h3><?php echo _("Profile Name and RADIUS realm"); ?></h3> |
144 | 144 | <?php |
145 | 145 | if ($wizardStyle) { |
146 | - echo "<p>" . _("First of all we need a name for the profile. This will be displayed to end users, so you may want to choose a descriptive name like 'Professors', 'Students of the Faculty of Bioscience', etc.") . "</p>"; |
|
147 | - echo "<p>" . _("Optionally, you can provide a longer descriptive text about who this profile is for. If you specify it, it will be displayed on the download page after the user has selected the profile name in the list.") . "</p>"; |
|
148 | - echo "<p>" . _("You can also tell us your RADIUS realm. "); |
|
146 | + echo "<p>"._("First of all we need a name for the profile. This will be displayed to end users, so you may want to choose a descriptive name like 'Professors', 'Students of the Faculty of Bioscience', etc.")."</p>"; |
|
147 | + echo "<p>"._("Optionally, you can provide a longer descriptive text about who this profile is for. If you specify it, it will be displayed on the download page after the user has selected the profile name in the list.")."</p>"; |
|
148 | + echo "<p>"._("You can also tell us your RADIUS realm. "); |
|
149 | 149 | if (\config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS'] !== NULL) { |
150 | 150 | printf(_("This is useful if you want to use the sanity check module later, which tests reachability of your realm in the %s infrastructure. "), \config\ConfAssistant::CONSORTIUM['display_name']); |
151 | 151 | } |
152 | - echo _("It is required to enter the realm name if you want to support anonymous outer identities (see below).") . "</p>"; |
|
152 | + echo _("It is required to enter the realm name if you want to support anonymous outer identities (see below).")."</p>"; |
|
153 | 153 | } |
154 | 154 | |
155 | 155 | echo $optionDisplay->prefilledOptionTable("profile"); |
156 | 156 | ?> |
157 | 157 | <button type='button' class='newoption' onclick='getXML("profile")'><?php echo _("Add new option"); ?></button> |
158 | 158 | <table> |
159 | - <caption><?php echo _("Basic Realm Information");?></caption> |
|
159 | + <caption><?php echo _("Basic Realm Information"); ?></caption> |
|
160 | 160 | <tr> |
161 | - <th class="wai-invisible" scope="col"><?php echo _("Realm:");?></th> |
|
162 | - <th class="wai-invisible" scope="col"><?php echo _("Realm input field");?></th> |
|
161 | + <th class="wai-invisible" scope="col"><?php echo _("Realm:"); ?></th> |
|
162 | + <th class="wai-invisible" scope="col"><?php echo _("Realm input field"); ?></th> |
|
163 | 163 | </tr> |
164 | 164 | <?php |
165 | 165 | ?> |
@@ -204,9 +204,9 @@ discard block |
||
204 | 204 | |
205 | 205 | <?php |
206 | 206 | if ($wizardStyle) { |
207 | - echo "<p>" . sprintf(_("Some installers support a feature called 'Anonymous outer identity'. If you don't know what this is, please read <a href='%s'>this article</a>."), "https://confluence.terena.org/display/H2eduroam/eap-types") . "</p>"; |
|
208 | - echo "<p>" . _("On some platforms, the installers can suggest username endings and/or verify the user input to contain the realm suffix.") . "</p>"; |
|
209 | - echo "<p>" . _("The realm check feature needs to know an outer ID which actually gets a chance to authenticate. If your RADIUS server lets only select usernames pass, it is useful to supply the information which of those (outer ID) username we can use for testing.") . "</p>"; |
|
207 | + echo "<p>".sprintf(_("Some installers support a feature called 'Anonymous outer identity'. If you don't know what this is, please read <a href='%s'>this article</a>."), "https://confluence.terena.org/display/H2eduroam/eap-types")."</p>"; |
|
208 | + echo "<p>"._("On some platforms, the installers can suggest username endings and/or verify the user input to contain the realm suffix.")."</p>"; |
|
209 | + echo "<p>"._("The realm check feature needs to know an outer ID which actually gets a chance to authenticate. If your RADIUS server lets only select usernames pass, it is useful to supply the information which of those (outer ID) username we can use for testing.")."</p>"; |
|
210 | 210 | } |
211 | 211 | ?> |
212 | 212 | <p> |
@@ -214,10 +214,10 @@ discard block |
||
214 | 214 | |
215 | 215 | <!-- UI table to align elements--> |
216 | 216 | <table> |
217 | - <caption><?php echo _("Username Handling Options");?></caption> |
|
217 | + <caption><?php echo _("Username Handling Options"); ?></caption> |
|
218 | 218 | <tr> |
219 | - <th class="wai-invisible" scope="col"><?php echo _("Option name");?></th> |
|
220 | - <th class="wai-invisible" scope="col"><?php echo _("Option checkbox");?></th> |
|
219 | + <th class="wai-invisible" scope="col"><?php echo _("Option name"); ?></th> |
|
220 | + <th class="wai-invisible" scope="col"><?php echo _("Option checkbox"); ?></th> |
|
221 | 221 | </tr> |
222 | 222 | |
223 | 223 | <tr> |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | </td> |
230 | 230 | <td> |
231 | 231 | <input type='checkbox' <?php |
232 | - echo ($verify != FALSE ? "checked" : "" ); |
|
232 | + echo ($verify != FALSE ? "checked" : ""); |
|
233 | 233 | ?> name='verify_support' onclick=' |
234 | 234 | if (this.form.elements["verify_support"].checked !== true || this.form.elements["realm"].value.length == 0) { |
235 | 235 | this.form.elements["hint_support"].setAttribute("disabled", "disabled"); |
@@ -237,48 +237,48 @@ discard block |
||
237 | 237 | this.form.elements["hint_support"].removeAttribute("disabled"); |
238 | 238 | } |
239 | 239 | ;'/> |
240 | - <span id='hint_label' style='<?php echo ($realm == "" ? "color:#999999" : "" ); ?>'> |
|
240 | + <span id='hint_label' style='<?php echo ($realm == "" ? "color:#999999" : ""); ?>'> |
|
241 | 241 | <?php echo _("Prefill user input with realm suffix:"); ?> |
242 | 242 | </span> |
243 | - <input type='checkbox' <?php echo ($verify == FALSE ? "disabled" : "" ); ?> name='hint_support' <?php echo ( $hint != FALSE ? "checked" : "" ); ?> /> |
|
243 | + <input type='checkbox' <?php echo ($verify == FALSE ? "disabled" : ""); ?> name='hint_support' <?php echo ($hint != FALSE ? "checked" : ""); ?> /> |
|
244 | 244 | </td> |
245 | 245 | </tr> |
246 | 246 | <tr> |
247 | 247 | |
248 | 248 | <!-- checkbox and input field for anonymity support, available only when realm is known--> |
249 | 249 | <td> |
250 | - <span id='anon_support_label' style='<?php echo ($realm == "" ? "color:#999999" : "" ); ?>'> |
|
250 | + <span id='anon_support_label' style='<?php echo ($realm == "" ? "color:#999999" : ""); ?>'> |
|
251 | 251 | <?php echo _("Enable Anonymous Outer Identity:"); ?> |
252 | 252 | </span> |
253 | 253 | </td> |
254 | 254 | <td> |
255 | - <input type='checkbox' <?php echo ($useAnon != FALSE ? "checked" : "" ) . ($realm == "" ? " disabled" : "" ); ?> name='anon_support' onclick=' |
|
255 | + <input type='checkbox' <?php echo ($useAnon != FALSE ? "checked" : "").($realm == "" ? " disabled" : ""); ?> name='anon_support' onclick=' |
|
256 | 256 | if (this.form.elements["anon_support"].checked !== true) { |
257 | 257 | this.form.elements["anon_local"].setAttribute("disabled", "disabled"); |
258 | 258 | } else { |
259 | 259 | this.form.elements["anon_local"].removeAttribute("disabled"); |
260 | 260 | } |
261 | 261 | ;'/> |
262 | - <input type='text' <?php echo ($checkuserOuter == FALSE ? "disabled" : "" ); ?> name='anon_local' value='<?php echo $anonLocal; ?>'/> |
|
262 | + <input type='text' <?php echo ($checkuserOuter == FALSE ? "disabled" : ""); ?> name='anon_local' value='<?php echo $anonLocal; ?>'/> |
|
263 | 263 | </td> |
264 | 264 | </tr> |
265 | 265 | <tr> |
266 | 266 | |
267 | 267 | <!-- checkbox and input field for check realm outer id, available only when realm is known--> |
268 | 268 | <td> |
269 | - <span id='checkuser_label' style='<?php echo ($realm == "" ? "color:#999999" : "" ); ?>'> |
|
269 | + <span id='checkuser_label' style='<?php echo ($realm == "" ? "color:#999999" : ""); ?>'> |
|
270 | 270 | <?php echo _("Use special Outer Identity for realm checks:"); ?> |
271 | 271 | </span> |
272 | 272 | </td> |
273 | 273 | <td> |
274 | - <input type='checkbox' <?php echo ($checkuserOuter != FALSE ? "checked" : "" ) . ($realm == "" ? " disabled" : "" ); ?> name='checkuser_support' onclick=' |
|
274 | + <input type='checkbox' <?php echo ($checkuserOuter != FALSE ? "checked" : "").($realm == "" ? " disabled" : ""); ?> name='checkuser_support' onclick=' |
|
275 | 275 | if (this.form.elements["checkuser_support"].checked !== true) { |
276 | 276 | this.form.elements["checkuser_local"].setAttribute("disabled", "disabled"); |
277 | 277 | } else { |
278 | 278 | this.form.elements["checkuser_local"].removeAttribute("disabled"); |
279 | 279 | } |
280 | 280 | ;'/> |
281 | - <input type='text' <?php echo ($checkuserOuter == FALSE ? "disabled" : "" ); ?> name='checkuser_local' value='<?php echo $checkuserValue; ?>'/> |
|
281 | + <input type='text' <?php echo ($checkuserOuter == FALSE ? "disabled" : ""); ?> name='checkuser_local' value='<?php echo $checkuserValue; ?>'/> |
|
282 | 282 | </td> |
283 | 283 | </tr> |
284 | 284 | </table> |
@@ -288,20 +288,20 @@ discard block |
||
288 | 288 | |
289 | 289 | <?php |
290 | 290 | if ($wizardStyle) { |
291 | - echo "<p>" . _("The CAT has a download area for end users. There, they will, for example, learn about the support pointers you entered earlier. The CAT can also immediately offer the installers for the profile for download. If you don't want that, you can instead enter a web site location where you want your users to be redirected to. You, as the administrator, can still download the profiles to place them on that page (see the 'Compatibility Matrix' button on the dashboard).") . "</p>"; |
|
291 | + echo "<p>"._("The CAT has a download area for end users. There, they will, for example, learn about the support pointers you entered earlier. The CAT can also immediately offer the installers for the profile for download. If you don't want that, you can instead enter a web site location where you want your users to be redirected to. You, as the administrator, can still download the profiles to place them on that page (see the 'Compatibility Matrix' button on the dashboard).")."</p>"; |
|
292 | 292 | } |
293 | 293 | ?> |
294 | 294 | <p> |
295 | 295 | |
296 | 296 | <?php |
297 | - echo "<span id='redirect_label' style='" . ($realm == "" ? "color:#999999" : "" ) . "'><label for='redirect'>" . _("Redirect end users to own web page:") . "</label></span> |
|
298 | - <input type='checkbox' name='redirect' id='redirect' " . ($blacklisted === FALSE ? "" : "checked " ) . "onclick=' |
|
297 | + echo "<span id='redirect_label' style='".($realm == "" ? "color:#999999" : "")."'><label for='redirect'>"._("Redirect end users to own web page:")."</label></span> |
|
298 | + <input type='checkbox' name='redirect' id='redirect' " . ($blacklisted === FALSE ? "" : "checked ")."onclick=' |
|
299 | 299 | if (this.form.elements[\"redirect\"].checked != true) { |
300 | 300 | this.form.elements[\"redirect_target\"].setAttribute(\"disabled\", \"disabled\"); |
301 | 301 | } else { |
302 | 302 | this.form.elements[\"redirect_target\"].removeAttribute(\"disabled\"); |
303 | 303 | };'/> |
304 | - <input type='text' name='redirect_target' " . ($blacklisted !== FALSE ? "value='$blacklisted'" : "disabled" ) . "/>"; |
|
304 | + <input type='text' name='redirect_target' " . ($blacklisted !== FALSE ? "value='$blacklisted'" : "disabled")."/>"; |
|
305 | 305 | ?> |
306 | 306 | </p> |
307 | 307 | |
@@ -310,7 +310,7 @@ discard block |
||
310 | 310 | <legend><strong><?php echo _("Supported EAP types"); ?></strong></legend> |
311 | 311 | <?php |
312 | 312 | if ($wizardStyle) { |
313 | - echo "<p>" . _("Now, we need to know which EAP types your IdP supports. If you support multiple EAP types, you can assign every type a priority (1=highest). This tool will always generate an automatic installer for the EAP type with the highest priority; only if the user's device can't use that EAP type, we will use an EAP type further down in the list.") . "</p>"; |
|
313 | + echo "<p>"._("Now, we need to know which EAP types your IdP supports. If you support multiple EAP types, you can assign every type a priority (1=highest). This tool will always generate an automatic installer for the EAP type with the highest priority; only if the user's device can't use that EAP type, we will use an EAP type further down in the list.")."</p>"; |
|
314 | 314 | } |
315 | 315 | ?> |
316 | 316 | <?php |
@@ -334,7 +334,7 @@ discard block |
||
334 | 334 | ?> |
335 | 335 | <div> |
336 | 336 | <table style="border:none"> |
337 | - <caption><?php echo _("EAP type support");?></caption> |
|
337 | + <caption><?php echo _("EAP type support"); ?></caption> |
|
338 | 338 | <tr> |
339 | 339 | <th scope="row" style="vertical-align:top; padding:1em"> |
340 | 340 | <?php echo _('Supported EAP types for this profile'); ?> |
@@ -344,7 +344,7 @@ discard block |
||
344 | 344 | <?php |
345 | 345 | $D = []; |
346 | 346 | foreach ($prefill_methods as $prio => $value) { |
347 | - print '<li>' . $value->getPrintableRep() . "</li>\n"; |
|
347 | + print '<li>'.$value->getPrintableRep()."</li>\n"; |
|
348 | 348 | $D[$value->getPrintableRep()] = $prio; |
349 | 349 | } |
350 | 350 | ?> |
@@ -370,7 +370,7 @@ discard block |
||
370 | 370 | } |
371 | 371 | $display = $a->getPrintableRep(); |
372 | 372 | if (!isset($D[$a->getPrintableRep()])) { |
373 | - print '<li class="eap1">' . $a->getPrintableRep() . "</li>\n"; |
|
373 | + print '<li class="eap1">'.$a->getPrintableRep()."</li>\n"; |
|
374 | 374 | } |
375 | 375 | } |
376 | 376 | ?> |
@@ -383,8 +383,8 @@ discard block |
||
383 | 383 | foreach ($methods as $a) { |
384 | 384 | $display = $a->getPrintableRep(); |
385 | 385 | $v = isset($D[$display]) ? $D[$display] : ''; |
386 | - print '<input type="hidden" class="eapm" name="' . $display . '" id="EAP-' . $display . '" value="' . $display . '">'; |
|
387 | - print '<input type="hidden" class="eapmv" name="' . $display . '-priority" id="EAP-' . $display . '-priority" value="' . $v . '">'; |
|
386 | + print '<input type="hidden" class="eapm" name="'.$display.'" id="EAP-'.$display.'" value="'.$display.'">'; |
|
387 | + print '<input type="hidden" class="eapmv" name="'.$display.'-priority" id="EAP-'.$display.'-priority" value="'.$v.'">'; |
|
388 | 388 | } |
389 | 389 | ?> |
390 | 390 | <br style="clear:both;" /> |
@@ -404,11 +404,11 @@ discard block |
||
404 | 404 | foreach ($optionsAlreadySet as $optionNames) { |
405 | 405 | if (preg_match("/^support:/", $optionNames)) { |
406 | 406 | $has_support_options[$optionNames] = "SET"; |
407 | - $support_text .= "<li><strong>" . $uiElements->displayName($optionNames) . "</strong></li>"; |
|
407 | + $support_text .= "<li><strong>".$uiElements->displayName($optionNames)."</strong></li>"; |
|
408 | 408 | } |
409 | 409 | if (preg_match("/^media:/", $optionNames)) { |
410 | 410 | $has_media_options[$optionNames] = "SET"; |
411 | - $media_text .= "<li><strong>" . $uiElements->displayName($optionNames) . "</strong></li>"; |
|
411 | + $media_text .= "<li><strong>".$uiElements->displayName($optionNames)."</strong></li>"; |
|
412 | 412 | } |
413 | 413 | } |
414 | 414 | $fields = [ |
@@ -417,22 +417,22 @@ discard block |
||
417 | 417 | "media" => _("Media Properties for this profile")]; |
418 | 418 | |
419 | 419 | foreach ($fields as $name => $description) { |
420 | - echo "<fieldset class='option_container' id='" . $name . "_override'> |
|
420 | + echo "<fieldset class='option_container' id='".$name."_override'> |
|
421 | 421 | <legend><strong>$description</strong></legend> |
422 | 422 | <p>"; |
423 | 423 | |
424 | - if (count(${"has_" . $name . "_options"}) > 0) { |
|
425 | - printf(ngettext("The option %s is already defined IdP-wide. If you set it here on profile level, this setting will override the IdP-wide one.", "The options %s are already defined IdP-wide. If you set them here on profile level, these settings will override the IdP-wide ones.", count(${"has_" . $name . "_options"})), "<ul>" . ${$name . "_text"} . "</ul>"); |
|
424 | + if (count(${"has_".$name."_options"}) > 0) { |
|
425 | + printf(ngettext("The option %s is already defined IdP-wide. If you set it here on profile level, this setting will override the IdP-wide one.", "The options %s are already defined IdP-wide. If you set them here on profile level, these settings will override the IdP-wide ones.", count(${"has_".$name."_options"})), "<ul>".${$name."_text"}."</ul>"); |
|
426 | 426 | } |
427 | 427 | |
428 | 428 | echo "</p>"; |
429 | 429 | echo $optionDisplay->prefilledOptionTable($name); |
430 | - echo "<button type='button' class='newoption' onclick='getXML(\"$name\")'>" . _("Add new option") . "</button>"; |
|
430 | + echo "<button type='button' class='newoption' onclick='getXML(\"$name\")'>"._("Add new option")."</button>"; |
|
431 | 431 | echo "</fieldset>"; |
432 | 432 | } |
433 | 433 | |
434 | 434 | if ($wizardStyle) { |
435 | - echo "<p>" . _("When you are sure that everything is correct, please click on 'Save data' and you will be taken to your IdP Dashboard page.") . "</p>"; |
|
435 | + echo "<p>"._("When you are sure that everything is correct, please click on 'Save data' and you will be taken to your IdP Dashboard page.")."</p>"; |
|
436 | 436 | } |
437 | -echo "<p><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_idp.php?inst_id=$my_inst->identifier\"'>" . _("Discard changes") . "</button></p></form>"; |
|
437 | +echo "<p><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_idp.php?inst_id=$my_inst->identifier\"'>"._("Discard changes")."</button></p></form>"; |
|
438 | 438 | echo $deco->footer(); |
@@ -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 | $deco = new \web\lib\admin\PageDecoration(); |
25 | 25 | $validator = new \web\lib\common\InputValidation(); |
@@ -44,9 +44,9 @@ discard block |
||
44 | 44 | |
45 | 45 | $preflist = $my_profile->getEapMethodsinOrderOfPreference(); |
46 | 46 | ?> |
47 | - <h1><?php $tablecaption = sprintf(_("Device compatiblity matrix for %s of %s "), $profile_name, $inst_name); echo $tablecaption;?></h1> |
|
47 | + <h1><?php $tablecaption = sprintf(_("Device compatiblity matrix for %s of %s "), $profile_name, $inst_name); echo $tablecaption; ?></h1> |
|
48 | 48 | <table class="compatmatrix"> |
49 | - <caption><?php echo $tablecaption;?></caption> |
|
49 | + <caption><?php echo $tablecaption; ?></caption> |
|
50 | 50 | <tr> |
51 | 51 | <th scope='col'></th> |
52 | 52 | <th scope='col'><?php echo _("Device"); ?></th> |
@@ -54,10 +54,10 @@ discard block |
||
54 | 54 | <?php |
55 | 55 | foreach ($preflist as $method) { |
56 | 56 | $escapedMethod = $method->getIntegerRep(); |
57 | - echo "<th scope='col' style='min-width:200px'>" . $method->getPrintableRep() . "<br/> |
|
57 | + echo "<th scope='col' style='min-width:200px'>".$method->getPrintableRep()."<br/> |
|
58 | 58 | <form method='post' action='inc/toggleRedirect.inc.php?inst_id=$my_inst->identifier&profile_id=$my_profile->identifier' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'> |
59 | 59 | <input type='hidden' name='eaptype' value='$escapedMethod'> |
60 | - <button class='redirect' type='submit'>" . _("EAP-Type-specific options...") . "</button> |
|
60 | + <button class='redirect' type='submit'>"._("EAP-Type-specific options...")."</button> |
|
61 | 61 | </form></th>"; |
62 | 62 | } |
63 | 63 | ?> |
@@ -73,10 +73,10 @@ discard block |
||
73 | 73 | foreach (\devices\Devices::listDevices() as $index => $description) { |
74 | 74 | |
75 | 75 | echo "<tr>"; |
76 | - echo "<td align='center'><img src='../resources/images/vendorlogo/" . $description['group'] . ".png' alt='logo'></td><td>" . $description['display'] . "<br/> |
|
76 | + echo "<td align='center'><img src='../resources/images/vendorlogo/".$description['group'].".png' alt='logo'></td><td>".$description['display']."<br/> |
|
77 | 77 | <form method='post' action='inc/toggleRedirect.inc.php?inst_id=$my_inst->identifier&profile_id=$my_profile->identifier' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'> |
78 | 78 | <input type='hidden' name='device' value='$index'> |
79 | - <button class='redirect' type='submit'>" . _("Device-specific options...") . "</button> |
|
79 | + <button class='redirect' type='submit'>"._("Device-specific options...")."</button> |
|
80 | 80 | </form> |
81 | 81 | </td>"; |
82 | 82 | $factory = new \core\DeviceFactory($index); |
@@ -85,10 +85,10 @@ discard block |
||
85 | 85 | $footnotesForDevEapCombo = []; |
86 | 86 | $display_footnote = FALSE; |
87 | 87 | $langObject = new \core\common\Language(); |
88 | - $downloadform = "<form action='" . rtrim(dirname(dirname($_SERVER['SCRIPT_NAME'])), '/') . "/user/API.php?action=downloadInstaller&profile=$my_profile->identifier&lang=" . $langObject->getLang() . "' method='post' accept-charset='UTF-8'> |
|
88 | + $downloadform = "<form action='".rtrim(dirname(dirname($_SERVER['SCRIPT_NAME'])), '/')."/user/API.php?action=downloadInstaller&profile=$my_profile->identifier&lang=".$langObject->getLang()."' method='post' accept-charset='UTF-8'> |
|
89 | 89 | <input type='hidden' name='device' value='$index'/> |
90 | 90 | <input type='hidden' name='generatedfor' value='admin'/> |
91 | - <button class='download'>" . _("Download") . "</button> |
|
91 | + <button class='download'>"._("Download")."</button> |
|
92 | 92 | "; |
93 | 93 | // first of all: if redirected, indicate by color |
94 | 94 | |
@@ -151,8 +151,8 @@ discard block |
||
151 | 151 | </table> |
152 | 152 | <p><strong><?php $tablecaption2 = _("Legend:"); echo $tablecaption2; ?></strong></p> |
153 | 153 | <table class="compatmatrix"> |
154 | - <caption><?php echo $tablecaption2;?></caption> |
|
155 | - <tr><th scope="col"><?php echo _("Colour");?></th><th scope='col'><?php echo _("Meaning");?></th></tr> |
|
154 | + <caption><?php echo $tablecaption2; ?></caption> |
|
155 | + <tr><th scope="col"><?php echo _("Colour"); ?></th><th scope='col'><?php echo _("Meaning"); ?></th></tr> |
|
156 | 156 | <tr><td class="compat_redirected"> </td> <td><?php echo _("redirection is set"); ?></td></tr> |
157 | 157 | <tr><td class="compat_default"> </td> <td><?php echo _("will be offered on download site"); ?></td></tr> |
158 | 158 | <tr><td class="compat_secondary"> </td> <td><?php echo _("configured, but not preferred EAP type"); ?></td></tr> |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | </table> |
162 | 162 | <?php |
163 | 163 | if (count($distinctFootnotes)) { |
164 | - echo "<p><strong>" . _("Footnotes:") . "</strong></p><table>"; |
|
164 | + echo "<p><strong>"._("Footnotes:")."</strong></p><table>"; |
|
165 | 165 | foreach ($distinctFootnotes as $number => $text) { |
166 | 166 | echo "<tr><td>($number) - </td><td>$text</td></tr>"; |
167 | 167 | } |