Passed
Push — master ( aef4dc...5b84db )
by Maja
07:46
created
web/diag/show_realmcheck.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
  * 
25 25
  * @author Maja Górecka-Wolniewicz <[email protected]>
26 26
  */
27
-require_once dirname(dirname(__DIR__)) . "/config/_config.php";
27
+require_once dirname(dirname(__DIR__))."/config/_config.php";
28 28
 
29 29
 $loggerInstance = new \core\common\Logging();
30 30
 
@@ -53,9 +53,9 @@  discard block
 block discarded – undo
53 53
 <script type="text/javascript" src="../external/jquery/jquery.js"></script>
54 54
 <script type="text/javascript" src="../external/jquery/jquery-ui.js"></script>
55 55
 <script type="text/javascript">
56
-var morealltext = "<?php echo '<i>' . _("Show detailed information for all tests") . '&raquo;</i>' ?>";
57
-var lessalltext = "<?php echo '<i>' . _("Hide detailed information for all tests") . '&raquo;</i>' ?>";
58
-var moretext = "<?php echo _("more") . "&raquo;" ?>";
56
+var morealltext = "<?php echo '<i>'._("Show detailed information for all tests").'&raquo;</i>' ?>";
57
+var lessalltext = "<?php echo '<i>'._("Hide detailed information for all tests").'&raquo;</i>' ?>";
58
+var moretext = "<?php echo _("more")."&raquo;" ?>";
59 59
 var lesstext = "<?php echo "&laquo" ?>";
60 60
     $(document).ready(function () {
61 61
         $('.caresult, .eap_test_results, .udp_results').on('click', '.morelink', function () {
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 </head>
100 100
 <body>
101 101
 <?php
102
-require dirname(__DIR__) . '/skins/modern/diag/js/diag_js.php';
102
+require dirname(__DIR__).'/skins/modern/diag/js/diag_js.php';
103 103
 echo $deco->productheader("ADMIN");
104 104
 $check_realm = FALSE;
105 105
 $token = filter_input(INPUT_GET, 'token', FILTER_SANITIZE_STRING);
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
     </h1>
118 118
     <div id="debug_out" style="display: none"></div>
119 119
     <div id="timestamp" style="min-width: 600px; max-width:800px" align="right">
120
-        <?php echo _("Tests timestamp: ") . $realmTests->getTimeStamp() . ' UTC'; ?>
120
+        <?php echo _("Tests timestamp: ").$realmTests->getTimeStamp().' UTC'; ?>
121 121
     </div>
122 122
     <div id="tabs" style="min-width: 600px; max-width:800px">
123 123
         <ul>
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
             <div id="tabs-1">
135 135
                 <button id="run_tests" onclick="runRealmCheck('<?php echo $check_realm; ?>','<?php echo $ourlocale; ?>')"><?php echo _("Repeat connectivity tests") ?></button>
136 136
                 <div id="test_area"></div>
137
-                <?php print $realmTests->printOverview();?>
137
+                <?php print $realmTests->printOverview(); ?>
138 138
 
139 139
             </div>
140 140
             <div id="tabs-2">
@@ -157,9 +157,9 @@  discard block
 block discarded – undo
157 157
             }
158 158
 } else {
159 159
         if (is_null($token)) {
160
-            echo '<p><h1>' . _("Token missing, no data can be presented") . '</h1>';
160
+            echo '<p><h1>'._("Token missing, no data can be presented").'</h1>';
161 161
         } else {
162
-            echo '<p><h1>' . _("The token given in the request does not exists, no data can be presented") . '</h1>';
162
+            echo '<p><h1>'._("The token given in the request does not exists, no data can be presented").'</h1>';
163 163
         }
164 164
 }
165 165
 echo $deco->footer();
Please login to merge, or discard this patch.
web/diag/radius_tests.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -20,14 +20,14 @@  discard block
 block discarded – undo
20 20
  *          <base_url>/copyright.php after deploying the software
21 21
  */
22 22
 
23
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
23
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
24 24
 
25 25
 $loggerInstance = new \core\common\Logging();
26 26
 $validator = new \web\lib\common\InputValidation();
27 27
 $languageInstance = new \core\common\Language();
28 28
 $languageInstance->setTextDomain("diagnostics");
29 29
 
30
-$jsonDir = dirname(dirname(dirname(dirname(__FILE__)))) . "/CAT/var/json_cache";
30
+$jsonDir = dirname(dirname(dirname(dirname(__FILE__))))."/CAT/var/json_cache";
31 31
 
32 32
 $additional_message = [
33 33
     \core\common\Entity::L_OK => '',
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 function disp_name($eap)
46 46
 {
47 47
     $displayName = \core\common\EAP::eapDisplayName($eap);
48
-    return $displayName['OUTER'] . ( $displayName['INNER'] != '' ? '-' . $displayName['INNER'] : '');
48
+    return $displayName['OUTER'].($displayName['INNER'] != '' ? '-'.$displayName['INNER'] : '');
49 49
 }
50 50
 
51 51
 if (!isset($_REQUEST['test_type']) || !$_REQUEST['test_type']) {
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
     $testsuite = new \core\diag\RADIUSTests($check_realm, $my_profile->getRealmCheckOuterUsername(), $my_profile->getEapMethodsinOrderOfPreference(1), $my_profile->getCollapsedAttributes()['eap:server_name'], $my_profile->getCollapsedAttributes()['eap:ca_file']);
69 69
 } else {
70 70
     $my_profile = NULL;
71
-    $testsuite = new \core\diag\RADIUSTests($check_realm, "@" . $check_realm);
71
+    $testsuite = new \core\diag\RADIUSTests($check_realm, "@".$check_realm);
72 72
 }
73 73
 
74 74
 
@@ -163,10 +163,10 @@  discard block
 block discarded – undo
163 163
                             break;
164 164
                         case \core\common\Entity::L_REMARK:
165 165
                         case \core\common\Entity::L_WARN:
166
-                            $message = _("<strong>Test partially successful</strong>: authentication succeded.") . ' ' . $additional_message[$level];
166
+                            $message = _("<strong>Test partially successful</strong>: authentication succeded.").' '.$additional_message[$level];
167 167
                             break;
168 168
                         case \core\common\Entity::L_ERROR:
169
-                            $message = _("<strong>Test FAILED</strong>: authentication succeded.") . ' ' . $additional_message[$level];
169
+                            $message = _("<strong>Test FAILED</strong>: authentication succeded.").' '.$additional_message[$level];
170 170
                             break;
171 171
                     }
172 172
                     break;
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
             case \core\diag\RADIUSTests::RETVAL_CONVERSATION_REJECT:
218 218
                 $level = $returnarray['result'][$i]['level'];
219 219
                 if ($level > \core\common\Entity::L_OK) {
220
-                    $message = _("<strong>Test partially successful</strong>: a bidirectional RADIUS conversation with multiple round-trips was carried out, and ended in an Access-Reject as planned.") . ' ' . $additional_message[$level];
220
+                    $message = _("<strong>Test partially successful</strong>: a bidirectional RADIUS conversation with multiple round-trips was carried out, and ended in an Access-Reject as planned.").' '.$additional_message[$level];
221 221
                 } else {
222 222
                     $message = _("<strong>Test successful</strong>: a bidirectional RADIUS conversation with multiple round-trips was carried out, and ended in an Access-Reject as planned.");
223 223
                 }
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
                 $level = \core\common\Entity::L_ERROR;
241 241
                 break;
242 242
         }
243
-        $loggerInstance->debug(4, "SERVER=" . $returnarray['result'][$i]['server'] . "\n");
243
+        $loggerInstance->debug(4, "SERVER=".$returnarray['result'][$i]['server']."\n");
244 244
         $returnarray['result'][$i]['level'] = $level;
245 245
         $returnarray['result'][$i]['message'] = $message;
246 246
         break;
@@ -257,9 +257,9 @@  discard block
 block discarded – undo
257 257
         }
