Test Setup Failed
Push — master ( 499243...624c0d )
by Maja
05:54
created
devices/xml/DeviceXML.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -146,12 +146,12 @@  discard block
 block discarded – undo
146 146
         $this->marshalObject($root, $eapIdp);
147 147
         $dom = dom_import_simplexml($root)->ownerDocument;
148 148
         //TODO schema validation makes sense so probably should be used
149
-        if ($dom->schemaValidate(ROOT . '/devices/xml/eap-metadata.xsd') === FALSE) {
149
+        if ($dom->schemaValidate(ROOT.'/devices/xml/eap-metadata.xsd') === FALSE) {
150 150
             throw new Exception("Schema validation failed for eap-metadata");
151 151
         }
152 152
         $dom->formatOutput = true;
153
-        file_put_contents($this->installerBasename . '.eap-config', $dom->saveXML());
154
-        return($this->installerBasename . '.eap-config');
153
+        file_put_contents($this->installerBasename.'.eap-config', $dom->saveXML());
154
+        return($this->installerBasename.'.eap-config');
155 155
     }
156 156
 
157 157
     private const ATTRIBUTENAMES = [
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
             $this->loggerInstance->debug(4, "Missing class definition for $attrName\n");
178 178
             return([]);
179 179
         }
180
-        $className = "\devices\xml\\" . self::ATTRIBUTENAMES[$attrName];
180
+        $className = "\devices\xml\\".self::ATTRIBUTENAMES[$attrName];
181 181
         $objs = [];
