Test Failed
Push — master ( 7c9196...d32c48 )
by Stefan
07:03
created
web/diag/processSociopath.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
  *          <base_url>/copyright.php after deploying the software
20 20
  */
21 21
 
22
-require_once dirname(dirname(__DIR__)) . "/config/_config.php";
22
+require_once dirname(dirname(__DIR__))."/config/_config.php";
23 23
 \core\CAT::sessionStart();
24 24
 $loggerInstance = new \core\common\Logging();
25 25
 $loggerInstance->debug(4, "Sociopath test\n");
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
         return NULL;
34 34
     }
35 35
     $loggerInstance->debug(4, $_SESSION['EVIDENCE']['QUESTIONSASKED']);
36
-    $loggerInstance->debug(4, "\nAnswer question " . $QNUM . "\n");
36
+    $loggerInstance->debug(4, "\nAnswer question ".$QNUM."\n");
37 37
     switch ($answer) {
38 38
         case 1:
39 39
             $loggerInstance->debug(4, "Revaluate with FALSE");
Please login to merge, or discard this patch.
web/diag/magicTelepath.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,10 +19,10 @@
 block discarded – undo
19 19
  *          <base_url>/copyright.php after deploying the software
20 20
  */
21 21
 
22
-require_once dirname(dirname(__DIR__)) . "/config/_config.php";
22
+require_once dirname(dirname(__DIR__))."/config/_config.php";
23 23
 $realm = filter_input(INPUT_GET, 'realm', FILTER_SANITIZE_STRING);
24
-$visited = filter_input(INPUT_GET,'visited', FILTER_SANITIZE_STRING);
25
-$nro = filter_input(INPUT_GET,'nro', FILTER_SANITIZE_STRING);
24
+$visited = filter_input(INPUT_GET, 'visited', FILTER_SANITIZE_STRING);
25
+$nro = filter_input(INPUT_GET, 'nro', FILTER_SANITIZE_STRING);
26 26
 \core\CAT::sessionStart();
27 27
 $languageObject = new core\common\Language();
28 28
 $languageObject->setTextDomain("diagonstics");
Please login to merge, or discard this patch.
web/diag/diag.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,8 +42,8 @@
 block discarded – undo
42 42
     $auth->authenticate();
43 43
 }
44 44
 if (isset($_SESSION['admin_diag_auth'])) {
45
-   $admin =  1;
46
-   unset($_SESSION['admin_diag_auth']);
45
+    $admin =  1;
46
+    unset($_SESSION['admin_diag_auth']);
47 47
 }
48 48
 $Gui = new \web\lib\user\Gui();
49 49
 $skinObject = new \web\lib\user\Skinjob($_REQUEST['skin'] ?? $_SESSION['skin'] ?? $fedskin[0] ?? \config\Master::CONFIG['APPEARANCE']['skins'][0]);
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
  *          <base_url>/copyright.php after deploying the software
20 20
  */
21 21
 
22
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
22
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
23 23
 $admin = filter_input(INPUT_GET, 'admin', FILTER_VALIDATE_INT);
24 24
 $auth = new \web\lib\admin\Authentication();
25 25
 $isauth = 0;
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
             unset($q_el[$idx]);
34 34
             $q_r = preg_replace("/\?.*/", "", $_SERVER['REQUEST_URI']);
35 35
             if (count($q_el)) {
36
-                $q_r = $q_r . '?' . implode('&', $q_el);
36
+                $q_r = $q_r.'?'.implode('&', $q_el);
37 37
             }
38 38
             $_SERVER['REQUEST_URI'] = $q_r;
39 39
         }
@@ -42,11 +42,11 @@  discard block
 block discarded – undo
42 42
     $auth->authenticate();
43 43
 }
44 44
 if (isset($_SESSION['admin_diag_auth'])) {
45
-   $admin =  1;
45
+   $admin = 1;
46 46
    unset($_SESSION['admin_diag_auth']);
47 47
 }
48 48
 $Gui = new \web\lib\user\Gui();
49 49
 $skinObject = new \web\lib\user\Skinjob($_REQUEST['skin'] ?? $_SESSION['skin'] ?? $fedskin[0] ?? \config\Master::CONFIG['APPEARANCE']['skins'][0]);
50
-require "../skins/" . $skinObject->skin . "/diag/diag.php";
50
+require "../skins/".$skinObject->skin."/diag/diag.php";
51 51
 
52 52
 
Please login to merge, or discard this patch.
web/diag/action_realmcheck.php 1 patch
Spacing   +57 added lines, -57 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
  *          <base_url>/copyright.php after deploying the software
20 20
  */
21 21
 
22
-require_once dirname(dirname(__DIR__)) . "/config/_config.php";
22
+require_once dirname(dirname(__DIR__))."/config/_config.php";
23 23
 
24 24
 $loggerInstance = new \core\common\Logging();
25 25
 
@@ -55,13 +55,13 @@  discard block
 block discarded – undo
55 55
         $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"]);
56 56
         $rfc7585suite = new \core\diag\RFC7585Tests($check_realm);
57 57
     } else {
58
-        $error_message = _("You asked for a realm check, but we don't know the realm for this profile!") . "</p>";
58
+        $error_message = _("You asked for a realm check, but we don't know the realm for this profile!")."</p>";
59 59
     }