258 258
         // we tried to contact someone, and know how long that took
259 259
         $returnarray['time_millisec'] = sprintf("%d", $rfc6614suite->TLS_CA_checks_result[$host]['time_millisec']);
260
-        $timeDisplay = ' (' . sprintf(_("elapsed time: %d"), $rfc6614suite->TLS_CA_checks_result[$host]['time_millisec']) . '&nbsp;ms)';
260
+        $timeDisplay = ' ('.sprintf(_("elapsed time: %d"), $rfc6614suite->TLS_CA_checks_result[$host]['time_millisec']).'&nbsp;ms)';
261 261
         if (isset($rfc6614suite->TLS_CA_checks_result[$host]['cert_oddity']) && ($rfc6614suite->TLS_CA_checks_result[$host]['cert_oddity'] == \core\diag\RADIUSTests::CERTPROB_UNKNOWN_CA)) {
262
-            $returnarray['message'] = _("<strong>ERROR</strong>: the server presented a certificate which is from an unknown authority!") . $timeDisplay;
262
+            $returnarray['message'] = _("<strong>ERROR</strong>: the server presented a certificate which is from an unknown authority!").$timeDisplay;
263 263
             $returnarray['level'] = \core\common\Entity::L_ERROR;
264 264
             $returnarray['result'] = $testresult;
265 265
             break;
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
         $returnarray['level'] = \core\common\Entity::L_OK;
270 270
         // override if the connection was with a mismatching server name
271 271
         if (isset($rfc6614suite->TLS_CA_checks_result[$host]['cert_oddity']) && ($rfc6614suite->TLS_CA_checks_result[$host]['cert_oddity'] == \core\diag\RADIUSTests::CERTPROB_DYN_SERVER_NAME_MISMATCH)) {
272
-            $returnarray['message'] = _("<strong>WARNING</strong>: the server name as discovered in the SRV record does not match any name in the server certificate!") . $timeDisplay;
272
+            $returnarray['message'] = _("<strong>WARNING</strong>: the server name as discovered in the SRV record does not match any name in the server certificate!").$timeDisplay;
273 273
             $returnarray['level'] = \core\common\Entity::L_WARN;
274 274
         }
275 275
         switch ($rfc6614suite->TLS_CA_checks_result[$host]['status']) {
@@ -327,13 +327,13 @@  discard block
 block discarded – undo
327 327
         throw new Exception("Unknown test requested: default case reached!");
328 328
 }
329 329
 $returnarray['datetime'] = date("Y-m-d H:i:s");
330
-if (!is_dir($jsonDir . '/' . $token)) {
331
-    mkdir($jsonDir . '/' . $token, 0777, true);
330
+if (!is_dir($jsonDir.'/'.$token)) {
331
+    mkdir($jsonDir.'/'.$token, 0777, true);
332 332
 }
333 333
 $json_data = json_encode($returnarray);
334 334
 if ($token != '') {
335
-    $loggerInstance->debug(4, $jsonDir . '/' . $returnarray['token']);
336
-    file_put_contents($jsonDir . '/' . $token . '/' . $test_type . '_' . $hostindex, $json_data);
335
+    $loggerInstance->debug(4, $jsonDir.'/'.$returnarray['token']);
336
+    file_put_contents($jsonDir.'/'.$token.'/'.$test_type.'_'.$hostindex, $json_data);
337 337
 }
338 338
 echo($json_data);
339 339
 
Please login to merge, or discard this patch.
web/admin/edit_participant_result.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
  *          <base_url>/copyright.php after deploying the software
21 21
  */
22 22
 
23
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
23
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
24 24
 
25 25
 $auth = new \web\lib\admin\Authentication();
26 26
 $loggerInstance = new \core\common\Logging();
@@ -33,15 +33,15 @@  discard block
 block discarded – undo
33 33
 $myInstOriginal = $validator->existingIdP($_GET['inst_id'], $_SESSION['user']);
34 34
 $instId = $myInstOriginal->identifier;
35 35
 
36
-$hello = _("To whom it may concern,") . "\n\n";
37
-$bye = _("This mail is merely a cross-check because these changes can be security-relevant. If the change was expected, you do not need to take any action.") . "\n\n" .
38
-        _("Greetings, ") . "\n\n" .
36
+$hello = _("To whom it may concern,")."\n\n";
37
+$bye = _("This mail is merely a cross-check because these changes can be security-relevant. If the change was expected, you do not need to take any action.")."\n\n".
38
+        _("Greetings, ")."\n\n".
39 39
         \config\Master::APPEARANCE['productname_long'];
40 40
 
41 41
 switch ($_POST['submitbutton']) {
42 42
     case web\lib\common\FormElements::BUTTON_DELETE:
43 43
         $myInstOriginal->destroy();
44
-        $loggerInstance->writeAudit($_SESSION['user'], "DEL", "IdP " . $instId);
44
+        $loggerInstance->writeAudit($_SESSION['user'], "DEL", "IdP ".$instId);
45 45
         header("Location: overview_user.php");
46 46
         exit;
47 47
     case web\lib\common\FormElements::BUTTON_FLUSH_AND_RESTART:
@@ -51,9 +51,9 @@  discard block
 block discarded – undo
51 51
         }
52 52
         // flush all IdP attributes and send user to creation wizard
53 53
         $myInstOriginal->flushAttributes();
54
-        $loggerInstance->writeAudit($_SESSION['user'], "DEL", "IdP starting over" . $instId);
55
-        $text = $hello .
56
-                sprintf(_("the %s %s / %s / (previously known as) '%s' has deleted all properties and is starting over freshly. This means that its not recognisable by its name any more, and it may assume a different name in the future. You will get another mail if and when the name change happens."), $ui->nomenclatureInst, strtoupper($myInstOriginal->federation), $myInstOriginal->identifier, $myInstOriginal->name) . "\n\n" .
54
+        $loggerInstance->writeAudit($_SESSION['user'], "DEL", "IdP starting over".$instId);
55
+        $text = $hello.
56
+                sprintf(_("the %s %s / %s / (previously known as) '%s' has deleted all properties and is starting over freshly. This means that its not recognisable by its name any more, and it may assume a different name in the future. You will get another mail if and when the name change happens."), $ui->nomenclatureInst, strtoupper($myInstOriginal->federation), $myInstOriginal->identifier, $myInstOriginal->name)."\n\n".
57 57
                 $bye;
58 58
         $fed = new core\Federation($myInstOriginal->federation);
59 59
         foreach ($fed->listFederationAdmins() as $id) {
@@ -72,19 +72,19 @@  discard block
 block discarded – undo
72 72
             exit(0);
73 73
         }
74 74
         $inst_name = $myInstOriginal->name;
75
-        echo "<h1>" . sprintf(_("Submitted attributes for IdP '%s'"), $inst_name) . "</h1>";
75
+        echo "<h1>".sprintf(_("Submitted attributes for IdP '%s'"), $inst_name)."</h1>";
76 76
         echo "<table>";
77 77
         echo $optionParser->processSubmittedFields($myInstOriginal, $_POST, $_FILES);
78 78
         echo "</table>";
79 79
 // delete cached logo, if present
80
-        $dir = ROOT . '/web/downloads/logos/';
81
-        $globResult = glob($dir . $myInstOriginal->identifier . "_*.png");
80
+        $dir = ROOT.'/web/downloads/logos/';
81
+        $globResult = glob($dir.$myInstOriginal->identifier."_*.png");
82 82
         if ($globResult === FALSE) { // we should catch the improbable error condition
83 83
             $globResult = [];
84 84
         }
85 85
         array_map('unlink', $globResult);
86 86
         $loggerInstance->debug(4, "UNLINK from $dir\n");
87
-        $loggerInstance->writeAudit($_SESSION['user'], "MOD", "IdP " . $myInstOriginal->identifier . " - attributes changed");
87
+        $loggerInstance->writeAudit($_SESSION['user'], "MOD", "IdP ".$myInstOriginal->identifier." - attributes changed");
88 88
 
89 89
 // re-instantiate ourselves... profiles need fresh data
90 90
         $myInstReinstantiated = $validator->existingIdP($_GET['inst_id'], $_SESSION['user']);
@@ -93,10 +93,10 @@  discard block
 block discarded – undo
93 93
         if (count($significantChanges) > 0) {
94 94
             // send a notification/alert mail to someone we know is in charge
95 95
             /// were made to the *Identity Provider* *LU* / integer number of IdP / (previously known as) Name
96
-            $text = $hello . sprintf(_("significant changes were made to the %s %s / %s / (previously known as) '%s'."), $ui->nomenclatureInst, strtoupper($myInstOriginal->federation), $myInstOriginal->identifier, $myInstOriginal->name) . "\n\n";
96
+            $text = $hello.sprintf(_("significant changes were made to the %s %s / %s / (previously known as) '%s'."), $ui->nomenclatureInst, strtoupper($myInstOriginal->federation), $myInstOriginal->identifier, $myInstOriginal->name)."\n\n";
97 97
             if (isset($significantChanges[\core\IdP::INSTNAME_CHANGED])) {
98
-                $text .= sprintf(_("The %s has changed its name. The details are below:"), $ui->nomenclatureInst) . "\n\n";
99
-                $text .= $significantChanges[\core\IdP::INSTNAME_CHANGED] . "\n\n";
98
+                $text .= sprintf(_("The %s has changed its name. The details are below:"), $ui->nomenclatureInst)."\n\n";
99
+                $text .= $significantChanges[\core\IdP::INSTNAME_CHANGED]."\n\n";
100 100
             }
101 101
             $text .= $bye;
102 102
             // (currently, send hard-wired to NRO - future: for linked insts, check eduroam DBv2 and send to registered admins directly)
@@ -112,12 +112,12 @@  discard block
 block discarded – undo
112 112
 
113 113
         if (isset(\config\ConfAssistant::CONSORTIUM['ssid']) && count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0) {
114 114
             foreach (\config\ConfAssistant::CONSORTIUM['ssid'] as $ssidname) {
115
-                $ssids[] = $ssidname . " " . (isset(\config\ConfAssistant::CONSORTIUM['tkipsupport']) && \config\ConfAssistant::CONSORTIUM['tkipsupport'] === TRUE ? _("(WPA2/AES and WPA/TKIP)") : _("(WPA2/AES)") );
115
+                $ssids[] = $ssidname." ".(isset(\config\ConfAssistant::CONSORTIUM['tkipsupport']) && \config\ConfAssistant::CONSORTIUM['tkipsupport'] === TRUE ? _("(WPA2/AES and WPA/TKIP)") : _("(WPA2/AES)"));
116 116
             }
117 117
         }
118 118
 
119 119
         foreach ($myInstReinstantiated->getAttributes("media:SSID") as $ssidname) {
120
-            $ssids[] = $ssidname['value'] . " " . _("(WPA2/AES)");
120
+            $ssids[] = $ssidname['value']." "._("(WPA2/AES)");
121 121
         }
122 122
 
123 123
         echo "<table>";
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
         if (count($ssids) > 0) {
126 126
             $printedlist = "";
127 127
             foreach ($ssids as $names) {
128
-                $printedlist = $printedlist . "$names ";
128
+                $printedlist = $printedlist."$names ";
129 129
             }
130 130
             echo $uiElements->boxOkay(sprintf(_("Your installers will configure the following SSIDs: <strong>%s</strong>"), $printedlist), _("SSIDs configured"));
131 131
         }
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
                 // did we get an email address? then, show the silverbullet jumpstart button
154 154
                 // otherwise, issue a smartass comment
155 155
                 if (count($myInstReinstantiated->getAttributes("support:email")) > 0) {
156
-                    echo "<form method='post' action='edit_silverbullet.php?inst_id=$my_inst->identifier' accept-charset='UTF-8'><button type='submit'>" . sprintf(_("Continue to %s properties"), \core\ProfileSilverbullet::PRODUCTNAME) . "</button></form>";
156
+                    echo "<form method='post' action='edit_silverbullet.php?inst_id=$my_inst->identifier' accept-charset='UTF-8'><button type='submit'>".sprintf(_("Continue to %s properties"), \core\ProfileSilverbullet::PRODUCTNAME)."</button></form>";
157 157
                 } else {
158 158
                     echo "<table>";
159 159
                     echo $uiElements->boxError(sprintf(_("You did not submit an e-mail address. This is required for %s. Please go to the %s dashboard and edit your helpdesk settings to include a helpdesk e-mail address."), core\ProfileSilverbullet::PRODUCTNAME, $ui->nomenclatureInst), _("No support e-mail!"));
@@ -161,10 +161,10 @@  discard block
 block discarded – undo
161 161
                 }
162 162
             }
163 163
             if (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_RADIUS'] == "LOCAL") {
164
-                echo "<br/><form method='post' action='edit_profile.php?inst_id=$my_inst->identifier' accept-charset='UTF-8'><button type='submit'>" . _("Continue to RADIUS/EAP profile definition") . "</button></form>";
164
+                echo "<br/><form method='post' action='edit_profile.php?inst_id=$my_inst->identifier' accept-charset='UTF-8'><button type='submit'>"._("Continue to RADIUS/EAP profile definition")."</button></form>";
165 165
             }
166 166
         }
167
-        echo "<br/><form method='post' action='overview_user.php?inst_id=$my_inst->identifier' accept-charset='UTF-8'><button type='submit'>" . _("Continue to dashboard") . "</button></form>";
167
+        echo "<br/><form method='post' action='overview_user.php?inst_id=$my_inst->identifier' accept-charset='UTF-8'><button type='submit'>"._("Continue to dashboard")."</button></form>";
168 168
 
169 169
         break;
170 170
     default:
Please login to merge, or discard this patch.
web/admin/edit_profile_result.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
  *          <base_url>/copyright.php after deploying the software
20 20
  */
21 21
 
22
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
22
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
23 23
 
24 24
 $auth = new \web\lib\admin\Authentication();
25 25
 $deco = new \web\lib\admin\PageDecoration();
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
             echo $deco->pageheader(sprintf(_("%s: Edit Profile - Result"), \config\Master::APPEARANCE['productname']), "ADMIN-IDP");
53 53
         } else {
54 54
             $profile = $my_inst->newProfile(core\AbstractProfile::PROFILETYPE_RADIUS);
55
-            $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP " . $my_inst->identifier . " - Profile created");
55
+            $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP ".$my_inst->identifier." - Profile created");
56 56
             echo $deco->pageheader(sprintf(_("%s: Profile wizard (step 3 completed)"), \config\Master::APPEARANCE['productname']), "ADMIN-IDP");
57 57
         }