182 182
         if ($this->langScope === 'global') {
183 183
             foreach ($attributeList['langs'] as $language => $value) {
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
                 $displayname = new DisplayName();
216 216
                 if (isset($profileNameLangs)) {
217 217
                     $langOrC = isset($profileNameLangs[$language]) ? $profileNameLangs[$language] : $profileNameLangs['C'];
218
-                    $value .= ' - ' . $langOrC;
218
+                    $value .= ' - '.$langOrC;
219 219
                 }
220 220
                 $displayname->setValue($value);
221 221
                 $displayname->setAttributes(['lang' => $language]);
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
             $displayname = new DisplayName();
226 226
             $value = $attr['general:instname'][0];
227 227
             if ($attr['internal:profile_count'][0] > 1) {
228
-                $value .= ' - ' . $attr['profile:name'][0];
228
+                $value .= ' - '.$attr['profile:name'][0];
229 229
             }
230 230
             $displayname->setValue($value);
231 231
             $objs[] = $displayname;
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
         $attr = $this->attributes;
243 243
         if (isset($attr['general:logo_file'][0])) {
244 244
             $logoString = base64_encode($attr['general:logo_file'][0]);
245
-            $logoMime = 'image/' . $attr['internal:logo_file'][0]['mime'];
245
+            $logoMime = 'image/'.$attr['internal:logo_file'][0]['mime'];
246 246
             $providerlogo = new ProviderLogo();
247 247
             $providerlogo->setAttributes(['mime' => $logoMime, 'encoding' => 'base64']);
248 248
             $providerlogo->setValue($logoString);
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
 
348 348
         if (isset($inner["METHOD"]) && $inner["METHOD"]) {
349 349
             $innerauthmethod = new InnerAuthenticationMethod();
350
-            $typeOfInner = "\devices\xml\\" . ($inner["EAP"] ? 'EAPMethod' : 'NonEAPAuthMethod');
350
+            $typeOfInner = "\devices\xml\\".($inner["EAP"] ? 'EAPMethod' : 'NonEAPAuthMethod');
351 351
             $eapmethod = new $typeOfInner();
352 352
             $eaptype = new Type();
353 353
             $eaptype->setValue(abs($inner['METHOD']));
Please login to merge, or discard this patch.
web/skins/modern/diag/js/diag_js.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
  * License: see the web/copyright.inc.php file in the file structure or
20 20
  *          <base_url>/copyright.php after deploying the software
21 21
  */
22
- ?>
22
+    ?>
23 23
 <script>
24 24
     var L_OK = <?php echo \core\common\Entity::L_OK ?>;
25 25
     var L_WARN = <?php echo \core\common\Entity::L_WARN ?>;
Please login to merge, or discard this patch.
web/diag/action_realmcheck.php 1 patch
Spacing   +58 added lines, -58 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
 
@@ -65,13 +65,13 @@  discard block
 block discarded – undo
65 65
         $testsuite = new \core\diag\RADIUSTests($check_realm, $testedProfile->getRealmCheckOuterUsername(), $testedProfile->getEapMethodsinOrderOfPreference(1), $testedProfile->getCollapsedAttributes()['eap:server_name'], $testedProfile->getCollapsedAttributes()["eap:ca_file"]);
66 66
         $rfc7585suite = new \core\diag\RFC7585Tests($check_realm);
67 67
     } else {
68
-        $error_message = _("You asked for a realm check, but we don't know the realm for this profile!") . "</p>";
68
+        $error_message = _("You asked for a realm check, but we don't know the realm for this profile!")."</p>";
69 69
     }
70 70
 } else { // someone else's realm, and we don't know anything about it... only shallow checks
71 71
     $check_realm = $validator->realm($realm ?? $_SESSION['check_realm'] ?? "");
72 72
     if ($check_realm !== FALSE) {
73 73
         $_SESSION['check_realm'] = $check_realm;
74
-        $testsuite = new \core\diag\RADIUSTests($check_realm, "@" . $check_realm);
74
+        $testsuite = new \core\diag\RADIUSTests($check_realm, "@".$check_realm);
75 75
         $rfc7585suite = new \core\diag\RFC7585Tests($check_realm);
76 76
     } else {
77 77
         $error_message = _("No valid realm name given, cannot execute any checks!");
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
     var listofcas = "<?php echo _("You should update your list of accredited CAs") ?>";
120 120
     var getitfrom = "<?php echo _("Get it from here.") ?>";
121 121
     var listsource = "<?php echo \config\Diagnostics::RADIUSTESTS['accreditedCAsURL'] ?>";
122
-    var moretext = "<?php echo _("more") . "&raquo;" ?>";
122
+    var moretext = "<?php echo _("more")."&raquo;" ?>";
123 123
     var lesstext = "<?php echo "&laquo" ?>";
124 124
     var morealltext = "<?php echo _("Show detailed information for all tests") ?>";
125 125
     var unknownca_code = "<?php echo \core\diag\RADIUSTests::CERTPROB_UNKNOWN_CA ?>";
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
                         }
257 257
                     }
258 258
                     cliinfo = cliinfo + '<li><table><tbody><tr><td class="icon_td"><img class="icon" src="' + icons[level] + '" style="width: 24px;"></td><td>' + state;
259
-                    cliinfo = cliinfo + ' <?php echo "(" . sprintf(_("elapsed time: %sms."), "'+data.ca[key].certificate[c].time_millisec+'&nbsp;") . ")"; ?>' + add + '</td></tr>';
259
+                    cliinfo = cliinfo + ' <?php echo "(".sprintf(_("elapsed time: %sms."), "'+data.ca[key].certificate[c].time_millisec+'&nbsp;").")"; ?>' + add + '</td></tr>';
260 260
                     cliinfo = cliinfo + '</tbody></table></ul></li>';
261 261
                     if (data.ca[key].certificate[c].finalerror === 1) {
262 262
                         cliinfo = cliinfo + '<li>' + restskipped + '</li>';
@@ -425,8 +425,8 @@  discard block
 block discarded – undo
425 425
 <?php
426 426
 foreach (\config\Diagnostics::RADIUSTESTS['UDP-hosts'] as $hostindex => $host) {
427 427
     print "
428
-$(\"#live_src" . $hostindex . "_img\").attr('src',icon_loading);
429
-$(\"#live_src" . $hostindex . "_img\").show();
428
+$(\"#live_src" . $hostindex."_img\").attr('src',icon_loading);
429
+$(\"#live_src" . $hostindex."_img\").show();
430 430
 $.ajax({
431 431
     url: 'radius_tests.php?src=0&hostindex=$hostindex&realm='+realm,
432 432
     type: 'POST',
@@ -456,15 +456,15 @@  discard block
 block discarded – undo
456 456
 <?php
457 457
 foreach (\config\Diagnostics::RADIUSTESTS['UDP-hosts'] as $hostindex => $host) {
458 458
     if ($testedProfile !== NULL) {
459
-        $extraarg = "profile_id: " . $testedProfile->identifier . ", ";
459
+        $extraarg = "profile_id: ".$testedProfile->identifier.", ";
460 460
     } else {
461 461
         $extraarg = "";
462 462
     }
463 463
     print "
464
-$(\"#src" . $hostindex . "_img\").attr('src',icon_loading);
464
+$(\"#src" . $hostindex."_img\").attr('src',icon_loading);
465 465
 $(\"#src$hostindex\").html('');
466 466
 running_ajax_stat++;
467
-$.get('radius_tests.php',{test_type: 'udp', $extraarg realm: realm, src: $hostindex, lang: '" . $gui->languageInstance->getLang() . "', hostindex: '$hostindex'  }, udp, 'json');
467
+$.get('radius_tests.php',{test_type: 'udp', $extraarg realm: realm, src: $hostindex, lang: '".$gui->languageInstance->getLang()."', hostindex: '$hostindex'  }, udp, 'json');
468 468
 
469 469
 ";
470 470
 }
@@ -491,7 +491,7 @@  discard block
 block discarded – undo
491 491
     if ($check_realm === FALSE) {
492 492
         print "<p>$error_message</p>";
493 493
     } else {
494
-        print "<h1>" . sprintf(_("Realm testing for: %s"), $check_realm) . "</h1>\n";
494
+        print "<h1>".sprintf(_("Realm testing for: %s"), $check_realm)."</h1>\n";
495 495
         ?>
496 496
         <div id="debug_out" style="display: none"></div>
497 497
         <div id="tabs" style="min-width: 600px; max-width:800px">
@@ -508,12 +508,12 @@  discard block
 block discarded – undo
508 508
                     </legend>
509 509
                     <?php
510 510
                     // NAPTR existence check
511
-                    echo "<strong>" . _("DNS chekcs") . "</strong><div>";
511
+                    echo "<strong>"._("DNS chekcs")."</strong><div>";
512 512
                     $naptr = $rfc7585suite->relevantNAPTR();
513 513
                     if ($naptr != \core\diag\RADIUSTests::RETVAL_NOTCONFIGURED) {
514 514
                         echo "<table>";
515 515
                         // output in friendly words
516
-                        echo "<tr><td>" . _("Checking NAPTR existence:") . "</td><td>";
516
+                        echo "<tr><td>"._("Checking NAPTR existence:")."</td><td>";
517 517
                         switch ($naptr) {
518 518
                             case \core\diag\RFC7585Tests::RETVAL_NONAPTR:
519 519
                                 echo _("This realm has no NAPTR records.");
@@ -528,7 +528,7 @@  discard block
 block discarded – undo
528 528
 
529 529
                         // compliance checks for NAPTRs
530 530
                         if ($naptr > 0) {
531
-                            echo "<tr><td>" . _("Checking NAPTR compliance (flag = S and regex = {empty}):") . "</td><td>";
531
+                            echo "<tr><td>"._("Checking NAPTR compliance (flag = S and regex = {empty}):")."</td><td>";
532 532
                             $naptr_valid = $rfc7585suite->relevantNAPTRcompliance();
533 533
                             switch ($naptr_valid) {
534 534
                                 case \core\diag\RADIUSTests::RETVAL_OK:
@@ -545,7 +545,7 @@  discard block
 block discarded – undo
545 545
 
546 546
                         if ($naptr > 0 && $naptr_valid == \core\diag\RADIUSTests::RETVAL_OK) {
547 547
                             $srv = $rfc7585suite->relevantNAPTRsrvResolution();
548
-                            echo "<tr><td>" . _("Checking SRVs:") . "</td><td>";
548
+                            echo "<tr><td>"._("Checking SRVs:")."</td><td>";
549 549
                             switch ($srv) {
550 550
                                 case \core\diag\RADIUSTests::RETVAL_SKIPPED:
551 551
                                     echo _("This check was skipped.");
@@ -561,7 +561,7 @@  discard block
 block discarded – undo
561 561
                         // IP addresses for the hosts
562 562
                         if ($naptr > 0 && $naptr_valid == \core\diag\RADIUSTests::RETVAL_OK && $srv > 0) {
563 563
                             $hosts = $rfc7585suite->relevantNAPTRhostnameResolution();
564
-                            echo "<tr><td>" . _("Checking IP address resolution:") . "</td><td>";
564
+                            echo "<tr><td>"._("Checking IP address resolution:")."</td><td>";
565 565
                             switch ($srv) {
566 566
                                 case \core\diag\RADIUSTests::RETVAL_SKIPPED:
567 567
                                     echo _("This check was skipped.");
@@ -577,12 +577,12 @@  discard block
 block discarded – undo
577 577
 
578 578
                         echo "</table><br/><br/>";
579 579
                         if (count($testsuite->listerrors()) == 0) {
580
-                            echo sprintf(_("Realm is <strong>%s</strong> "), _(($naptr > 0 ? "DYNAMIC" : "STATIC"))) . _("with no DNS errors encountered. Congratulations!");
580
+                            echo sprintf(_("Realm is <strong>%s</strong> "), _(($naptr > 0 ? "DYNAMIC" : "STATIC")))._("with no DNS errors encountered. Congratulations!");
581 581
                         } else {
582
-                            echo sprintf(_("Realm is <strong>%s</strong> "), _(($naptr > 0 ? "DYNAMIC" : "STATIC"))) . _("but there were DNS errors! Check them!") . " " . _("You should re-run the tests after fixing the errors; more errors might be uncovered at that point. The exact error causes are listed below.");
582
+                            echo sprintf(_("Realm is <strong>%s</strong> "), _(($naptr > 0 ? "DYNAMIC" : "STATIC")))._("but there were DNS errors! Check them!")." "._("You should re-run the tests after fixing the errors; more errors might be uncovered at that point. The exact error causes are listed below.");
583 583
                             echo "<div class='notacceptable'><table>";
584 584
                             foreach ($testsuite->listerrors() as $details) {
585
-                                echo "<tr><td>" . $details['TYPE'] . "</td><td>" . $details['TARGET'] . "</td></tr>";
585
+                                echo "<tr><td>".$details['TYPE']."</td><td>".$details['TARGET']."</td></tr>";
586 586
                             }
587 587
                             echo "</table></div>";
588 588
                         }
@@ -598,26 +598,26 @@  discard block
 block discarded – undo
598 598
                  $("#dynamic_tests").show();
599 599
               ';
600 600
                         foreach ($rfc7585suite->NAPTR_hostname_records as $hostindex => $addr) {
601
-                            $host = ($addr['family'] == "IPv6" ? "[" : "") . $addr['IP'] . ($addr['family'] == "IPv6" ? "]" : "") . ":" . $addr['port'];
601
+                            $host = ($addr['family'] == "IPv6" ? "[" : "").$addr['IP'].($addr['family'] == "IPv6" ? "]" : "").":".$addr['port'];
602 602
                             $expectedName = $addr['hostname'];
603 603
                             print "
604 604
                             running_ajax_dyn++;
605
-                            $.ajax({url:'radius_tests.php', data:{test_type: 'capath', realm: realm, src: '$host', lang: '" . $gui->languageInstance->getLang() . "', hostindex: '$hostindex', expectedname: '$expectedName' }, error: eee, success: capath, dataType: 'json'}); 
605
+                            $.ajax({url:'radius_tests.php', data:{test_type: 'capath', realm: realm, src: '$host', lang: '".$gui->languageInstance->getLang()."', hostindex: '$hostindex', expectedname: '$expectedName' }, error: eee, success: capath, dataType: 'json'}); 
606 606
                             running_ajax_dyn++;
607
-                            $.ajax({url:'radius_tests.php', data:{test_type: 'clients', realm: realm, src: '$host', lang: '" . $gui->languageInstance->getLang() . "', hostindex: '$hostindex' }, error: eee, success: clients, dataType: 'json'}); 
607
+                            $.ajax({url:'radius_tests.php', data:{test_type: 'clients', realm: realm, src: '$host', lang: '".$gui->languageInstance->getLang()."', hostindex: '$hostindex' }, error: eee, success: clients, dataType: 'json'}); 
608 608
                        ";
609 609
                         }
610 610
                         echo "}
611 611
               </script><hr>";
612 612
                     } else {
613
-                        echo "<tr><td>" . _("Dynamic discovery test is not configured") . "</td><td>";
613
+                        echo "<tr><td>"._("Dynamic discovery test is not configured")."</td><td>";
614 614
                     }
615
-                    echo "<strong>" . _("Static connectivity tests") . "</strong>
615
+                    echo "<strong>"._("Static connectivity tests")."</strong>
616 616
          <table><tr>
617 617
          <td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='main_static_ico' class='icon'></td><td id='main_static_result' style='display:none'>&nbsp;</td>
618 618
          </tr></table>";
619 619
                     if ($naptr > 0) {
620
-                        echo "<hr><strong>" . _("Dynamic connectivity tests") . "</strong>
620
+                        echo "<hr><strong>"._("Dynamic connectivity tests")."</strong>
621 621
          <table><tr>
622 622
          <td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='main_dynamic_ico' class='icon'></td><td id='main_dynamic_result' style='display:none'>&nbsp;</td>
623 623
          </tr></table>";
@@ -637,12 +637,12 @@  discard block
 block discarded – undo
637 637
                     print "<p>";
638 638
                     foreach (\config\Diagnostics::RADIUSTESTS['UDP-hosts'] as $hostindex => $host) {
639 639
                         print "<hr>";
640
-                        printf(_("Testing from: %s"), "<strong>" . \config\Diagnostics::RADIUSTESTS['UDP-hosts'][$hostindex]['display_name'] . "</strong>");
640
+                        printf(_("Testing from: %s"), "<strong>".\config\Diagnostics::RADIUSTESTS['UDP-hosts'][$hostindex]['display_name']."</strong>");
641 641
                         print "<table id='results$hostindex'  style='width:100%' class='udp_results'>
642 642
 <tr>
643
-<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='src" . $hostindex . "_img'></td>
643
+<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='src".$hostindex."_img'></td>
644 644
 <td id='src$hostindex' colspan=2>
645
-" . _("testing...") . "
645
+"._("testing...")."
646 646
 </td>
647 647
 </tr>
648 648
 </table>";
@@ -661,21 +661,21 @@  discard block
 block discarded – undo
661 661
 
662 662
                     <?php
663 663
                     echo "<div id='dynamic_tests'><fieldset class='option_container'>
664
-                <legend><strong>" . _("DYNAMIC connectivity tests") . "</strong></legend>";
664
+                <legend><strong>" . _("DYNAMIC connectivity tests")."</strong></legend>";
665 665
 
666 666
                     $resultstoprint = [];
667 667
                     if (count($rfc7585suite->NAPTR_hostname_records) > 0) {
668
-                        $resultstoprint[] = '<div style="align:right; display: none;" id="dynamic_result_fail">' . _("Some errors were found during the tests, see below") . '</div><div style="align:right; display: none;" id="dynamic_result_pass">' . _("All tests passed, congratulations!") . '</div>';
669
-                        $resultstoprint[] = '<div style="align:right;"><a href="" class="moreall">' . _('Show detailed information for all tests') . '</a></div>' . '<p><strong>' . _("Checking server handshake...") . "</strong><p>";
668
+                        $resultstoprint[] = '<div style="align:right; display: none;" id="dynamic_result_fail">'._("Some errors were found during the tests, see below").'</div><div style="align:right; display: none;" id="dynamic_result_pass">'._("All tests passed, congratulations!").'</div>';
669
+                        $resultstoprint[] = '<div style="align:right;"><a href="" class="moreall">'._('Show detailed information for all tests').'</a></div>'.'<p><strong>'._("Checking server handshake...")."</strong><p>";
670 670
                         foreach ($rfc7585suite->NAPTR_hostname_records as $hostindex => $addr) {
671
-                            $bracketaddr = ($addr["family"] == "IPv6" ? "[" . $addr["IP"] . "]" : $addr["IP"]);
672
-                            $resultstoprint[] = '<p><strong>' . $bracketaddr . ' TCP/' . $addr['port'] . '</strong>';
671
+                            $bracketaddr = ($addr["family"] == "IPv6" ? "[".$addr["IP"]."]" : $addr["IP"]);
672
+                            $resultstoprint[] = '<p><strong>'.$bracketaddr.' TCP/'.$addr['port'].'</strong>';
673 673
                             $resultstoprint[] = '<ul style="list-style-type: none;" class="caresult"><li>';
674 674
                             $resultstoprint[] = "<table id='caresults$hostindex'  style='width:100%'>
675 675
 <tr>
676
-<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='srcca" . $hostindex . "_img'></td>
676
+<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='srcca".$hostindex."_img'></td>
677 677
 <td id='srcca$hostindex'>
678
-" . _("testing...") . "
678
+"._("testing...")."
679 679
 </td>
680 680
 </tr>
681 681
 </table>";
@@ -683,12 +683,12 @@  discard block
 block discarded – undo
683 683
                         }
684 684
                         $clientstest = [];
685 685
                         foreach ($rfc7585suite->NAPTR_hostname_records as $hostindex => $addr) {
686
-                            $clientstest[] = '<p><strong>' . $addr['IP'] . ' TCP/' . $addr['port'] . '</strong></p><ol>';
686
+                            $clientstest[] = '<p><strong>'.$addr['IP'].' TCP/'.$addr['port'].'</strong></p><ol>';
687 687
                             $clientstest[] = "<span id='clientresults$hostindex$clinx'><table style='width:100%'>
688 688
 <tr>
689
-<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='srcclient" . $hostindex . "_img'></td>
689
+<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='srcclient".$hostindex."_img'></td>
690 690
 <td id='srcclient$hostindex'>
691
-" . _("testing...") . "
691
+"._("testing...")."
692 692
 </td>
693 693
 </tr>
694 694
 </table></span>";
@@ -696,7 +696,7 @@  discard block
 block discarded – undo
696 696
                         }
697 697
                         echo '<div style="align:right;">';
698 698
                         echo join('', $resultstoprint);
699
-                        echo '<span id="clientstest" style="display: none;"><p><hr><b>' . _('Checking if certificates from  CAs are accepted...') . '</b><p>' . _('A few client certificates will be tested to check if servers are resistant to some certificate problems.') . '<p>';
699
+                        echo '<span id="clientstest" style="display: none;"><p><hr><b>'._('Checking if certificates from  CAs are accepted...').'</b><p>'._('A few client certificates will be tested to check if servers are resistant to some certificate problems.').'<p>';
700 700
                         print join('', $clientstest);
701 701
                         echo '</span>';
702 702
                         echo '</div>';
@@ -710,7 +710,7 @@  discard block
 block discarded – undo
710 710
                 //     check if truncates/dies on Operator-Name
711 711
                 if ($my_profile !== NULL) {
712 712
                     echo "<div id='tabs-4'><fieldset class='option_container'>
713
-                <legend><strong>" . _("Live login test") . "</strong></legend>";
713
+                <legend><strong>" . _("Live login test")."</strong></legend>";
714 714
                     $prof_compl = $my_profile->getEapMethodsinOrderOfPreference(1);
715 715
                     if (count($prof_compl) > 0) {
716 716
                         $passwordReqired = FALSE;
@@ -723,34 +723,34 @@  discard block
 block discarded – undo
723 723
                                 $clientCertRequired = TRUE;
724 724
                             }
725 725
                         }
726
-                        echo "<div id='disposable_credential_container'><p>" . _("If you enter an existing login credential here, you can test the actual authentication from various checkpoints all over the world.") . "</p>
727
-                    <p>" . _("The test will use all EAP types you have set in your profile information to check whether the right CAs and server names are used, and of course whether the login with these credentials and the given EAP type actually worked. If you have set anonymous outer ID, the test will use that.") . "</p>
728
-                    <p>" . _("Note: the tool purposefully does not offer you to save these credentials, and they will never be saved in any way on the server side. Please use only <strong>temporary test accounts</strong> here; permanently valid test accounts in the wild are considered harmful!") . "</p></div>
726
+                        echo "<div id='disposable_credential_container'><p>"._("If you enter an existing login credential here, you can test the actual authentication from various checkpoints all over the world.")."</p>
727
+                    <p>" . _("The test will use all EAP types you have set in your profile information to check whether the right CAs and server names are used, and of course whether the login with these credentials and the given EAP type actually worked. If you have set anonymous outer ID, the test will use that.")."</p>
728
+                    <p>" . _("Note: the tool purposefully does not offer you to save these credentials, and they will never be saved in any way on the server side. Please use only <strong>temporary test accounts</strong> here; permanently valid test accounts in the wild are considered harmful!")."</p></div>
729 729
                     <form enctype='multipart/form-data' id='live_form' accept-charset='UTF-8'>
730 730
                     <input type='hidden' name='test_type' value='udp_login'>
731
-                    <input type='hidden' name='lang' value='" . $gui->languageInstance->getLang() . "'>
732
-                    <input type='hidden' name='profile_id' value='" . $my_profile->identifier . "'>
731
+                    <input type='hidden' name='lang' value='" . $gui->languageInstance->getLang()."'>
732
+                    <input type='hidden' name='profile_id' value='" . $my_profile->identifier."'>
733 733
                     <table id='live_tests'>";
734 734
 // if any password based EAP methods are available enable this section
735 735
                         if ($passwordReqired) {
736
-                            echo "<tr><td colspan='2'><strong>" . _("Password-based EAP types") . "</strong></td></tr>
737
-                        <tr><td>" . _("Real (inner) username:") . "</td><td><input type='text' id='username' class='mandatory' name='username'/></td></tr>";
738
-                            echo "<tr><td>" . _("Anonymous outer ID (optional):") . "</td><td><input type='text' id='outer_username' name='outer_username'/></td></tr>";
739
-                            echo "<tr><td>" . _("Password:") . "</td><td><input type='text' id='password' class='mandatory' name='password'/></td></tr>";
736
+                            echo "<tr><td colspan='2'><strong>"._("Password-based EAP types")."</strong></td></tr>
737
+                        <tr><td>" . _("Real (inner) username:")."</td><td><input type='text' id='username' class='mandatory' name='username'/></td></tr>";
738
+                            echo "<tr><td>"._("Anonymous outer ID (optional):")."</td><td><input type='text' id='outer_username' name='outer_username'/></td></tr>";
739
+                            echo "<tr><td>"._("Password:")."</td><td><input type='text' id='password' class='mandatory' name='password'/></td></tr>";
740 740
                         }
741 741
                         // ask for cert + privkey if TLS-based method is active
742 742
                         if ($clientCertRequired) {
743
-                            echo "<tr><td colspan='2'><strong>" . _("Certificate-based EAP types") . "</strong></td></tr>
744
-                        <tr><td>" . _("Certificate file (.p12 or .pfx):") . "</td><td><input type='file' id='cert' accept='application/x-pkcs12' name='cert'/></td></tr>
745
-                        <tr><td>" . _("Certificate password, if any:") . "</td><td><input type='text' id='privkey' name='privkey_pass'/></td></tr>
746
-                        <tr><td>" . _("Username, if different from certificate Subject:") . "</td><td><input type='text' id='tls_username' name='tls_username'/></td></tr>";
743
+                            echo "<tr><td colspan='2'><strong>"._("Certificate-based EAP types")."</strong></td></tr>
744
+                        <tr><td>" . _("Certificate file (.p12 or .pfx):")."</td><td><input type='file' id='cert' accept='application/x-pkcs12' name='cert'/></td></tr>
745
+                        <tr><td>" . _("Certificate password, if any:")."</td><td><input type='text' id='privkey' name='privkey_pass'/></td></tr>
746
+                        <tr><td>" . _("Username, if different from certificate Subject:")."</td><td><input type='text' id='tls_username' name='tls_username'/></td></tr>";
747 747
                         }
748
-                        echo "<tr><td colspan='2'><button id='submit_credentials'>" . _("Submit credentials") . "</button></td></tr></table></form>";
748
+                        echo "<tr><td colspan='2'><button id='submit_credentials'>"._("Submit credentials")."</button></td></tr></table></form>";
749 749
                         echo "<div id='live_login_results' style='display:none'>";
750 750
                         foreach (\config\Diagnostics::RADIUSTESTS['UDP-hosts'] as $hostindex => $host) {
751 751
                             print "<hr>";
752
-                            printf(_("Testing from: %s"), "<strong>" . \config\Diagnostics::RADIUSTESTS['UDP-hosts'][$hostindex]['display_name'] . "</strong>");
753
-                            print "<span style='position:relative'><img src='../resources/images/icons/loading51.gif' id='live_src" . $hostindex . "_img' style='width:24px; position: absolute; left: 20px; bottom: 0px; '></span>";
752
+                            printf(_("Testing from: %s"), "<strong>".\config\Diagnostics::RADIUSTESTS['UDP-hosts'][$hostindex]['display_name']."</strong>");
753
+                            print "<span style='position:relative'><img src='../resources/images/icons/loading51.gif' id='live_src".$hostindex."_img' style='width:24px; position: absolute; left: 20px; bottom: 0px; '></span>";
754 754
                             print "<div id='eap_test$hostindex' class='eap_test_results'></div>";
755 755
                         }
756 756
                         echo "</div>";
@@ -765,9 +765,9 @@  discard block
 block discarded – undo
765 765
             }
766 766
 
767 767
             if (isset($_POST['comefrom'])) {
768
-                $return = htmlspecialchars_decode($_POST['comefrom']) . ( $inst_id ? "?inst_id=" . $inst_id : "" );
768
+                $return = htmlspecialchars_decode($_POST['comefrom']).($inst_id ? "?inst_id=".$inst_id : "");
769 769
                 echo "<form method='post' action='$return' accept-charset='UTF-8'>
770
-                    <button type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_CLOSE . "'>" . sprintf(_("Return to %s administrator area"), core\common\Entity::$nomenclature_inst) . "</button>"
770
+                    <button type='submit' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_CLOSE."'>".sprintf(_("Return to %s administrator area"), core\common\Entity::$nomenclature_inst)."</button>"
771 771
                 . "</form>";
772 772
             }
773 773
             if ($check_realm !== FALSE) {
Please login to merge, or discard this patch.
ansible/ManagedSP/templates/web/lib.inc 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -4,12 +4,12 @@
 block discarded – undo
4 4
 define('OPNAME_SUFFIX', '.hosted.eduroam.org');
5 5
 
6 6
 function cat_socket($obj) {
7
-   $sock = socket_create(AF_UNIX, SOCK_STREAM, 0);
8
-   $conn = socket_connect($sock, SOCKET);
9
-   if ( $conn ) {
10
-     socket_write ($sock, $obj, strlen($obj));
11
-     $out = socket_read ($sock, 2048);
12
-     return $out;
13
-   }
14
-   return 'FAILURE';
7
+    $sock = socket_create(AF_UNIX, SOCK_STREAM, 0);
8
+    $conn = socket_connect($sock, SOCKET);
9
+    if ( $conn ) {
10
+        socket_write ($sock, $obj, strlen($obj));
11
+        $out = socket_read ($sock, 2048);
12
+        return $out;
13
+    }
14
+    return 'FAILURE';
15 15
 }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -6,9 +6,9 @@
 block discarded – undo
6 6
 function cat_socket($obj) {
7 7
    $sock = socket_create(AF_UNIX, SOCK_STREAM, 0);
8 8
    $conn = socket_connect($sock, SOCKET);
9
-   if ( $conn ) {
10
-     socket_write ($sock, $obj, strlen($obj));
11
-     $out = socket_read ($sock, 2048);
9
+   if ($conn) {
10
+     socket_write($sock, $obj, strlen($obj));
11
+     $out = socket_read($sock, 2048);
12 12
      return $out;
13 13
    }
14 14
    return 'FAILURE';
Please login to merge, or discard this patch.
web/lib/admin/MapGoogle.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     public function htmlHeadCode() {
48 48
         $cat = new \core\CAT();
49 49
         \core\common\Entity::intoThePotatoes();
50
-        $retval = "<script type='text/javascript' src='https://maps.googleapis.com/maps/api/js?key=" . \config\Master::APPEARANCE['google_maps_api_key'] . "'></script>
50
+        $retval = "<script type='text/javascript' src='https://maps.googleapis.com/maps/api/js?key=".\config\Master::APPEARANCE['google_maps_api_key']."'></script>
51 51
     <script type='text/javascript'>
52 52
         // some global variables;
53 53
         var center_lat=49.6114885608729;
@@ -103,19 +103,19 @@  discard block
 block discarded – undo
103 103
          *
104 104
          */
105 105
         function locator_magic() {
106
-            geocoder.geocode({'address':\"" . preg_replace("/\"/", "&quot;", $this->instName) . "\", 'region':\"" . strtolower($this->fedName) . "\"},
106
+            geocoder.geocode({'address':\"" . preg_replace("/\"/", "&quot;", $this->instName)."\", 'region':\"".strtolower($this->fedName)."\"},
107 107
             function(r,status) {
108 108
                 if(status != google.maps.GeocoderStatus.OK) {
109
-                    locate_country(\"" . $cat->knownFederations[strtoupper($this->fedName)] . "\");
109
+                    locate_country(\"" . $cat->knownFederations[strtoupper($this->fedName)]."\");
110 110
                 } else {
111 111
                     var i;
112 112
                     for(i = 0; i < r.length; i++) {
113 113
                         Addr = getAddressElements(r[i].address_components);
114
-                        if(Addr.country == \"" . strtoupper($this->fedName) . "\")
114
+                        if(Addr.country == \"" . strtoupper($this->fedName)."\")
115 115
                         break;
116 116
                     }
117
-                    if(Addr.country != \"" . strtoupper($this->fedName) . "\")
118
-                    locate_country(\"" . $cat->knownFederations[strtoupper($this->fedName)] . "\");
117
+                    if(Addr.country != \"" . strtoupper($this->fedName)."\")
118
+                    locate_country(\"" . $cat->knownFederations[strtoupper($this->fedName)]."\");
119 119
                     else {
120 120
                         addMarker(r[i].geometry.location,15,null);
121 121
                     }
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
          */
129 129
         function markerClicked(m) {
130 130
             info_window.close();
131
-            var t = \"" . _("This is location ") . "\"+m.info;
131
+            var t = \"" . _("This is location ")."\"+m.info;
132 132
             info_window.setContent(t);
133 133
             info_window.setPosition(m.getPosition());
134 134
             info_window.open(map,m);
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
         function getAddressLocation() {
208 208
             var city = $('#address').val();
209 209
             if(city == '') {
210
-                alert(\"" . _("nothing entered in the address field") . "\");
210
+                alert(\"" . _("nothing entered in the address field")."\");
211 211
                 return false;
212 212
             }
213 213
             geocoder.geocode( { 'address': city}, function(results, status) {
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
          * trigger geolocation
228 228
          */
229 229
         function locateMe() {
230
-            $('#address').val(\"" . _("locating") . "\");
230
+            $('#address').val(\"" . _("locating")."\");
231 231
             navigator.geolocation.getCurrentPosition(locate_succes,locate_fail,{maximumAge:3600000, timeout:5000});
232 232
         }
233 233
 
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
         if ($this->readOnly) {
346 346
             return "<div id='map' class='googlemap'></div>";
347 347
         } else {
348
-            return $this->htmlPreEdit($wizard, $additional) . $this->findLocationHtml() . "<div id='map' class='googlemap'></div>" . $this->htmlPostEdit(FALSE);
348
+            return $this->htmlPreEdit($wizard, $additional).$this->findLocationHtml()."<div id='map' class='googlemap'></div>".$this->htmlPostEdit(FALSE);
349 349
         }
350 350
     }
351 351
 
@@ -358,11 +358,11 @@  discard block
 block discarded – undo
358 358
      */
359 359
     public static function optionListDisplayCode($coords, $number) {
360 360
         // quiesce warnings about unused variable
361
-        if (strlen(sprintf("%s", $coords)) <0) {
361
+        if (strlen(sprintf("%s", $coords)) < 0) {
362 362
             throw new \Exception("A miracle! A string with negative length!");
363 363
         };
364 364
         \core\common\Entity::intoThePotatoes();
365
-        $retval = "<button id='location_b_" . $number . "' class='location_button'>" . _("Click to see location") . " $number</button>";
365
+        $retval = "<button id='location_b_".$number."' class='location_button'>"._("Click to see location")." $number</button>";
366 366
         \core\common\Entity::outOfThePotatoes();
367 367
         return $retval;
368 368
     }
@@ -373,7 +373,7 @@  discard block
 block discarded – undo
373 373
      * @return string
374 374
      */
375 375
     public function bodyTagCode() {
376
-        return "onload='load(" . ($this->readOnly ? "0" : "1") . ")'";
376
+        return "onload='load(".($this->readOnly ? "0" : "1").")'";
377 377
     }
378 378
 
379 379
     /**
@@ -383,7 +383,7 @@  discard block
 block discarded – undo
383 383
      */
384 384
     private function findLocationHtml() {
385 385
         \core\common\Entity::intoThePotatoes();
386
-        $retval = "<p>" . _("Address:") . " <input name='address' id='address' /><button type='button' onclick='getAddressLocation()'>" . _("Find address") . "</button> <button type='button' onclick='locateMe()'>" . _("Locate Me!") . "</button></p>";
386
+        $retval = "<p>"._("Address:")." <input name='address' id='address' /><button type='button' onclick='getAddressLocation()'>"._("Find address")."</button> <button type='button' onclick='locateMe()'>"._("Locate Me!")."</button></p>";
387 387
         \core\common\Entity::outOfThePotatoes();
388 388
         return $retval;
389 389
     }
Please login to merge, or discard this patch.
web/admin/overview_installers.php 1 patch
Spacing   +12 added lines, -12 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
 $deco = new \web\lib\admin\PageDecoration();
25 25
 $validator = new \web\lib\common\InputValidation();
@@ -44,9 +44,9 @@  discard block
 block discarded – undo
44 44
 
45 45
     $preflist = $my_profile->getEapMethodsinOrderOfPreference();
46 46
     ?>
47
-    <h1><?php $tablecaption = sprintf(_("Device compatiblity matrix for %s of %s "), $profile_name, $inst_name); echo $tablecaption;?></h1>
47
+    <h1><?php $tablecaption = sprintf(_("Device compatiblity matrix for %s of %s "), $profile_name, $inst_name); echo $tablecaption; ?></h1>
48 48
     <table class="compatmatrix">
49
-        <caption><?php echo $tablecaption;?></caption>
49
+        <caption><?php echo $tablecaption; ?></caption>
50 50
         <tr>
51 51
             <th scope='col'></th>
52 52
             <th scope='col'><?php echo _("Device"); ?></th>
@@ -54,10 +54,10 @@  discard block
 block discarded – undo
54 54
             <?php
55 55
             foreach ($preflist as $method) {
56 56
                 $escapedMethod = $method->getIntegerRep();
57
-                echo "<th  scope='col' style='min-width:200px'>" . $method->getPrintableRep() . "<br/>
57
+                echo "<th  scope='col' style='min-width:200px'>".$method->getPrintableRep()."<br/>
58 58
                         <form method='post' action='inc/toggleRedirect.inc.php?inst_id=$my_inst->identifier&amp;profile_id=$my_profile->identifier' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'>
59 59
                         <input type='hidden' name='eaptype' value='$escapedMethod'>
60
-                        <button class='redirect' type='submit'>" . _("EAP-Type-specific options...") . "</button>
60
+                        <button class='redirect' type='submit'>"._("EAP-Type-specific options...")."</button>
61 61
                         </form></th>";
62 62
             }
63 63
             ?>
@@ -73,10 +73,10 @@  discard block
 block discarded – undo
73 73
         foreach (\devices\Devices::listDevices() as $index => $description) {
74 74
 
75 75
             echo "<tr>";
76
-            echo "<td align='center'><img src='../resources/images/vendorlogo/" . $description['group'] . ".png' alt='logo'></td><td>" . $description['display'] . "<br/>
76
+            echo "<td align='center'><img src='../resources/images/vendorlogo/".$description['group'].".png' alt='logo'></td><td>".$description['display']."<br/>
77 77
                         <form method='post' action='inc/toggleRedirect.inc.php?inst_id=$my_inst->identifier&amp;profile_id=$my_profile->identifier' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'>
78 78
                         <input type='hidden' name='device' value='$index'>
79
-                        <button class='redirect' type='submit'>" . _("Device-specific options...") . "</button>
79
+                        <button class='redirect' type='submit'>"._("Device-specific options...")."</button>
80 80
                         </form>
81 81
                         </td>";
82 82
             $factory = new \core\DeviceFactory($index);
@@ -85,10 +85,10 @@  discard block
 block discarded – undo
85 85
                 $footnotesForDevEapCombo = [];
86 86
                 $display_footnote = FALSE;
87 87
                 $langObject = new \core\common\Language();
88
-                $downloadform = "<form action='" . rtrim(dirname(dirname($_SERVER['SCRIPT_NAME'])), '/') . "/user/API.php?action=downloadInstaller&profile=$my_profile->identifier&lang=" . $langObject->getLang() . "' method='post' accept-charset='UTF-8'>
88
+                $downloadform = "<form action='".rtrim(dirname(dirname($_SERVER['SCRIPT_NAME'])), '/')."/user/API.php?action=downloadInstaller&profile=$my_profile->identifier&lang=".$langObject->getLang()."' method='post' accept-charset='UTF-8'>
89 89
                                        <input type='hidden' name='device' value='$index'/>
90 90
                                        <input type='hidden' name='generatedfor'  value='admin'/>
91
-                                       <button class='download'>" . _("Download") . "</button>
91
+                                       <button class='download'>"._("Download")."</button>
92 92
                                      ";
93 93
                 // first of all: if redirected, indicate by color
94 94
 
@@ -151,8 +151,8 @@  discard block
 block discarded – undo
151 151
     </table>
152 152
     <p><strong><?php $tablecaption2 = _("Legend:"); echo $tablecaption2; ?></strong></p>
153 153
     <table class="compatmatrix">
154
-        <caption><?php echo $tablecaption2;?></caption>
155
-        <tr><th scope="col"><?php echo _("Colour");?></th><th scope='col'><?php echo _("Meaning");?></th></tr>
154
+        <caption><?php echo $tablecaption2; ?></caption>
155
+        <tr><th scope="col"><?php echo _("Colour"); ?></th><th scope='col'><?php echo _("Meaning"); ?></th></tr>
156 156
         <tr><td class="compat_redirected">&nbsp;&nbsp;&nbsp;</td> <td><?php echo _("redirection is set"); ?></td></tr>
157 157
         <tr><td class="compat_default">&nbsp;&nbsp;&nbsp;</td>    <td><?php echo _("will be offered on download site"); ?></td></tr>
158 158
         <tr><td class="compat_secondary">&nbsp;&nbsp;&nbsp;</td>  <td><?php echo _("configured, but not preferred EAP type"); ?></td></tr>
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
     </table>
162 162
     <?php
163 163
     if (count($distinctFootnotes)) {
164
-        echo "<p><strong>" . _("Footnotes:") . "</strong></p><table>";
164
+        echo "<p><strong>"._("Footnotes:")."</strong></p><table>";
165 165
         foreach ($distinctFootnotes as $number => $text) {
166 166
             echo "<tr><td>($number) - </td><td>$text</td></tr>";
167 167
         }
Please login to merge, or discard this patch.
web/admin/edit_user.php 1 patch
Spacing   +6 added lines, -6 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();
@@ -37,14 +37,14 @@  discard block
 block discarded – undo
37 37
     </h1>
38 38
     <div class='infobox'>
39 39
         <h2>
40
-            <?php $tablecaption = _("Current User Attributes"); echo $tablecaption;?>
40
+            <?php $tablecaption = _("Current User Attributes"); echo $tablecaption; ?>
41 41
         </h2>
42 42
         <table>
43
-            <caption><?php echo $tablecaption;?></caption>
43
+            <caption><?php echo $tablecaption; ?></caption>
44 44
             <tr>
45
-                <th class="wai-invisible" scope="col"><?php echo _("Property Type");?></th>
46
-                <th class="wai-invisible" scope="col"><?php echo _("Language if applicable");?></th>
47
-                <th class="wai-invisible" scope="col"><?php echo _("Property Value");?></th>
45
+                <th class="wai-invisible" scope="col"><?php echo _("Property Type"); ?></th>
46
+                <th class="wai-invisible" scope="col"><?php echo _("Language if applicable"); ?></th>
47
+                <th class="wai-invisible" scope="col"><?php echo _("Property Value"); ?></th>
48 48
             </tr>
49 49
             <?php echo $uiElements->infoblock($user->getAttributes(), "user", "User"); ?>
50 50
         </table>
Please login to merge, or discard this patch.
web/admin/edit_user_result.php 1 patch
Spacing   +6 added lines, -6 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
 $loggerInstance = new \core\common\Logging();
25 25
 $deco = new \web\lib\admin\PageDecoration();
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 
30 30
 $user = new \core\User($_SESSION['user']);
31 31
 if (!isset($_POST['submitbutton']) || $_POST['submitbutton'] != web\lib\common\FormElements::BUTTON_SAVE) { // what are we supposed to do?
32
-    echo "<p>" . _("The page was called with insufficient data. Please report this as an error.") . "</p>";
32
+    echo "<p>"._("The page was called with insufficient data. Please report this as an error.")."</p>";
33 33
     echo $deco->footer();
34 34
     exit(0);
35 35
 }
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 if (isset($_POST['option'])) {
47 47
     foreach ($_POST['option'] as $opt_id => $optname) {
48 48
         if ($optname == "user:fedadmin") {
49
-            echo "Security violation: user tried to make himself " . \config\ConfAssistant::CONSORTIUM['nomenclature_federation'] . " administrator!";
49
+            echo "Security violation: user tried to make himself ".\config\ConfAssistant::CONSORTIUM['nomenclature_federation']." administrator!";
50 50
             exit(1);
51 51
         }
52 52
     }
@@ -71,11 +71,11 @@  discard block
 block discarded – undo
71 71
 ?>
72 72
 <h1><?php $tablecaption = _("Submitted attributes for this user"); echo $tablecaption; ?></h1>
73 73
 <table>
74
-            <caption><?php echo $tablecaption;?></caption>
74
+            <caption><?php echo $tablecaption; ?></caption>
75 75
             <tr>
76 76
                             <tr>
77
-                <th class="wai-invisible" scope="col"><?php echo _("Overall Result");?></th>
78
-                <th class="wai-invisible" scope="col"><?php echo _("Details");?></th>
77
+                <th class="wai-invisible" scope="col"><?php echo _("Overall Result"); ?></th>
78
+                <th class="wai-invisible" scope="col"><?php echo _("Details"); ?></th>
79 79
             </tr>
80 80
     <?php
81 81
     echo $optionParser->processSubmittedFields($user, $_POST, $_FILES);
Please login to merge, or discard this patch.
web/admin/overview_federation.php 1 patch
Spacing   +34 added lines, -34 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();
@@ -50,16 +50,16 @@  discard block
 block discarded – undo
50 50
     <div class="infobox">
51 51
         <h2><?php $tablecaption = _("Your Personal Information"); echo $tablecaption; ?></h2>
52 52
         <table>
53
-            <caption><?php echo $tablecaption;?></caption>
53
+            <caption><?php echo $tablecaption; ?></caption>
54 54
             <tr>
55
-                <th class="wai-invisible" scope="col"><?php echo _("Property Type");?></th>
56
-                <th class="wai-invisible" scope="col"><?php echo _("Language if applicable");?></th>
57
-                <th class="wai-invisible" scope="col"><?php echo _("Property Value");?></th>
55
+                <th class="wai-invisible" scope="col"><?php echo _("Property Type"); ?></th>
56
+                <th class="wai-invisible" scope="col"><?php echo _("Language if applicable"); ?></th>
57
+                <th class="wai-invisible" scope="col"><?php echo _("Property Value"); ?></th>
58 58
             </tr>            
59 59
             <?php echo $uiElements->infoblock($user->getAttributes(), "user", "User"); ?>
60 60
             <tr>
61 61
                 <td>
62
-                    <?php echo "" . _("Unique Identifier") ?>
62
+                    <?php echo ""._("Unique Identifier") ?>
63 63
                 </td>
64 64
                 <td>
65 65
                 </td>
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
     $mgmt = new \core\UserManagement();
75 75
 
76 76
     if (!$user->isFederationAdmin()) {
77
-        echo "<p>" . sprintf(_("You are not a %s manager."), $uiElements->nomenclatureFed) . "</p>";
77
+        echo "<p>".sprintf(_("You are not a %s manager."), $uiElements->nomenclatureFed)."</p>";
78 78
         echo $deco->footer();
79 79
         exit(0);
80 80
     }
@@ -88,16 +88,16 @@  discard block
 block discarded – undo
88 88
                 <?php $tablecaption2 = sprintf(_("%s Properties: %s"), $uiElements->nomenclatureFed, $thefed->name); echo $tablecaption2; ?>
89 89
             </h2>
90 90
             <table>
91
-            <caption><?php echo $tablecaption2;?></caption>
91
+            <caption><?php echo $tablecaption2; ?></caption>
92 92
             <tr>
93
-                <th class="wai-invisible" scope="col"><?php echo _("Property Type");?></th>
94
-                <th class="wai-invisible" scope="col"><?php echo _("Language if applicable");?></th>
95
-                <th class="wai-invisible" scope="col"><?php echo _("Property Value");?></th>
93
+                <th class="wai-invisible" scope="col"><?php echo _("Property Type"); ?></th>
94
+                <th class="wai-invisible" scope="col"><?php echo _("Language if applicable"); ?></th>
95
+                <th class="wai-invisible" scope="col"><?php echo _("Property Value"); ?></th>
96 96
             </tr>
97 97
                 <!-- fed properties -->
98 98
                 <tr>
99 99
                     <td>
100
-                        <?php echo "" . _("Country") ?>
100
+                        <?php echo ""._("Country") ?>
101 101
                     </td>
102 102
                     <td>
103 103
                     </td>
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
                     default:
179 179
                         throw new Exception("Error: unknown encryption status of invitation!?!");
180 180
                 }
181
-                echo $uiElements->boxRemark(ngettext("The invitation email was sent successfully.", "All invitation emails were sent successfully.", $counter) . " " . $cryptText, _("Sent successfully."));
181
+                echo $uiElements->boxRemark(ngettext("The invitation email was sent successfully.", "All invitation emails were sent successfully.", $counter)." ".$cryptText, _("Sent successfully."));
182 182
                 break;
183 183
             case "FAILURE":
184 184
                 echo $uiElements->boxError(_("No invitation email could be sent!"), _("Sending failure!"));
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
                     default:
199 199
                         throw new Exception("Error: unknown encryption status of invitation!?!");
200 200
                 }
201
-                echo $uiElements->boxWarning(sprintf(_("Some invitation emails were sent successfully (%s in total), the others failed."), $counter) . " " . $cryptText, _("Partial success."));
201
+                echo $uiElements->boxWarning(sprintf(_("Some invitation emails were sent successfully (%s in total), the others failed."), $counter)." ".$cryptText, _("Partial success."));
202 202
                 break;
203 203
             case "INVALIDSYNTAX":
204 204
                 echo $uiElements->boxError(_("The invitation email address was malformed, no invitation was sent!"), _("The invitation email address was malformed, no invitation was sent!"));
@@ -214,27 +214,27 @@  discard block
 block discarded – undo
214 214
     } else {
215 215
         $link = 'http://';
216 216
     }
217
-    $link .= $_SERVER['SERVER_NAME'] . $_SERVER['SCRIPT_NAME'];
217
+    $link .= $_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME'];
218 218
     $link = htmlspecialchars($link);
219 219
     if (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_RADIUS'] == 'LOCAL' && \config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS'] == 'LOCAL') {
220 220
         echo "<table><tr>
221
-                        <td>" . sprintf(_("Diagnose reachability and connection parameters of any %s %s"), \config\ConfAssistant::CONSORTIUM['display_name'], $uiElements->nomenclatureInst) . "</td>
221
+                        <td>" . sprintf(_("Diagnose reachability and connection parameters of any %s %s"), \config\ConfAssistant::CONSORTIUM['display_name'], $uiElements->nomenclatureInst)."</td>
222 222
                         <td><form method='post' action='../diag/action_realmcheck.php' accept-charset='UTF-8'>
223 223
                               <input type='hidden' name='comefrom' id='comefrom' value='$link'/>
224
-                              <button id='realmcheck' style='cursor:pointer;' type='submit'>" . _("Go!") . "</button>
224
+                              <button id='realmcheck' style='cursor:pointer;' type='submit'>"._("Go!")."</button>
225 225
                             </form>
226 226
                         </td>
227 227
                     </tr>
228 228
                     </table>";
229 229
     }
230 230
     if (\config\ConfAssistant::CONSORTIUM['name'] == 'eduroam') {
231
-        $helptext = "<h3>" . sprintf(_("Need help? Refer to the <a href='%s'>%s manual</a>"), "https://wiki.geant.org/x/qJg7Bw", $uiElements->nomenclatureFed) . "</h3>";
231
+        $helptext = "<h3>".sprintf(_("Need help? Refer to the <a href='%s'>%s manual</a>"), "https://wiki.geant.org/x/qJg7Bw", $uiElements->nomenclatureFed)."</h3>";
232 232
     } else {
233 233
         $helptext = "";
234 234
     }
235 235
     ?>
236 236
     <table class='user_overview' style='border:0px;'>
237
-        <caption><?php echo _("Participant Details");?></caption>
237
+        <caption><?php echo _("Participant Details"); ?></caption>
238 238
         <tr>
239 239
             <th scope='col'><?php echo _("Deployment Status"); ?></th>
240 240
             <th scope='col'><?php echo sprintf(_("%s Name"), $uiElements->nomenclatureInst); ?></th>
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
             $pending_invites = $mgmt->listPendingInvitations();
244 244
 
245 245
             if (\config\Master::DB['enforce-external-sync']) {
246
-                echo "<th scope='col'>" . sprintf(_("%s Database Sync Status"), \config\ConfAssistant::CONSORTIUM['display_name']) . "</th>";
246
+                echo "<th scope='col'>".sprintf(_("%s Database Sync Status"), \config\ConfAssistant::CONSORTIUM['display_name'])."</th>";
247 247
             }
248 248
             ?>
249 249
             <th scope='col'>
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
         foreach ($feds as $onefed) {
259 259
             $thefed = new \core\Federation(strtoupper($onefed['value']));
260 260
             /// nomenclature for 'federation', federation name, nomenclature for 'inst'
261
-            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>";
261
+            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>";
262 262
 
263 263
             // extract only pending invitations for *this* fed
264 264
             $display_pendings = FALSE;
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
                 // deployment status; need to dive into profiles for this
284 284
                 // show happy eyeballs if at least one profile is configured/showtime                    
285 285
                 echo "<td>";
286
-                echo ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_CONFIGURED ? "C" : "" ) . " " . ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_SHOWTIME ? "V" : "" );
286
+                echo ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_CONFIGURED ? "C" : "")." ".($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_SHOWTIME ? "V" : "");
287 287
                 echo "</td>";
288 288
                 // name; and realm of silverbullet profiles if any
289 289
                 // instantiating all profiles is costly, so we only do this if
@@ -297,23 +297,23 @@  discard block
 block discarded – undo
297 297
                     }
298 298
                 }
299 299
                 echo "<td style='vertical-align:top;'>
300
-                         <input type='hidden' name='inst' value='" . $index . "'>" . $idp_instance->name . (empty($listOfSilverbulletRealms) ? "" : "<ul><li>" ) . implode("</li><li>", $listOfSilverbulletRealms) . (empty($listOfSilverbulletRealms) ? "" : "</li><ul>" ) . "
300
+                         <input type='hidden' name='inst' value='" . $index."'>".$idp_instance->name.(empty($listOfSilverbulletRealms) ? "" : "<ul><li>").implode("</li><li>", $listOfSilverbulletRealms).(empty($listOfSilverbulletRealms) ? "" : "</li><ul>")."
301 301
                       </td>";
302 302
                 // external DB sync, if configured as being necessary
303 303
                 if (\config\Master::DB['enforce-external-sync']) {
304 304
                     echo "<td style='display: ruby;'>";
305 305
                     if ($readonly === FALSE) {
306
-                        echo "<form method='post' action='inc/manageDBLink.inc.php?inst_id=" . $idp_instance->identifier . "' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'>
307
-                                    <button type='submit'>" . _("Manage DB Link") . "</button></form>&nbsp;&nbsp;";
306
+                        echo "<form method='post' action='inc/manageDBLink.inc.php?inst_id=".$idp_instance->identifier."' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'>
307
+                                    <button type='submit'>" . _("Manage DB Link")."</button></form>&nbsp;&nbsp;";
308 308
                     }
309 309
                     switch ($idp_instance->getExternalDBSyncState()) {
310 310
                         case \core\IdP::EXTERNAL_DB_SYNCSTATE_NOTSUBJECTTOSYNCING:
311 311
                             break;
312 312
                         case \core\IdP::EXTERNAL_DB_SYNCSTATE_SYNCED:
313
-                            echo "<div class='acceptable'>" . _("Linked") . "</div>";
313
+                            echo "<div class='acceptable'>"._("Linked")."</div>";
314 314
                             break;
315 315
                         case \core\IdP::EXTERNAL_DB_SYNCSTATE_NOT_SYNCED:
316
-                            echo "<div class='notacceptable'>" . _("NOT linked") . "</div>";
316
+                            echo "<div class='notacceptable'>"._("NOT linked")."</div>";
317 317
 
318 318
 
319 319
                             break;
@@ -326,9 +326,9 @@  discard block
 block discarded – undo
326 326
                 echo "<td style='vertical-align: top;'>";
327 327
                 if ($readonly === FALSE) {
328 328
                     echo "<div style='white-space: nowrap;'>
329
-                                  <form method='post' action='inc/manageAdmins.inc.php?inst_id=" . $index . "' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'>
329
+                                  <form method='post' action='inc/manageAdmins.inc.php?inst_id=" . $index."' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'>
330 330
                                       <button type='submit'>" .
331
-                    _("Add/Remove Administrators") . "
331
+                    _("Add/Remove Administrators")."
332 332
                                       </button>
333 333
                                   </form>
334 334
                                 </div>";
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
                 echo "<tr>
342 342
                             <td colspan='2'>
343 343
                                <strong>" .
344
-                sprintf(_("Pending invitations in the %s:"), $uiElements->nomenclatureFed) . "
344
+                sprintf(_("Pending invitations in the %s:"), $uiElements->nomenclatureFed)."
345 345
                                </strong>
346 346
                             </td>
347 347
                          </tr>";
@@ -349,16 +349,16 @@  discard block
 block discarded – undo
349 349
                     if (strtoupper($oneinvite['country']) == strtoupper($thefed->tld)) {
350 350
                         echo "<tr>
351 351
                                     <td>" .
352
-                        $oneinvite['name'] . "
352
+                        $oneinvite['name']."
353 353
                                     </td>
354 354
                                     <td>" .
355
-                        $oneinvite['mail'] . "
355
+                        $oneinvite['mail']."
356 356
                                     </td>
357 357
                                     <td colspan=2>";
358 358
                         if ($readonly === FALSE) {
359 359
                             echo "<form method='post' action='overview_federation.php' accept-charset='UTF-8'>
360
-                                <input type='hidden' name='invitation_id' value='" . $oneinvite['token'] . "'/>
361
-                                <button class='delete' type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_DELETE . "'>" . _("Revoke Invitation") . "</button> "
360
+                                <input type='hidden' name='invitation_id' value='" . $oneinvite['token']."'/>
361
+                                <button class='delete' type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_DELETE."'>"._("Revoke Invitation")."</button> "
362 362
                             . sprintf(_("(expires %s)"), $oneinvite['expiry'])
363 363
                             . "</form>";
364 364
                         }
Please login to merge, or discard this patch.