Passed
Push — master ( b32147...6275ed )
by Maja
06:20
created
config/Master-template.php 2 patches
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -148,7 +148,6 @@
 block discarded – undo
148 148
          *    mails, just configure the signing cert with these parameters. All must
149 149
          *    be non-NULL for signing to happen. If you don't need a keypass, make 
150 150
          *    it an empty string instead.
151
-
152 151
          * @var array
153 152
          */
154 153
         const MAILSETTINGS = [// we always use Submission
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
                 'db' => 'cat',
215 215
                 'user' => 'someuser',
216 216
                 'pass' => 'somepass',
217
-                'readonly' => FALSE,],
217
+                'readonly' => FALSE, ],
218 218
             // this DB stores diagnostics data. The connection details can be
219 219
             // identical to INST as there is no table overlap
220 220
             'DIAGNOSTICS' => [
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
                 'db' => 'cat',
223 223
                 'user' => 'someuser',
224 224
                 'pass' => 'somepass',
225
-                'readonly' => FALSE,],
225
+                'readonly' => FALSE, ],
226 226
             // this slice of DB user is about the downloads table. The corresponding
227 227
             // DB user should have write access to update statistics and the cache
228 228
             // locations of installers. 
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
                 'db' => 'cat',
233 233
                 'user' => 'someuser',
234 234
                 'pass' => 'somepass',
235
-                'readonly' => FALSE,],
235
+                'readonly' => FALSE, ],
236 236
             // this slice of DB use is about user management in the user_options
237 237
             // table. Giving the corresponding user only read-only access means that
238 238
             // all user properties have to "magically" occur in the table by OOB
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
                 'db' => 'cat',
244 244
                 'user' => 'someuser',
245 245
                 'pass' => 'somepass',