60 60
 } else { // someone else's realm... only shallow checks
61 61
     $check_realm = $validator->realm($realm ?? $_SESSION['check_realm'] ?? "");
62 62
     if ($check_realm !== FALSE) {
63 63
         $_SESSION['check_realm'] = $check_realm;
64
-        $testsuite = new \core\diag\RADIUSTests($check_realm, "@" . $check_realm);
64
+        $testsuite = new \core\diag\RADIUSTests($check_realm, "@".$check_realm);
65 65
         $rfc7585suite = new \core\diag\RFC7585Tests($check_realm);
66 66
     } else {
67 67
         $error_message = _("No valid realm name given, cannot execute any checks!");
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
     var listofcas = "<?php echo _("You should update your list of accredited CAs") ?>";
110 110
     var getitfrom = "<?php echo _("Get it from here.") ?>";
111 111
     var listsource = "<?php echo \config\Diagnostics::CONFIG['RADIUSTESTS']['accreditedCAsURL'] ?>";
112
-    var moretext = "<?php echo _("more") . "&raquo;" ?>";
112
+    var moretext = "<?php echo _("more")."&raquo;" ?>";
113 113
     var lesstext = "<?php echo "&laquo" ?>";
114 114
     var morealltext = "<?php echo _("Show detailed information for all tests") ?>";
115 115
     var unknownca_code = "<?php echo \core\diag\RADIUSTests::CERTPROB_UNKNOWN_CA ?>";
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
                         }
247 247
                     }
248 248
                     cliinfo = cliinfo + '<li><table><tbody><tr><td class="icon_td"><img class="icon" src="' + icons[level] + '" style="width: 24px;"></td><td>' + state;
249
-                    cliinfo = cliinfo + ' <?php echo "(" . sprintf(_("elapsed time: %sms."), "'+data.ca[key].certificate[c].time_millisec+'&nbsp;") . ")"; ?>' + add + '</td></tr>';
249
+                    cliinfo = cliinfo + ' <?php echo "(".sprintf(_("elapsed time: %sms."), "'+data.ca[key].certificate[c].time_millisec+'&nbsp;").")"; ?>' + add + '</td></tr>';
250 250
                     cliinfo = cliinfo + '</tbody></table></ul></li>';