58 58
         if (!$profile instanceof \core\ProfileRADIUS) {
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
             $uiElements = new web\lib\admin\UIElements();
114 114
             // set realm info, if submitted
115 115
             if ($realm !== FALSE) {
116
-                $profile->setRealm($anonLocal . "@" . $realm);
116
+                $profile->setRealm($anonLocal."@".$realm);
117 117
                 echo $uiElements->boxOkay(sprintf(_("Realm: <strong>%s</strong>"), $realm));
118 118
             } else {
119 119
                 $profile->setRealm("");
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
                     echo $uiElements->boxError(_("Realm check username cannot be configured: realm is missing!"));
137 137
                 } else {
138 138
                     $profile->setRealmcheckUser(true, $checkuser_name);
139
-                    echo $uiElements->boxOkay(sprintf(_("Special username for realm check is <strong>%s</strong>, the value is <strong>%s</strong>"), _("ON"), $checkuser_name . "@" . $realm));
139
+                    echo $uiElements->boxOkay(sprintf(_("Special username for realm check is <strong>%s</strong>, the value is <strong>%s</strong>"), _("ON"), $checkuser_name."@".$realm));
140 140
                 }
141 141
             } else {
142 142
                 $profile->setRealmCheckUser(false);
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
                 } else {
150 150
                     $profile->setInputVerificationPreference($verify, $hint);
151 151
                     if ($hint !== FALSE) {
152
-                        $extratext = " " . sprintf(_("and the input field will be prefilled with '<strong>@%s</strong>'."), $realm);
152
+                        $extratext = " ".sprintf(_("and the input field will be prefilled with '<strong>@%s</strong>'."), $realm);
153 153
                     } else {
154 154
                         $extratext = ".";
155 155
                     }
@@ -186,17 +186,17 @@  discard block
 block discarded – undo
186 186
                 echo $uiElements->boxOkay(_("Redirection is <strong>OFF</strong>"));
187 187
             }