246
-                'readonly' => FALSE,],
246
+                'readonly' => FALSE, ],
247 247
             /*   If you use this tool in conjunction with an external customer management database, you can configure that every 
248 248
              * institution entry in CAT MUST correspond to a customer entry in an external database. If you want this, set this
249 249
              * config variable to TRUE.
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
                 'db' => 'customer_db',
264 264
                 'user' => 'customerservice',
265 265
                 'pass' => '2lame4u',
266
-                'readonly' => TRUE,],
266
+                'readonly' => TRUE, ],
267 267
             'enforce-external-sync' => TRUE,
268 268
         ];
269 269
         /**
Please login to merge, or discard this patch.
web/resources/css/cat.css.php 1 patch
Spacing   +17 added lines, -17 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 dirname(dirname(dirname(dirname(__FILE__)))) . "/config/_config.php";
22
+require dirname(dirname(dirname(dirname(__FILE__))))."/config/_config.php";
23 23
 $colour1 = \config\Master::APPEARANCE['colour1'];
24 24
 $colour2 = \config\Master::APPEARANCE['colour2'];
25 25
 header('Content-type: text/css; charset=utf-8');
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 }
30 30
 
31 31
 body {
32
-    background: <?php echo $colour1;?>;
32
+    background: <?php echo $colour1; ?>;
33 33
     color: #000000;
34 34
     font-family:Verdana, Arial, Helvetica, sans-serif;
35 35
     font-size:11px;
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 }
45 45
 
46 46
 button {
47
-    background: <?php echo $colour2;?>; 
47
+    background: <?php echo $colour2; ?>; 
48 48
     color: #FFFFFF; 
49 49
     min-height: 23px;
50 50
     border-left-style: outset; 
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
 
396 396
 span.edu_cat {
397 397
     font-weight: bold;
398
-    color: <?php echo $colour2;?>;
398
+    color: <?php echo $colour2; ?>;
399 399
 }
400 400
 
401 401
 span.tooltip {
@@ -491,7 +491,7 @@  discard block
 block discarded – undo
491 491
     border-bottom-style:solid;
492 492
     border-top-width:5px; 
493 493
     border-bottom-width:5px; 
494
-    border-color: <?php echo $colour1;?>; 
494
+    border-color: <?php echo $colour1; ?>; 
495 495
     padding-left:30px;
496 496
 }
497 497
 
@@ -561,7 +561,7 @@  discard block
 block discarded – undo
561 561
 }
562 562
 
563 563
 #close_button {
564
-    background: <?php echo $colour2;?>; 
564
+    background: <?php echo $colour2; ?>; 
565 565
     color: #FFFFFF; 
566 566
     height: 23px;
567 567
     border-left-style: inset; 
@@ -636,7 +636,7 @@  discard block
 block discarded – undo
636 636
     width: 30em; 
637 637
     padding-left: 10px; 
638 638
     padding-right: 0px; 
639
-    background: <?php echo $colour2;?>; 
639
+    background: <?php echo $colour2; ?>; 
640 640
     color: white; 
641 641
     box-shadow: 10px 10px 5px #888888;
642 642
 }
@@ -683,7 +683,7 @@  discard block
 block discarded – undo
683 683
     padding-top: 4px; 
684 684
     padding-bottom: 12px; 
685 685
     padding-left: 30px; 
686
-    background: <?php echo $colour1;?>; 
686
+    background: <?php echo $colour1; ?>; 
687 687
     text-align: left; 
688 688
     text-shadow: 10px 10px 5px #888888;
689 689
 }
@@ -693,9 +693,9 @@  discard block
 block discarded – undo
693 693
     border-bottom-style:solid;
694 694
     border-top-width:5px;
695 695
     border-bottom-width:5px;
696
-    border-color: <?php echo $colour1;?>;
696
+    border-color: <?php echo $colour1; ?>;
697 697
     padding-left:30px;
698
-    color: <?php echo $colour2;?>;
698
+    color: <?php echo $colour2; ?>;
699 699
 }
700 700
 
701 701
 #heading h1 { 
@@ -714,7 +714,7 @@  discard block
 block discarded – undo
714 714
     text-align: justify;
715 715
     border-bottom-style:solid;
716 716
     border-bottom-width:5px;
717
-    border-color: <?php echo $colour1;?>;
717
+    border-color: <?php echo $colour1; ?>;
718 718
     font-size: 11px;
719 719
     font-weight: normal;
720 720
 }
@@ -761,7 +761,7 @@  discard block
 block discarded – undo
761 761
 
762 762
 #faq {
763 763
     padding: 20px;
764
-    color: <?php echo $colour2;?>;
764
+    color: <?php echo $colour2; ?>;
765 765
     background: #ffffff;
766 766
 }
767 767
 
@@ -813,7 +813,7 @@  discard block
 block discarded – undo
813 813
 
814 814
 #line1 {
815 815
     top:145px;
816
-    color: <?php echo $colour2;?>;
816
+    color: <?php echo $colour2; ?>;
817 817
     font-size:20px;
818 818
 }
819 819
 
@@ -860,7 +860,7 @@  discard block
 block discarded – undo
860 860
 
861 861
 #front_page_leftmenu {
862 862
     border-right:solid; 
863
-    border-color: <?php echo $colour1;?>; 
863
+    border-color: <?php echo $colour1; ?>; 
864 864
     border-width:5px; 
865 865
     min-height:400px; 
866 866
     padding-left: 10px; 
@@ -885,11 +885,11 @@  discard block
 block discarded – undo
885 885
 }
886 886
 
887 887
 a:link {
888
-    color:<?php echo $colour2;?>;
888
+    color:<?php echo $colour2; ?>;
889 889
 }
890 890
 
891 891
 a:visited {
892
-    color:<?php echo $colour2;?>;
892
+    color:<?php echo $colour2; ?>;
893 893
 }
894 894
 
895 895
 a:hover {
@@ -897,7 +897,7 @@  discard block
 block discarded – undo
897 897
 }
898 898
 
899 899
 a:active {
900
-    color:<?php echo $colour2;?>;
900
+    color:<?php echo $colour2; ?>;
901 901
 }
902 902
 
903 903
 .comment {
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::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::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::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::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::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::RADIUSTESTS['UDP-hosts'] as $hostindex => $host) {
629 629
                         print "<hr>";
630
-                        printf(_("Testing from: %s"), "<strong>" . \config\Diagnostics::RADIUSTESTS['UDP-hosts'][$hostindex]['display_name'] . "</strong>");
630
+                        printf(_("Testing from: %s"), "<strong>".\config\Diagnostics::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::RADIUSTESTS['UDP-hosts'] as $hostindex => $host) {
741 741
                             print "<hr>";
742
-                            printf(_("Testing from: %s"), "<strong>" . \config\Diagnostics::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::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/admin/logout_check.php 1 patch
Spacing   +3 added lines, -3 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
 require_once \config\Master::AUTHENTICATION['ssp-path-to-autoloader'];
24 24
 
25 25
 $deco = new \web\lib\admin\PageDecoration();
@@ -38,13 +38,13 @@  discard block
 block discarded – undo
38 38
     if ($cutoff !== FALSE) {    
39 39
         $substring = substr($_SERVER['PHP_SELF'], 0, $cutoff);
40 40
         if ($substring !== FALSE) {
41
-            $url = "//" . htmlspecialchars($_SERVER['SERVER_NAME']) . $substring;
41
+            $url = "//".htmlspecialchars($_SERVER['SERVER_NAME']).$substring;
42 42
         }
43 43
     }
44 44
     header("Location: $url");
45 45
 } else {
46 46
     /* Logout failed. Tell the user to close the browser. */
