Passed
Push — master ( fe1973...d8c538 )
by Stefan
07:40
created
web/admin/overview_sp.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
  */
27 27
 ?>
28 28
 <?php
29
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
29
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
30 30
 
31 31
 $deco = new \web\lib\admin\PageDecoration();
32 32
 $validator = new \web\lib\common\InputValidation();
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 } else {
39 39
     $link = 'http://';
40 40
 }
41
-$link .= $_SERVER['SERVER_NAME'] . $_SERVER['SCRIPT_NAME'];
41
+$link .= $_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME'];
42 42
 $link = htmlspecialchars($link);
43 43
 
44 44
 echo $deco->defaultPagePrelude(sprintf(_("%s: %s Dashboard"), \config\Master::APPEARANCE['productname'], $uiElements->nomenclatureHotspot));
@@ -99,21 +99,21 @@  discard block
 block discarded – undo
99 99
         <?php
100 100
         if (\config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS'] !== NULL) {
101 101
             echo "<tr>
102
-                        <td>" . sprintf(_("Diagnose reachability and connection parameters of %ss"),$uiElements->nomenclatureInst) . "</td>
102
+                        <td>" . sprintf(_("Diagnose reachability and connection parameters of %ss"), $uiElements->nomenclatureInst)."</td>
103 103
                         <td><form method='post' action='../diag/action_realmcheck.php?inst_id=$my_inst->identifier' accept-charset='UTF-8'>
104 104
                               <!--<input type='text' name='realm' id='realm'>-->
105 105
                               <input type='hidden' name='comefrom' id='comefrom' value='$link'/>
106
-                              <button id='realmcheck' style='cursor:pointer;' type='submit'>" . _("Go!") . "</button>
106
+                              <button id='realmcheck' style='cursor:pointer;' type='submit'>"._("Go!")."</button>
107 107
                             </form>
108 108
                         </td>
109 109
                     </tr>";
110 110
         }