251 251
                     if (data.ca[key].certificate[c].finalerror === 1) {
252 252
                         cliinfo = cliinfo + '<li>' + restskipped + '</li>';
@@ -416,8 +416,8 @@  discard block
 block discarded – undo
416 416
 <?php
417 417
 foreach (\config\Diagnostics::CONFIG['RADIUSTESTS']['UDP-hosts'] as $hostindex => $host) {
418 418
     print "
419
-$(\"#live_src" . $hostindex . "_img\").attr('src',icon_loading);
420
-$(\"#live_src" . $hostindex . "_img\").show();
419
+$(\"#live_src" . $hostindex."_img\").attr('src',icon_loading);
420
+$(\"#live_src" . $hostindex."_img\").show();
421 421
     $.ajax({
422 422
         url: 'radius_tests.php?src=0&hostindex=$hostindex&realm='+realm,
423 423
         type: 'POST',
@@ -447,15 +447,15 @@  discard block
 block discarded – undo
447 447
 <?php
448 448
 foreach (\config\Diagnostics::CONFIG['RADIUSTESTS']['UDP-hosts'] as $hostindex => $host) {
449 449
     if ($my_profile !== NULL) {
450
-        $extraarg = "profile_id: " . $my_profile->identifier . ", ";
450
+        $extraarg = "profile_id: ".$my_profile->identifier.", ";
451 451
     } else {
452 452
         $extraarg = "";
453 453
     }
454 454
     print "
455
-$(\"#src" . $hostindex . "_img\").attr('src',icon_loading);
455
+$(\"#src" . $hostindex."_img\").attr('src',icon_loading);
456 456
 $(\"#src$hostindex\").html('');
457 457
 running_ajax_stat++;
458
-$.get('radius_tests.php',{test_type: 'udp', $extraarg realm: realm, src: $hostindex, lang: '" . $gui->languageInstance->getLang() . "', hostindex: '$hostindex'  }, udp, 'json');
458
+$.get('radius_tests.php',{test_type: 'udp', $extraarg realm: realm, src: $hostindex, lang: '".$gui->languageInstance->getLang()."', hostindex: '$hostindex'  }, udp, 'json');
459 459
 
460 460
 ";
461 461
 }
@@ -482,7 +482,7 @@  discard block
 block discarded – undo
482 482
     if ($check_realm === FALSE) {
483 483
         print "<p>$error_message</p>";
484 484
     } else {
485
-        print "<h1>" . sprintf(_("Realm testing for: %s"), $check_realm) . "</h1>\n";
485
+        print "<h1>".sprintf(_("Realm testing for: %s"), $check_realm)."</h1>\n";
486 486
         ?>
487 487
         <div id="debug_out" style="display: none"></div>
488 488
         <div id="tabs" style="min-width: 600px; max-width:800px">
@@ -499,12 +499,12 @@  discard block
 block discarded – undo
499 499
                     </legend>
500 500
                     <?php
501 501
                     // NAPTR existence check
502
-                    echo "<strong>" . _("DNS chekcs") . "</strong><div>";
502
+                    echo "<strong>"._("DNS chekcs")."</strong><div>";
503 503
                     $naptr = $rfc7585suite->relevantNAPTR();
504 504
                     if ($naptr != \core\diag\RADIUSTests::RETVAL_NOTCONFIGURED) {
505 505
                         echo "<table>";
506 506
                         // output in friendly words
507
-                        echo "<tr><td>" . _("Checking NAPTR existence:") . "</td><td>";
507
+                        echo "<tr><td>"._("Checking NAPTR existence:")."</td><td>";
508 508
                         switch ($naptr) {
509 509
                             case \core\diag\RFC7585Tests::RETVAL_NONAPTR:
510 510
                                 echo _("This realm has no NAPTR records.");
@@ -519,7 +519,7 @@  discard block
 block discarded – undo
519 519
 
520 520
                         // compliance checks for NAPTRs
521 521
                         if ($naptr > 0) {
522
-                            echo "<tr><td>" . _("Checking NAPTR compliance (flag = S and regex = {empty}):") . "</td><td>";
522
+                            echo "<tr><td>"._("Checking NAPTR compliance (flag = S and regex = {empty}):")."</td><td>";
523 523
                             $naptr_valid = $rfc7585suite->relevantNAPTRcompliance();
524 524
                             switch ($naptr_valid) {
525 525
                                 case \core\diag\RADIUSTests::RETVAL_OK:
@@ -536,7 +536,7 @@  discard block
 block discarded – undo
536 536
 
537 537
                         if ($naptr > 0 && $naptr_valid == \core\diag\RADIUSTests::RETVAL_OK) {
538 538
                             $srv = $rfc7585suite->relevantNAPTRsrvResolution();
539
-                            echo "<tr><td>" . _("Checking SRVs:") . "</td><td>";
539
+                            echo "<tr><td>"._("Checking SRVs:")."</td><td>";
540 540
                             switch ($srv) {
541 541
                                 case \core\diag\RADIUSTests::RETVAL_SKIPPED:
542 542
                                     echo _("This check was skipped.");
@@ -552,7 +552,7 @@  discard block
 block discarded – undo
552 552
                         // IP addresses for the hosts
553 553
                         if ($naptr > 0 && $naptr_valid == \core\diag\RADIUSTests::RETVAL_OK && $srv > 0) {
554 554
                             $hosts = $rfc7585suite->relevantNAPTRhostnameResolution();
555
-                            echo "<tr><td>" . _("Checking IP address resolution:") . "</td><td>";
555
+                            echo "<tr><td>"._("Checking IP address resolution:")."</td><td>";
556 556
                             switch ($srv) {
557 557
                                 case \core\diag\RADIUSTests::RETVAL_SKIPPED:
558 558
                                     echo _("This check was skipped.");
@@ -568,12 +568,12 @@  discard block
 block discarded – undo
568 568
 
569 569
                         echo "</table><br/><br/>";
570 570
                         if (count($testsuite->listerrors()) == 0) {
571
-                            echo sprintf(_("Realm is <strong>%s</strong> "), _(($naptr > 0 ? "DYNAMIC" : "STATIC"))) . _("with no DNS errors encountered. Congratulations!");
571
+                            echo sprintf(_("Realm is <strong>%s</strong> "), _(($naptr > 0 ? "DYNAMIC" : "STATIC")))._("with no DNS errors encountered. Congratulations!");
572 572
                         } else {
573
-                            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.");
573
+                            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.");
574 574
                             echo "<div class='notacceptable'><table>";
575 575
                             foreach ($testsuite->listerrors() as $details) {
576
-                                echo "<tr><td>" . $details['TYPE'] . "</td><td>" . $details['TARGET'] . "</td></tr>";
576
+                                echo "<tr><td>".$details['TYPE']."</td><td>".$details['TARGET']."</td></tr>";
577 577
                             }
578 578
                             echo "</table></div>";
579 579
                         }
@@ -589,25 +589,25 @@  discard block
 block discarded – undo
589 589
                  $("#dynamic_tests").show();
590 590
               ';
591 591
                         foreach ($rfc7585suite->NAPTR_hostname_records as $hostindex => $addr) {
592
-                            $host = ($addr['family'] == "IPv6" ? "[" : "") . $addr['IP'] . ($addr['family'] == "IPv6" ? "]" : "") . ":" . $addr['port'];
592
+                            $host = ($addr['family'] == "IPv6" ? "[" : "").$addr['IP'].($addr['family'] == "IPv6" ? "]" : "").":".$addr['port'];
593 593
                             print "
594 594
                             running_ajax_dyn++;
595
-                            $.ajax({url:'radius_tests.php', data:{test_type: 'capath', realm: realm, src: '$host', lang: '" . $gui->languageInstance->getLang() . "', hostindex: '$hostindex' }, error: eee, success: capath, dataType: 'json'}); 
595
+                            $.ajax({url:'radius_tests.php', data:{test_type: 'capath', realm: realm, src: '$host', lang: '".$gui->languageInstance->getLang()."', hostindex: '$hostindex' }, error: eee, success: capath, dataType: 'json'}); 
596 596
                             running_ajax_dyn++;
597
-                            $.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'}); 
597
+                            $.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'}); 
598 598
                        ";
599 599
                         }
600 600
                         echo "}
601 601
               </script><hr>";
602 602
                     } else {
603
-                        echo "<tr><td>" . _("Dynamic discovery test is not configured") . "</td><td>";
603
+                        echo "<tr><td>"._("Dynamic discovery test is not configured")."</td><td>";
604 604
                     }
605
-                    echo "<strong>" . _("Static connectivity tests") . "</strong>
605
+                    echo "<strong>"._("Static connectivity tests")."</strong>
606 606
          <table><tr>
607 607
          <td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='main_static_ico' class='icon'></td><td id='main_static_result' style='display:none'>&nbsp;</td>
608 608
          </tr></table>";
609 609
                     if ($naptr > 0) {
610
-                        echo "<hr><strong>" . _("Dynamic connectivity tests") . "</strong>
610
+                        echo "<hr><strong>"._("Dynamic connectivity tests")."</strong>
611 611
          <table><tr>
612 612
          <td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='main_dynamic_ico' class='icon'></td><td id='main_dynamic_result' style='display:none'>&nbsp;</td>
613 613
          </tr></table>";
@@ -627,12 +627,12 @@  discard block
 block discarded – undo
627 627
                     print "<p>";
628 628
                     foreach (\config\Diagnostics::CONFIG['RADIUSTESTS']['UDP-hosts'] as $hostindex => $host) {
629 629
                         print "<hr>";
630
-                        printf(_("Testing from: %s"), "<strong>" . \config\Diagnostics::CONFIG['RADIUSTESTS']['UDP-hosts'][$hostindex]['display_name'] . "</strong>");
630
+                        printf(_("Testing from: %s"), "<strong>".\config\Diagnostics::CONFIG['RADIUSTESTS']['UDP-hosts'][$hostindex]['display_name']."</strong>");
631 631
                         print "<table id='results$hostindex'  style='width:100%' class='udp_results'>
632 632
 <tr>
633
-<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='src" . $hostindex . "_img'></td>
633
+<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='src".$hostindex."_img'></td>
634 634
 <td id='src$hostindex' colspan=2>
635
-" . _("testing...") . "
635
+"._("testing...")."
636 636
 </td>
637 637
 </tr>
638 638
 </table>";
@@ -651,21 +651,21 @@  discard block
 block discarded – undo
651 651
 
652 652
                     <?php
653 653
                     echo "<div id='dynamic_tests'><fieldset class='option_container'>
654
-                <legend><strong>" . _("DYNAMIC connectivity tests") . "</strong></legend>";
654
+                <legend><strong>" . _("DYNAMIC connectivity tests")."</strong></legend>";
655 655
 
656 656
                     $resultstoprint = [];
657 657
                     if (count($rfc7585suite->NAPTR_hostname_records) > 0) {
658
-                        $resultstoprint[] = '<table style="align:right; display: none;" id="dynamic_result_fail">' . _("Some errors were found during the tests, see below") . '</table><table style="align:right; display: none;" id="dynamic_result_pass">' . _("All tests passed, congratulations!") . '</table>';
659
-                        $resultstoprint[] = '<div style="align:right;"><a href="" class="moreall">' . _('Show detailed information for all tests') . '</a></div>' . '<p><strong>' . _("Checking server handshake...") . "</strong><p>";
658
+                        $resultstoprint[] = '<table style="align:right; display: none;" id="dynamic_result_fail">'._("Some errors were found during the tests, see below").'</table><table style="align:right; display: none;" id="dynamic_result_pass">'._("All tests passed, congratulations!").'</table>';
659
+                        $resultstoprint[] = '<div style="align:right;"><a href="" class="moreall">'._('Show detailed information for all tests').'</a></div>'.'<p><strong>'._("Checking server handshake...")."</strong><p>";
660 660
                         foreach ($rfc7585suite->NAPTR_hostname_records as $hostindex => $addr) {
661
-                            $bracketaddr = ($addr["family"] == "IPv6" ? "[" . $addr["IP"] . "]" : $addr["IP"]);
662
-                            $resultstoprint[] = '<p><strong>' . $bracketaddr . ' TCP/' . $addr['port'] . '</strong>';
661
+                            $bracketaddr = ($addr["family"] == "IPv6" ? "[".$addr["IP"]."]" : $addr["IP"]);
662
+                            $resultstoprint[] = '<p><strong>'.$bracketaddr.' TCP/'.$addr['port'].'</strong>';
663 663
                             $resultstoprint[] = '<ul style="list-style-type: none;" class="caresult"><li>';
664 664
                             $resultstoprint[] = "<table id='caresults$hostindex'  style='width:100%'>
665 665
 <tr>
666
-<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='srcca" . $hostindex . "_img'></td>
666
+<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='srcca".$hostindex."_img'></td>
667 667
 <td id='srcca$hostindex'>
668
-" . _("testing...") . "
668
+"._("testing...")."
669 669
 </td>
670 670
 </tr>
671 671
 </table>";
@@ -673,12 +673,12 @@  discard block
 block discarded – undo
673 673
                         }
674 674
                         $clientstest = [];
675 675
                         foreach ($rfc7585suite->NAPTR_hostname_records as $hostindex => $addr) {
676
-                            $clientstest[] = '<p><strong>' . $addr['IP'] . ' TCP/' . $addr['port'] . '</strong></p><ol>';
676
+                            $clientstest[] = '<p><strong>'.$addr['IP'].' TCP/'.$addr['port'].'</strong></p><ol>';
677 677
                             $clientstest[] = "<span id='clientresults$hostindex$clinx'><table style='width:100%'>
678 678
 <tr>
679
-<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='srcclient" . $hostindex . "_img'></td>
679
+<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='srcclient".$hostindex."_img'></td>
680 680
 <td id='srcclient$hostindex'>
681
-" . _("testing...") . "
681
+"._("testing...")."
682 682
 </td>
683 683
 </tr>
684 684
 </table></span>";
@@ -686,7 +686,7 @@  discard block
 block discarded – undo
686 686
                         }
687 687
                         echo '<div style="align:right;">';
688 688
                         echo join('', $resultstoprint);
689
-                        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>';
689
+                        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>';
690 690
                         print join('', $clientstest);
691 691
                         echo '</span>';
692 692
                         echo '</div>';
@@ -700,7 +700,7 @@  discard block
 block discarded – undo
700 700
                 //     check if truncates/dies on Operator-Name
701 701
                 if ($my_profile !== NULL) {
702 702
                     echo "<div id='tabs-4'><fieldset class='option_container'>
703
-                <legend><strong>" . _("Live login test") . "</strong></legend>";
703
+                <legend><strong>" . _("Live login test")."</strong></legend>";
704 704
                     $prof_compl = $my_profile->getEapMethodsinOrderOfPreference(1);
705 705
                     if (count($prof_compl) > 0) {
706 706
                         $passwordReqired = FALSE;
@@ -713,34 +713,34 @@  discard block
 block discarded – undo
713 713
                                 $clientCertRequired = TRUE;
714 714
                             }
715 715
                         }
716
-                        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>
717
-                    <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>
718
-                    <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>
716
+                        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>
717
+                    <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>
718
+                    <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>
719 719
                     <form enctype='multipart/form-data' id='live_form' accept-charset='UTF-8'>
720 720
                     <input type='hidden' name='test_type' value='udp_login'>
721
-                    <input type='hidden' name='lang' value='" . $gui->languageInstance->getLang() . "'>
722
-                    <input type='hidden' name='profile_id' value='" . $my_profile->identifier . "'>
721
+                    <input type='hidden' name='lang' value='" . $gui->languageInstance->getLang()."'>
722
+                    <input type='hidden' name='profile_id' value='" . $my_profile->identifier."'>
723 723
                     <table id='live_tests'>";
724 724
 // if any password based EAP methods are available enable this section
725 725
                         if ($passwordReqired) {
726
-                            echo "<tr><td colspan='2'><strong>" . _("Password-based EAP types") . "</strong></td></tr>
727
-                        <tr><td>" . _("Real (inner) username:") . "</td><td><input type='text' id='username' class='mandatory' name='username'/></td></tr>";
728
-                            echo "<tr><td>" . _("Anonymous outer ID (optional):") . "</td><td><input type='text' id='outer_username' name='outer_username'/></td></tr>";
729
-                            echo "<tr><td>" . _("Password:") . "</td><td><input type='text' id='password' class='mandatory' name='password'/></td></tr>";
726
+                            echo "<tr><td colspan='2'><strong>"._("Password-based EAP types")."</strong></td></tr>
727
+                        <tr><td>" . _("Real (inner) username:")."</td><td><input type='text' id='username' class='mandatory' name='username'/></td></tr>";
728
+                            echo "<tr><td>"._("Anonymous outer ID (optional):")."</td><td><input type='text' id='outer_username' name='outer_username'/></td></tr>";
729
+                            echo "<tr><td>"._("Password:")."</td><td><input type='text' id='password' class='mandatory' name='password'/></td></tr>";
730 730
                         }
731 731
                         // ask for cert + privkey if TLS-based method is active
732 732
                         if ($clientCertRequired) {
733
-                            echo "<tr><td colspan='2'><strong>" . _("Certificate-based EAP types") . "</strong></td></tr>
734
-                        <tr><td>" . _("Certificate file (.p12 or .pfx):") . "</td><td><input type='file' id='cert' accept='application/x-pkcs12' name='cert'/></td></tr>
735
-                        <tr><td>" . _("Certificate password, if any:") . "</td><td><input type='text' id='privkey' name='privkey_pass'/></td></tr>
736
-                        <tr><td>" . _("Username, if different from certificate Subject:") . "</td><td><input type='text' id='tls_username' name='tls_username'/></td></tr>";
733
+                            echo "<tr><td colspan='2'><strong>"._("Certificate-based EAP types")."</strong></td></tr>
734
+                        <tr><td>" . _("Certificate file (.p12 or .pfx):")."</td><td><input type='file' id='cert' accept='application/x-pkcs12' name='cert'/></td></tr>
735
+                        <tr><td>" . _("Certificate password, if any:")."</td><td><input type='text' id='privkey' name='privkey_pass'/></td></tr>
736
+                        <tr><td>" . _("Username, if different from certificate Subject:")."</td><td><input type='text' id='tls_username' name='tls_username'/></td></tr>";
737 737
                         }
738
-                        echo "<tr><td colspan='2'><button id='submit_credentials'>" . _("Submit credentials") . "</button></td></tr></table></form>";
738
+                        echo "<tr><td colspan='2'><button id='submit_credentials'>"._("Submit credentials")."</button></td></tr></table></form>";
739 739
                         echo "<div id='live_login_results' style='display:none'>";
740 740
                         foreach (\config\Diagnostics::CONFIG['RADIUSTESTS']['UDP-hosts'] as $hostindex => $host) {
741 741
                             print "<hr>";
742
-                            printf(_("Testing from: %s"), "<strong>" . \config\Diagnostics::CONFIG['RADIUSTESTS']['UDP-hosts'][$hostindex]['display_name'] . "</strong>");
743
-                            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>";
742
+                            printf(_("Testing from: %s"), "<strong>".\config\Diagnostics::CONFIG['RADIUSTESTS']['UDP-hosts'][$hostindex]['display_name']."</strong>");
743
+                            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>";
744 744
                             print "<div id='eap_test$hostindex' class='eap_test_results'></div>";
745 745
                         }
746 746
                         echo "</div>";
@@ -757,7 +757,7 @@  discard block
 block discarded – undo
757 757
             if (isset($_POST['comefrom'])) {
758 758
                 $return = htmlspecialchars_decode($_POST['comefrom'])."?inst_id=".$my_inst->identifier;
759 759
                 echo "<form method='post' action='$return' accept-charset='UTF-8'>
760
-                    <button type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_CLOSE . "'>" . sprintf(_("Return to %s administrator area"), core\common\Entity::$nomenclature_inst) . "</button>"
760
+                    <button type='submit' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_CLOSE."'>".sprintf(_("Return to %s administrator area"), core\common\Entity::$nomenclature_inst)."</button>"
761 761
                 . "</form>";
762 762
             }
763 763
             if ($check_realm !== FALSE) {
Please login to merge, or discard this patch.
web/diag/findRealm.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -37,16 +37,16 @@
 block discarded – undo
37 37
  */
38 38
 function check_my_nonce($nonce, $optSalt = '') {
39 39
     $remote = filter_input(INPUT_SERVER, 'REMOTE_ADDR');
40
-    $lasthour = date("G") - 1 < 0 ? date('Ymd') . '23' : date("YmdG") - 1;
41
-    if (hash_hmac('sha256', session_id() . $optSalt, date("YmdG") . '1qaz2wsx3edc!QAZ@WSX#EDC' . $remote) == $nonce ||
42
-            hash_hmac('sha256', session_id() . $optSalt, $lasthour . '1qaz2wsx3edc!QAZ@WSX#EDC' . $remote) == $nonce) {
40
+    $lasthour = date("G") - 1 < 0 ? date('Ymd').'23' : date("YmdG") - 1;
41
+    if (hash_hmac('sha256', session_id().$optSalt, date("YmdG").'1qaz2wsx3edc!QAZ@WSX#EDC'.$remote) == $nonce ||
42
+            hash_hmac('sha256', session_id().$optSalt, $lasthour.'1qaz2wsx3edc!QAZ@WSX#EDC'.$remote) == $nonce) {
43 43
         return true;
44 44
     } else {
45 45
         return false;
46 46
     }
47 47
 }
48 48
 
49
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
49
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
50 50
 
51 51
 // we are referring to $_SESSION later in the file
52 52
 \core\CAT::sessionStart();
Please login to merge, or discard this patch.
web/admin/sanity_tests.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
  *          <base_url>/copyright.php after deploying the software
20 20
  */
21 21
 
22
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
22
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
23 23
 
24 24
 $Tests = [
25 25
     'CatBaseUrl',
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
     'RADIUSProbes',
41 41
 ];
42 42
 
43
-if (\config\Master::CONFIG['FUNCTIONALITY_LOCATIONS']['CONFASSISTANT_SILVERBULLET'] == "LOCAL" || \config\Master::CONFIG['FUNCTIONALITY_LOCATIONS']['CONFASSISTANT_RADIUS'] == "LOCAL" ) {
43
+if (\config\Master::CONFIG['FUNCTIONALITY_LOCATIONS']['CONFASSISTANT_SILVERBULLET'] == "LOCAL" || \config\Master::CONFIG['FUNCTIONALITY_LOCATIONS']['CONFASSISTANT_RADIUS'] == "LOCAL") {
44 44
     $Tests[] = 'Makensis';
45 45
     $Tests[] = 'Makensis=>NSISmodules';
46 46
 }
@@ -74,10 +74,10 @@  discard block
 block discarded – undo
74 74
             $message = "Your configuration appears to be fine.";
75 75
             break;
76 76
         default:
77
-            throw new Exception("The result code level " . $test->test_result['global'] . " is not defined!");
77
+            throw new Exception("The result code level ".$test->test_result['global']." is not defined!");
78 78
     }
79 79
     $uiElements = new web\lib\admin\UIElements();
80
-    $out .= $uiElements->boxFlexible($test->test_result['global'], "<br><strong>Test Summary</strong><br>" . $message . "<br>See below for details<br><hr>");
80
+    $out .= $uiElements->boxFlexible($test->test_result['global'], "<br><strong>Test Summary</strong><br>".$message."<br>See below for details<br><hr>");
81 81
     foreach ($test->out as $testValue) {
82 82
         foreach ($testValue as $o) {
83 83
             $out .= $uiElements->boxFlexible($o['level'], $o['message']);
Please login to merge, or discard this patch.
web/admin/edit_participant.php 1 patch
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
  *          <base_url>/copyright.php after deploying the software
20 20
  */
21 21
 
22
-require_once dirname(dirname(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
 block discarded – undo
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::CONFIG['APPEARANCE']['productname'],  $uiElements->nomenclatureParticipant));
42
+    echo $deco->defaultPagePrelude(sprintf(_("%s: %s enrollment wizard (step 2)"), \config\Master::CONFIG['APPEARANCE']['productname'], $uiElements->nomenclatureParticipant));
43 43
 } else {
44 44
     echo $deco->defaultPagePrelude(sprintf(_("%s: Editing %s '%s'"), \config\Master::CONFIG['APPEARANCE']['productname'], $uiElements->nomenclatureParticipant, $inst_name));
45 45
 }
@@ -94,12 +94,12 @@  discard block
 block discarded – undo
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::CONFIG['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::CONFIG['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
 block discarded – undo
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
 block discarded – undo
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::CONFIG['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::CONFIG['CONSORTIUM']['display_name'])."</p>
130 130
           <ul>";
131 131
             echo "<li>";
132
-            echo "<strong>" . ( count(\config\ConfAssistant::CONFIG['CONSORTIUM']['ssid']) > 0 ? _("Additional SSIDs:") : _("SSIDs:")) . " </strong>";
132
+            echo "<strong>".(count(\config\ConfAssistant::CONFIG['CONSORTIUM']['ssid']) > 0 ? _("Additional SSIDs:") : _("SSIDs:"))." </strong>";
133 133
             if (count(\config\ConfAssistant::CONFIG['CONSORTIUM']['ssid']) > 0) {
134 134
                 $ssidlist = "";
135 135
                 foreach (\config\ConfAssistant::CONFIG['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::CONFIG['CONSORTIUM']['ssid'])), $ssidlist);
140 140
                 if (\config\ConfAssistant::CONFIG['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 options '%s' and '%s' below."), $uiElements->displayName("media:SSID"), $uiElements->displayName("media:SSID_with_legacy"));
143
+                echo "<br/>".sprintf(_("It is also possible to define custom additional SSIDs with the options '%s' and '%s' below."), $uiElements->displayName("media:SSID"), $uiElements->displayName("media:SSID_with_legacy"));
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::CONFIG['CONSORTIUM']['ssid']) > 0 ? _("Additional Hotspot 2.0 / Passpoint Consortia:") : _("Hotspot 2.0 / Passpoint Consortia:")) . " </strong>";
151
+            echo "<strong>".(count(\config\ConfAssistant::CONFIG['CONSORTIUM']['ssid']) > 0 ? _("Additional Hotspot 2.0 / Passpoint Consortia:") : _("Hotspot 2.0 / Passpoint Consortia:"))." </strong>";
152 152
             if (count(\config\ConfAssistant::CONFIG['CONSORTIUM']['interworking-consortium-oi']) > 0) {
153 153
                 $consortiumlist = "";
154 154
                 foreach (\config\ConfAssistant::CONFIG['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::CONFIG['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
 block discarded – undo
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::CONFIG['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::CONFIG['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::CONFIG['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
 block discarded – undo
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();
Please login to merge, or discard this patch.
web/admin/edit_federation.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
  */
27 27
 ?>
28 28
 <?php
29
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
29
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
30 30
 
31 31
 $auth = new \web\lib\admin\Authentication();
32 32
 $deco = new \web\lib\admin\PageDecoration();
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         ?>
62 62
     </h1>
63 63
     <div class='infobox'>
64
-        <h2><?php echo sprintf(_("%s Properties"),$uiElements->nomenclatureFed); ?></h2>
64
+        <h2><?php echo sprintf(_("%s Properties"), $uiElements->nomenclatureFed); ?></h2>
65 65
         <table>
66 66
             <tr>
67 67
                 <td><?php echo _("Country:"); ?></td>
@@ -72,11 +72,11 @@  discard block
 block discarded – undo
72 72
         </table>
73 73
     </div>
74 74
     <?php
75
-    echo "<form enctype='multipart/form-data' action='edit_federation_result.php?fed_id=$my_fed->tld" . "' method='post' accept-charset='UTF-8'>
76
-              <input type='hidden' name='MAX_FILE_SIZE' value='" . \config\Master::CONFIG['MAX_UPLOAD_SIZE'] . "'>";
75
+    echo "<form enctype='multipart/form-data' action='edit_federation_result.php?fed_id=$my_fed->tld"."' method='post' accept-charset='UTF-8'>
76
+              <input type='hidden' name='MAX_FILE_SIZE' value='" . \config\Master::CONFIG['MAX_UPLOAD_SIZE']."'>";
77 77
     ?>
78 78
     <fieldset class="option_container">
79
-        <legend><strong><?php echo sprintf(_("%s Properties"),$uiElements->nomenclatureFed); ?></strong></legend>
79
+        <legend><strong><?php echo sprintf(_("%s Properties"), $uiElements->nomenclatureFed); ?></strong></legend>
80 80
         <?php
81 81
         $optionDisplay = new \web\lib\admin\OptionDisplay($fed_options, "FED");
82 82
         echo $optionDisplay->prefilledOptionTable("fed");
@@ -84,5 +84,5 @@  discard block
 block discarded – undo
84 84
         <button type='button' class='newoption' onclick='getXML("fed")'><?php echo _("Add new option"); ?></button>
85 85
     </fieldset>
86 86
     <?php
87
-    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_federation.php\"'>" . _("Discard changes") . "</button></div></form>";
87
+    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_federation.php\"'>"._("Discard changes")."</button></div></form>";
88 88
     echo $deco->footer();
Please login to merge, or discard this patch.
web/admin/overview_federation.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
  *          <base_url>/copyright.php after deploying the software
20 20
  */
21 21
 
22
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
22
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
23 23
 
24 24
 $deco = new \web\lib\admin\PageDecoration();
25 25
 $uiElements = new web\lib\admin\UIElements();
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
             <?php echo $uiElements->infoblock($user->getAttributes(), "user", "User"); ?>
48 48
             <tr>
49 49
                 <td>
50
-                    <?php echo "" . _("Unique Identifier") ?>
50
+                    <?php echo ""._("Unique Identifier") ?>
51 51
                 </td>
52 52
                 <td>
53 53
                 </td>
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
     $mgmt = new \core\UserManagement();
63 63
 
64 64
     if (!$user->isFederationAdmin()) {
65
-        echo "<p>" . sprintf(_("You are not a %s manager."), $uiElements->nomenclatureFed) . "</p>";
65
+        echo "<p>".sprintf(_("You are not a %s manager."), $uiElements->nomenclatureFed)."</p>";
66 66
         echo $deco->footer();
67 67
         exit(0);
68 68
     }
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
                 <!-- fed properties -->
80 80
                 <tr>
81 81
                     <td>
82
-                        <?php echo "" . _("Country") ?>
82
+                        <?php echo ""._("Country") ?>
83 83
                     </td>
84 84
                     <td>
85 85
                     </td>
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
                     default:
161 161
                         throw new Exception("Error: unknown encryption status of invitation!?!");
162 162
                 }
163
-                echo $uiElements->boxRemark(ngettext("The invitation email was sent successfully.", "All invitation emails were sent successfully.", $counter) . " " . $cryptText, _("Sent successfully."));
163
+                echo $uiElements->boxRemark(ngettext("The invitation email was sent successfully.", "All invitation emails were sent successfully.", $counter)." ".$cryptText, _("Sent successfully."));
164 164
                 break;
165 165
             case "FAILURE":
166 166
                 echo $uiElements->boxError(_("No invitation email could be sent!"), _("Sending failure!"));
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
                     default:
181 181
                         throw new Exception("Error: unknown encryption status of invitation!?!");
182 182
                 }
183
-                echo $uiElements->boxWarning(sprintf(_("Some invitation emails were sent successfully (%s in total), the others failed."), $counter) . " " . $cryptText, _("Partial success."));
183
+                echo $uiElements->boxWarning(sprintf(_("Some invitation emails were sent successfully (%s in total), the others failed."), $counter)." ".$cryptText, _("Partial success."));
184 184
                 break;
185 185
             case "INVALIDSYNTAX":
186 186
                 echo $uiElements->boxError(_("The invitation email address was malformed, no invitation was sent!"), _("The invitation email address was malformed, no invitation was sent!"));
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
         echo "</table></div>";
192 192
     }
193 193
     if (\config\ConfAssistant::CONFIG['CONSORTIUM']['name'] == 'eduroam') {
194
-        $helptext = "<h3>" . sprintf(_("Need help? Refer to the <a href='%s'>%s manual</a>"), "https://wiki.geant.org/x/fgBwBg", $uiElements->nomenclatureFed) . "</h3>";
194
+        $helptext = "<h3>".sprintf(_("Need help? Refer to the <a href='%s'>%s manual</a>"), "https://wiki.geant.org/x/fgBwBg", $uiElements->nomenclatureFed)."</h3>";
195 195
     } else {
196 196
         $helptext = "";
197 197
     }
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
             $pending_invites = $mgmt->listPendingInvitations();
206 206
 
207 207
             if (\config\Master::CONFIG['DB']['enforce-external-sync']) {
208
-                echo "<th>" . sprintf(_("%s Database Sync Status"), \config\ConfAssistant::CONFIG['CONSORTIUM']['display_name']) . "</th>";
208
+                echo "<th>".sprintf(_("%s Database Sync Status"), \config\ConfAssistant::CONFIG['CONSORTIUM']['display_name'])."</th>";
209 209
             }
210 210
             ?>
211 211
             <th>
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
         foreach ($feds as $onefed) {
221 221
             $thefed = new \core\Federation(strtoupper($onefed['value']));
222 222
             /// nomenclature for 'federation', federation name, nomenclature for 'inst'
223
-            echo "<tr><td colspan='8'><strong>" . sprintf(_("The following %s are in your %s %s:"), $uiElements->nomenclatureInst, $uiElements->nomenclatureFed, '<span style="color:green">' . $thefed->name . '</span>') . "</strong></td></tr>";
223
+            echo "<tr><td colspan='8'><strong>".sprintf(_("The following %s are in your %s %s:"), $uiElements->nomenclatureInst, $uiElements->nomenclatureFed, '<span style="color:green">'.$thefed->name.'</span>')."</strong></td></tr>";
224 224
 
225 225
             // extract only pending invitations for *this* fed
226 226
             $display_pendings = FALSE;
@@ -245,27 +245,27 @@  discard block
 block discarded – undo
245 245
                 // deployment status; need to dive into profiles for this
246 246
                 // show happy eyeballs if at least one profile is configured/showtime                    
247 247
                 echo "<td>";
248
-                echo ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_CONFIGURED ? "C" : "" ) . " " . ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_SHOWTIME ? "V" : "" );
248
+                echo ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_CONFIGURED ? "C" : "")." ".($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_SHOWTIME ? "V" : "");
249 249
                 echo "</td>";
250 250
                 // name
251 251
                 echo "<td>
252
-                         <input type='hidden' name='inst' value='" . $index . "'>" . $idp_instance->name . "
252
+                         <input type='hidden' name='inst' value='" . $index."'>".$idp_instance->name."
253 253
                       </td>";
254 254
                 // external DB sync, if configured as being necessary
255 255
                 if (\config\Master::CONFIG['DB']['enforce-external-sync']) {
256 256
                     echo "<td style='display: ruby;'>";
257 257
                     if ($readonly === FALSE) {
258
-                        echo "<form method='post' action='inc/manageDBLink.inc.php?inst_id=" . $idp_instance->identifier . "' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'>
259
-                                    <button type='submit'>" . _("Manage DB Link") . "</button></form>&nbsp;&nbsp;";
258
+                        echo "<form method='post' action='inc/manageDBLink.inc.php?inst_id=".$idp_instance->identifier."' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'>
259
+                                    <button type='submit'>" . _("Manage DB Link")."</button></form>&nbsp;&nbsp;";
260 260
                     }
261 261
                     switch ($idp_instance->getExternalDBSyncState()) {
262 262
                         case \core\IdP::EXTERNAL_DB_SYNCSTATE_NOTSUBJECTTOSYNCING:
263 263
                             break;
264 264
                         case \core\IdP::EXTERNAL_DB_SYNCSTATE_SYNCED:
265
-                            echo "<div class='acceptable'>" . _("Linked") . "</div>";
265
+                            echo "<div class='acceptable'>"._("Linked")."</div>";
266 266
                             break;
267 267
                         case \core\IdP::EXTERNAL_DB_SYNCSTATE_NOT_SYNCED:
268
-                            echo "<div class='notacceptable'>" . _("NOT linked") . "</div>";
268
+                            echo "<div class='notacceptable'>"._("NOT linked")."</div>";
269 269
 
270 270
 
271 271
                             break;
@@ -278,9 +278,9 @@  discard block
 block discarded – undo
278 278
                 echo "<td>";
279 279
                 if ($readonly === FALSE) {
280 280
                     echo "<div style='white-space: nowrap;'>
281
-                                  <form method='post' action='inc/manageAdmins.inc.php?inst_id=" . $index . "' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'>
281
+                                  <form method='post' action='inc/manageAdmins.inc.php?inst_id=" . $index."' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'>
282 282
                                       <button type='submit'>" .
283
-                    _("Add/Remove Administrators") . "
283
+                    _("Add/Remove Administrators")."
284 284
                                       </button>
285 285
                                   </form>
286 286
                                 </div>";
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
                 echo "<tr>
294 294
                             <td colspan='2'>
295 295
                                <strong>" .
296
-                sprintf(_("Pending invitations in the %s:"), $uiElements->nomenclatureFed) . "
296
+                sprintf(_("Pending invitations in the %s:"), $uiElements->nomenclatureFed)."
297 297
                                </strong>
298 298
                             </td>
299 299
                          </tr>";
@@ -301,17 +301,17 @@  discard block
 block discarded – undo
301 301
                     if (strtoupper($oneinvite['country']) == strtoupper($thefed->tld)) {
302 302
                         echo "<tr>
303 303
                                     <td>" .
304
-                        $oneinvite['name'] . "
304
+                        $oneinvite['name']."
305 305
                                     </td>
306 306
                                     <td>" .
307
-                        $oneinvite['mail'] . "
307
+                        $oneinvite['mail']."
308 308
                                     </td>
309 309
                                     <td colspan=2>";
310 310
                         if ($readonly === FALSE) {
311 311
                             echo "<form method='post' action='overview_federation.php' accept-charset='UTF-8'>
312
-                                <input type='hidden' name='invitation_id' value='" . $oneinvite['token'] . "'/>
313
-                                <button class='delete' type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_DELETE . "'>" . _("Revoke Invitation") . "</button> "
314
-                              . sprintf(_("(expires %s)"),$oneinvite['expiry'])
312
+                                <input type='hidden' name='invitation_id' value='" . $oneinvite['token']."'/>
313
+                                <button class='delete' type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_DELETE."'>"._("Revoke Invitation")."</button> "
314
+                              . sprintf(_("(expires %s)"), $oneinvite['expiry'])
315 315
                               .     "</form>";
316 316
                         }
317 317
                         echo "      </td>
Please login to merge, or discard this patch.