47 47
     echo $deco->pageheader(_("Incomplete Logout"), "ADMIN", FALSE);
48
-    echo "<p>" . _("We were unable to log you out of all your sessions. To be completely sure that you are logged out, you need to close your web browser.") . "</p>";
48
+    echo "<p>"._("We were unable to log you out of all your sessions. To be completely sure that you are logged out, you need to close your web browser.")."</p>";
49 49
     echo $deco->footer();
50 50
 }
Please login to merge, or discard this patch.
web/admin/inc/manageDBLink.inc.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
  */
21 21
 ?>
22 22
 <?php
23
-require_once dirname(dirname(dirname(dirname(__FILE__)))) . "/config/_config.php";
23
+require_once dirname(dirname(dirname(dirname(__FILE__))))."/config/_config.php";
24 24
 
25 25
 $auth = new \web\lib\admin\Authentication();
26 26
 $auth->authenticate();
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 
36 36
 // if we have a pushed close button, submit attributes and send user back to the overview page
37 37
 // if external DB sync is disabled globally, the user never gets to this page. If he came here *anyway* -> send him back immediately.
38
-if ((isset($_POST['submitbutton']) && $_POST['submitbutton'] == web\lib\common\FormElements::BUTTON_CLOSE ) || \config\Master::DB['enforce-external-sync'] == FALSE) {
38
+if ((isset($_POST['submitbutton']) && $_POST['submitbutton'] == web\lib\common\FormElements::BUTTON_CLOSE) || \config\Master::DB['enforce-external-sync'] == FALSE) {
39 39
     header("Location: ../overview_federation.php");
40 40
     exit;
41 41
 }
@@ -92,9 +92,9 @@  discard block
 block discarded – undo
92 92
     $cat = new \core\CAT();
93 93
     switch ($my_inst->getExternalDBSyncState()) {
94 94
         case \core\IdP::EXTERNAL_DB_SYNCSTATE_SYNCED:
95
-            printf(_("This %s is linked to the %s database."), $uiElements->nomenclatureInst, \config\ConfAssistant::CONSORTIUM['display_name']) . "</p>";
96
-            echo "<p>" . sprintf(_("The following information about the IdP is stored in the %s DB and %s DB:"), \config\Master::APPEARANCE['productname'], \config\ConfAssistant::CONSORTIUM['display_name']) . "</p>";
97
-            echo "<table><tr><td>" . sprintf(_("Information in <strong>%s Database</strong>"), \config\Master::APPEARANCE['productname']) . "</td><td>" . sprintf(_("Information in <strong>%s Database</strong>"), \config\ConfAssistant::CONSORTIUM['display_name']) . "</td></tr>";
95
+            printf(_("This %s is linked to the %s database."), $uiElements->nomenclatureInst, \config\ConfAssistant::CONSORTIUM['display_name'])."</p>";
96
+            echo "<p>".sprintf(_("The following information about the IdP is stored in the %s DB and %s DB:"), \config\Master::APPEARANCE['productname'], \config\ConfAssistant::CONSORTIUM['display_name'])."</p>";
97
+            echo "<table><tr><td>".sprintf(_("Information in <strong>%s Database</strong>"), \config\Master::APPEARANCE['productname'])."</td><td>".sprintf(_("Information in <strong>%s Database</strong>"), \config\ConfAssistant::CONSORTIUM['display_name'])."</td></tr>";
98 98
             echo "<tr><td>";
99 99
             // left-hand side: CAT DB
100 100
             echo "<table>";
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
                 } else {
107 107
                     $language = \config\Master::LANGUAGES[$name['lang']]['display'] ?? "(unsupported language)";
108 108
                 }
109
-                echo "<tr><td>" . sprintf(_("%s Name (%s)"), $uiElements->nomenclatureInst, $language) . "</td><td>" . $name['value'] . "</td></tr>";
109
+                echo "<tr><td>".sprintf(_("%s Name (%s)"), $uiElements->nomenclatureInst, $language)."</td><td>".$name['value']."</td></tr>";
110 110
             }