188 188
 
189
-            $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile " . $profile->identifier . " - attributes changed");
189
+            $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile ".$profile->identifier." - attributes changed");
190 190
 
191 191
             foreach (\core\common\EAP::listKnownEAPTypes() as $a) {
192 192
                 if ($a->getIntegerRep() == \core\common\EAP::INTEGER_SILVERBULLET) { // do not allow adding silverbullet via the backdoor
193 193
                     continue;
194 194
                 }
195
-                if (isset($_POST[$a->getPrintableRep()]) && isset($_POST[$a->getPrintableRep() . "-priority"]) && is_numeric($_POST[$a->getPrintableRep() . "-priority"])) {
196
-                    $priority = (int) $_POST[$a->getPrintableRep() . "-priority"];
195
+                if (isset($_POST[$a->getPrintableRep()]) && isset($_POST[$a->getPrintableRep()."-priority"]) && is_numeric($_POST[$a->getPrintableRep()."-priority"])) {
196
+                    $priority = (int) $_POST[$a->getPrintableRep()."-priority"];
197 197
                     // add EAP type to profile as requested, but ...
198 198
                     $profile->addSupportedEapMethod($a, $priority);
199
-                    $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile " . $profile->identifier . " - supported EAP types changed");
199
+                    $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile ".$profile->identifier." - supported EAP types changed");
200 200
                 }
201 201
             }
202 202
             // re-instantiate $profile, we need to do completion checks and need fresh data for isEapTypeDefinitionComplete()
@@ -205,23 +205,23 @@  discard block
 block discarded – undo
205 205
             if (count($significantChanges) > 0) {
206 206
                 $myInstOriginal = new \core\IdP($profile->institution);
207 207
                 // send a notification/alert mail to someone we know is in charge
208
-                $text = _("To whom it may concern,") . "\n\n";
208
+                $text = _("To whom it may concern,")."\n\n";
209 209
                 /// were made to the *Identity Provider* *LU* / integer number of IdP / (previously known as) Name
210
-                $text .= sprintf(_("significant changes were made to a RADIUS deployment profile of the %s %s / %s / '%s'."), $ui->nomenclatureInst, strtoupper($myInstOriginal->federation), $myInstOriginal->identifier, $myInstOriginal->name) . "\n\n";
210
+                $text .= sprintf(_("significant changes were made to a RADIUS deployment profile of the %s %s / %s / '%s'."), $ui->nomenclatureInst, strtoupper($myInstOriginal->federation), $myInstOriginal->identifier, $myInstOriginal->name)."\n\n";
211 211
                 if (isset($significantChanges[\core\AbstractProfile::CA_CLASH_ADDED])) {
212
-                    $text .= _("WARNING! A new trusted root CA was added, and it has the exact same name as a previously existing root CA. This may (but does not necessarily) mean that this is an attempt to insert an unauthorised trust root by disguising as the genuine one. The details are below:") . "\n\n";
213
-                    $text .= $significantChanges[\core\AbstractProfile::CA_CLASH_ADDED] . "\n\n";
212
+                    $text .= _("WARNING! A new trusted root CA was added, and it has the exact same name as a previously existing root CA. This may (but does not necessarily) mean that this is an attempt to insert an unauthorised trust root by disguising as the genuine one. The details are below:")."\n\n";
213
+                    $text .= $significantChanges[\core\AbstractProfile::CA_CLASH_ADDED]."\n\n";
214 214
                 }
215 215
                 if (isset($significantChanges[\core\AbstractProfile::CA_ADDED])) {
216 216
                     $text .= _("A new trusted root CA was added. The details are below:\n\n");
217
-                    $text .= $significantChanges[\core\AbstractProfile::CA_ADDED] . "\n\n";
217
+                    $text .= $significantChanges[\core\AbstractProfile::CA_ADDED]."\n\n";
218 218
                 }
219 219
                 if (isset($significantChanges[\core\AbstractProfile::SERVERNAME_ADDED])) {
220
-                    $text .= _("A new acceptable server name for the authentication server was added. The details are below:") . "\n\n";
221
-                    $text .= $significantChanges[\core\AbstractProfile::SERVERNAME_ADDED] . "\n\n";
220
+                    $text .= _("A new acceptable server name for the authentication server was added. The details are below:")."\n\n";
221
+                    $text .= $significantChanges[\core\AbstractProfile::SERVERNAME_ADDED]."\n\n";
222 222
                 }
223
-                $text .= _("This mail is merely a cross-check because these changes can be security-relevant. If the change was expected, you do not need to take any action.") . "\n\n";
224
-                $text .= _("Greetings, ") . "\n\n" . \config\Master::APPEARANCE['productname_long'];
223
+                $text .= _("This mail is merely a cross-check because these changes can be security-relevant. If the change was expected, you do not need to take any action.")."\n\n";
224
+                $text .= _("Greetings, ")."\n\n".\config\Master::APPEARANCE['productname_long'];
225 225
                 // (currently, send hard-wired to NRO - future: for linked insts, check eduroam DBv2 and send to registered admins directly)
226 226
                 $fed = new core\Federation($myInstOriginal->federation);
227 227
                 foreach ($fed->listFederationAdmins() as $id) {
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
                 // see if we can enable the EAP type, or if info is missing
234 234
                     $eapcompleteness = $reloadedProfile->isEapTypeDefinitionComplete($oneEap);
235 235
                     if ($eapcompleteness === true) {
236
-                        echo $uiElements->boxOkay(_("Supported EAP Type: ") . "<strong>" . $oneEap->getPrintableRep() . "</strong>");
236
+                        echo $uiElements->boxOkay(_("Supported EAP Type: ")."<strong>".$oneEap->getPrintableRep()."</strong>");
237 237
                     } else {
238 238
                         
239 239
                         if (is_array($eapcompleteness)) {
@@ -242,11 +242,11 @@  discard block
 block discarded – undo
242 242
                             $warntext = "<strong>";
243 243
                             foreach ($eapcompleteness as $item) {
244 244
                                 $iterator = $iterator + 1;
245
-                                $warntext .= $uiElements->displayName($item) . "</strong>".($iterator < $number ? ", " : "")."<strong>";
245
+                                $warntext .= $uiElements->displayName($item)."</strong>".($iterator < $number ? ", " : "")."<strong>";
246 246
                             }
247 247
                             $warntext .= "</strong>";
248 248
                         }
249
-                        echo $uiElements->boxWarning(sprintf(_("Supported EAP Type <strong>%s</strong> is missing required information: %s !"), $oneEap->getPrintableRep(), $warntext) . "<br/>" . _("The EAP type was added to the profile, but you need to complete the missing information before we can produce installers for you."));
249
+                        echo $uiElements->boxWarning(sprintf(_("Supported EAP Type <strong>%s</strong> is missing required information: %s !"), $oneEap->getPrintableRep(), $warntext)."<br/>"._("The EAP type was added to the profile, but you need to complete the missing information before we can produce installers for you."));
250 250
                     }
251 251
             }
252 252
             $reloadedProfile->prepShowtime();
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
         <?php
260 260
         if (count($reloadedProfile->getEapMethodsinOrderOfPreference(1)) > 0) {
261 261
             echo "<form method='post' action='overview_installers.php?inst_id=$my_inst->identifier&profile_id=$reloadedProfile->identifier' accept-charset='UTF-8'>
262
-        <button type='submit'>" . _("Continue to Installer Fine-Tuning and Download") . "</button>
262
+        <button type='submit'>"._("Continue to Installer Fine-Tuning and Download")."</button>
263 263
     </form>";
264 264
         }
265 265
         echo $deco->footer();
Please login to merge, or discard this patch.
core/diag/RADIUSTestsUI.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
          <table><tr>
291 291
          <td class='icon_td'>";
292 292
         $out[] = "<img src='".$this->stateIcons[$this->globalLevelStatic]."' id='main_static_ico' class='icon'></td><td id='main_static_result'>".
293
-                            $this->globalInfo[$this->globalLevelStatic].' '. _("See the appropriate tab for details.").'</td>
293
+                            $this->globalInfo[$this->globalLevelStatic].' '._("See the appropriate tab for details.").'</td>
294 294
          </tr></table>';
295 295
         if ($this->naptr > 0) {
296 296
             $out[] = "<hr><strong>"._("Dynamic connectivity tests")."</strong>
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
 <td class='icon_td'><img src='".$this->stateIcons[$result->level]."' id='src".$hostindex."_img'></td>
324 324
 <td id='src$hostindex' colspan=2>
325 325
 ";
326
-            $out[] = '<strong>'.($result->server ? $result->server : _("Connected to undetermined server")).'</strong><br/>'.sprintf (_("elapsed time: %sms."), $result->time_millisec).'<p>'.$result->message.'</p>';
326
+            $out[] = '<strong>'.($result->server ? $result->server : _("Connected to undetermined server")).'</strong><br/>'.sprintf(_("elapsed time: %sms."), $result->time_millisec).'<p>'.$result->message.'</p>';
327 327
                     
328 328
             if ($result->level > \core\common\Entity::L_OK && property_exists($result, 'cert_oddities')) {
329 329
                 foreach ($result->cert_oddities as $oddities) {
@@ -408,7 +408,7 @@  discard block
 block discarded – undo
408 408
             } else {
409 409
                 $certdesc = '<br>';
410 410
             }
411
-            $capathtest[] = '<div>'.($capath->message!='' ? $capath->message : _('Test failed')).'</div>'.$more;
411
+            $capathtest[] = '<div>'.($capath->message != '' ? $capath->message : _('Test failed')).'</div>'.$more;
412 412
             $capathtest[] = '</td>
413 413
 </tr>
414 414
 </table>';
@@ -434,7 +434,7 @@  discard block
 block discarded – undo
434 434
                         $srefused = 0;
435 435
                         $cliinfo = '';
436 436
                         $cliinfo .= '<li>'._('Client certificate').' <b>'.$ca->clientcertinfo->from.
437
-                                    '</b>'.', '.$ca->clientcertinfo->message .
437
+                                    '</b>'.', '.$ca->clientcertinfo->message.
438 438
                                     '<br> (CA: '.$ca->clientcertinfo->issuer.')<ul>';
439 439
                         foreach ($ca->certificate as $certificate) {
440 440
                             if ($certificate->returncode == \core\diag\RADIUSTests::RETVAL_CONNECTION_REFUSED) {
@@ -494,7 +494,7 @@  discard block
 block discarded – undo
494 494
                 } else {
495 495
                     $cliinfo = _('Test failed');
496 496
                     $clientstest[] = "<table><tr><td class='icon_td' id='srcclient".$hostindex."_img'><img src='".
497
-                                    $this->stateIcons[\core\common\Entity::L_WARN]."'></td>" .
497
+                                    $this->stateIcons[\core\common\Entity::L_WARN]."'></td>".
498 498
                                     "<td id='srcclient$hostindex'>$cliinfo</td></tr></table>";
499 499
                 }
500 500
             } else {
Please login to merge, or discard this patch.
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 2 patches
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.
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
         if (type === 'idp' || type === 'sp') {
39 39
             shtml = '<table><tbody><tr id="row_'+type+'_country"></tr>';
40 40
             shtml = shtml + '<tr id="row_'+type+'_institution" style="visibility: collapse;">';
41
-            shtml = shtml + '<td>' + <?php echo '"' . _("Select institiution:") . '"'; ?> + '</td><td></td></tr>';
41
+            shtml = shtml + '<td>' + <?php echo '"'._("Select institiution:").'"'; ?> + '</td><td></td></tr>';
42 42
             if (type === 'idp') {
43 43
                 shtml = shtml + '<tr id="row_idp_realm"></tr>';
44 44
             }
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
         var options = '';
65 65
         var selecthead = '';
66 66
         if (type1 === 'sp' || type1 === 'idp') {
67
-            selecthead = <?php echo '"<td>' . _("Select country or region:") . ' </td>"'; ?>;
67
+            selecthead = <?php echo '"<td>'._("Select country or region:").' </td>"'; ?>;
68 68
             selecthead = selecthead + '<td>\n';
69 69
         }
70 70
         var select = '<select id="' + type1 + '_country" name="' + type1 + '_country" style="margin-left:0px; width:400px;">';
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
             options = ($('#'+type2+'_country').html());
73 73
             countryAddSelect(selecthead, select + options + '</select>', type1);
74 74
         } else {
75
-            var comment = <?php echo '"<br><br>' . _("Fetching country/region list") . '..."'; ?>;
75
+            var comment = <?php echo '"<br><br>'._("Fetching country/region list").'..."'; ?>;
76 76
             inProgress(1, comment);
77 77
             $.ajax({
78 78
                 url: "findRealm.php",
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
         return false;
110 110
     }
111 111
     function testSociopath(realm, answer) {
112
-        var comment = <?php echo '"' . _("Testing realm") . '..."'; ?>; 
112
+        var comment = <?php echo '"'._("Testing realm").'..."'; ?>; 
113 113
         inProgress(1, comment);
114 114
         if ($('#tested_realm').length == 0) {
115 115
             $('<input>').attr({
@@ -133,9 +133,9 @@  discard block
 block discarded – undo
133 133
                                 query = '<input type="hidden" id="tested_realm" value="' + realm + '">';
134 134
                             }    
135 135
                             query = query + '<div id="current_query">'+data['TEXT']+'</div>';
136
-                            query = query + '<div><button class="diag_button" id="answer_yes">' + <?php echo '"' . _("Yes") . '"'; ?> + '</button>';
137
-                            query = query + '<button style="margin-left:20px;" class="diag_button" id="answer_no">' + <?php echo '"' . _("No") . '"'; ?> + '</button>';
138
-                            query = query + '<button style="margin-left:20px;" class="diag_button" id="answer_noidea">' + <?php echo '"' . _("I don't know") . '"'; ?> + '</button></div>';
136
+                            query = query + '<div><button class="diag_button" id="answer_yes">' + <?php echo '"'._("Yes").'"'; ?> + '</button>';
137
+                            query = query + '<button style="margin-left:20px;" class="diag_button" id="answer_no">' + <?php echo '"'._("No").'"'; ?> + '</button>';
138
+                            query = query + '<button style="margin-left:20px;" class="diag_button" id="answer_noidea">' + <?php echo '"'._("I don't know").'"'; ?> + '</button></div>';
139 139
                             $('#sociopath_queries').html(query);
140 140
                             $('#sociopath_query_area').show();
141 141
                         }
@@ -166,55 +166,55 @@  discard block
 block discarded – undo
166 166
        }); 
167 167
     }
168 168
     function finalVerdict(realm, verdict) {
169
-        var title = <?php echo '"' . _("Diagnostic tests results for selected realm") . '"'; ?>;
169
+        var title = <?php echo '"'._("Diagnostic tests results for selected realm").'"'; ?>;
170 170
         result = '<div class="padding">';
171 171
         result = result + '<div><h3>';
172
-        result = result + <?php echo '"' . _("The result for tested realm:") . ' "'; ?> + realm;
172
+        result = result + <?php echo '"'._("The result for tested realm:").' "'; ?> + realm;
173 173
         result = result + '</h3></p><div style="padding: 5px;"><div style="padding: 0px;">';
174
-        result = result + <?php echo '"' . _("The system identified") . '" '; ?>  + ' ';
174
+        result = result + <?php echo '"'._("The system identified").'" '; ?>  + ' ';
175 175
         result = result + Object.keys(verdict).length + ' ';
176
-        result = result + <?php echo '"' . _("suspected areas which potentially can cause a problem.") . '"'; ?> + '<br>';
177
-        result = result + <?php echo '"' . _("Next to the problem description we show a speculated probability of this event.") . '"'; ?>;
176
+        result = result + <?php echo '"'._("suspected areas which potentially can cause a problem.").'"'; ?> + '<br>';
177
+        result = result + <?php echo '"'._("Next to the problem description we show a speculated probability of this event.").'"'; ?>;
178 178
         result = result + '</div><div style="padding: 5px;"><table>';
179 179
         k = 1;
180 180
         for (key in verdict) {
181 181
             result = result + '<tr><td>' + k + '.</td>';
182 182
             k = k + 1;
183 183
             if (key === 'INFRA_DEVICE') {
184
-                result = result + '<td>' + <?php echo '"' . _("Your device configuration is broken") . '"'; ?> + '</td>';
184
+                result = result + '<td>' + <?php echo '"'._("Your device configuration is broken").'"'; ?> + '</td>';
185 185
             }
186 186
             if (key === 'INFRA_SP_80211') {
187
-                result = result + '<td>' + <?php echo '"' . _("The Wi-Fi network in your vicinity has quality issues") . '"'; ?> + '</td>';
187
+                result = result + '<td>' + <?php echo '"'._("The Wi-Fi network in your vicinity has quality issues").'"'; ?> + '</td>';
188 188
             }
189 189
             if (key === 'INFRA_SP_LAN') {
190
-                result = result + '<td>' + <?php echo '"' . _("The network environment around you is broken") . '"'; ?> + '</td>';
190
+                result = result + '<td>' + <?php echo '"'._("The network environment around you is broken").'"'; ?> + '</td>';
191 191
             }
192 192
             if (key === 'INFRA_SP_RADIUS') {
193
-                result = result + '<td>' + <?php echo '"' . _("The RADIUS server of your service provider is the source of the problem") . '"'; ?> + '</td>';
193
+                result = result + '<td>' + <?php echo '"'._("The RADIUS server of your service provider is the source of the problem").'"'; ?> + '</td>';
194 194
             }
195 195
             if (key === 'INFRA_IDP_AUTHBACKEND') {
196
-                result = result + '<td>' + <?php echo '"' . _("The RADIUS server in your home institution is currently unable to authenticate you") . '"'; ?> + '</td>';
196
+                result = result + '<td>' + <?php echo '"'._("The RADIUS server in your home institution is currently unable to authenticate you").'"'; ?> + '</td>';
197 197
             }
198 198
             if (key === 'INFRA_NRO_SP') {
199
-                result = result + '<td>' + <?php echo '"' . _("The national server in the country/region you are visiting is not functioning correctly") . '"'; ?> + '</td>';
199
+                result = result + '<td>' + <?php echo '"'._("The national server in the country/region you are visiting is not functioning correctly").'"'; ?> + '</td>';
200 200
             }
201 201
             if (key === 'INFRA_LINK_ETLR_NRO_SP') {
202
-                result = result + '<td>' + <?php echo '"' . _("The link between the national server of the country/region you are visiting and the top-level server is broken") . '"'; ?> + '</td>';
202
+                result = result + '<td>' + <?php echo '"'._("The link between the national server of the country/region you are visiting and the top-level server is broken").'"'; ?> + '</td>';
203 203
             }
204 204
             if (key === 'INFRA_LINK_ETLR_NRO_IdP') {
205
-                result = result + '<td>' + <?php echo '"' . _("The link between the national server of your home country/region and the top-level server is broken") . '"'; ?> + '</td>';
205
+                result = result + '<td>' + <?php echo '"'._("The link between the national server of your home country/region and the top-level server is broken").'"'; ?> + '</td>';
206 206
             }
207 207
             if (key === 'INFRA_ETLR') {
208
-                result = result + '<td>' + <?php echo '"' . _("The communication to the top-level server is down") . '"'; ?> + '</td>';
208
+                result = result + '<td>' + <?php echo '"'._("The communication to the top-level server is down").'"'; ?> + '</td>';
209 209
             }
210 210
             if (key === 'INFRA_NRO_IdP') {
211
-                result = result + '<td>' + <?php echo '"' . _("The national server in your home country/region is not functioning properly.") . '"'; ?> + '</td>';
211
+                result = result + '<td>' + <?php echo '"'._("The national server in your home country/region is not functioning properly.").'"'; ?> + '</td>';
212 212
             }
213 213
             if (key === 'INFRA_IdP_RADIUS') {
214
-                result = result + '<td>' + <?php echo '"' . _("The RADIUS server of your home institution is the source of the problem") . '"'; ?> + '</td>';
214
+                result = result + '<td>' + <?php echo '"'._("The RADIUS server of your home institution is the source of the problem").'"'; ?> + '</td>';
215 215
             }
216 216
             if (key === 'INFRA_NONEXISTENTREALM') {
217
-                result = result + '<td>' + <?php echo '"' . _("This realm does not exist") . '"'; ?> + '</td>';
217
+                result = result + '<td>' + <?php echo '"'._("This realm does not exist").'"'; ?> + '</td>';
218 218
             }
219 219
             result = result + '<td style="padding-left: 5px;">' + (verdict[key] * 100).toFixed(2) + "%</td></tr>";
220 220
         }
@@ -292,8 +292,8 @@  discard block
 block discarded – undo
292 292
     function runConnectionTests(data, realm, token, wherefrom) {
293 293
         dynamic_req = null;
294 294
         udp_req = null;
295
-        var running = <?php echo '"<img style=\'vertical-align:middle\' src=' . "'../resources/images/icons/loading51.gif' width='24' height='24'/><i>" . _('Running connectivity tests for this realm') . '...</i>"'; ?>;
296
-        var testresult = "<a target='_blank' href='show_realmcheck.php?token=" + token + "'>" + <?php echo '"' . _("New tests results are available, click to see") . '"'; ?> + '</a>';
295
+        var running = <?php echo '"<img style=\'vertical-align:middle\' src='."'../resources/images/icons/loading51.gif' width='24' height='24'/><i>"._('Running connectivity tests for this realm').'...</i>"'; ?>;
296
+        var testresult = "<a target='_blank' href='show_realmcheck.php?token=" + token + "'>" + <?php echo '"'._("New tests results are available, click to see").'"'; ?> + '</a>';
297 297
         if (wherefrom == 'diag') {
298 298
             $('#tests_info_area').css('color', 'black');
299 299
             $('#tests_info_area').html(running);
@@ -420,7 +420,7 @@  discard block
 block discarded – undo
420 420
         return requests;
421 421
     }
422 422
     function show_tests_result(token, level) {
423
-        $('#tests_info_area').html(global_info[level] + ': ' + "<a target='_blank' href='show_realmcheck.php?token=" + token + "'>" + <?php echo '"' . _("See details") . '"'; ?> + '</a>');
423
+        $('#tests_info_area').html(global_info[level] + ': ' + "<a target='_blank' href='show_realmcheck.php?token=" + token + "'>" + <?php echo '"'._("See details").'"'; ?> + '</a>');
424 424
         if (level > 0) {
425 425
             $('#tests_info_area').css('color', 'red');
426 426
             $('#tests_result').val('1');
@@ -428,9 +428,9 @@  discard block
 block discarded – undo
428 428
             $('#tests_info_area').css('color', 'black');
429 429
             $('#tests_result').val('0');
430 430
         }
431
-        var info = global_info[level] + ': ' + "<a target='_blank' href='show_realmcheck.php?token=" + token + "'>" + <?php echo '"' . _("See details") . '"'; ?> + '</a>';
431
+        var info = global_info[level] + ': ' + "<a target='_blank' href='show_realmcheck.php?token=" + token + "'>" + <?php echo '"'._("See details").'"'; ?> + '</a>';
432 432
         if (level == 0) {
433
-            info = info + '<br>' + <?php echo "'" . _("If you want to report your problem, fill fields bellow.") . "'";?>;
433
+            info = info + '<br>' + <?php echo "'"._("If you want to report your problem, fill fields bellow.")."'"; ?>;
434 434
         }
435 435
         $('#tests_info_area').html(info);
436 436
         
Please login to merge, or discard this patch.
web/admin/overview_federation.php 1 patch
Spacing   +25 added lines, -25 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();
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
             <?php echo $uiElements->infoblock($user->getAttributes(), "user", "User"); ?>
54 54
             <tr>
55 55
                 <td>
56
-                    <?php echo "" . _("Unique Identifier") ?>
56
+                    <?php echo ""._("Unique Identifier") ?>
57 57
                 </td>
58 58
                 <td>
59 59
                 </td>
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
     $mgmt = new \core\UserManagement();
69 69
 
70 70
     if (!$user->isFederationAdmin()) {
71
-        echo "<p>" . sprintf(_("You are not a %s manager."), $uiElements->nomenclatureFed) . "</p>";
71
+        echo "<p>".sprintf(_("You are not a %s manager."), $uiElements->nomenclatureFed)."</p>";
72 72
         echo $deco->footer();
73 73
         exit(0);
74 74
     }
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
                 <!-- fed properties -->
86 86
                 <tr>
87 87
                     <td>
88
-                        <?php echo "" . _("Country") ?>
88
+                        <?php echo ""._("Country") ?>
89 89
                     </td>
90 90
                     <td>
91 91
                     </td>
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
                     default:
167 167
                         throw new Exception("Error: unknown encryption status of invitation!?!");
168 168
                 }
169
-                echo $uiElements->boxRemark(ngettext("The invitation email was sent successfully.", "All invitation emails were sent successfully.", $counter) . " " . $cryptText, _("Sent successfully."));
169
+                echo $uiElements->boxRemark(ngettext("The invitation email was sent successfully.", "All invitation emails were sent successfully.", $counter)." ".$cryptText, _("Sent successfully."));
170 170
                 break;
171 171
             case "FAILURE":
172 172
                 echo $uiElements->boxError(_("No invitation email could be sent!"), _("Sending failure!"));
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
                     default:
187 187
                         throw new Exception("Error: unknown encryption status of invitation!?!");
188 188
                 }
189
-                echo $uiElements->boxWarning(sprintf(_("Some invitation emails were sent successfully (%s in total), the others failed."), $counter) . " " . $cryptText, _("Partial success."));
189
+                echo $uiElements->boxWarning(sprintf(_("Some invitation emails were sent successfully (%s in total), the others failed."), $counter)." ".$cryptText, _("Partial success."));
190 190
                 break;
191 191
             case "INVALIDSYNTAX":
192 192
                 echo $uiElements->boxError(_("The invitation email address was malformed, no invitation was sent!"), _("The invitation email address was malformed, no invitation was sent!"));
@@ -202,21 +202,21 @@  discard block
 block discarded – undo
202 202
     } else {
203 203
         $link = 'http://';
204 204
     }
205
-    $link .= $_SERVER['SERVER_NAME'] . $_SERVER['SCRIPT_NAME'];
205
+    $link .= $_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME'];
206 206
     $link = htmlspecialchars($link);
207 207
     if (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_RADIUS'] == 'LOCAL' && \config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS'] == 'LOCAL') {
208 208
         echo "<table><tr>
209
-                        <td>" . sprintf(_("Diagnose reachability and connection parameters of any %s %s"), \config\ConfAssistant::CONSORTIUM['display_name'], $uiElements->nomenclatureInst) . "</td>
209
+                        <td>" . sprintf(_("Diagnose reachability and connection parameters of any %s %s"), \config\ConfAssistant::CONSORTIUM['display_name'], $uiElements->nomenclatureInst)."</td>
210 210
                         <td><form method='post' action='../diag/action_realmcheck.php' accept-charset='UTF-8'>
211 211
                               <input type='hidden' name='comefrom' id='comefrom' value='$link'/>
212
-                              <button id='realmcheck' style='cursor:pointer;' type='submit'>" . _("Go!") . "</button>
212
+                              <button id='realmcheck' style='cursor:pointer;' type='submit'>"._("Go!")."</button>
213 213
                             </form>
214 214
                         </td>
215 215
                     </tr>
216 216
                     </table>";
217 217
     }
218 218
     if (\config\ConfAssistant::CONSORTIUM['name'] == 'eduroam') {
219
-        $helptext = "<h3>" . sprintf(_("Need help? Refer to the <a href='%s'>%s manual</a>"), "https://wiki.geant.org/x/qJg7Bw", $uiElements->nomenclatureFed) . "</h3>";
219
+        $helptext = "<h3>".sprintf(_("Need help? Refer to the <a href='%s'>%s manual</a>"), "https://wiki.geant.org/x/qJg7Bw", $uiElements->nomenclatureFed)."</h3>";
220 220
     } else {
221 221
         $helptext = "";
222 222
     }
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
             $pending_invites = $mgmt->listPendingInvitations();
231 231
 
232 232
             if (\config\Master::DB['enforce-external-sync']) {
233
-                echo "<th>" . sprintf(_("%s Database Sync Status"), \config\ConfAssistant::CONSORTIUM['display_name']) . "</th>";
233
+                echo "<th>".sprintf(_("%s Database Sync Status"), \config\ConfAssistant::CONSORTIUM['display_name'])."</th>";
234 234
             }
235 235
             ?>
236 236
             <th>
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
         foreach ($feds as $onefed) {
246 246
             $thefed = new \core\Federation(strtoupper($onefed['value']));
247 247
             /// nomenclature for 'federation', federation name, nomenclature for 'inst'
248
-            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>";
248
+            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>";
249 249
 
250 250
             // extract only pending invitations for *this* fed
251 251
             $display_pendings = FALSE;
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
                 // deployment status; need to dive into profiles for this
271 271
                 // show happy eyeballs if at least one profile is configured/showtime                    
272 272
                 echo "<td>";
273
-                echo ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_CONFIGURED ? "C" : "" ) . " " . ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_SHOWTIME ? "V" : "" );
273
+                echo ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_CONFIGURED ? "C" : "")." ".($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_SHOWTIME ? "V" : "");
274 274
                 echo "</td>";
275 275
                 // name; and realm of silverbullet profiles if any
276 276
                 // instantiating all profiles is costly, so we only do this if
@@ -284,23 +284,23 @@  discard block
 block discarded – undo
284 284
                     }
285 285
                 }
286 286
                 echo "<td style='vertical-align:top;'>
287
-                         <input type='hidden' name='inst' value='" . $index . "'>" . $idp_instance->name . (empty($listOfSilverbulletRealms) ? "" : "<ul><li>" ) . implode("</li><li>", $listOfSilverbulletRealms) . (empty($listOfSilverbulletRealms) ? "" : "</li><ul>" ) . "
287
+                         <input type='hidden' name='inst' value='" . $index."'>".$idp_instance->name.(empty($listOfSilverbulletRealms) ? "" : "<ul><li>").implode("</li><li>", $listOfSilverbulletRealms).(empty($listOfSilverbulletRealms) ? "" : "</li><ul>")."
288 288
                       </td>";
289 289
                 // external DB sync, if configured as being necessary
290 290
                 if (\config\Master::DB['enforce-external-sync']) {
291 291
                     echo "<td style='display: ruby;'>";
292 292
                     if ($readonly === FALSE) {
293
-                        echo "<form method='post' action='inc/manageDBLink.inc.php?inst_id=" . $idp_instance->identifier . "' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'>
294
-                                    <button type='submit'>" . _("Manage DB Link") . "</button></form>&nbsp;&nbsp;";
293
+                        echo "<form method='post' action='inc/manageDBLink.inc.php?inst_id=".$idp_instance->identifier."' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'>
294
+                                    <button type='submit'>" . _("Manage DB Link")."</button></form>&nbsp;&nbsp;";
295 295
                     }
296 296
                     switch ($idp_instance->getExternalDBSyncState()) {
297 297
                         case \core\IdP::EXTERNAL_DB_SYNCSTATE_NOTSUBJECTTOSYNCING:
298 298
                             break;
299 299
                         case \core\IdP::EXTERNAL_DB_SYNCSTATE_SYNCED:
300
-                            echo "<div class='acceptable'>" . _("Linked") . "</div>";
300
+                            echo "<div class='acceptable'>"._("Linked")."</div>";
301 301
                             break;
302 302
                         case \core\IdP::EXTERNAL_DB_SYNCSTATE_NOT_SYNCED:
303
-                            echo "<div class='notacceptable'>" . _("NOT linked") . "</div>";
303
+                            echo "<div class='notacceptable'>"._("NOT linked")."</div>";
304 304
 
305 305
 
306 306
                             break;
@@ -313,9 +313,9 @@  discard block
 block discarded – undo
313 313
                 echo "<td style='vertical-align: top;'>";
314 314
                 if ($readonly === FALSE) {
315 315
                     echo "<div style='white-space: nowrap;'>
316
-                                  <form method='post' action='inc/manageAdmins.inc.php?inst_id=" . $index . "' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'>
316
+                                  <form method='post' action='inc/manageAdmins.inc.php?inst_id=" . $index."' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'>
317 317
                                       <button type='submit'>" .
318
-                    _("Add/Remove Administrators") . "
318
+                    _("Add/Remove Administrators")."
319 319
                                       </button>
320 320
                                   </form>
321 321
                                 </div>";
@@ -328,7 +328,7 @@  discard block
 block discarded – undo
328 328
                 echo "<tr>
329 329
                             <td colspan='2'>
330 330
                                <strong>" .
331
-                sprintf(_("Pending invitations in the %s:"), $uiElements->nomenclatureFed) . "
331
+                sprintf(_("Pending invitations in the %s:"), $uiElements->nomenclatureFed)."
332 332
                                </strong>
333 333
                             </td>
334 334
                          </tr>";
@@ -336,16 +336,16 @@  discard block
 block discarded – undo
336 336
                     if (strtoupper($oneinvite['country']) == strtoupper($thefed->tld)) {
337 337
                         echo "<tr>
338 338
                                     <td>" .
339
-                        $oneinvite['name'] . "
339
+                        $oneinvite['name']."
340 340
                                     </td>
341 341
                                     <td>" .
342
-                        $oneinvite['mail'] . "
342
+                        $oneinvite['mail']."
343 343
                                     </td>
344 344
                                     <td colspan=2>";
345 345
                         if ($readonly === FALSE) {
346 346
                             echo "<form method='post' action='overview_federation.php' accept-charset='UTF-8'>
347
-                                <input type='hidden' name='invitation_id' value='" . $oneinvite['token'] . "'/>
348
-                                <button class='delete' type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_DELETE . "'>" . _("Revoke Invitation") . "</button> "
347
+                                <input type='hidden' name='invitation_id' value='" . $oneinvite['token']."'/>
348
+                                <button class='delete' type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_DELETE."'>"._("Revoke Invitation")."</button> "
349 349
                             . sprintf(_("(expires %s)"), $oneinvite['expiry'])
350 350
                             . "</form>";
351 351
                         }
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.