111 111
         if (\config\ConfAssistant::CONSORTIUM['name'] == "eduroam") { // SW: APPROVED
112 112
             echo "<tr>
113
-                        <td>" . sprintf(_("Check %s server status"), $uiElements->nomenclatureFed) . "</td>
113
+                        <td>" . sprintf(_("Check %s server status"), $uiElements->nomenclatureFed)."</td>
114 114
                         <td>
115 115
                            <form action='https://monitor.eduroam.org/mon_direct.php' accept-charset='UTF-8'>
116
-                              <button style='cursor:pointer;' type='submit'>" . _("Go!") . "</button>
116
+                              <button style='cursor:pointer;' type='submit'>" . _("Go!")."</button>
117 117
                            </form>
118 118
                         </td>
119 119
                     </tr>";
@@ -124,10 +124,10 @@  discard block
 block discarded – undo
124 124
     <?php
125 125
     $hotspotProfiles = $my_inst->listDeployments();
126 126
     if (count($hotspotProfiles) == 0) { // no profiles yet.
127
-        echo "<h2>" . sprintf(_("There are not yet any known deployments for your %s."), $uiElements->nomenclatureHotspot) . "</h2>";
127
+        echo "<h2>".sprintf(_("There are not yet any known deployments for your %s."), $uiElements->nomenclatureHotspot)."</h2>";
128 128
     }
129 129
     if (count($hotspotProfiles) > 0) { // no profiles yet.
130
-        echo "<h2>" . sprintf(_("Deployments for this %s"), $uiElements->nomenclatureHotspot) . "</h2>";
130
+        echo "<h2>".sprintf(_("Deployments for this %s"), $uiElements->nomenclatureHotspot)."</h2>";
131 131
         // display an info box with the connection data
132 132
     }
133 133
    
@@ -146,19 +146,19 @@  discard block
 block discarded – undo
146 146
         ?>
147 147
         <div style='display: table-row; margin-bottom: 20px;'>
148 148
             <div class='profilebox' style='display: table-cell;'>
149
-                <h2><?php echo core\DeploymentManaged::PRODUCTNAME . " (<span style='color:" . ( $deploymentObject->status == \core\AbstractDeployment::INACTIVE ? "red;'>" . _("inactive") : "green;'>" . _("active") ) . "</span>)"; ?></h2>
149
+                <h2><?php echo core\DeploymentManaged::PRODUCTNAME." (<span style='color:".($deploymentObject->status == \core\AbstractDeployment::INACTIVE ? "red;'>"._("inactive") : "green;'>"._("active"))."</span>)"; ?></h2>
150 150
                 <table>
151 151
                     <tr>
152 152
                         <td><strong><?php echo _("Your primary RADIUS server") ?></strong><br/>
153 153
                         <?php
154 154
                             if ($deploymentObject->host1_v4 !== NULL) {
155
-                                echo _("IPv4") . ": " . $deploymentObject->host1_v4;
155
+                                echo _("IPv4").": ".$deploymentObject->host1_v4;
156 156
                             }
157 157
                             if ($deploymentObject->host1_v4 !== NULL && $deploymentObject->host1_v6 !== NULL) {
158 158
                                 echo "<br/>";
159 159
                             }
160 160
                             if ($deploymentObject->host1_v6 !== NULL) {
161
-                                echo _("IPv6") . ": " . $deploymentObject->host1_v6;
161
+                                echo _("IPv6").": ".$deploymentObject->host1_v6;
162 162
                             }
163 163
                             ?>
164 164
                         </td>
@@ -166,9 +166,9 @@  discard block
 block discarded – undo
166 166
                         <td><?php echo $deploymentObject->port1; ?></td>
167 167
                         <td>
168 168
                             <?php
169
-                                echo "<img src='" . $radiusMessages[$deploymentObject->radius_status_1]['icon'] . 
170
-                                     "' alt='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] . 
171
-                                     "' title='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] . "'>";
169
+                                echo "<img src='".$radiusMessages[$deploymentObject->radius_status_1]['icon']. 
170
+                                     "' alt='".$radiusMessages[$deploymentObject->radius_status_1]['text']. 
171
+                                     "' title='".$radiusMessages[$deploymentObject->radius_status_1]['text']."'>";
172 172
                             ?>
173 173
                         </td>
174 174
                     </tr>
@@ -176,22 +176,22 @@  discard block
 block discarded – undo
176 176
                         <td><strong><?php echo _("Your backup RADIUS server") ?><br/></strong>
177 177
                             <?php
178 178
                             if ($deploymentObject->host2_v4 !== NULL) {
179
-                                echo _("IPv4") . ": " . $deploymentObject->host2_v4;
179
+                                echo _("IPv4").": ".$deploymentObject->host2_v4;
180 180
                             }
181 181
                             if ($deploymentObject->host2_v4 !== NULL && $deploymentObject->host2_v6 !== NULL) {
182 182
                                 echo "<br/>";
183 183
                             }
184 184
                             if ($deploymentObject->host2_v6 !== NULL) {
185
-                                echo _("IPv6") . ": " . $deploymentObject->host2_v6;
185
+                                echo _("IPv6").": ".$deploymentObject->host2_v6;
186 186
                             }
187 187
                             ?></td>
188 188
                         <td><?php echo _("RADIUS port number: ") ?></td>
189 189
                         <td><?php echo $deploymentObject->port2; ?></td>
190 190
                         <td>
191 191
                             <?php
192
-                                echo "<img src='" . $radiusMessages[$deploymentObject->radius_status_2]['icon'] .
193
-                                     "' alt='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] . 
194
-                                     "' title='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] . "'>";
192
+                                echo "<img src='".$radiusMessages[$deploymentObject->radius_status_2]['icon'].
193
+                                     "' alt='".$radiusMessages[$deploymentObject->radius_status_2]['text']. 
194
+                                     "' title='".$radiusMessages[$deploymentObject->radius_status_2]['text']."'>";
195 195
                             ?>
196 196
                         </td>
197 197
                     </tr>
@@ -242,12 +242,12 @@  discard block
 block discarded – undo
242 242
                                     if (isset($res['FAILURE']) && $res['FAILURE'] > 0) {
243 243
                                         echo '<br>';
244 244
                                         if ($res['FAILURE'] == 2) {
245
-                                            echo ' <span style="color: red;">' . _("Activation failure.") . '</span>';
245
+                                            echo ' <span style="color: red;">'._("Activation failure.").'</span>';
246 246
                                         } else {
247 247
                                             if (isset($_GET['res'][1]) && $_GET['res']['1'] == 'FAILURE') {
248
-                                                echo ' <span style="color: red;">' . _("Activation failure for your primary RADIUS server.") . '</span>';
248
+                                                echo ' <span style="color: red;">'._("Activation failure for your primary RADIUS server.").'</span>';
249 249
                                             } else {
250
-                                                echo ' <span style="color: red;">' . _("Activation failure for your backup RADIUS server.") . '</span>';
250
+                                                echo ' <span style="color: red;">'._("Activation failure for your backup RADIUS server.").'</span>';
251 251
                                             }
252 252
                                         }
253 253
                                     }
@@ -267,12 +267,12 @@  discard block
 block discarded – undo
267 267
                                     if ($res['FAILURE'] > 0) {
268 268
                                         echo '<br>';
269 269
                                         if ($res['FAILURE'] == 2) {
270
-                                            echo ' <span style="color: red;">' . _("Failure during deactivation, your request is queued for handling") . '</span>';
270
+                                            echo ' <span style="color: red;">'._("Failure during deactivation, your request is queued for handling").'</span>';
271 271
                                         } else {
272 272
                                             if (isset($_GET['res'][1]) && $_GET['res']['1'] == 'FAILURE') {
273
-                                                echo ' <span style="color: red;">' . _("Deactivation failure for your primary RADIUS server, your request is queued.") . '</span>';
273
+                                                echo ' <span style="color: red;">'._("Deactivation failure for your primary RADIUS server, your request is queued.").'</span>';
274 274
                                             } else {
275
-                                                echo ' <span style="color: red;">' . _("Deactivation failure for your backup RADIUS server, your request is queued.") . '</span>';
275
+                                                echo ' <span style="color: red;">'._("Deactivation failure for your backup RADIUS server, your request is queued.").'</span>';
276 276
                                             }
277 277
                                         }
278 278
                                     }
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/skins/modern/diag/diag.php 1 patch
Spacing   +69 added lines, -69 removed lines patch added patch discarded remove patch
@@ -46,9 +46,9 @@  discard block
 block discarded – undo
46 46
 $Gui->loggerInstance->debug(4, $operatingSystem);
47 47
 $uiElements = new web\lib\admin\UIElements();
48 48
 if ($operatingSystem) {
49
-    print "recognisedOS = '" . $operatingSystem['device'] . "';\n";
49
+    print "recognisedOS = '".$operatingSystem['device']."';\n";
50 50
 }
51
-require dirname(__DIR__) . '/user/js/cat_js.php';
51
+require dirname(__DIR__).'/user/js/cat_js.php';
52 52
 
53 53
 ?>
54 54
 </script>
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 <div id='wrap' style='background-image:url("<?php echo $Gui->skinObject->findResourceUrl("IMAGES", "beta.png"); ?>");'>
61 61
 <form id="cat_form" name="cat_form" accept-charset="UTF-8" action="<?php echo $_SERVER['SCRIPT_NAME']; ?>" method="POST">
62 62
 <?php
63
-require dirname(__DIR__) . '/diag/js/diag_js.php';
63
+require dirname(__DIR__).'/diag/js/diag_js.php';
64 64
 echo $divs->divHeading($visibility);
65 65
 $Gui->languageInstance->setTextDomain("diagnostics");
66 66
 ?>
@@ -78,12 +78,12 @@  discard block
 block discarded – undo
78 78
     </div>
79 79
     <div id="main_body">
80 80
         <div id="user_page">
81
-            <?php echo $divs->divPagetitle(_("Diagnostics site") . " (<span style='color:red'>beta</span>)", ""); ?>
81
+            <?php echo $divs->divPagetitle(_("Diagnostics site")." (<span style='color:red'>beta</span>)", ""); ?>
82 82
             <div id="user_info" style='padding-top: 10px;'>
83 83
             <div id='diagnostic_choice'>
84
-                <?php echo _("The diagnostics system will do its best to identify and resolve your problems!") . ' ' . _("Please help the system by answering the questions as precisely as possible.") . "<br/>" . _("Are you a") . ' '; ?>
85
-                <input type='radio' name='diagnostic_usertype' value='0'><?php echo _("end-user") . ' ' . _("or"); ?>   
86
-                <input type='radio' name='diagnostic_usertype' value='1' <?php if ($admin == 1) { echo " checked"; } ?> > <?php echo _("eduroam administrator") .'?'; ?>
84
+                <?php echo _("The diagnostics system will do its best to identify and resolve your problems!").' '._("Please help the system by answering the questions as precisely as possible.")."<br/>"._("Are you a").' '; ?>
85
+                <input type='radio' name='diagnostic_usertype' value='0'><?php echo _("end-user").' '._("or"); ?>   
86
+                <input type='radio' name='diagnostic_usertype' value='1' <?php if ($admin == 1) { echo " checked"; } ?> > <?php echo _("eduroam administrator").'?'; ?>
87 87
             </div>
88 88
             <div id='diagnostic_enduser' style='display: none;'>
89 89
                 <h2><?php echo _("Tools for End Users"); ?></h2>
@@ -93,24 +93,24 @@  discard block
 block discarded – undo
93 93
                 ?>
94 94
                 </p>
95 95
                 <?php
96
-                    echo '<div id="before_stage_1"><h3>' . _("The system needs some information on your home institution - issuer of your account") . '</h3>';
96
+                    echo '<div id="before_stage_1"><h3>'._("The system needs some information on your home institution - issuer of your account").'</h3>';
97 97
                     echo _("What is the realm part of your user account (the part behind the @ of 'your.username@<b>realm.tld</b>):");
98 98
                 ?>
99 99
                 <input type='text' name='user_realm' id='user_realm' value=''>
100 100
                 <?php
101
-                    echo '<div id="realm_by_select"><br/>' . _("alternatively") . '<br/>';
102
-                    echo _("You can select your home institution from the following list") . '<br/>';
101
+                    echo '<div id="realm_by_select"><br/>'._("alternatively").'<br/>';
102
+                    echo _("You can select your home institution from the following list").'<br/>';
103 103
                     echo '<div id="select_idp_country"><a href="" id="idp_countries_list">';    
104
-                    echo '<span id="realmselect">' . _("Click to select your country/region and organisation") . '</span></a></div>';
104
+                    echo '<span id="realmselect">'._("Click to select your country/region and organisation").'</span></a></div>';
105 105
                 ?>
106 106
                 <div id="select_idp_area" style="display:none;">
107 107
                 </div>
108 108
                 </div>
109 109
                 <div id="position_info">
110 110
                     <?php
111
-                        echo '<h3>' . _("Optionally, to improve tests, you can provide information on your current location") . '</h3>';
111
+                        echo '<h3>'._("Optionally, to improve tests, you can provide information on your current location").'</h3>';
112 112
                         echo '<div id="select_sp_country"><a href="" id="sp_countries_list">';    
113
-                        echo '<span id="spselect">' . _("Click to select a location in which you have an eduroam problem") . '</span></a></div>';
113
+                        echo '<span id="spselect">'._("Click to select a location in which you have an eduroam problem").'</span></a></div>';
114 114
                     ?>
115 115
                     <div id="select_sp_area" style="display:none;">
116 116
                     </div>
@@ -143,11 +143,11 @@  discard block
 block discarded – undo
143 143
                             echo 'none';
144 144
                         }