111 111
 
112 112
             $admins = $my_inst->listOwners();
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
                 if (count($username) == 0) {
118 118
                     $username[0]['value'] = _("Unnamed User");
119 119
                 }
120
-                echo "<tr><td>" . _("Administrator [invited as]") . "</td><td>" . $username[0]['value'] . " [" . $admin['MAIL'] . "]</td></tr>";
120
+                echo "<tr><td>"._("Administrator [invited as]")."</td><td>".$username[0]['value']." [".$admin['MAIL']."]</td></tr>";
121 121
             }
122 122
             echo "</table>";
123 123
             // end of left-hand side
@@ -125,38 +125,38 @@  discard block
 block discarded – undo
125 125
             // right-hand side: external DB
126 126
             $externalid = $my_inst->getExternalDBId();
127 127
             if (is_bool($externalid)) { // we are in SYNCED state so this cannot happen
128
-                throw new Exception("We are in SYNCSTATE_SYNCED but still there is no external DB Id available for the " . \config\ConfAssistant::CONSORTIUM['nomenclature_institution'] . "!");
128
+                throw new Exception("We are in SYNCSTATE_SYNCED but still there is no external DB Id available for the ".\config\ConfAssistant::CONSORTIUM['nomenclature_institution']."!");
129 129
             }
130 130
 
131 131
             $extinfo = $cat->getExternalDBEntityDetails($externalid);
132 132
 
133 133
             echo "<table>";
134 134
             foreach ($extinfo['names'] as $lang => $name) {
135
-                echo "<tr><td>" . sprintf(_("%s Name (%s)"), $uiElements->nomenclatureInst, $lang) . "</td><td>$name</td>";
135
+                echo "<tr><td>".sprintf(_("%s Name (%s)"), $uiElements->nomenclatureInst, $lang)."</td><td>$name</td>";
136 136
             }
137 137
             foreach ($extinfo['admins'] as $number => $admin_details) {
138
-                echo "<tr><td>" . _("Administrator email") . "</td><td>" . $admin_details['email'] . "</td></tr>";
138
+                echo "<tr><td>"._("Administrator email")."</td><td>".$admin_details['email']."</td></tr>";
139 139
             }
140 140
             echo "</table>";
141 141
             // end of right-hand side
142 142
             echo "</td></tr></table>";
143
-            echo "<p>" . _("If this mapping is not correct any more, you can remove the link:") . " ";
143
+            echo "<p>"._("If this mapping is not correct any more, you can remove the link:")." ";
144 144
             echo "<form name='form-unlink-inst' action='inc/manageDBLink.inc.php?inst_id=$my_inst->identifier' method='post' accept-charset='UTF-8'>";
145
-            echo "<button type='submit' class='delete' name='submitbutton' id='submit' value='" . web\lib\common\FormElements::BUTTON_DELETE . "'>" . _("Unlink") . "</button></form>";
145
+            echo "<button type='submit' class='delete' name='submitbutton' id='submit' value='".web\lib\common\FormElements::BUTTON_DELETE."'>"._("Unlink")."</button></form>";
146 146
             break;
147 147
         case \core\IdP::EXTERNAL_DB_SYNCSTATE_NOT_SYNCED:
148 148
             $temparray = [];
149
-            printf(_("This %s is not yet linked to the %s database."), $uiElements->nomenclatureInst, \config\ConfAssistant::CONSORTIUM['display_name']) . " ";
150
-            echo "<strong>" . _("This means that its profiles are not made available on the user download page.") . "</strong> ";
149
+            printf(_("This %s is not yet linked to the %s database."), $uiElements->nomenclatureInst, \config\ConfAssistant::CONSORTIUM['display_name'])." ";
150
+            echo "<strong>"._("This means that its profiles are not made available on the user download page.")."</strong> ";
151 151
             printf(_("You can link it to the %s database below."), \config\ConfAssistant::CONSORTIUM['display_name']);
152 152
             $candidates = $my_inst->getExternalDBSyncCandidates($my_inst->type);
153 153
             echo "<br/><form name='form-link-inst' action='inc/manageDBLink.inc.php?inst_id=$my_inst->identifier' method='post' accept-charset='UTF-8'>";
154
-            printf(_("Please select an entity from the %s DB which corresponds to this CAT %s."), \config\ConfAssistant::CONSORTIUM['display_name'], $uiElements->nomenclatureInst) . " ";
154
+            printf(_("Please select an entity from the %s DB which corresponds to this CAT %s."), \config\ConfAssistant::CONSORTIUM['display_name'], $uiElements->nomenclatureInst)." ";
155 155
             if (count($candidates) > 0) {
156 156
                 printf(_("Particularly promising entries (names in CAT and %s DB are a 100%% match) are on top of the list."), \config\ConfAssistant::CONSORTIUM['display_name']);
157 157
             }
158 158
             echo "<table>";
159
-            echo "<tr><th>" . _("Link to this entity?") . "</th><th>" . sprintf(_("%s Name"), $uiElements->nomenclatureInst) . "</th><th>" . _("Administrators") . "</th></tr>";
159
+            echo "<tr><th>"._("Link to this entity?")."</th><th>".sprintf(_("%s Name"), $uiElements->nomenclatureInst)."</th><th>"._("Administrators")."</th></tr>";
160 160
 
161 161
             foreach ($candidates as $candidate) {
162 162
                 $info = $cat->getExternalDBEntityDetails($candidate);
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
                 }
167 167
                 echo "</td><td>";
168 168
                 foreach ($info['admins'] as $number => $admin_details) {
169
-                    echo "[E-Mail] " . $admin_details['email'] . "<br/>";
169
+                    echo "[E-Mail] ".$admin_details['email']."<br/>";
170 170
                 }
171 171
                 echo "</td></tr>";
172 172
                 $temparray[] = $candidate;
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
             $buffer = "";
179 179
 
180 180
             foreach ($unmappedentities as $v) {
181
-                $buffer .= "<option value='" . $v['ID'] . "'>[ID " . $v['ID'] . "] " . $v['name'] . "</option>";
181
+                $buffer .= "<option value='".$v['ID']."'>[ID ".$v['ID']."] ".$v['name']."</option>";
182 182
             }
183 183
 
184 184
             if ($buffer != "") {
@@ -189,9 +189,9 @@  discard block
 block discarded – undo
189 189
             }
190 190
             // issue a big red warning if there are no link candidates at all in the federation