145 145
                         echo ";'>";
146
-                        echo '<h3>' . _("What is the nature of the problem?") . '</h3>';
147
-                        echo '<input type="radio" name="problem_type" value="1"' . (($sp==1)? ' checked' : '') . '>';
148
-                        echo _("I suspect a technical problem at a particular IdP") . '<br>';
149
-                        echo '<input type="radio" name="problem_type" value="1"' . (($sp==1)? ' checked' : '') . '>';
150
-                        echo _("I want to report abuse of network resources by a roaming user") . '<br>';
146
+                        echo '<h3>'._("What is the nature of the problem?").'</h3>';
147
+                        echo '<input type="radio" name="problem_type" value="1"'.(($sp == 1) ? ' checked' : '').'>';
148
+                        echo _("I suspect a technical problem at a particular IdP").'<br>';
149
+                        echo '<input type="radio" name="problem_type" value="1"'.(($sp == 1) ? ' checked' : '').'>';
150
+                        echo _("I want to report abuse of network resources by a roaming user").'<br>';
151 151
                         echo '<input type="radio" name="problem_type" value="2">';
152 152
                         echo _("I suspect a technical problem for one of my users at a particular SP");
153 153
                         echo "<div id='idp_contact_area'></div>";
@@ -156,9 +156,9 @@  discard block
 block discarded – undo