191 191
             if (empty($buffer) && empty($candidates)) {
192
-                echo "<tr><td style='color:#ff0000' colspan='2'>" . sprintf(_('There is no single unmapped %s in the external database for this %s!'), $uiElements->nomenclatureInst, $uiElements->nomenclatureFed) . "</td></tr>";
192
+                echo "<tr><td style='color:#ff0000' colspan='2'>".sprintf(_('There is no single unmapped %s in the external database for this %s!'), $uiElements->nomenclatureInst, $uiElements->nomenclatureFed)."</td></tr>";
193 193
             }
194
-            echo "</table><button type='submit' name='submitbutton' id='submit' value='" . web\lib\common\FormElements::BUTTON_SAVE . "' disabled >" . _("Create Link") . "</button></form>";
194
+            echo "</table><button type='submit' name='submitbutton' id='submit' value='".web\lib\common\FormElements::BUTTON_SAVE."' disabled >"._("Create Link")."</button></form>";
195 195
             break;
196 196
         default:
197 197
     }
Please login to merge, or discard this patch.
web/admin/inc/manageNewInst.inc.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
  */
21 21
 ?>
22 22
 <?php
23
-require_once dirname(dirname(dirname(dirname(__FILE__)))) . "/config/_config.php";
23
+require_once dirname(dirname(dirname(dirname(__FILE__))))."/config/_config.php";
24 24
 
25 25
 $auth = new \web\lib\admin\Authentication();
26 26
 $uiElements = new \web\lib\admin\UIElements();
@@ -57,8 +57,8 @@  discard block
 block discarded – undo
57 57
 <?php
58 58
 echo sprintf(_("On this page, you can add a new %s to your %s. Please fill out the form below to send out an email invitation to the new %s administrator."), $uiElements->nomenclatureInst, $uiElements->nomenclatureFed, $uiElements->nomenclatureInst);
59 59
 if (\config\Master::DB['enforce-external-sync']) {
60
-    echo "<p>" . sprintf(_("You can either register a known %s (as defined in the %s database) or create a totally new %s."), $uiElements->nomenclatureInst, \config\ConfAssistant::CONSORTIUM['display_name'], $uiElements->nomenclatureInst) . "</p>";
61
-    echo "<p>" . sprintf(_("The latter one is typically for an %s which is yet in a testing phase and therefore doesn't appear in the %s database yet."), $uiElements->nomenclatureInst, \config\ConfAssistant::CONSORTIUM['display_name']) . "</p>";    
60
+    echo "<p>".sprintf(_("You can either register a known %s (as defined in the %s database) or create a totally new %s."), $uiElements->nomenclatureInst, \config\ConfAssistant::CONSORTIUM['display_name'], $uiElements->nomenclatureInst)."</p>";
61
+    echo "<p>".sprintf(_("The latter one is typically for an %s which is yet in a testing phase and therefore doesn't appear in the %s database yet."), $uiElements->nomenclatureInst, \config\ConfAssistant::CONSORTIUM['display_name'])."</p>";    
62 62
 }
63 63
 ?>
64 64
 <hr/>
@@ -68,12 +68,12 @@  discard block
 block discarded – undo
68 68
         <?php
69 69
         if (\config\Master::DB['enforce-external-sync']) {
70 70
             echo "<tr><td>
71
-                <input type='radio' name='creation' value='existing'>" . sprintf(_("Existing %s:"), $uiElements->nomenclatureParticipant) . "</input>
71
+                <input type='radio' name='creation' value='existing'>" . sprintf(_("Existing %s:"), $uiElements->nomenclatureParticipant)."</input>
72 72
                      </td>";
73 73
 
74 74
             echo "<td colspan='4'>
75 75
                 <select id='externals' name='externals' onchange='document.sendinvite.creation[0].checked=true; document.sendinvite.mailaddr.value=this.options[this.selectedIndex].id;'>
76
-                    <option value='FREETEXT'>" . sprintf(_("--- select %s here ---"),$uiElements->nomenclatureParticipant) . "</option>";
76
+                    <option value='FREETEXT'>" . sprintf(_("--- select %s here ---"), $uiElements->nomenclatureParticipant)."</option>";
77 77
 
78 78
             foreach ($feds as $fed_value) {
79 79
                 $thefed = new \core\Federation(strtoupper($fed_value['value']));
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
                 $entities = $thefed->listExternalEntities(TRUE, NULL);
83 83
 
84 84
                 foreach ($entities as $v) {
85
-                    echo "<option id='" . $v['contactlist'] . "' value='" . $v['ID'] . "'>[" . $fed_value['value'] . "] " . $v['name'] . "</option>";
85
+                    echo "<option id='".$v['contactlist']."' value='".$v['ID']."'>[".$fed_value['value']."] ".$v['name']."</option>";
86 86
                 }
87 87
             }
88 88
 
@@ -91,16 +91,16 @@  discard block
 block discarded – undo
91 91
         ?>
92 92
         <tr>
93 93
             <td>
94
-                <input type='radio' name='creation' value='new'><?php echo sprintf(_("New %s"),$uiElements->nomenclatureParticipant); ?></input>
94
+                <input type='radio' name='creation' value='new'><?php echo sprintf(_("New %s"), $uiElements->nomenclatureParticipant); ?></input>
95 95
             </td>
96 96
             <td>
97 97
                 <?php echo _("Name"); ?><input type='text' size='30' id='name' name='name' onchange='document.sendinvite.creation[1].checked = true'/>
98 98
             </td>
99 99
             <td>
100 100
                 <select name="participant_type">
101
-                    <option value="IdPSP" selected><?php printf(_("%s and %s"),$uiElements->nomenclatureInst, $uiElements->nomenclatureHotspot)?></option>
102
-                    <option value="IdP"><?php printf(_("%s"),$uiElements->nomenclatureInst)?></option>
103
-                    <option value="SP"><?php printf(_("%s"),$uiElements->nomenclatureHotspot)?></option>
101
+                    <option value="IdPSP" selected><?php printf(_("%s and %s"), $uiElements->nomenclatureInst, $uiElements->nomenclatureHotspot)?></option>
102
+                    <option value="IdP"><?php printf(_("%s"), $uiElements->nomenclatureInst)?></option>
103
+                    <option value="SP"><?php printf(_("%s"), $uiElements->nomenclatureHotspot)?></option>
104 104
                 </select>
105 105
             </td>
106 106
             <td><?php echo $uiElements->nomenclatureFed; ?>
Please login to merge, or discard this patch.
web/user/about_cat.inc.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -34,9 +34,9 @@
 block discarded – undo
34 34
 $skinObject = new \web\lib\user\Skinjob("classic");
35 35
 /// eduroam CAT, twice the consortium name eduroam, twice eduroam CAT
36 36
 $out = sprintf(_("<span class='edu_cat'>%s</span> is built as a cooperation platform."))."<p>".
37
-       sprintf(_("Local %s administrators enter their %s configuration details and based on them, <span class='edu_cat'>%s</span> builds customised installers for a number of popular platforms. ".
38
-                 "An installer prepared for one organisation will not work for users of another one, therefore if your organisation is not on the list, you cannot use this system. ".
39
-                 "Please contact your local administrators and try to influence them to add your %s configuration to <span class='edu_cat'>%s</span>."), 
37
+        sprintf(_("Local %s administrators enter their %s configuration details and based on them, <span class='edu_cat'>%s</span> builds customised installers for a number of popular platforms. ".
38
+                    "An installer prepared for one organisation will not work for users of another one, therefore if your organisation is not on the list, you cannot use this system. ".
39
+                    "Please contact your local administrators and try to influence them to add your %s configuration to <span class='edu_cat'>%s</span>."), 
40 40
         \config\Master::APPEARANCE['productname'], 
41 41
         \config\ConfAssistant::CONSORTIUM['display_name'], 
42 42
         \config\ConfAssistant::CONSORTIUM['display_name'], 
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -42,10 +42,10 @@  discard block
 block discarded – undo
42 42
         \config\ConfAssistant::CONSORTIUM['display_name'], 
43 43
         \config\Master::APPEARANCE['productname'], 
44 44
         \config\Master::APPEARANCE['productname']);
45
-$out .= "<p>" . sprintf(_("<span class='edu_cat'>%s</span> currently supports the following devices and EAP type combinations:"), \config\Master::APPEARANCE['productname']) . "</p>";
46
-$out .= "<table><tr><th>" . _("Device Group") . "</th><th>" . _("Device") . "</th>";
45
+$out .= "<p>".sprintf(_("<span class='edu_cat'>%s</span> currently supports the following devices and EAP type combinations:"), \config\Master::APPEARANCE['productname'])."</p>";
46
+$out .= "<table><tr><th>"._("Device Group")."</th><th>"._("Device")."</th>";
47 47
 foreach (\core\common\EAP::listKnownEAPTypes() as $oneeap) {
48
-    $out .= "<th style='min-width: 80px;'>" . $oneeap->getPrintableRep() . "</th>";
48
+    $out .= "<th style='min-width: 80px;'>".$oneeap->getPrintableRep()."</th>";
49 49
 }
50 50
 $out .= "</tr>";
51 51
 foreach (\devices\Devices::listDevices() as $index => $onedevice) {
@@ -54,12 +54,12 @@  discard block
 block discarded – undo
54 54
             continue;
55 55
         }
56 56
     }
57
-    $vendor = (new \web\lib\user\Skinjob())->findResourceUrl("IMAGES", "vendorlogo/" . $onedevice['group'] . ".png");
57
+    $vendor = (new \web\lib\user\Skinjob())->findResourceUrl("IMAGES", "vendorlogo/".$onedevice['group'].".png");
58 58
     $vendorImg = "";
59 59
     if ($vendor !== FALSE) {
60 60
         $vendorImg = "<img src='$vendor' alt='logo'>";
61 61
     }
62
-    $out .= "<tr><td class='vendor'>$vendorImg</td><td>" . $onedevice['display'] . "</td>";
62
+    $out .= "<tr><td class='vendor'>$vendorImg</td><td>".$onedevice['display']."</td>";
63 63
     $device_instance = new \core\DeviceFactory($index);
64 64
     foreach (\core\common\EAP::listKnownEAPTypes() as $oneeap) {
65 65
         $out .= "<td>";
Please login to merge, or discard this patch.
web/user/devel.inc.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -19,13 +19,13 @@
 block discarded – undo
19 19
  *          <base_url>/copyright.php after deploying the software
20 20
  */
21 21
 
22
-$out = "<h3>" . _("Access the sources") . "</h3>" .
23
-        sprintf(_("%s is an opensource project. If you are interested in the details of the implementation, please visit <a href='%s'>GitHub</a>."), \config\Master::APPEARANCE['productname'], "https://github.com/GEANT/CAT" ) .
24
-        "<h3>" . _("Join the developers mailing list.") . "</h3>" .
25
-        sprintf(_("The list is available at: %s"), \config\Master::APPEARANCE['support-contact']['display']) .
26
-        "<h3>" . _("Add a translation") . "</h3>" .
27
-        _("If you would like to add a new language to CAT then please contact us ...") .
28
-        "<h3><a href='" . \core\CAT::getRootUrlPath() . "/apidoc' target='_blank'>". _("Documentation") . "</a></h3>" ;
22
+$out = "<h3>"._("Access the sources")."</h3>".
23
+        sprintf(_("%s is an opensource project. If you are interested in the details of the implementation, please visit <a href='%s'>GitHub</a>."), \config\Master::APPEARANCE['productname'], "https://github.com/GEANT/CAT").
24
+        "<h3>"._("Join the developers mailing list.")."</h3>".
25
+        sprintf(_("The list is available at: %s"), \config\Master::APPEARANCE['support-contact']['display']).
26
+        "<h3>"._("Add a translation")."</h3>".
27
+        _("If you would like to add a new language to CAT then please contact us ...").
28
+        "<h3><a href='".\core\CAT::getRootUrlPath()."/apidoc' target='_blank'>"._("Documentation")."</a></h3>";
29 29
 
30 30
         
31 31
 
Please login to merge, or discard this patch.