156 156
                         echo "</div>"; 
157 157
                     } else {
158 158
                         echo "0\">";
159
-                        echo _("This service is for authenticated admins only.") . '<br>';
160
-                        echo "<a href=\"diag.php?admin=1\">" .
161
-                             _("eduroam® admin access is needed") . "</a>";
159
+                        echo _("This service is for authenticated admins only.").'<br>';
160
+                        echo "<a href=\"diag.php?admin=1\">".
161
+                             _("eduroam® admin access is needed")."</a>";
162 162
                     }
163 163
                 ?>
164 164
             </div> 
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
         return false;
235 235
     });
236 236
     $(document).on('change', '#idp_country' , function() {
237
-        var comment = <?php echo '"' . _("Fetching institutions list") . '..."'; ?>;  
237
+        var comment = <?php echo '"'._("Fetching institutions list").'..."'; ?>;  
238 238
         var id = $(this).attr('id');
239 239
         var k = id.indexOf('_');
240 240
         var type = id.substr(0,k);
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
                         var shtml = '';
253 253
                         var select = '';
254 254
                         if (type !== 'asp') {
255
-                            shtml = <?php echo '"<td>' . _("Select institution:") . '</td><td>"'; ?>;
255
+                            shtml = <?php echo '"<td>'._("Select institution:").'</td><td>"'; ?>;
256 256
                         }
257 257
                         select = '<select id="' + type + '_inst" name="' + type + '_inst" style="margin-left:0px; width:400px;"><option value=""></option>';
258 258
                         for (var i in institutions) {
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
                     } else {
274 274
                         if (data.status === 0) {
275 275
                             inProgress(0);
276
-                            var msg = <?php echo '"' . _("The database does not contain the information needed to help you in realm selection for this country. You have to provide the realm you are interested in.") . '"'; ?>;
276
+                            var msg = <?php echo '"'._("The database does not contain the information needed to help you in realm selection for this country. You have to provide the realm you are interested in.").'"'; ?>;
277 277
                             alert(msg);
278 278
                             $('#select_idp_country').show();
279 279
                             $('#select_idp_area').hide();
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
                 },
283 283
                 error:function() {
284 284
                     inProgress(0);
285
-                    var msg = <?php echo '"' . _("Can not search in database. You have to provide the realm you are interested in.") . '"'; ?>;
285
+                    var msg = <?php echo '"'._("Can not search in database. You have to provide the realm you are interested in.").'"'; ?>;
286 286
                     alert(msg);
287 287
                     $('#select_idp_country').show();
288 288
                     $('#select_idp_area').hide();
@@ -298,9 +298,9 @@  discard block
 block discarded – undo
298 298
     });
299 299
     $(document).on('change', '#select_sp_problem' , function() {
300 300
         if ($('#select_sp_problem').val().substr(0,6) == 'abuse-') {
301
-            $('#realm_in_db_admin').text(<?php echo '"' . _("Check if this realm is registered") . '"'; ?>);
301
+            $('#realm_in_db_admin').text(<?php echo '"'._("Check if this realm is registered").'"'; ?>);
302 302
         } else {
303
-            $('#realm_in_db_admin').text(<?php echo '"' . _("Check this realm") . '"'; ?>);
303
+            $('#realm_in_db_admin').text(<?php echo '"'._("Check this realm").'"'; ?>);
304 304
         }
305 305
         $('#realm_in_db_admin').hide();
306 306
         $('#admin_realm').val('');
@@ -308,7 +308,7 @@  discard block
 block discarded – undo
308 308
         clear_sp_question();
309 309
     });
310 310
     $(document).on('change', '#sp_country, #asp_country' , function() {
311
-        var comment = <?php echo '"' . _("Fetching institutions list") . '..."'; ?>;  
311
+        var comment = <?php echo '"'._("Fetching institutions list").'..."'; ?>;  
312 312
         var id = $(this).attr('id');
313 313
         var k = id.indexOf('_');
314 314
         var type = id.substr(0,k);
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
                         var shtml = '';
327 327
                         var select = '';
328 328
                         if (type !== 'asp') {
329
-                            shtml = <?php echo '"<td>' . _("Select institution:") . '</td><td>"'; ?>;
329
+                            shtml = <?php echo '"<td>'._("Select institution:").'</td><td>"'; ?>;
330 330
                         }
331 331
                         select = '<select id="' + type + '_inst" name="' + type + '_inst" style="margin-left:0px; width:400px;"><option value=""></option>';
332 332
                         for (var i in hotspots) {
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
                             inProgress(0);
350 350
                             var select = '<select id="' + type + '_inst" name="' + type + '_inst" style="margin-left:0px; width:400px;"><option value="">';
351 351
                             var shtml = '<td></td><td>';
352
-                            select = select + <?php echo '"' . _("Other location") . '"'; ?> + '</option></select></td>';
352
+                            select = select + <?php echo '"'._("Other location").'"'; ?> + '</option></select></td>';
353 353
                             if (type !== 'asp') {
354 354
                                 $('#row_' + type + '_institution').html('');
355 355
                                 $('#row_' + type + '_institution').append(shtml + select);
@@ -383,7 +383,7 @@  discard block
 block discarded – undo
383 383
             $('#start_test_area').hide();
384 384
             return false;
385 385
         }
386
-        var comment = <?php echo '"' . _("Fetching realms list") . '..."'; ?>;
386
+        var comment = <?php echo '"'._("Fetching realms list").'..."'; ?>;
387 387
         inProgress(1, comment);
388 388
         $.ajax({
389 389
             url: "findRealm.php",
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
                     var realms = data.realms;
396 396
                     var realmselect = '';
397 397
                     if (realms.length > 1) {
398
-                        realmselect = <?php echo '"<td>' . _("Check realm(s):") . '</td>"'; ?>;
398
+                        realmselect = <?php echo '"<td>'._("Check realm(s):").'</td>"'; ?>;
399 399
                         realmselect = realmselect + '<td>' + "<span style='margin-left: 10px'>";
400 400
                         for (var i in realms) {
401 401
                             realmselect = realmselect + '<input type="radio" name="realm" ';
@@ -407,7 +407,7 @@  discard block
 block discarded – undo
407 407
                         }
408 408
                         realmselect = realmselect + '</span></td>';
409 409
                     } else {
410
-                        realmselect = <?php echo '"<td>' . _("Realm:") . '</td>"'; ?>;
410
+                        realmselect = <?php echo '"<td>'._("Realm:").'</td>"'; ?>;
411 411
                         realmselect = realmselect + '<td>' + "<span style='margin-left: 10px'>";
412 412
                         realmselect = realmselect + realms[0] + '</span>';
413 413
                         realmselect = realmselect + '<input type="hidden" name="realm" value="' + realms[0] + '">';
@@ -459,7 +459,7 @@  discard block
 block discarded – undo
459 459
             clear_sp_question();
460 460
             t = 1;
461 461
         }
462
-        var comment = <?php echo '"' . _("Running realm tests") . '..."'; ?>;
462
+        var comment = <?php echo '"'._("Running realm tests").'..."'; ?>;
463 463
         inProgress(1, comment);
464 464
         /*waiting(comment);*/
465 465
         $.ajax({
@@ -518,7 +518,7 @@  discard block
 block discarded – undo
518 518
         testSociopath('', answer);
519 519
     });
520 520
     $('#realmtest').click(function(event){
521
-        var comment = <?php echo '"<br><br>' . _("Running realm tests") . '..."'; ?>;
521
+        var comment = <?php echo '"<br><br>'._("Running realm tests").'..."'; ?>;
522 522
         inProgress(1, comment);
523 523
         $('#start_test_area').hide();
524 524
         if ($('#select_sp_area').is(':hidden')) {
@@ -566,13 +566,13 @@  discard block
 block discarded – undo
566 566
                         reset_footer();
567 567
                         testSociopath(realm, 0);
568 568
                     } else {
569
-                        var title = <?php echo '"' . _("Diagnostics results for selected realms") . '"'; ?>;
570
-                        result = '<div class="padding"><h3>' + <?php echo '"' . _("An unknown problem occured") . '"'; ?>;
569
+                        var title = <?php echo '"'._("Diagnostics results for selected realms").'"'; ?>;
570
+                        result = '<div class="padding"><h3>' + <?php echo '"'._("An unknown problem occured").'"'; ?>;
571 571
                         result = result + '</h3>'
572 572
                         if (r.length == 1) {
573
-                            result = result + <?php echo '"' . _("This test includes checking of the following realm") . '"'; ?>;
573
+                            result = result + <?php echo '"'._("This test includes checking of the following realm").'"'; ?>;
574 574
                         } else {    
575
-                            result = result + <?php echo '"' . _("This test includes checking of the following realms") . '"'; ?>;
575
+                            result = result + <?php echo '"'._("This test includes checking of the following realms").'"'; ?>;
576 576
                         }
577 577
                         result = result + ': '
578 578
                         for (var i=0; i < r.length; i++) {
@@ -582,7 +582,7 @@  discard block
 block discarded – undo
582 582
                             result = result + r[i];
583 583
                         }
584 584
                         result = result + '.<br>';
585
-                        result = result + <?php echo '"' . _("You should report this to") . '"'; ?> + ' <a href="mailto:[email protected]">[email protected]</a>';
585
+                        result = result + <?php echo '"'._("You should report this to").'"'; ?> + ' <a href="mailto:[email protected]">[email protected]</a>';
586 586
                         result = result + '</div>';
587 587
                         $('#after_stage_1').hide();
588 588
                         $('#before_stage_1').show();
@@ -650,43 +650,43 @@  discard block
 block discarded – undo
650 650
             success:function(data) {
651 651
                 if (data.status === 1) {
652 652
                     var result = '';
653
-                    var title = <?php echo '"' . _("eduroam admin report submission") . '"'; ?>;
653
+                    var title = <?php echo '"'._("eduroam admin report submission").'"'; ?>;
654 654
                     result = '<div class="padding">';
655 655
                     if (type == 'idp_send') {
656
-                        result = result + '<h3>'+ <?php echo '"' . _("SP contacting IdP due to technical problems or abuse") . '"'; ?> + '</h3>';
656
+                        result = result + '<h3>'+ <?php echo '"'._("SP contacting IdP due to technical problems or abuse").'"'; ?> + '</h3>';
657 657
                         result = result + '<table>';
658
-                        result = result + '<tr><td>' + <?php echo '"' . _("Reason") . '"'; ?> + '</td><td>' + data.reason + '</td></tr>';
659
-                        result = result + '<tr><td>' + <?php echo '"' . _("Event's timestamp") . '"'; ?> + '</td><td>' + data.timestamp + '</td></tr>';
660
-                        result = result + '<tr><td>' + <?php echo '"' . _("Calling-Station-Id") . '"'; ?> + '</td><td>' + data.mac + '</td></tr>';
661
-                        result = result + '<tr><td>' + <?php echo '"' . _("Additional description") . '"'; ?> +'</td><td>' + data.freetext + '</td></tr>';
662
-                        result = result + '<tr><td>' + <?php echo '"' . _("An email to contact the reporter") . '"'; ?> + '</td><td>' + data.email + '</td></tr>';
663
-                        result = result + '<tr><td>' + <?php echo '"' . _("Test result") . '" '; ?> +'</td><td>';
658
+                        result = result + '<tr><td>' + <?php echo '"'._("Reason").'"'; ?> + '</td><td>' + data.reason + '</td></tr>';
659
+                        result = result + '<tr><td>' + <?php echo '"'._("Event's timestamp").'"'; ?> + '</td><td>' + data.timestamp + '</td></tr>';
660
+                        result = result + '<tr><td>' + <?php echo '"'._("Calling-Station-Id").'"'; ?> + '</td><td>' + data.mac + '</td></tr>';
661
+                        result = result + '<tr><td>' + <?php echo '"'._("Additional description").'"'; ?> +'</td><td>' + data.freetext + '</td></tr>';
662
+                        result = result + '<tr><td>' + <?php echo '"'._("An email to contact the reporter").'"'; ?> + '</td><td>' + data.email + '</td></tr>';
663
+                        result = result + '<tr><td>' + <?php echo '"'._("Test result").'" '; ?> +'</td><td>';
664 664
                         if (data.tests_result == 1) {
665
-                            result = result + <?php echo '"' . _("failure") . '"'; ?>;
665
+                            result = result + <?php echo '"'._("failure").'"'; ?>;
666 666
                         } else {
667
-                            result = result + <?php echo '"' . _("success") . '"'; ?>;
667
+                            result = result + <?php echo '"'._("success").'"'; ?>;
668 668
                         }
669 669
                         result = result + '</td></tr>';
670
-                        result = result + '<tr><td>' + <?php echo '"' . _("Test URL") . '" '; ?> +'</td><td><a href="' + data.testurl + '">' + data.testurl + '</a></td></tr>';
671
-                        result = result + '<tr><td>' + <?php echo '"' . _("Email to IdP administrators ") . '"'; ?> + ' ';
670
+                        result = result + '<tr><td>' + <?php echo '"'._("Test URL").'" '; ?> +'</td><td><a href="' + data.testurl + '">' + data.testurl + '</a></td></tr>';
671
+                        result = result + '<tr><td>' + <?php echo '"'._("Email to IdP administrators ").'"'; ?> + ' ';
672 672
                         if (data.emailsent == 1) {
673
-                            result = result + <?php echo '"' . _("send successfully") . '"'; ?>;
673
+                            result = result + <?php echo '"'._("send successfully").'"'; ?>;
674 674
                         } else {
675
-                            result = result + <?php echo '"' . _("not sent - failure while sending") . '"'; ?>;
675
+                            result = result + <?php echo '"'._("not sent - failure while sending").'"'; ?>;
676 676
                         }
677 677
                         result = result + '</td><td></td></tr>';
678 678
                     }
679 679
                     if (type == 'sp_send') {
680
-                        result = result + '<h3>'+ <?php echo '"' . _("IdP contacting SP due to technical problems or abuse") . '"'; ?> + '</h3>';
680
+                        result = result + '<h3>'+ <?php echo '"'._("IdP contacting SP due to technical problems or abuse").'"'; ?> + '</h3>';
681 681
                         result = result + '<table>';
682
-                        result = result + '<tr><td>' + <?php echo '"' . _("Reason") . '"'; ?> + '</td><td>' + data.reason + '</td></tr>';
683
-                        result = result + '<tr><td>' + <?php echo '"' . _("SP's Operator-Name") . '"'; ?> + '</td><td>' + data.opname + '</td></tr>';
684
-                        result = result + '<tr><td>' + <?php echo '"' . _("User's outer ID") . '"'; ?> + '</td><td>' + data.outerid + '</td></tr>';
685
-                        result = result + '<tr><td>' + <?php echo '"' . _("IdP email") . '"'; ?> + '</td><td>' + data.email + '</td></tr>';
686
-                        result = result + '<tr><td>' + <?php echo '"' . _("Event's timestamp") . '"'; ?> + '</td><td>' + data.timestamp + '</td></tr>';
687
-                        result = result + '<tr><td>' + <?php echo '"' . _("Calling-Station-Id") . '"'; ?> + '</td><td>' + data.mac + '</td></tr>';
688
-                        result = result + '<tr><td>' + <?php echo '"' . _("Additional description") . '"'; ?> +'</td><td>' + data.freetext + '</td></tr>';
689
-                        result = result + '<tr><td>' + <?php echo '"' . _("How to contact the user") . '"'; ?> +'</td><td>' + data.cdetails + '</td></tr>';
682
+                        result = result + '<tr><td>' + <?php echo '"'._("Reason").'"'; ?> + '</td><td>' + data.reason + '</td></tr>';
683
+                        result = result + '<tr><td>' + <?php echo '"'._("SP's Operator-Name").'"'; ?> + '</td><td>' + data.opname + '</td></tr>';
684
+                        result = result + '<tr><td>' + <?php echo '"'._("User's outer ID").'"'; ?> + '</td><td>' + data.outerid + '</td></tr>';
685
+                        result = result + '<tr><td>' + <?php echo '"'._("IdP email").'"'; ?> + '</td><td>' + data.email + '</td></tr>';
686
+                        result = result + '<tr><td>' + <?php echo '"'._("Event's timestamp").'"'; ?> + '</td><td>' + data.timestamp + '</td></tr>';
687
+                        result = result + '<tr><td>' + <?php echo '"'._("Calling-Station-Id").'"'; ?> + '</td><td>' + data.mac + '</td></tr>';
688
+                        result = result + '<tr><td>' + <?php echo '"'._("Additional description").'"'; ?> +'</td><td>' + data.freetext + '</td></tr>';
689
+                        result = result + '<tr><td>' + <?php echo '"'._("How to contact the user").'"'; ?> +'</td><td>' + data.cdetails + '</td></tr>';
690 690
                     }
691 691
                     result = result + '</div>';
692 692
                     showInfo(result, title);
@@ -711,7 +711,7 @@  discard block
 block discarded – undo
711 711
                         $(this).removeClass('visible_row').addClass('hidden_row');
712 712
                     }
713 713
                 });
714
-                $('#admin_realm').attr('title', <?php echo '"' . _("Wrong format of realm") . '"'; ?>);
714
+                $('#admin_realm').attr('title', <?php echo '"'._("Wrong format of realm").'"'; ?>);
715 715
             } else {
716 716
                 $('#admin_realm').removeClass('error_input');
717 717
                 $('#admin_realm').attr('title', '');
@@ -721,7 +721,7 @@  discard block
 block discarded – undo
721 721
     $(document).on('keyup change', '#email' , function() {
722 722
         if ($(this).val().length == 0 || !isEmail($(this).val())) {
723 723
             $('#email').addClass('error_input');
724
-            $('#email').attr('title', <?php echo '"' . _("Wrong format of email") . '"'; ?>);
724
+            $('#email').attr('title', <?php echo '"'._("Wrong format of email").'"'; ?>);
725 725
         } else {
726 726
             $('#email').removeClass('error_input');
727 727
             $('#email').attr('title', '');
@@ -734,7 +734,7 @@  discard block
 block discarded – undo
734 734
         if ($('#mac').val().length > 0) {
735 735
             if ($('#mac').val().length != 17) {
736 736
                 $('#mac').addClass('error_input');
737
-                $('#mac').attr('title', <?php echo '"' . _("MAC address is incomplete") . '"'; ?>);
737
+                $('#mac').attr('title', <?php echo '"'._("MAC address is incomplete").'"'; ?>);
738 738
             } else {
739 739
                 $('#mac').removeClass('error_input'); 
740 740
                 $('#mac').attr('title', '');
@@ -743,7 +743,7 @@  discard block
 block discarded – undo
743 743
         if ($(this).attr('id') == 'email' &&  $(this).val().length > 0) {
744 744
             if (!isEmail($(this).val())) {
745 745
                 $('#email').addClass('error_input');
746
-                $('#email').attr('title', <?php echo '"' . _("Wrong format of email") . '"'; ?>);
746
+                $('#email').attr('title', <?php echo '"'._("Wrong format of email").'"'; ?>);
747 747
             } else {
748 748
                 $('#email').removeClass('error_input');
749 749
                 $('#email').attr('title', '');
@@ -752,7 +752,7 @@  discard block
 block discarded – undo
752 752
         if ($(this).attr('id') == 'outer_id' &&  $(this).val().length > 0) {
753 753
             if (!isEmail($(this).val(), true)) {
754 754
                 $('#outer_id').addClass('error_input');
755
-                $('#outer_id').attr('title', <?php echo '"' . _("Wrong format of outer ID") . '"'; ?>);
755
+                $('#outer_id').attr('title', <?php echo '"'._("Wrong format of outer ID").'"'; ?>);
756 756
             } else {
757 757
                 $('#outer_id').removeClass('error_input');
758 758
                 $('#outer_id').attr('title', '');
@@ -761,7 +761,7 @@  discard block
 block discarded – undo
761 761
         if ($(this).attr('id') == 'opname' && $('#opname').val().length > 0) {
762 762
             if (!isOperatorName($(this).val())) {
763 763
                 $('#opname').addClass('error_input');
764
-                $('#opname').attr('title', <?php echo '"' . _("Wrong string given as OperatorName") . '"'; ?>);
764
+                $('#opname').attr('title', <?php echo '"'._("Wrong string given as OperatorName").'"'; ?>);
765 765
                 $('#spmanually').show();
766 766
             } else {
767 767
                 $('#opname').removeClass('error_input');
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.