@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | * <base_url>/copyright.php after deploying the software |
20 | 20 | */ |
21 | 21 | |
22 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
22 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
23 | 23 | |
24 | 24 | $deco = new \web\lib\admin\PageDecoration(); |
25 | 25 | $uiElements = new web\lib\admin\UIElements(); |
@@ -50,16 +50,16 @@ discard block |
||
50 | 50 | <div class="infobox"> |
51 | 51 | <h2><?php $tablecaption = _("Your Personal Information"); echo $tablecaption; ?></h2> |
52 | 52 | <table> |
53 | - <caption><?php echo $tablecaption;?></caption> |
|
53 | + <caption><?php echo $tablecaption; ?></caption> |
|
54 | 54 | <tr> |
55 | - <th class="wai-invisible" scope="col"><?php echo _("Property Type");?></th> |
|
56 | - <th class="wai-invisible" scope="col"><?php echo _("Language if applicable");?></th> |
|
57 | - <th class="wai-invisible" scope="col"><?php echo _("Property Value");?></th> |
|
55 | + <th class="wai-invisible" scope="col"><?php echo _("Property Type"); ?></th> |
|
56 | + <th class="wai-invisible" scope="col"><?php echo _("Language if applicable"); ?></th> |
|
57 | + <th class="wai-invisible" scope="col"><?php echo _("Property Value"); ?></th> |
|
58 | 58 | </tr> |
59 | 59 | <?php echo $uiElements->infoblock($user->getAttributes(), "user", "User"); ?> |
60 | 60 | <tr> |
61 | 61 | <td> |
62 | - <?php echo "" . _("Unique Identifier") ?> |
|
62 | + <?php echo ""._("Unique Identifier") ?> |
|
63 | 63 | </td> |
64 | 64 | <td> |
65 | 65 | </td> |
@@ -71,14 +71,14 @@ discard block |
||
71 | 71 | </div> |
72 | 72 | |
73 | 73 | <form action='overview_certificates.php' method='GET' accept-charset='UTF-8'> |
74 | - <button type='submit'><?php echo sprintf(_('RADIUS/TLS Certificate management'));?></button> |
|
74 | + <button type='submit'><?php echo sprintf(_('RADIUS/TLS Certificate management')); ?></button> |
|
75 | 75 | </form> |
76 | 76 | |
77 | 77 | <?php |
78 | 78 | $mgmt = new \core\UserManagement(); |
79 | 79 | |
80 | 80 | if (!$user->isFederationAdmin()) { |
81 | - echo "<p>" . sprintf(_("You are not a %s manager."), $uiElements->nomenclatureFed) . "</p>"; |
|
81 | + echo "<p>".sprintf(_("You are not a %s manager."), $uiElements->nomenclatureFed)."</p>"; |
|
82 | 82 | echo $deco->footer(); |
83 | 83 | exit(0); |
84 | 84 | } |
@@ -92,16 +92,16 @@ discard block |
||
92 | 92 | <?php $tablecaption2 = sprintf(_("%s Properties: %s"), $uiElements->nomenclatureFed, $thefed->name); echo $tablecaption2; ?> |
93 | 93 | </h2> |
94 | 94 | <table> |
95 | - <caption><?php echo $tablecaption2;?></caption> |
|
95 | + <caption><?php echo $tablecaption2; ?></caption> |
|
96 | 96 | <tr> |
97 | - <th class="wai-invisible" scope="col"><?php echo _("Property Type");?></th> |
|
98 | - <th class="wai-invisible" scope="col"><?php echo _("Language if applicable");?></th> |
|
99 | - <th class="wai-invisible" scope="col"><?php echo _("Property Value");?></th> |
|
97 | + <th class="wai-invisible" scope="col"><?php echo _("Property Type"); ?></th> |
|
98 | + <th class="wai-invisible" scope="col"><?php echo _("Language if applicable"); ?></th> |
|
99 | + <th class="wai-invisible" scope="col"><?php echo _("Property Value"); ?></th> |
|
100 | 100 | </tr> |
101 | 101 | <!-- fed properties --> |
102 | 102 | <tr> |
103 | 103 | <td> |
104 | - <?php echo "" . _("Country") ?> |
|
104 | + <?php echo ""._("Country") ?> |
|
105 | 105 | </td> |
106 | 106 | <td> |
107 | 107 | </td> |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | default: |
183 | 183 | throw new Exception("Error: unknown encryption status of invitation!?!"); |
184 | 184 | } |
185 | - echo $uiElements->boxRemark(ngettext("The invitation email was sent successfully.", "All invitation emails were sent successfully.", $counter) . " " . $cryptText, _("Sent successfully.")); |
|
185 | + echo $uiElements->boxRemark(ngettext("The invitation email was sent successfully.", "All invitation emails were sent successfully.", $counter)." ".$cryptText, _("Sent successfully.")); |
|
186 | 186 | break; |
187 | 187 | case "FAILURE": |
188 | 188 | echo $uiElements->boxError(_("No invitation email could be sent!"), _("Sending failure!")); |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | default: |
203 | 203 | throw new Exception("Error: unknown encryption status of invitation!?!"); |
204 | 204 | } |
205 | - echo $uiElements->boxWarning(sprintf(_("Some invitation emails were sent successfully (%s in total), the others failed."), $counter) . " " . $cryptText, _("Partial success.")); |
|
205 | + echo $uiElements->boxWarning(sprintf(_("Some invitation emails were sent successfully (%s in total), the others failed."), $counter)." ".$cryptText, _("Partial success.")); |
|
206 | 206 | break; |
207 | 207 | case "INVALIDSYNTAX": |
208 | 208 | echo $uiElements->boxError(_("The invitation email address was malformed, no invitation was sent!"), _("The invitation email address was malformed, no invitation was sent!")); |
@@ -218,27 +218,27 @@ discard block |
||
218 | 218 | } else { |
219 | 219 | $link = 'http://'; |
220 | 220 | } |
221 | - $link .= $_SERVER['SERVER_NAME'] . $_SERVER['SCRIPT_NAME']; |
|
221 | + $link .= $_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME']; |
|
222 | 222 | $link = htmlspecialchars($link); |
223 | 223 | if (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_RADIUS'] == 'LOCAL' && \config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS'] == 'LOCAL') { |
224 | 224 | echo "<table><tr> |
225 | - <td>" . sprintf(_("Diagnose reachability and connection parameters of any %s %s"), \config\ConfAssistant::CONSORTIUM['display_name'], $uiElements->nomenclatureIdP) . "</td> |
|
225 | + <td>" . sprintf(_("Diagnose reachability and connection parameters of any %s %s"), \config\ConfAssistant::CONSORTIUM['display_name'], $uiElements->nomenclatureIdP)."</td> |
|
226 | 226 | <td><form method='post' action='../diag/action_realmcheck.php' accept-charset='UTF-8'> |
227 | 227 | <input type='hidden' name='comefrom' id='comefrom' value='$link'/> |
228 | - <button id='realmcheck' style='cursor:pointer;' type='submit'>" . _("Go!") . "</button> |
|
228 | + <button id='realmcheck' style='cursor:pointer;' type='submit'>"._("Go!")."</button> |
|
229 | 229 | </form> |
230 | 230 | </td> |
231 | 231 | </tr> |
232 | 232 | </table>"; |
233 | 233 | } |
234 | 234 | if (\config\ConfAssistant::CONSORTIUM['name'] == 'eduroam') { |
235 | - $helptext = "<h3>" . sprintf(_("Need help? Refer to the <a href='%s'>%s manual</a>"), "https://wiki.geant.org/x/qJg7Bw", $uiElements->nomenclatureFed) . "</h3>"; |
|
235 | + $helptext = "<h3>".sprintf(_("Need help? Refer to the <a href='%s'>%s manual</a>"), "https://wiki.geant.org/x/qJg7Bw", $uiElements->nomenclatureFed)."</h3>"; |
|
236 | 236 | } else { |
237 | 237 | $helptext = ""; |
238 | 238 | } |
239 | 239 | ?> |
240 | 240 | <table class='user_overview' style='border:0px; width:unset'> |
241 | - <caption><?php echo _("Participant Details");?></caption> |
|
241 | + <caption><?php echo _("Participant Details"); ?></caption> |
|
242 | 242 | <tr> |
243 | 243 | <th scope='col' style="width:13em"><?php echo _("Configured / Visible / OpenRoaming"); ?></th> |
244 | 244 | <th scope='col'><?php echo sprintf(_("%s Name"), $uiElements->nomenclatureParticipant); ?></th> |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | $pending_invites = $mgmt->listPendingInvitations(); |
248 | 248 | |
249 | 249 | if (\config\Master::DB['enforce-external-sync']) { |
250 | - echo "<th scope='col'>" . sprintf(_("%s Database Sync Status"), \config\ConfAssistant::CONSORTIUM['display_name']) . "</th>"; |
|
250 | + echo "<th scope='col'>".sprintf(_("%s Database Sync Status"), \config\ConfAssistant::CONSORTIUM['display_name'])."</th>"; |
|
251 | 251 | } |
252 | 252 | ?> |
253 | 253 | <th scope='col'> |
@@ -262,7 +262,7 @@ discard block |
||
262 | 262 | foreach ($feds as $onefed) { |
263 | 263 | $thefed = new \core\Federation(strtoupper($onefed['value'])); |
264 | 264 | /// nomenclature for 'federation', federation name, nomenclature for 'inst' |
265 | - echo "<tr><td colspan='8'><strong>" . sprintf(_("The following %s are in your %s %s:"), $uiElements->nomenclatureParticipant, $uiElements->nomenclatureFed, '<span style="color:green">' . $thefed->name . '</span>') . "</strong></td></tr>"; |
|
265 | + echo "<tr><td colspan='8'><strong>".sprintf(_("The following %s are in your %s %s:"), $uiElements->nomenclatureParticipant, $uiElements->nomenclatureFed, '<span style="color:green">'.$thefed->name.'</span>')."</strong></td></tr>"; |
|
266 | 266 | |
267 | 267 | // extract only pending invitations for *this* fed |
268 | 268 | $display_pendings = FALSE; |
@@ -287,9 +287,9 @@ discard block |
||
287 | 287 | // deployment status; need to dive into profiles for this |
288 | 288 | // show happy eyeballs if at least one profile is configured/showtime |
289 | 289 | echo "<td>"; |
290 | - echo ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_CONFIGURED ? "C" : "-" ) |
|
290 | + echo ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_CONFIGURED ? "C" : "-") |
|
291 | 291 | . " " |
292 | - . ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_SHOWTIME ? "V" : "-" ) |
|
292 | + . ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_SHOWTIME ? "V" : "-") |
|
293 | 293 | . " " |
294 | 294 | . "<span style='color:"; |
295 | 295 | switch ($idp_instance->maxOpenRoamingStatus()) { |
@@ -324,23 +324,23 @@ discard block |
||
324 | 324 | } |
325 | 325 | } |
326 | 326 | echo "<td style='vertical-align:top;'> |
327 | - <input type='hidden' name='inst' value='" . $index . "'>" . $idp_instance->name . (empty($listOfSilverbulletRealms) ? "" : "<ul><li>" ) . implode("</li><li>", $listOfSilverbulletRealms) . (empty($listOfSilverbulletRealms) ? "" : "</li><ul>" ) . " |
|
327 | + <input type='hidden' name='inst' value='" . $index."'>".$idp_instance->name.(empty($listOfSilverbulletRealms) ? "" : "<ul><li>").implode("</li><li>", $listOfSilverbulletRealms).(empty($listOfSilverbulletRealms) ? "" : "</li><ul>")." |
|
328 | 328 | </td>"; |
329 | 329 | // external DB sync, if configured as being necessary |
330 | 330 | if (\config\Master::DB['enforce-external-sync']) { |
331 | 331 | echo "<td style='display: ruby;'>"; |
332 | 332 | if ($readonly === FALSE) { |
333 | - echo "<form method='post' action='inc/manageDBLink.inc.php?inst_id=" . $idp_instance->identifier . "' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'> |
|
334 | - <button type='submit'>" . _("Manage DB Link") . "</button></form> "; |
|
333 | + echo "<form method='post' action='inc/manageDBLink.inc.php?inst_id=".$idp_instance->identifier."' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'> |
|
334 | + <button type='submit'>" . _("Manage DB Link")."</button></form> "; |
|
335 | 335 | } |
336 | 336 | switch ($idp_instance->getExternalDBSyncState()) { |
337 | 337 | case \core\IdP::EXTERNAL_DB_SYNCSTATE_NOTSUBJECTTOSYNCING: |
338 | 338 | break; |
339 | 339 | case \core\IdP::EXTERNAL_DB_SYNCSTATE_SYNCED: |
340 | - echo "<div class='acceptable'>" . _("Linked") . "</div>"; |
|
340 | + echo "<div class='acceptable'>"._("Linked")."</div>"; |
|
341 | 341 | break; |
342 | 342 | case \core\IdP::EXTERNAL_DB_SYNCSTATE_NOT_SYNCED: |
343 | - echo "<div class='notacceptable'>" . _("NOT linked") . "</div>"; |
|
343 | + echo "<div class='notacceptable'>"._("NOT linked")."</div>"; |
|
344 | 344 | |
345 | 345 | |
346 | 346 | break; |
@@ -353,9 +353,9 @@ discard block |
||
353 | 353 | echo "<td style='vertical-align: top;'>"; |
354 | 354 | if ($readonly === FALSE) { |
355 | 355 | echo "<div style='white-space: nowrap;'> |
356 | - <form method='post' action='inc/manageAdmins.inc.php?inst_id=" . $index . "' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'> |
|
356 | + <form method='post' action='inc/manageAdmins.inc.php?inst_id=" . $index."' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'> |
|
357 | 357 | <button type='submit'>" . |
358 | - _("Add/Remove Administrators") . " |
|
358 | + _("Add/Remove Administrators")." |
|
359 | 359 | </button> |
360 | 360 | </form> |
361 | 361 | </div>"; |
@@ -368,7 +368,7 @@ discard block |
||
368 | 368 | echo "<tr> |
369 | 369 | <td colspan='2'> |
370 | 370 | <strong>" . |
371 | - sprintf(_("Pending invitations in the %s:"), $uiElements->nomenclatureFed) . " |
|
371 | + sprintf(_("Pending invitations in the %s:"), $uiElements->nomenclatureFed)." |
|
372 | 372 | </strong> |
373 | 373 | </td> |
374 | 374 | </tr>"; |
@@ -376,16 +376,16 @@ discard block |
||
376 | 376 | if (strtoupper($oneinvite['country']) == strtoupper($thefed->tld)) { |
377 | 377 | echo "<tr> |
378 | 378 | <td>" . |
379 | - $oneinvite['name'] . " |
|
379 | + $oneinvite['name']." |
|
380 | 380 | </td> |
381 | 381 | <td>" . |
382 | - $oneinvite['mail'] . " |
|
382 | + $oneinvite['mail']." |
|
383 | 383 | </td> |
384 | 384 | <td colspan=2>"; |
385 | 385 | if ($readonly === FALSE) { |
386 | 386 | echo "<form method='post' action='overview_federation.php' accept-charset='UTF-8'> |
387 | - <input type='hidden' name='invitation_id' value='" . $oneinvite['token'] . "'/> |
|
388 | - <button class='delete' type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_DELETE . "'>" . _("Revoke Invitation") . "</button> " |
|
387 | + <input type='hidden' name='invitation_id' value='" . $oneinvite['token']."'/> |
|
388 | + <button class='delete' type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_DELETE."'>"._("Revoke Invitation")."</button> " |
|
389 | 389 | . sprintf(_("(expires %s)"), $oneinvite['expiry']) |
390 | 390 | . "</form>"; |
391 | 391 | } |
@@ -61,10 +61,10 @@ |
||
61 | 61 | header("Content-Type:text/html;charset=utf-8"); |
62 | 62 | ?> |
63 | 63 | <!DOCTYPE html> |
64 | - <html xmlns='http://www.w3.org/1999/xhtml' lang='<?php echo $ourlocale;?>' <?php echo ($direction ? "dir='rtl'" : "");?>> |
|
65 | - <head lang='<?php echo $ourlocale;?>'> |
|
64 | + <html xmlns='http://www.w3.org/1999/xhtml' lang='<?php echo $ourlocale; ?>' <?php echo ($direction ? "dir='rtl'" : ""); ?>> |
|
65 | + <head lang='<?php echo $ourlocale; ?>'> |
|
66 | 66 | <meta http-equiv='Content-Type' content='text/html; charset=UTF-8'> |
67 | - <title><?php echo htmlspecialchars($pagetitle);?></title> |
|
67 | + <title><?php echo htmlspecialchars($pagetitle); ?></title> |
|
68 | 68 | <script type="text/javascript">ie_version = 0;</script> |
69 | 69 | <!--[if IE]> |
70 | 70 | <script type="text/javascript">ie_version=1;</script> |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | $optionClass = \core\Options::instance(); |
102 | 102 | $optionProps = $optionClass->optionType($optiontype); |
103 | 103 | $allowedValues = explode(',', substr($optionProps["flags"], 7)); |
104 | - if (in_array($incomingBinary,$allowedValues)) { |
|
104 | + if (in_array($incomingBinary, $allowedValues)) { |
|
105 | 105 | return TRUE; |
106 | 106 | } |
107 | 107 | return FALSE; |
@@ -347,14 +347,14 @@ discard block |
||
347 | 347 | case \core\Options::TYPECODE_TEXT: |
348 | 348 | case \core\Options::TYPECODE_COORDINATES: |
349 | 349 | case \core\Options::TYPECODE_INTEGER: |
350 | - $varName = $listOfEntries["$objId-" . self::VALIDATOR_FUNCTIONS[$optioninfo['type']]['field']]; |
|
350 | + $varName = $listOfEntries["$objId-".self::VALIDATOR_FUNCTIONS[$optioninfo['type']]['field']]; |
|
351 | 351 | if (!empty($varName)) { |
352 | 352 | $content = call_user_func_array([$this->validator, self::VALIDATOR_FUNCTIONS[$optioninfo['type']]['function']], array_merge([$varName], self::VALIDATOR_FUNCTIONS[$optioninfo['type']]['extraarg'])); |
353 | 353 | break; |
354 | 354 | } |
355 | 355 | continue 2; |
356 | 356 | case \core\Options::TYPECODE_BOOLEAN: |
357 | - $varName = $listOfEntries["$objId-" . \core\Options::TYPECODE_BOOLEAN]; |
|
357 | + $varName = $listOfEntries["$objId-".\core\Options::TYPECODE_BOOLEAN]; |
|
358 | 358 | if (!empty($varName)) { |
359 | 359 | $contentValid = $this->validator->boolean($varName); |
360 | 360 | if ($contentValid) { |
@@ -367,7 +367,7 @@ discard block |
||
367 | 367 | } |
368 | 368 | continue 2; |
369 | 369 | case \core\Options::TYPECODE_STRING: |
370 | - $previsionalContent = $listOfEntries["$objId-" . \core\Options::TYPECODE_STRING]; |
|
370 | + $previsionalContent = $listOfEntries["$objId-".\core\Options::TYPECODE_STRING]; |
|
371 | 371 | if (!empty(trim($previsionalContent))) { |
372 | 372 | $content = $this->furtherStringChecks($objValue, $previsionalContent, $bad); |
373 | 373 | if ($content === FALSE) { |
@@ -378,7 +378,7 @@ discard block |
||
378 | 378 | continue 2; |
379 | 379 | |
380 | 380 | case \core\Options::TYPECODE_ENUM_OPENROAMING: |
381 | - $previsionalContent = $listOfEntries["$objId-" . \core\Options::TYPECODE_ENUM_OPENROAMING]; |
|
381 | + $previsionalContent = $listOfEntries["$objId-".\core\Options::TYPECODE_ENUM_OPENROAMING]; |
|
382 | 382 | if (!empty($previsionalContent)) { |
383 | 383 | $content = $this->furtherStringChecks($objValue, $previsionalContent, $bad); |
384 | 384 | if ($content === FALSE) { |
@@ -389,15 +389,15 @@ discard block |
||
389 | 389 | continue 2; |
390 | 390 | case \core\Options::TYPECODE_FILE: |
391 | 391 | // this is either actually an uploaded file, or a reference to a DB entry of a previously uploaded file |
392 | - $reference = $listOfEntries["$objId-" . \core\Options::TYPECODE_STRING]; |
|
392 | + $reference = $listOfEntries["$objId-".\core\Options::TYPECODE_STRING]; |
|
393 | 393 | if (!empty($reference)) { // was already in, by ROWID reference, extract |
394 | 394 | // ROWID means it's a multi-line string (simple strings are inline in the form; so allow whitespace) |
395 | 395 | $content = $this->validator->string(urldecode($reference), TRUE); |
396 | 396 | break; |
397 | 397 | } |
398 | - $fileName = $listOfEntries["$objId-" . \core\Options::TYPECODE_FILE] ?? ""; |
|
398 | + $fileName = $listOfEntries["$objId-".\core\Options::TYPECODE_FILE] ?? ""; |
|
399 | 399 | if ($fileName != "") { // let's do the download |
400 | - $rawContent = \core\common\OutsideComm::downloadFile("file:///" . $fileName); |
|
400 | + $rawContent = \core\common\OutsideComm::downloadFile("file:///".$fileName); |
|
401 | 401 | |
402 | 402 | if ($rawContent === FALSE || !$this->checkUploadSanity($objValue, $rawContent)) { |
403 | 403 | $bad[] = $objValue; |
@@ -408,7 +408,7 @@ discard block |
||
408 | 408 | } |
409 | 409 | continue 2; |
410 | 410 | default: |
411 | - throw new Exception("Internal Error: Unknown option type " . $objValue . "!"); |
|
411 | + throw new Exception("Internal Error: Unknown option type ".$objValue."!"); |
|
412 | 412 | } |
413 | 413 | // lang can be NULL here, if it's not a multilang attribute, or a ROWID reference. Never mind that. |
414 | 414 | $retval[] = ["$objValue" => ["lang" => $languageFlag, "content" => $content]]; |
@@ -47,9 +47,9 @@ discard block |
||
47 | 47 | $Gui->loggerInstance->debug(4, $operatingSystem); |
48 | 48 | $uiElements = new web\lib\admin\UIElements(); |
49 | 49 | if ($operatingSystem) { |
50 | - print "recognisedOS = '" . $operatingSystem['device'] . "';\n"; |
|
50 | + print "recognisedOS = '".$operatingSystem['device']."';\n"; |
|
51 | 51 | } |
52 | -require dirname(__DIR__) . '/user/js/cat_js.php'; |
|
52 | +require dirname(__DIR__).'/user/js/cat_js.php'; |
|
53 | 53 | $cssUrl = $Gui->skinObject->findResourceUrl("CSS", "cat-user.css.php"); |
54 | 54 | ?> |
55 | 55 | </script> |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | <?php |
64 | 64 | echo $divs->divHeading($visibility); |
65 | 65 | $Gui->languageInstance->setTextDomain("diagnostics"); |
66 | -require dirname(__DIR__) . '/diag/js/diag_js.php'; |
|
66 | +require dirname(__DIR__).'/diag/js/diag_js.php'; |
|
67 | 67 | ?> |
68 | 68 | <div id="main_page"> |
69 | 69 | <div id="loading_ico"> |
@@ -79,12 +79,12 @@ discard block |
||
79 | 79 | </div> |
80 | 80 | <div id="main_body"> |
81 | 81 | <div id="user_page"> |
82 | - <?php echo $divs->divPagetitle(_("Diagnostics site") . " (<span style='color:red'>beta</span>)", ""); ?> |
|
82 | + <?php echo $divs->divPagetitle(_("Diagnostics site")." (<span style='color:red'>beta</span>)", ""); ?> |
|
83 | 83 | <div id="user_info" style='padding-top: 10px;'> |
84 | 84 | <div id='diagnostic_choice'> |
85 | - <?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") . ' '; ?> |
|
86 | - <input type='radio' name='diagnostic_usertype' value='0'><?php echo _("end-user") . ' ' . _("or"); ?> |
|
87 | - <input type='radio' name='diagnostic_usertype' value='1' <?php if ($admin == 1) { echo " checked"; } ?> > <?php echo _("eduroam administrator") .'?'; ?> |
|
85 | + <?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").' '; ?> |
|
86 | + <input type='radio' name='diagnostic_usertype' value='0'><?php echo _("end-user").' '._("or"); ?> |
|
87 | + <input type='radio' name='diagnostic_usertype' value='1' <?php if ($admin == 1) { echo " checked"; } ?> > <?php echo _("eduroam administrator").'?'; ?> |
|
88 | 88 | </div> |
89 | 89 | <div id='diagnostic_enduser' style='display: none;'> |
90 | 90 | <h2><?php echo _("Tools for End Users"); ?></h2> |
@@ -94,24 +94,24 @@ discard block |
||
94 | 94 | ?> |
95 | 95 | </p> |
96 | 96 | <?php |
97 | - echo '<div id="before_stage_1"><h3>' . _("The system needs some information on your home institution - issuer of your account") . '</h3>'; |
|
97 | + echo '<div id="before_stage_1"><h3>'._("The system needs some information on your home institution - issuer of your account").'</h3>'; |
|
98 | 98 | echo _("What is the realm part of your user account (the part behind the @ of 'your.username@<strong>realm.tld</strong>'):"); |
99 | 99 | ?> |
100 | 100 | <input type='text' name='user_realm' id='user_realm' value=''> |
101 | 101 | <?php |
102 | - echo '<div id="realm_by_select"><br/>' . _("alternatively") . '<br/>'; |
|
103 | - echo _("You can select your home institution from the following list") . '<br/>'; |
|
102 | + echo '<div id="realm_by_select"><br/>'._("alternatively").'<br/>'; |
|
103 | + echo _("You can select your home institution from the following list").'<br/>'; |
|
104 | 104 | echo '<div id="select_idp_country"><a href="" id="idp_countries_list">'; |
105 | - echo '<span id="realmselect">' . _("Click to select your country/region and organisation") . '</span></a></div>'; |
|
105 | + echo '<span id="realmselect">'._("Click to select your country/region and organisation").'</span></a></div>'; |
|
106 | 106 | ?> |
107 | 107 | <div id="select_idp_area" style="display:none;"> |
108 | 108 | </div> |
109 | 109 | </div> |
110 | 110 | <div id="position_info"> |
111 | 111 | <?php |
112 | - echo '<h3>' . _("Optionally, to improve tests, you can provide information on your current location") . '</h3>'; |
|
112 | + echo '<h3>'._("Optionally, to improve tests, you can provide information on your current location").'</h3>'; |
|
113 | 113 | echo '<div id="select_sp_country"><a href="" id="sp_countries_list">'; |
114 | - echo '<span id="spselect">' . _("Click to select a location in which you have an eduroam problem") . '</span></a></div>'; |
|
114 | + echo '<span id="spselect">'._("Click to select a location in which you have an eduroam problem").'</span></a></div>'; |
|
115 | 115 | ?> |
116 | 116 | <div id="select_sp_area" style="display:none;"> |
117 | 117 | </div> |
@@ -144,11 +144,11 @@ discard block |
||
144 | 144 | echo 'none'; |
145 | 145 | } |
146 | 146 | echo ";'>"; |
147 | - echo '<h3>' . _("What is the nature of the problem?") . '</h3>'; |
|
148 | - echo '<input type="radio" name="problem_type" value="0"' . (($sp==1)? ' checked' : '') . '>'; |
|
149 | - echo _("I suspect a technical problem at a particular IdP") . '<br>'; |
|
147 | + echo '<h3>'._("What is the nature of the problem?").'</h3>'; |
|
148 | + echo '<input type="radio" name="problem_type" value="0"'.(($sp == 1) ? ' checked' : '').'>'; |
|
149 | + echo _("I suspect a technical problem at a particular IdP").'<br>'; |
|
150 | 150 | echo '<input type="radio" name="problem_type" value="1">'; |
151 | - echo _("I want to report abuse of network resources by a roaming user") . '<br>'; |
|
151 | + echo _("I want to report abuse of network resources by a roaming user").'<br>'; |
|
152 | 152 | echo '<input type="radio" name="problem_type" value="2">'; |
153 | 153 | echo _("I suspect a technical problem for one of my users at a particular SP"); |
154 | 154 | echo "<div id='idp_contact_area'></div>"; |
@@ -157,9 +157,9 @@ discard block |
||
157 | 157 | echo "</div>"; |
158 | 158 | } else { |
159 | 159 | echo "0\">"; |
160 | - echo _("This service is for authenticated admins only.") . '<br>'; |
|
161 | - echo "<a href=\"diag.php?admin=1\">" . |
|
162 | - _("eduroam® admin access is needed") . "</a>"; |
|
160 | + echo _("This service is for authenticated admins only.").'<br>'; |
|
161 | + echo "<a href=\"diag.php?admin=1\">". |
|
162 | + _("eduroam® admin access is needed")."</a>"; |
|
163 | 163 | } |
164 | 164 | ?> |
165 | 165 | <div id="realm_problem"> |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | return false; |
238 | 238 | }); |
239 | 239 | $(document).on('change', '#idp_country' , function() { |
240 | - var comment = <?php echo '"' . _("Fetching institutions list") . '..."'; ?>; |
|
240 | + var comment = <?php echo '"'._("Fetching institutions list").'..."'; ?>; |
|
241 | 241 | var id = $(this).attr('id'); |
242 | 242 | var k = id.indexOf('_'); |
243 | 243 | var type = id.substr(0,k); |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | var shtml = ''; |
256 | 256 | var select = ''; |
257 | 257 | if (type !== 'asp') { |
258 | - shtml = <?php echo '"<td>' . _("Select institution:") . '</td><td>"'; ?>; |
|
258 | + shtml = <?php echo '"<td>'._("Select institution:").'</td><td>"'; ?>; |
|
259 | 259 | } |
260 | 260 | select = '<select id="' + type + '_inst" name="' + type + '_inst" style="margin-left:0px; width:400px;"><option value=""></option>'; |
261 | 261 | for (var i in institutions) { |
@@ -276,7 +276,7 @@ discard block |
||
276 | 276 | } else { |
277 | 277 | if (data.status === 0) { |
278 | 278 | inProgress(0); |
279 | - 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.") . '"'; ?>; |
|
279 | + 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.").'"'; ?>; |
|
280 | 280 | alert(msg); |
281 | 281 | $('#select_idp_country').show(); |
282 | 282 | $('#select_idp_area').hide(); |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | }, |
286 | 286 | error:function() { |
287 | 287 | inProgress(0); |
288 | - var msg = <?php echo '"' . _("Can not search in database. You have to provide the realm you are interested in.") . '"'; ?>; |
|
288 | + var msg = <?php echo '"'._("Can not search in database. You have to provide the realm you are interested in.").'"'; ?>; |
|
289 | 289 | alert(msg); |
290 | 290 | $('#select_idp_country').show(); |
291 | 291 | $('#select_idp_area').hide(); |
@@ -301,9 +301,9 @@ discard block |
||
301 | 301 | }); |
302 | 302 | $(document).on('change', '#select_sp_problem' , function() { |
303 | 303 | if ($('#select_sp_problem').val().substr(0,6) == 'abuse-') { |
304 | - $('#realm_in_db_admin').text(<?php echo '"' . _("Check if this realm is registered") . '"'; ?>); |
|
304 | + $('#realm_in_db_admin').text(<?php echo '"'._("Check if this realm is registered").'"'; ?>); |
|
305 | 305 | } else { |
306 | - $('#realm_in_db_admin').text(<?php echo '"' . _("Check this realm") . '"'; ?>); |
|
306 | + $('#realm_in_db_admin').text(<?php echo '"'._("Check this realm").'"'; ?>); |
|
307 | 307 | } |
308 | 308 | $('#realm_in_db_admin').hide(); |
309 | 309 | $('#admin_realm').val(''); |
@@ -311,7 +311,7 @@ discard block |
||
311 | 311 | clear_sp_question(); |
312 | 312 | }); |
313 | 313 | $(document).on('change', '#sp_country, #asp_country' , function() { |
314 | - var comment = <?php echo '"' . _("Fetching institutions list") . '..."'; ?>; |
|
314 | + var comment = <?php echo '"'._("Fetching institutions list").'..."'; ?>; |
|
315 | 315 | var id = $(this).attr('id'); |
316 | 316 | var k = id.indexOf('_'); |
317 | 317 | var type = id.substr(0,k); |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | var shtml = ''; |
330 | 330 | var select = ''; |
331 | 331 | if (type !== 'asp') { |
332 | - shtml = <?php echo '"<td>' . _("Select institution:") . '</td><td>"'; ?>; |
|
332 | + shtml = <?php echo '"<td>'._("Select institution:").'</td><td>"'; ?>; |
|
333 | 333 | } |
334 | 334 | select = '<select id="' + type + '_inst" name="' + type + '_inst" style="margin-left:0px; width:400px;"><option value=""></option>'; |
335 | 335 | for (var i in hotspots) { |
@@ -352,7 +352,7 @@ discard block |
||
352 | 352 | inProgress(0); |
353 | 353 | var select = '<select id="' + type + '_inst" name="' + type + '_inst" style="margin-left:0px; width:400px;"><option value="">'; |
354 | 354 | var shtml = '<td></td><td>'; |
355 | - select = select + <?php echo '"' . _("Other location") . '"'; ?> + '</option></select></td>'; |
|
355 | + select = select + <?php echo '"'._("Other location").'"'; ?> + '</option></select></td>'; |
|
356 | 356 | if (type !== 'asp') { |
357 | 357 | $('#row_' + type + '_institution').html(''); |
358 | 358 | $('#row_' + type + '_institution').append(shtml + select); |
@@ -386,7 +386,7 @@ discard block |
||
386 | 386 | $('#start_test_area').hide(); |
387 | 387 | return false; |
388 | 388 | } |
389 | - var comment = <?php echo '"' . _("Fetching realms list") . '..."'; ?>; |
|
389 | + var comment = <?php echo '"'._("Fetching realms list").'..."'; ?>; |
|
390 | 390 | inProgress(1, comment); |
391 | 391 | $.ajax({ |
392 | 392 | url: "findRealm.php", |
@@ -398,7 +398,7 @@ discard block |
||
398 | 398 | var realms = data.realms; |
399 | 399 | var realmselect = ''; |
400 | 400 | if (realms.length > 1) { |
401 | - realmselect = <?php echo '"<td>' . _("Check realm(s):") . '</td>"'; ?>; |
|
401 | + realmselect = <?php echo '"<td>'._("Check realm(s):").'</td>"'; ?>; |
|
402 | 402 | realmselect = realmselect + '<td>' + "<span style='margin-left: 10px'>"; |
403 | 403 | for (var i in realms) { |
404 | 404 | realmselect = realmselect + '<input type="radio" name="realm" '; |
@@ -410,7 +410,7 @@ discard block |
||
410 | 410 | } |
411 | 411 | realmselect = realmselect + '</span></td>'; |
412 | 412 | } else { |
413 | - realmselect = <?php echo '"<td>' . _("Realm:") . '</td>"'; ?>; |
|
413 | + realmselect = <?php echo '"<td>'._("Realm:").'</td>"'; ?>; |
|
414 | 414 | realmselect = realmselect + '<td>' + "<span style='margin-left: 10px'>"; |
415 | 415 | realmselect = realmselect + realms[0] + '</span>'; |
416 | 416 | realmselect = realmselect + '<input type="hidden" name="realm" value="' + realms[0] + '">'; |
@@ -462,7 +462,7 @@ discard block |
||
462 | 462 | clear_sp_question(); |
463 | 463 | t = 1; |
464 | 464 | } |
465 | - var comment = <?php echo '"' . _("Running realm tests") . '..."'; ?>; |
|
465 | + var comment = <?php echo '"'._("Running realm tests").'..."'; ?>; |
|
466 | 466 | inProgress(1, comment); |
467 | 467 | /*waiting(comment);*/ |
468 | 468 | $.ajax({ |
@@ -523,7 +523,7 @@ discard block |
||
523 | 523 | testSociopath('', answer); |
524 | 524 | }); |
525 | 525 | $('#realmtest').click(function(event){ |
526 | - var comment = <?php echo '"<br><br>' . _("Running realm tests") . '..."'; ?>; |
|
526 | + var comment = <?php echo '"<br><br>'._("Running realm tests").'..."'; ?>; |
|
527 | 527 | inProgress(1, comment); |
528 | 528 | $('#start_test_area').hide(); |
529 | 529 | if ($('#select_sp_area').is(':hidden')) { |
@@ -571,13 +571,13 @@ discard block |
||
571 | 571 | reset_footer(); |
572 | 572 | testSociopath(realm, 0); |
573 | 573 | } else { |
574 | - var title = <?php echo '"' . _("Diagnostics results for selected realms") . '"'; ?>; |
|
575 | - result = '<div class="padding"><h3>' + <?php echo '"' . _("An unknown problem occurred") . '"'; ?>; |
|
574 | + var title = <?php echo '"'._("Diagnostics results for selected realms").'"'; ?>; |
|
575 | + result = '<div class="padding"><h3>' + <?php echo '"'._("An unknown problem occurred").'"'; ?>; |
|
576 | 576 | result = result + '</h3>' |
577 | 577 | if (r.length == 1) { |
578 | - result = result + <?php echo '"' . _("This test includes checking of the following realm") . '"'; ?>; |
|
578 | + result = result + <?php echo '"'._("This test includes checking of the following realm").'"'; ?>; |
|
579 | 579 | } else { |
580 | - result = result + <?php echo '"' . _("This test includes checking of the following realms") . '"'; ?>; |
|
580 | + result = result + <?php echo '"'._("This test includes checking of the following realms").'"'; ?>; |
|
581 | 581 | } |
582 | 582 | result = result + ': ' |
583 | 583 | for (var i=0; i < r.length; i++) { |
@@ -587,7 +587,7 @@ discard block |
||
587 | 587 | result = result + r[i]; |
588 | 588 | } |
589 | 589 | result = result + '.<br>'; |
590 | - result = result + <?php echo '"' . _("You should report this to") . '"'; ?> + ' <a href="mailto:[email protected]">[email protected]</a>'; |
|
590 | + result = result + <?php echo '"'._("You should report this to").'"'; ?> + ' <a href="mailto:[email protected]">[email protected]</a>'; |
|
591 | 591 | result = result + '</div>'; |
592 | 592 | $('#after_stage_1').hide(); |
593 | 593 | $('#before_stage_1').show(); |
@@ -655,43 +655,43 @@ discard block |
||
655 | 655 | success:function(data) { |
656 | 656 | if (data.status === 1) { |
657 | 657 | var result = ''; |
658 | - var title = <?php echo '"' . _("eduroam admin report submission") . '"'; ?>; |
|
658 | + var title = <?php echo '"'._("eduroam admin report submission").'"'; ?>; |
|
659 | 659 | result = '<div class="padding">'; |
660 | 660 | if (type == 'idp_send') { |
661 | - result = result + '<h3>'+ <?php echo '"' . _("SP contacting IdP due to technical problems or abuse") . '"'; ?> + '</h3>'; |
|
661 | + result = result + '<h3>'+ <?php echo '"'._("SP contacting IdP due to technical problems or abuse").'"'; ?> + '</h3>'; |
|
662 | 662 | result = result + '<table>'; |
663 | - result = result + '<tr><td>' + <?php echo '"' . _("Reason") . '"'; ?> + '</td><td>' + data.reason + '</td></tr>'; |
|
664 | - result = result + '<tr><td>' + <?php echo '"' . _("Event's timestamp") . '"'; ?> + '</td><td>' + data.timestamp + '</td></tr>'; |
|
665 | - result = result + '<tr><td>' + <?php echo '"' . _("Calling-Station-Id") . '"'; ?> + '</td><td>' + data.mac + '</td></tr>'; |
|
666 | - result = result + '<tr><td>' + <?php echo '"' . _("Additional description") . '"'; ?> +'</td><td>' + data.freetext + '</td></tr>'; |
|
667 | - result = result + '<tr><td>' + <?php echo '"' . _("An email to contact the reporter") . '"'; ?> + '</td><td>' + data.email + '</td></tr>'; |
|
668 | - result = result + '<tr><td>' + <?php echo '"' . _("Test result") . '" '; ?> +'</td><td>'; |
|
663 | + result = result + '<tr><td>' + <?php echo '"'._("Reason").'"'; ?> + '</td><td>' + data.reason + '</td></tr>'; |
|
664 | + result = result + '<tr><td>' + <?php echo '"'._("Event's timestamp").'"'; ?> + '</td><td>' + data.timestamp + '</td></tr>'; |
|
665 | + result = result + '<tr><td>' + <?php echo '"'._("Calling-Station-Id").'"'; ?> + '</td><td>' + data.mac + '</td></tr>'; |
|
666 | + result = result + '<tr><td>' + <?php echo '"'._("Additional description").'"'; ?> +'</td><td>' + data.freetext + '</td></tr>'; |
|
667 | + result = result + '<tr><td>' + <?php echo '"'._("An email to contact the reporter").'"'; ?> + '</td><td>' + data.email + '</td></tr>'; |
|
668 | + result = result + '<tr><td>' + <?php echo '"'._("Test result").'" '; ?> +'</td><td>'; |
|
669 | 669 | if (data.tests_result == 1) { |
670 | - result = result + <?php echo '"' . _("failure") . '"'; ?>; |
|
670 | + result = result + <?php echo '"'._("failure").'"'; ?>; |
|
671 | 671 | } else { |
672 | - result = result + <?php echo '"' . _("success") . '"'; ?>; |
|
672 | + result = result + <?php echo '"'._("success").'"'; ?>; |
|
673 | 673 | } |
674 | 674 | result = result + '</td></tr>'; |
675 | - result = result + '<tr><td>' + <?php echo '"' . _("Test URL") . '" '; ?> +'</td><td><a href="' + data.testurl + '">' + data.testurl + '</a></td></tr>'; |
|
676 | - result = result + '<tr><td>' + <?php echo '"' . _("Email to IdP administrators ") . '"'; ?> + ' '; |
|
675 | + result = result + '<tr><td>' + <?php echo '"'._("Test URL").'" '; ?> +'</td><td><a href="' + data.testurl + '">' + data.testurl + '</a></td></tr>'; |
|
676 | + result = result + '<tr><td>' + <?php echo '"'._("Email to IdP administrators ").'"'; ?> + ' '; |
|
677 | 677 | if (data.emailsent == 1) { |
678 | - result = result + <?php echo '"' . _("send successfully") . '"'; ?>; |
|
678 | + result = result + <?php echo '"'._("send successfully").'"'; ?>; |
|
679 | 679 | } else { |
680 | - result = result + <?php echo '"' . _("not sent - failure while sending") . '"'; ?>; |
|
680 | + result = result + <?php echo '"'._("not sent - failure while sending").'"'; ?>; |
|
681 | 681 | } |
682 | 682 | result = result + '</td><td></td></tr>'; |
683 | 683 | } |
684 | 684 | if (type == 'sp_send') { |
685 | - result = result + '<h3>'+ <?php echo '"' . _("IdP contacting SP due to technical problems or abuse") . '"'; ?> + '</h3>'; |
|
685 | + result = result + '<h3>'+ <?php echo '"'._("IdP contacting SP due to technical problems or abuse").'"'; ?> + '</h3>'; |
|
686 | 686 | result = result + '<table>'; |
687 | - result = result + '<tr><td>' + <?php echo '"' . _("Reason") . '"'; ?> + '</td><td>' + data.reason + '</td></tr>'; |
|
688 | - result = result + '<tr><td>' + <?php echo '"' . _("SP's Operator-Name") . '"'; ?> + '</td><td>' + data.opname + '</td></tr>'; |
|
689 | - result = result + '<tr><td>' + <?php echo '"' . _("User's outer ID") . '"'; ?> + '</td><td>' + data.outerid + '</td></tr>'; |
|
690 | - result = result + '<tr><td>' + <?php echo '"' . _("IdP email") . '"'; ?> + '</td><td>' + data.email + '</td></tr>'; |
|
691 | - result = result + '<tr><td>' + <?php echo '"' . _("Event's timestamp") . '"'; ?> + '</td><td>' + data.timestamp + '</td></tr>'; |
|
692 | - result = result + '<tr><td>' + <?php echo '"' . _("Calling-Station-Id") . '"'; ?> + '</td><td>' + data.mac + '</td></tr>'; |
|
693 | - result = result + '<tr><td>' + <?php echo '"' . _("Additional description") . '"'; ?> +'</td><td>' + data.freetext + '</td></tr>'; |
|
694 | - result = result + '<tr><td>' + <?php echo '"' . _("How to contact the user") . '"'; ?> +'</td><td>' + data.cdetails + '</td></tr>'; |
|
687 | + result = result + '<tr><td>' + <?php echo '"'._("Reason").'"'; ?> + '</td><td>' + data.reason + '</td></tr>'; |
|
688 | + result = result + '<tr><td>' + <?php echo '"'._("SP's Operator-Name").'"'; ?> + '</td><td>' + data.opname + '</td></tr>'; |
|
689 | + result = result + '<tr><td>' + <?php echo '"'._("User's outer ID").'"'; ?> + '</td><td>' + data.outerid + '</td></tr>'; |
|
690 | + result = result + '<tr><td>' + <?php echo '"'._("IdP email").'"'; ?> + '</td><td>' + data.email + '</td></tr>'; |
|
691 | + result = result + '<tr><td>' + <?php echo '"'._("Event's timestamp").'"'; ?> + '</td><td>' + data.timestamp + '</td></tr>'; |
|
692 | + result = result + '<tr><td>' + <?php echo '"'._("Calling-Station-Id").'"'; ?> + '</td><td>' + data.mac + '</td></tr>'; |
|
693 | + result = result + '<tr><td>' + <?php echo '"'._("Additional description").'"'; ?> +'</td><td>' + data.freetext + '</td></tr>'; |
|
694 | + result = result + '<tr><td>' + <?php echo '"'._("How to contact the user").'"'; ?> +'</td><td>' + data.cdetails + '</td></tr>'; |
|
695 | 695 | } |
696 | 696 | result = result + '</div>'; |
697 | 697 | showInfo(result, title); |
@@ -717,7 +717,7 @@ discard block |
||
717 | 717 | $(this).removeClass('visible_row').addClass('hidden_row'); |
718 | 718 | } |
719 | 719 | }); |
720 | - $('#admin_realm').attr('title', <?php echo '"' . _("Wrong format of realm") . '"'; ?>); |
|
720 | + $('#admin_realm').attr('title', <?php echo '"'._("Wrong format of realm").'"'; ?>); |
|
721 | 721 | } else { |
722 | 722 | $('#admin_realm').removeClass('error_input'); |
723 | 723 | $('#admin_realm').attr('title', ''); |
@@ -727,7 +727,7 @@ discard block |
||
727 | 727 | $(document).on('keyup change', '#email' , function() { |
728 | 728 | if ($(this).val().length == 0 || !isEmail($(this).val())) { |
729 | 729 | $('#email').addClass('error_input'); |
730 | - $('#email').attr('title', <?php echo '"' . _("Wrong format of email") . '"'; ?>); |
|
730 | + $('#email').attr('title', <?php echo '"'._("Wrong format of email").'"'; ?>); |
|
731 | 731 | } else { |
732 | 732 | $('#email').removeClass('error_input'); |
733 | 733 | $('#email').attr('title', ''); |
@@ -740,7 +740,7 @@ discard block |
||
740 | 740 | if ($('#mac').val().length > 0) { |
741 | 741 | if ($('#mac').val().length != 17) { |
742 | 742 | $('#mac').addClass('error_input'); |
743 | - $('#mac').attr('title', <?php echo '"' . _("MAC address is incomplete") . '"'; ?>); |
|
743 | + $('#mac').attr('title', <?php echo '"'._("MAC address is incomplete").'"'; ?>); |
|
744 | 744 | } else { |
745 | 745 | $('#mac').removeClass('error_input'); |
746 | 746 | $('#mac').attr('title', ''); |
@@ -749,7 +749,7 @@ discard block |
||
749 | 749 | if ($(this).attr('id') == 'email' && $(this).val().length > 0) { |
750 | 750 | if (!isEmail($(this).val())) { |
751 | 751 | $('#email').addClass('error_input'); |
752 | - $('#email').attr('title', <?php echo '"' . _("Wrong format of email") . '"'; ?>); |
|
752 | + $('#email').attr('title', <?php echo '"'._("Wrong format of email").'"'; ?>); |
|
753 | 753 | } else { |
754 | 754 | $('#email').removeClass('error_input'); |
755 | 755 | $('#email').attr('title', ''); |
@@ -758,7 +758,7 @@ discard block |
||
758 | 758 | if ($(this).attr('id') == 'outer_id' && $(this).val().length > 0) { |
759 | 759 | if (!isEmail($(this).val(), true)) { |
760 | 760 | $('#outer_id').addClass('error_input'); |
761 | - $('#outer_id').attr('title', <?php echo '"' . _("Wrong format of outer ID") . '"'; ?>); |
|
761 | + $('#outer_id').attr('title', <?php echo '"'._("Wrong format of outer ID").'"'; ?>); |
|
762 | 762 | } else { |
763 | 763 | $('#outer_id').removeClass('error_input'); |
764 | 764 | $('#outer_id').attr('title', ''); |
@@ -767,7 +767,7 @@ discard block |
||
767 | 767 | if ($(this).attr('id') == 'opname' && $('#opname').val().length > 0) { |
768 | 768 | if (!isOperatorName($(this).val())) { |
769 | 769 | $('#opname').addClass('error_input'); |
770 | - $('#opname').attr('title', <?php echo '"' . _("Wrong string given as OperatorName") . '"'; ?>); |
|
770 | + $('#opname').attr('title', <?php echo '"'._("Wrong string given as OperatorName").'"'; ?>); |
|
771 | 771 | $('#spmanually').show(); |
772 | 772 | } else { |
773 | 773 | $('#opname').removeClass('error_input'); |
@@ -146,10 +146,10 @@ discard block |
||
146 | 146 | !define MUI_HEADERIMAGE_BITMAP "cat_150.bmp" |
147 | 147 | !define MUI_COMPONENTSPAGE_SMALLDESC |
148 | 148 | |
149 | -!define WELCOME_HEADER "<?php printf(WindowsCommon::sprintNsis(_("Welcome to the %s installer")),\config\ConfAssistant::CONSORTIUM['display_name'])?>" |
|
150 | -!define FAREWELL_HEADER "<?php WindowsCommon::echoNsis( _("Installation complete"))?>" |
|
151 | -!define FAREWELL_TEXT "<?php WindowsCommon::echoNsis( _("Network profiles have been installed."))?>$\r$\n$\n <?php WindowsCommon::echoNsis( _("Your system is ready."))?>" |
|
152 | -!define FAREWELL_FAIL "<?php WindowsCommon::echoNsis( _("Network installation had errors."))?>$\r$\n$\n <?php WindowsCommon::echoNsis( _("Please contact \${SUPPORT}."))?>" |
|
149 | +!define WELCOME_HEADER "<?php printf(WindowsCommon::sprintNsis(_("Welcome to the %s installer")), \config\ConfAssistant::CONSORTIUM['display_name'])?>" |
|
150 | +!define FAREWELL_HEADER "<?php WindowsCommon::echoNsis(_("Installation complete"))?>" |
|
151 | +!define FAREWELL_TEXT "<?php WindowsCommon::echoNsis(_("Network profiles have been installed."))?>$\r$\n$\n <?php WindowsCommon::echoNsis(_("Your system is ready."))?>" |
|
152 | +!define FAREWELL_FAIL "<?php WindowsCommon::echoNsis(_("Network installation had errors."))?>$\r$\n$\n <?php WindowsCommon::echoNsis(_("Please contact \${SUPPORT}."))?>" |
|
153 | 153 | ;-------------------------------- |
154 | 154 | ;Languages |
155 | 155 | !insertmacro MUI_LANGUAGE "${LANG}" |
@@ -157,14 +157,14 @@ discard block |
||
157 | 157 | ;-------------------------------- |
158 | 158 | ; Licence file |
159 | 159 | !ifdef LICENSE_FILE |
160 | -LicenseForceSelection checkbox "<?php WindowsCommon::echoNsis( _("Accept"))?>" |
|
160 | +LicenseForceSelection checkbox "<?php WindowsCommon::echoNsis(_("Accept"))?>" |
|
161 | 161 | LicenseText "<?php WindowsCommon::echoNsis(_("If you accept the conditions then select Accept and then click Install to continue."))?>" |
162 | 162 | LicenseData ${LICENSE_FILE} |
163 | 163 | !endif |
164 | 164 | |
165 | 165 | ;----------------------------------- |
166 | 166 | |
167 | -MiscButtonText "" "" "" "<?php WindowsCommon::echoNsis( _("Finish"))?>" |
|
167 | +MiscButtonText "" "" "" "<?php WindowsCommon::echoNsis(_("Finish"))?>" |
|
168 | 168 | ;---------------------------------- |
169 | 169 | ; FUNCTIONS |
170 | 170 | |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | |
199 | 199 | !macro install_ca_cert ca_file ca_fingerprint level |
200 | 200 | !insertmacro debug_cat 2 "locating certificate SHA=${ca_fingerprint} Level=${level}" |
201 | - DetailPrint "<?php WindowsCommon::echoNsis( _("searching for certificate"))?> ${ca_file}" |
|
201 | + DetailPrint "<?php WindowsCommon::echoNsis(_("searching for certificate"))?> ${ca_file}" |
|
202 | 202 | File "${ca_file}" |
203 | 203 | nsArray::Set Delete_files "${ca_file}" |
204 | 204 | !insertmacro debug_cat 2 "Testing machine store root" |
@@ -260,13 +260,13 @@ discard block |
||
260 | 260 | ${EndIf} |
261 | 261 | !insertmacro debug_cat 2 "installing certificate $TEMP\${ca_file}" |
262 | 262 | !insertmacro debug_cat 3 "Execute: certutil -addstore -user ${level} $TEMP\${ca_file}" |
263 | - DetailPrint "<?php WindowsCommon::echoNsis( _("installing certificate"))?> ${ca_file}" |
|
263 | + DetailPrint "<?php WindowsCommon::echoNsis(_("installing certificate"))?> ${ca_file}" |
|
264 | 264 | nsExec::Exec '"certutil" -addstore -user ${level} "$TEMP"\${ca_file}' |
265 | 265 | Pop $0 |
266 | 266 | !insertmacro debug_cat 3 "certutil returned $0" |
267 | 267 | ${If} $0 != 0 |
268 | 268 | IfSilent +2 |
269 | - MessageBox MB_OK|MB_ICONEXCLAMATION "<?php WindowsCommon::echoNsis( _("could not install certificate"))?> ${ca_file}" |
|
269 | + MessageBox MB_OK|MB_ICONEXCLAMATION "<?php WindowsCommon::echoNsis(_("could not install certificate"))?> ${ca_file}" |
|
270 | 270 | !insertmacro debug_cat 1 "could not install certificate ${ca_file}" |
271 | 271 | ${EndIf} |
272 | 272 | no_install_${ca_file}: |
@@ -473,26 +473,26 @@ discard block |
||
473 | 473 | pop $R0 |
474 | 474 | ${If} $tkip_count > 0 |
475 | 475 | ${If} $aes_count > 1 |
476 | - StrCpy $R1 "$\r$\n$\n<?php WindowsCommon::echoNsis( _("The non TKIP profiles are preferred. Always use them if you have a choice."))?>" |
|
476 | + StrCpy $R1 "$\r$\n$\n<?php WindowsCommon::echoNsis(_("The non TKIP profiles are preferred. Always use them if you have a choice."))?>" |
|
477 | 477 | ${Else} |
478 | - StrCpy $R1 "$\r$\n$\n<?php WindowsCommon::echoNsis( _("The non TKIP profile is preferred. Always use it if you have a choice."))?>" |
|
478 | + StrCpy $R1 "$\r$\n$\n<?php WindowsCommon::echoNsis(_("The non TKIP profile is preferred. Always use it if you have a choice."))?>" |
|
479 | 479 | ${EndIf} |
480 | 480 | ${Else} |
481 | 481 | StrCpy $R1 "" |
482 | 482 | ${EndIf} |
483 | 483 | ${If} $profile_count > 0 |
484 | - StrCpy $welcome_message "<?php WindowsCommon::echoNsis( _("This installer has been prepared for \${ORGANISATION}"))?>.$\r$\n\ |
|
485 | -<?php WindowsCommon::echoNsis( _("The installer will create the following wireless profiles:"))?>$\r$\n\ |
|
484 | + StrCpy $welcome_message "<?php WindowsCommon::echoNsis(_("This installer has been prepared for \${ORGANISATION}"))?>.$\r$\n\ |
|
485 | +<?php WindowsCommon::echoNsis(_("The installer will create the following wireless profiles:"))?>$\r$\n\ |
|
486 | 486 | $R0.\ |
487 | 487 | $R1$\r$\n$\n\ |
488 | -<?php WindowsCommon::echoNsis( _("More information and comments:"))?>$\r$\n\ |
|
488 | +<?php WindowsCommon::echoNsis(_("More information and comments:"))?>$\r$\n\ |
|
489 | 489 | EMAIL: ${SUPPORT}$\r$\n\ |
490 | 490 | WWW: ${URL}" |
491 | 491 | ${Else} |
492 | -StrCpy $welcome_message "<?php WindowsCommon::echoNsis( _("This installer has been prepared for \${ORGANISATION}"))?>.$\r$\n\ |
|
493 | -<?php WindowsCommon::echoNsis( _("The installer will create the wireless profile:"))?> $R0.\ |
|
492 | +StrCpy $welcome_message "<?php WindowsCommon::echoNsis(_("This installer has been prepared for \${ORGANISATION}"))?>.$\r$\n\ |
|
493 | +<?php WindowsCommon::echoNsis(_("The installer will create the wireless profile:"))?> $R0.\ |
|
494 | 494 | $R1$\r$\n$\n\ |
495 | -<?php WindowsCommon::echoNsis( _("More information and comments:"))?>$\r$\n\ |
|
495 | +<?php WindowsCommon::echoNsis(_("More information and comments:"))?>$\r$\n\ |
|
496 | 496 | EMAIL: ${SUPPORT}$\r$\n\ |
497 | 497 | WWW: ${URL}" |
498 | 498 | ${EndIf} |
@@ -518,7 +518,7 @@ discard block |
||
518 | 518 | SendMessage $HEADLINE ${WM_SETFONT} $HEADLINE_FONT 0 |
519 | 519 | ;TRANSLATION |
520 | 520 | nsDialogs::CreateControl STATIC ${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 120u 46u -130u -32u "$welcome_message\ |
521 | -$\r$\n$\r$\n<?php WindowsCommon::echoNsis( _("Installer created with software from the GEANT project."))?>" |
|
521 | +$\r$\n$\r$\n<?php WindowsCommon::echoNsis(_("Installer created with software from the GEANT project."))?>" |
|
522 | 522 | Pop $TEXT |
523 | 523 | |
524 | 524 | SetCtlColors $DIALOG "" 0xffffff |
@@ -651,18 +651,18 @@ discard block |
||
651 | 651 | ${If} $wireless_result == 1 |
652 | 652 | !insertmacro debug_cat 1 "wlan_test.exe did not find wireless configuration service" |
653 | 653 | IfSilent +2 |
654 | - MessageBox MB_OK|MB_ICONEXCLAMATION "<?php WindowsCommon::echoNsis( _("Windows wireless configuration service is not enabled. The installer cannot continue."))?>" |
|
654 | + MessageBox MB_OK|MB_ICONEXCLAMATION "<?php WindowsCommon::echoNsis(_("Windows wireless configuration service is not enabled. The installer cannot continue."))?>" |
|
655 | 655 | Call Cleanup |
656 | 656 | ${EndIf} |
657 | 657 | ${If} $wireless_result == 2 |
658 | 658 | IfSilent +2 |
659 | - MessageBox MB_OK|MB_ICONEXCLAMATION "<?php WindowsCommon::echoNsis( _("No wireless interfaces found. The installer cannot continue."))?>" |
|
659 | + MessageBox MB_OK|MB_ICONEXCLAMATION "<?php WindowsCommon::echoNsis(_("No wireless interfaces found. The installer cannot continue."))?>" |
|
660 | 660 | Call Cleanup |
661 | 661 | ${EndIf} |
662 | 662 | ${Else} |
663 | 663 | ${If} $wireless_result > 0 |
664 | 664 | IfSilent +3 |
665 | - MessageBox MB_YESNO "<?php WindowsCommon::echoNsis( _("No wireless interfaces found. Wireless access will not be configured. Would you like to continue and configure access on the wired interface?"))?>" IDYES wired_yes |
|
665 | + MessageBox MB_YESNO "<?php WindowsCommon::echoNsis(_("No wireless interfaces found. Wireless access will not be configured. Would you like to continue and configure access on the wired interface?"))?>" IDYES wired_yes |
|
666 | 666 | Call Cleanup |
667 | 667 | wired_yes: |
668 | 668 | Push 1 |
@@ -678,7 +678,7 @@ discard block |
||
678 | 678 | ${If} $wired == 1 |
679 | 679 | ${If} $force_wired == 0 |
680 | 680 | IfSilent wired |
681 | - MessageBox MB_YESNO "<?php WindowsCommon::echoNsis( _("Do you want to enable access on wired interfaces?"))?>" IDYES wired |
|
681 | + MessageBox MB_YESNO "<?php WindowsCommon::echoNsis(_("Do you want to enable access on wired interfaces?"))?>" IDYES wired |
|
682 | 682 | Push 0 |
683 | 683 | Pop $wired |
684 | 684 | wired: |
@@ -719,7 +719,7 @@ discard block |
||
719 | 719 | ;================================ |
720 | 720 | |
721 | 721 | Function ShowInstfiles |
722 | - !insertmacro MUI_HEADER_TEXT "<?php WindowsCommon::echoNsis( _("Profiles installation"))?>" " " |
|
722 | + !insertmacro MUI_HEADER_TEXT "<?php WindowsCommon::echoNsis(_("Profiles installation"))?>" " " |
|
723 | 723 | FunctionEnd |
724 | 724 | ;================================ |
725 | 725 | ; Check if a wireless profile exist and put it on delete list |
@@ -738,7 +738,7 @@ discard block |
||
738 | 738 | |
739 | 739 | Function FindProfile |
740 | 740 | Pop $R8 |
741 | - DetailPrint "<?php WindowsCommon::echoNsis( _("Checking for profile \$R8"))?>" |
|
741 | + DetailPrint "<?php WindowsCommon::echoNsis(_("Checking for profile \$R8"))?>" |
|
742 | 742 | !insertmacro debug_cat 2 "Checking for profile $R8" |
743 | 743 | !insertmacro debug_cat 3 "Exec: $Netsh wlan show profiles $R8" |
744 | 744 | nsExec::Exec '"$Netsh" wlan show profiles "$R8"' |
@@ -746,7 +746,7 @@ discard block |
||
746 | 746 | !insertmacro debug_cat 4 "netsh returned $0" |
747 | 747 | ${If} $0 == 0 |
748 | 748 | !insertmacro debug_cat 1 "found profile $R8" |
749 | - DetailPrint "<?php WindowsCommon::echoNsis( _("found profile \$R8"))?>" |
|
749 | + DetailPrint "<?php WindowsCommon::echoNsis(_("found profile \$R8"))?>" |
|
750 | 750 | Push 0 |
751 | 751 | ${Else} |
752 | 752 | !insertmacro debug_cat 1 "profile $R8 not found" |
@@ -841,7 +841,7 @@ discard block |
||
841 | 841 | ${If} $Symantec_installed != 0 |
842 | 842 | !insertmacro debug_cat 3 "Symantec problem" |
843 | 843 | IfSilent +2 |
844 | - MessageBox MB_OK|MB_ICONEXCLAMATION "<?php printf(WindowsCommon::sprintNsis(_("Please READ this message it is IMPORTANT.$\\r$\\nInstallation problems may be due to the fact that Symantec Endpoint Protection is installed on your machine.$\\r$\\nWhile this is a well-known bug of the Symantec product, about which the installer can not do anything, there is a workaround.$\\r$\\nWhen you close this window the installer will exit and an explorer window will be started (it could appear underneath already opened windows). In this window you should see a script named inst_cat. Start it by double-clicking, It will install the profiles. You will need to login to %s with your username and password.")),\config\ConfAssistant::CONSORTIUM['display_name']) ?>" |
|
844 | + MessageBox MB_OK|MB_ICONEXCLAMATION "<?php printf(WindowsCommon::sprintNsis(_("Please READ this message it is IMPORTANT.$\\r$\\nInstallation problems may be due to the fact that Symantec Endpoint Protection is installed on your machine.$\\r$\\nWhile this is a well-known bug of the Symantec product, about which the installer can not do anything, there is a workaround.$\\r$\\nWhen you close this window the installer will exit and an explorer window will be started (it could appear underneath already opened windows). In this window you should see a script named inst_cat. Start it by double-clicking, It will install the profiles. You will need to login to %s with your username and password.")), \config\ConfAssistant::CONSORTIUM['display_name']) ?>" |
|
845 | 845 | Exec '"explorer" /select,"$EXEDIR\inst_cat.cmd"' |
846 | 846 | Quit |
847 | 847 | |
@@ -1174,7 +1174,7 @@ discard block |
||
1174 | 1174 | Function PFXCertificateSelect |
1175 | 1175 | !ifndef SILVERBULLET |
1176 | 1176 | ;TRANSLATION |
1177 | -!insertmacro MUI_HEADER_TEXT "<?php printf(WindowsCommon::sprintNsis(_("%s installer for")),\config\ConfAssistant::CONSORTIUM['display_name'])?> " "<?php WindowsCommon::echoNsis(_("Install personal certificate"))?>" |
|
1177 | +!insertmacro MUI_HEADER_TEXT "<?php printf(WindowsCommon::sprintNsis(_("%s installer for")), \config\ConfAssistant::CONSORTIUM['display_name'])?> " "<?php WindowsCommon::echoNsis(_("Install personal certificate"))?>" |
|
1178 | 1178 | ;TRANSLATION |
1179 | 1179 | IfSilent +2 |
1180 | 1180 | MessageBox MB_OK "<?php WindowsCommon::echoNsis(_("Preparing to install personal certificate."))?>$\r$\n<?php WindowsCommon::echoNsis(_("Click OK to continue"))?> " |
@@ -1190,7 +1190,7 @@ discard block |
||
1190 | 1190 | $certPasswordLength = strlen($certPasswordLabel); |
1191 | 1191 | $certUsernameLabel = WindowsCommon::sprintNsis(_("Username:")); |
1192 | 1192 | $certUsernameLength = strlen($certUsernameLabel); |
1193 | - $labelLength = max($certPasswordLength,$certUsernameLength); |
|
1193 | + $labelLength = max($certPasswordLength, $certUsernameLength); |
|
1194 | 1194 | ?> |
1195 | 1195 | ${NSD_CreateLabel} 0 0 100% 32u "<?php WindowsCommon::echoNsis(_("Selected file: \$Cert_file"))?>" |
1196 | 1196 | !else |
@@ -1207,11 +1207,11 @@ discard block |
||
1207 | 1207 | !insertmacro debug_cat 3 "Vista level (Vista without Service pack): $VistaNoSP"; |
1208 | 1208 | ${If} $VistaNoSP == 0 |
1209 | 1209 | !ifdef PFX_USERNAME |
1210 | - !define LABEL_LENGTH "<?php echo($labelLength*3.5)?>u" |
|
1211 | - !define TEXT_START "<?php echo($labelLength*3.5 +5)?>u" |
|
1210 | + !define LABEL_LENGTH "<?php echo($labelLength * 3.5)?>u" |
|
1211 | + !define TEXT_START "<?php echo($labelLength * 3.5 + 5)?>u" |
|
1212 | 1212 | !else |
1213 | - !define LABEL_LENGTH "<?php echo($certPasswordLength*3.5)?>u" |
|
1214 | - !define TEXT_START "<?php echo($certPasswordLength*3.5 +5)?>u" |
|
1213 | + !define LABEL_LENGTH "<?php echo($certPasswordLength * 3.5)?>u" |
|
1214 | + !define TEXT_START "<?php echo($certPasswordLength * 3.5 + 5)?>u" |
|
1215 | 1215 | !endif |
1216 | 1216 | ${NSD_CreateLabel} 0 35u ${LABEL_LENGTH} 12u "<?php echo $certPasswordLabel?>" |
1217 | 1217 | ${NSD_CreatePassword} ${TEXT_START} 34.5u 120u 12u "" |
@@ -1583,7 +1583,7 @@ discard block |
||
1583 | 1583 | Section "-start" |
1584 | 1584 | SectionIn RO |
1585 | 1585 | |
1586 | -!insertmacro MUI_HEADER_TEXT "<?php WindowsCommon::echoNsis( _("Installation"))?>" "<?php WindowsCommon::echoNsis( _("Checking for existing wireless profiles"))?>" |
|
1586 | +!insertmacro MUI_HEADER_TEXT "<?php WindowsCommon::echoNsis(_("Installation"))?>" "<?php WindowsCommon::echoNsis(_("Checking for existing wireless profiles"))?>" |
|
1587 | 1587 | !ifndef PWD |
1588 | 1588 | !include "certs.nsh" |
1589 | 1589 | !endif |
@@ -69,7 +69,7 @@ |
||
69 | 69 | $langInstance = new core\common\Language(); |
70 | 70 | $end = $langInstance->rtl ? "left" : "right"; |
71 | 71 | ?> |
72 | - pressedButton.next().append('<span style="padding-<?php echo $end;?>:1em">'+msg+'<\/span>'); |
|
72 | + pressedButton.next().append('<span style="padding-<?php echo $end; ?>:1em">'+msg+'<\/span>'); |
|
73 | 73 | } |
74 | 74 | ); |
75 | 75 | } |
@@ -19,7 +19,7 @@ discard block |
||
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 | |
@@ -69,13 +69,13 @@ discard block |
||
69 | 69 | $dnsChecksOR = new \core\diag\RFC7585Tests($check_realm, "aaa+auth:radius.tls.tcp"); |
70 | 70 | } |
71 | 71 | } else { |
72 | - $error_message = _("You asked for a realm check, but we don't know the realm for this profile!") . "</p>"; |
|
72 | + $error_message = _("You asked for a realm check, but we don't know the realm for this profile!")."</p>"; |
|
73 | 73 | } |
74 | 74 | } else { // someone else's realm, and we don't know anything about it... only shallow checks |
75 | 75 | $check_realm = $validator->realm($realm ?? $_SESSION['check_realm'] ?? ""); |
76 | 76 | if ($check_realm !== FALSE) { |
77 | 77 | $_SESSION['check_realm'] = $check_realm; |
78 | - $testsuite = new \core\diag\RADIUSTests($check_realm, "@" . $check_realm); |
|
78 | + $testsuite = new \core\diag\RADIUSTests($check_realm, "@".$check_realm); |
|
79 | 79 | $dnsChecks = new \core\diag\RFC7585Tests($check_realm); |
80 | 80 | } else { |
81 | 81 | $error_message = _("No valid realm name given, cannot execute any checks!"); |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | var listofcas = "<?php echo _("You should update your list of accredited CAs") ?>"; |
127 | 127 | var getitfrom = "<?php echo _("Get it from here.") ?>"; |
128 | 128 | var listsource = "<?php echo \config\Diagnostics::RADIUSTESTS['accreditedCAsURL'] ?>"; |
129 | - var moretext = "<?php echo _("more") . "»" ?>"; |
|
129 | + var moretext = "<?php echo _("more")."»" ?>"; |
|
130 | 130 | var lesstext = "<?php echo "«" ?>"; |
131 | 131 | var morealltext = "<?php echo _("Show detailed information for all tests") ?>"; |
132 | 132 | var unknownca_code = "<?php echo \core\diag\RADIUSTests::CERTPROB_UNKNOWN_CA ?>"; |
@@ -269,7 +269,7 @@ discard block |
||
269 | 269 | } |
270 | 270 | } |
271 | 271 | cliinfo = cliinfo + '<li><table><tbody><tr><td class="icon_td"><img class="icon" src="' + icons[level] + '" style="width: 24px;"></td><td>' + state; |
272 | - cliinfo = cliinfo + ' <?php echo "(" . sprintf(_("elapsed time: %sms."), "'+data.ca[key].certificate[c].time_millisec+' ") . ")"; ?>' + add + '</td></tr>'; |
|
272 | + cliinfo = cliinfo + ' <?php echo "(".sprintf(_("elapsed time: %sms."), "'+data.ca[key].certificate[c].time_millisec+' ").")"; ?>' + add + '</td></tr>'; |
|
273 | 273 | cliinfo = cliinfo + '</tbody></table></ul></li>'; |
274 | 274 | if (data.ca[key].certificate[c].finalerror === 1) { |
275 | 275 | cliinfo = cliinfo + '<li>' + restskipped + '</li>'; |
@@ -461,7 +461,7 @@ discard block |
||
461 | 461 | }); |
462 | 462 | } |
463 | 463 | o = o + cert_data + '</table>'; |
464 | - $("#eap_test" + data.hostindex).append('<strong><img style="position: relative; top: 2px;" src="' + icons[v.level] + '"><span style="position: relative; top: -5px; <?php echo $start;?>: 1em">' + v.eap + ' – <?php printf(_("elapsed time: %sms."), "'+v.time_millisec+' ") ?></span></strong><div class="more" style="padding-<?php echo $start;?>: 40px"><div class="morecontent"><div style="display:none; background: #eee;">' + o + '</div><a href="" class="morelink">' + moretext + '</a></div></div>'); |
|
464 | + $("#eap_test" + data.hostindex).append('<strong><img style="position: relative; top: 2px;" src="' + icons[v.level] + '"><span style="position: relative; top: -5px; <?php echo $start; ?>: 1em">' + v.eap + ' – <?php printf(_("elapsed time: %sms."), "'+v.time_millisec+' ") ?></span></strong><div class="more" style="padding-<?php echo $start; ?>: 40px"><div class="morecontent"><div style="display:none; background: #eee;">' + o + '</div><a href="" class="morelink">' + moretext + '</a></div></div>'); |
|
465 | 465 | }); |
466 | 466 | } |
467 | 467 | |
@@ -472,8 +472,8 @@ discard block |
||
472 | 472 | <?php |
473 | 473 | foreach (\config\Diagnostics::RADIUSTESTS['UDP-hosts'] as $hostindex => $host) { |
474 | 474 | print " |
475 | -$(\"#live_src" . $hostindex . "_img\").attr('src',icon_loading); |
|
476 | -$(\"#live_src" . $hostindex . "_img\").show(); |
|
475 | +$(\"#live_src" . $hostindex."_img\").attr('src',icon_loading); |
|
476 | +$(\"#live_src" . $hostindex."_img\").show(); |
|
477 | 477 | $.ajax({ |
478 | 478 | url: 'radius_tests.php?src=0&hostindex=$hostindex&realm='+realm, |
479 | 479 | type: 'POST', |
@@ -503,15 +503,15 @@ discard block |
||
503 | 503 | <?php |
504 | 504 | foreach (\config\Diagnostics::RADIUSTESTS['UDP-hosts'] as $hostindex => $host) { |
505 | 505 | if ($testedProfile !== NULL) { |
506 | - $extraarg = "profile_id: " . $testedProfile->identifier . ", "; |
|
506 | + $extraarg = "profile_id: ".$testedProfile->identifier.", "; |
|
507 | 507 | } else { |
508 | 508 | $extraarg = ""; |
509 | 509 | } |
510 | 510 | print " |
511 | -$(\"#src" . $hostindex . "_img\").attr('src',icon_loading); |
|
511 | +$(\"#src" . $hostindex."_img\").attr('src',icon_loading); |
|
512 | 512 | $(\"#src$hostindex\").html(''); |
513 | 513 | running_ajax_stat++; |
514 | -$.get('radius_tests.php',{test_type: 'udp', $extraarg realm: realm, src: $hostindex, lang: '" . $gui->languageInstance->getLang() . "', hostindex: '$hostindex' }, udp, 'json'); |
|
514 | +$.get('radius_tests.php',{test_type: 'udp', $extraarg realm: realm, src: $hostindex, lang: '".$gui->languageInstance->getLang()."', hostindex: '$hostindex' }, udp, 'json'); |
|
515 | 515 | |
516 | 516 | "; |
517 | 517 | } |
@@ -538,7 +538,7 @@ discard block |
||
538 | 538 | if ($check_realm === FALSE) { |
539 | 539 | print "<p>$error_message</p>"; |
540 | 540 | } else { |
541 | - print "<h1>" . sprintf(_("Realm testing for: %s"), $check_realm) . "</h1>\n"; |
|
541 | + print "<h1>".sprintf(_("Realm testing for: %s"), $check_realm)."</h1>\n"; |
|
542 | 542 | ?> |
543 | 543 | <div id="debug_out" style="display: none"></div> |
544 | 544 | <div id="tabs" style="min-width: 600px; max-width:1000px"> |
@@ -560,25 +560,25 @@ discard block |
||
560 | 560 | // NAPTR existence check |
561 | 561 | if ($dynType == "") { |
562 | 562 | $rfc7585suite = $dnsChecks; |
563 | - echo "<strong>" . _("DNS checks") . "</strong><div>"; |
|
563 | + echo "<strong>"._("DNS checks")."</strong><div>"; |
|
564 | 564 | } else { |
565 | 565 | if (count($orrealm) == 0) { |
566 | 566 | continue; |
567 | 567 | } |
568 | 568 | $rfc7585suite = $dnsChecksOR; |
569 | - echo "<strong>" . _("OpenRoaming DNS checks") . "</strong><div>"; |
|
569 | + echo "<strong>"._("OpenRoaming DNS checks")."</strong><div>"; |
|
570 | 570 | } |
571 | 571 | $naptr = $rfc7585suite->relevantNAPTR(); |
572 | 572 | if ($naptr == \core\diag\RADIUSTests::RETVAL_NOTCONFIGURED) { |
573 | 573 | if ($dynType == "") { |
574 | - echo "<tr><td>" . _("Dynamic discovery test is not configured") . "</td><td>"; |
|
574 | + echo "<tr><td>"._("Dynamic discovery test is not configured")."</td><td>"; |
|
575 | 575 | } else { |
576 | - echo "<tr><td>" . _("OpenRoaming connectivity test is not configured") . "</td><td>"; |
|
576 | + echo "<tr><td>"._("OpenRoaming connectivity test is not configured")."</td><td>"; |
|
577 | 577 | } |
578 | 578 | } else { |
579 | 579 | echo "<table>"; |
580 | 580 | // output in friendly words |
581 | - echo "<tr><td>" . _("Checking NAPTR existence:") . "</td><td>"; |
|
581 | + echo "<tr><td>"._("Checking NAPTR existence:")."</td><td>"; |
|
582 | 582 | switch ($naptr) { |
583 | 583 | case \core\diag\RFC7585Tests::RETVAL_NONAPTR: |
584 | 584 | echo _("This realm has no NAPTR records."); |
@@ -593,7 +593,7 @@ discard block |
||
593 | 593 | |
594 | 594 | // compliance checks for NAPTRs |
595 | 595 | if ($naptr > 0) { |
596 | - echo "<tr><td>" . _("Checking NAPTR compliance (flag = S and regex = {empty}):") . "</td><td>"; |
|
596 | + echo "<tr><td>"._("Checking NAPTR compliance (flag = S and regex = {empty}):")."</td><td>"; |
|
597 | 597 | $naptr_valid = $rfc7585suite->relevantNAPTRcompliance(); |
598 | 598 | switch ($naptr_valid) { |
599 | 599 | case \core\diag\RADIUSTests::RETVAL_OK: |
@@ -608,7 +608,7 @@ discard block |
||
608 | 608 | // SRV resolution |
609 | 609 | if ($naptr > 0 && $naptr_valid == \core\diag\RADIUSTests::RETVAL_OK) { |
610 | 610 | $srv = $rfc7585suite->relevantNAPTRsrvResolution(); |
611 | - echo "<tr><td>" . _("Checking SRVs:") . "</td><td>"; |
|
611 | + echo "<tr><td>"._("Checking SRVs:")."</td><td>"; |
|
612 | 612 | switch ($srv) { |
613 | 613 | case \core\diag\RADIUSTests::RETVAL_SKIPPED: |
614 | 614 | echo _("This check was skipped."); |
@@ -624,7 +624,7 @@ discard block |
||
624 | 624 | // IP addresses for the hosts |
625 | 625 | if ($naptr > 0 && $naptr_valid == \core\diag\RADIUSTests::RETVAL_OK && $srv > 0) { |
626 | 626 | $hosts = $rfc7585suite->relevantNAPTRhostnameResolution(); |
627 | - echo "<tr><td>" . _("Checking IP address resolution:") . "</td><td>"; |
|
627 | + echo "<tr><td>"._("Checking IP address resolution:")."</td><td>"; |
|
628 | 628 | switch ($srv) { |
629 | 629 | case \core\diag\RADIUSTests::RETVAL_SKIPPED: |
630 | 630 | echo _("This check was skipped."); |
@@ -641,12 +641,12 @@ discard block |
||
641 | 641 | echo "</table><br/>"; |
642 | 642 | if ($dynType == "") { |
643 | 643 | if (count($testsuite->listerrors()) == 0) { |
644 | - echo sprintf(_("Realm is <strong>%s</strong> "), _(($naptr > 0 ? "DYNAMIC" : "STATIC"))) . _("with no DNS errors encountered. Congratulations!"); |
|
644 | + echo sprintf(_("Realm is <strong>%s</strong> "), _(($naptr > 0 ? "DYNAMIC" : "STATIC")))._("with no DNS errors encountered. Congratulations!"); |
|
645 | 645 | } else { |
646 | - 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."); |
|
646 | + 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."); |
|
647 | 647 | echo "<div class='notacceptable'><table>"; |
648 | 648 | foreach ($testsuite->listerrors() as $details) { |
649 | - echo "<tr><td>" . $details['TYPE'] . "</td><td>" . $details['TARGET'] . "</td></tr>"; |
|
649 | + echo "<tr><td>".$details['TYPE']."</td><td>".$details['TARGET']."</td></tr>"; |
|
650 | 650 | } |
651 | 651 | echo "</table></div>"; |
652 | 652 | } |
@@ -665,13 +665,13 @@ discard block |
||
665 | 665 | $("#dynamic_tests").show(); |
666 | 666 | '; |
667 | 667 | foreach ($rfc7585suite->NAPTR_hostname_records as $hostindex => $addr) { |
668 | - $host = ($addr['family'] == "IPv6" ? "[" : "") . $addr['IP'] . ($addr['family'] == "IPv6" ? "]" : "") . ":" . $addr['port']; |
|
668 | + $host = ($addr['family'] == "IPv6" ? "[" : "").$addr['IP'].($addr['family'] == "IPv6" ? "]" : "").":".$addr['port']; |
|
669 | 669 | $expectedName = $addr['hostname']; |
670 | 670 | print " |
671 | 671 | running_ajax_dyn++; |
672 | - $.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'}); |
|
672 | + $.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'}); |
|
673 | 673 | running_ajax_dyn++; |
674 | - $.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'}); |
|
674 | + $.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'}); |
|
675 | 675 | "; |
676 | 676 | } |
677 | 677 | echo "} |
@@ -687,11 +687,11 @@ discard block |
||
687 | 687 | $("#openroaming_tests").show(); |
688 | 688 | '; |
689 | 689 | foreach ($rfc7585suite->NAPTR_hostname_records as $hostindex => $addr) { |
690 | - $host = ($addr['family'] == "IPv6" ? "[" : "") . $addr['IP'] . ($addr['family'] == "IPv6" ? "]" : "") . ":" . $addr['port']; |
|
690 | + $host = ($addr['family'] == "IPv6" ? "[" : "").$addr['IP'].($addr['family'] == "IPv6" ? "]" : "").":".$addr['port']; |
|
691 | 691 | $expectedName = $addr['hostname']; |
692 | 692 | print " |
693 | 693 | running_ajax_openroaming++; |
694 | - $.ajax({url:'radius_tests.php', data:{test_type: 'openroamingcapath', realm: realm, src: '$host', lang: '" . $gui->languageInstance->getLang() . "', hostindex: '$hostindex', expectedname: '$expectedName' }, error: eee, success: capath, dataType: 'json'}); |
|
694 | + $.ajax({url:'radius_tests.php', data:{test_type: 'openroamingcapath', realm: realm, src: '$host', lang: '".$gui->languageInstance->getLang()."', hostindex: '$hostindex', expectedname: '$expectedName' }, error: eee, success: capath, dataType: 'json'}); |
|
695 | 695 | "; |
696 | 696 | } |
697 | 697 | echo "} |
@@ -704,18 +704,18 @@ discard block |
||
704 | 704 | $naptrs[1] = $naptr; |
705 | 705 | } |
706 | 706 | } |
707 | - echo "<strong>" . _("Static connectivity tests") . "</strong> |
|
707 | + echo "<strong>"._("Static connectivity tests")."</strong> |
|
708 | 708 | <table><tr> |
709 | 709 | <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'> </td> |
710 | 710 | </tr></table>"; |
711 | 711 | if ($naptrs[0] > 0) { |
712 | - echo "<hr><strong>" . _("Dynamic connectivity tests") . "</strong> |
|
712 | + echo "<hr><strong>"._("Dynamic connectivity tests")."</strong> |
|
713 | 713 | <table><tr> |
714 | 714 | <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'> </td> |
715 | 715 | </tr></table>"; |
716 | 716 | } |
717 | 717 | if (count($orrealm) && ($naptrs[1] > 0)) { |
718 | - echo "<hr><strong>" . _("OpenRoaming connectivity tests") . "</strong> |
|
718 | + echo "<hr><strong>"._("OpenRoaming connectivity tests")."</strong> |
|
719 | 719 | <table><tr> |
720 | 720 | <td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='main_openroaming_ico' class='icon'></td><td id='main_openroaming_result' style='display:none'> </td> |
721 | 721 | </tr></table>"; |
@@ -735,12 +735,12 @@ discard block |
||
735 | 735 | print "<p>"; |
736 | 736 | foreach (\config\Diagnostics::RADIUSTESTS['UDP-hosts'] as $hostindex => $host) { |
737 | 737 | print "<hr>"; |
738 | - printf(_("Testing from: %s"), "<strong>" . \config\Diagnostics::RADIUSTESTS['UDP-hosts'][$hostindex]['display_name'] . "</strong>"); |
|
738 | + printf(_("Testing from: %s"), "<strong>".\config\Diagnostics::RADIUSTESTS['UDP-hosts'][$hostindex]['display_name']."</strong>"); |
|
739 | 739 | print "<table id='results$hostindex' style='width:100%' class='udp_results'> |
740 | 740 | <tr> |
741 | -<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='src" . $hostindex . "_img'></td> |
|
741 | +<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='src".$hostindex."_img'></td> |
|
742 | 742 | <td id='src$hostindex' colspan=2> |
743 | -" . _("testing...") . " |
|
743 | +"._("testing...")." |
|
744 | 744 | </td> |
745 | 745 | </tr> |
746 | 746 | </table>"; |
@@ -751,7 +751,7 @@ discard block |
||
751 | 751 | |
752 | 752 | </div> |
753 | 753 | <?php |
754 | - for ($i=3; $i<5; $i++) { |
|
754 | + for ($i = 3; $i < 5; $i++) { |
|
755 | 755 | if ($i == 3 && $naptrs[0] <= 0) { |
756 | 756 | continue; |
757 | 757 | } |
@@ -766,15 +766,15 @@ discard block |
||
766 | 766 | $rfc7585suite = $dnsChecksOR; |
767 | 767 | } |
768 | 768 | ?> |
769 | - <div id="tabs-<?php echo $i;?>"> |
|
770 | - <button id="run_<?php if ($i==3) echo 'd'; else echo 'o';?>_tests"; onclick="run_<?php if ($i==3) echo 'dynamic'; else echo 'openroaming';?>()"><?php if ($i==3) echo _("Repeat dynamic connectivity tests"); else echo _("Repeat OpenRoaming connectivity tests");?></button> |
|
769 | + <div id="tabs-<?php echo $i; ?>"> |
|
770 | + <button id="run_<?php if ($i == 3) echo 'd'; else echo 'o'; ?>_tests"; onclick="run_<?php if ($i == 3) echo 'dynamic'; else echo 'openroaming'; ?>()"><?php if ($i == 3) echo _("Repeat dynamic connectivity tests"); else echo _("Repeat OpenRoaming connectivity tests"); ?></button> |
|
771 | 771 | |
772 | 772 | <?php |
773 | 773 | echo "<div id='"; |
774 | - if ($i==3) { echo 'dynamic'; } else { echo 'openroaming'; } |
|
774 | + if ($i == 3) { echo 'dynamic'; } else { echo 'openroaming'; } |
|
775 | 775 | echo "_tests'><fieldset class='option_container'> |
776 | 776 | <legend><strong>"; |
777 | - if ($i==3) { |
|
777 | + if ($i == 3) { |
|
778 | 778 | echo _("DYNAMIC connectivity tests"); |
779 | 779 | } else { |
780 | 780 | echo _("OpenRoaming connectivity tests"); |
@@ -788,17 +788,17 @@ discard block |
||
788 | 788 | } |
789 | 789 | $resultstoprint = []; |
790 | 790 | if (count($rfc7585suite->NAPTR_hostname_records) > 0) { |
791 | - $resultstoprint[] = '<div style="align:'.$end.'; display: none;" id="' . $prefix1 . '_result_fail">' . _("Some errors were found during the tests, see below") . '</div><div style="align:'.$end.'; display: none;" id="' . $prefix1 . '_result_pass">' . _("All tests passed, congratulations!") . '</div>'; |
|
792 | - $resultstoprint[] = '<div style="align:'.$end.';"><a href="" class="moreall">' . _('Show detailed information for all tests') . '</a></div>' . '<p><strong>' . _("Checking server handshake...") . "</strong><p>"; |
|
791 | + $resultstoprint[] = '<div style="align:'.$end.'; display: none;" id="'.$prefix1.'_result_fail">'._("Some errors were found during the tests, see below").'</div><div style="align:'.$end.'; display: none;" id="'.$prefix1.'_result_pass">'._("All tests passed, congratulations!").'</div>'; |
|
792 | + $resultstoprint[] = '<div style="align:'.$end.';"><a href="" class="moreall">'._('Show detailed information for all tests').'</a></div>'.'<p><strong>'._("Checking server handshake...")."</strong><p>"; |
|
793 | 793 | foreach ($rfc7585suite->NAPTR_hostname_records as $hostindex => $addr) { |
794 | - $bracketaddr = ($addr["family"] == "IPv6" ? "[" . $addr["IP"] . "]" : $addr["IP"]); |
|
795 | - $resultstoprint[] = '<p><strong>' . $bracketaddr . ' TCP/' . $addr['port'] . '</strong>'; |
|
794 | + $bracketaddr = ($addr["family"] == "IPv6" ? "[".$addr["IP"]."]" : $addr["IP"]); |
|
795 | + $resultstoprint[] = '<p><strong>'.$bracketaddr.' TCP/'.$addr['port'].'</strong>'; |
|
796 | 796 | $resultstoprint[] = '<ul style="list-style-type: none;" class="caresult"><li>'; |
797 | - $resultstoprint[] = "<table id='" . $prefix2 . "caresults$hostindex' style='width:100%'> |
|
797 | + $resultstoprint[] = "<table id='".$prefix2."caresults$hostindex' style='width:100%'> |
|
798 | 798 | <tr> |
799 | -<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='" . $prefix2 . "srcca$hostindex" . "_img'></td> |
|
800 | -<td id='" . $prefix2 . "srcca$hostindex'> |
|
801 | -" . _("testing...") . " |
|
799 | +<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='".$prefix2."srcca$hostindex"."_img'></td> |
|
800 | +<td id='" . $prefix2."srcca$hostindex'> |
|
801 | +"._("testing...")." |
|
802 | 802 | </td> |
803 | 803 | </tr> |
804 | 804 | </table>"; |
@@ -806,26 +806,26 @@ discard block |
||
806 | 806 | } |
807 | 807 | $clientstest = []; |
808 | 808 | foreach ($rfc7585suite->NAPTR_hostname_records as $hostindex => $addr) { |
809 | - $clientstest[] = '<p><strong>' . $addr['IP'] . ' TCP/' . $addr['port'] . '</strong></p><ol>'; |
|
810 | - $clientstest[] = "<span id='" . $prefix2 . "clientresults$hostindex$clinx'><table style='width:100%'> |
|
809 | + $clientstest[] = '<p><strong>'.$addr['IP'].' TCP/'.$addr['port'].'</strong></p><ol>'; |
|
810 | + $clientstest[] = "<span id='".$prefix2."clientresults$hostindex$clinx'><table style='width:100%'> |
|
811 | 811 | <tr> |
812 | 812 | <td class='icon_td'>"; |
813 | - if ($i == 4 ) { |
|
813 | + if ($i == 4) { |
|
814 | 814 | $clientstest[] = "<!--"; |
815 | 815 | } |
816 | - $clientstest[] = "<img src='../resources/images/icons/loading51.gif' id='" . $prefix2 . "srcclient$hostindex" . "_img'></td> |
|
817 | -<td id='" . $prefix2 . "srcclient$hostindex'> |
|
818 | -" . _("testing..."); |
|
816 | + $clientstest[] = "<img src='../resources/images/icons/loading51.gif' id='".$prefix2."srcclient$hostindex"."_img'></td> |
|
817 | +<td id='" . $prefix2."srcclient$hostindex'> |
|
818 | +"._("testing..."); |
|
819 | 819 | |
820 | - if ($i == 4 ) { |
|
821 | - $clientstest[] = "-->" . _("not implemented yet"); |
|
820 | + if ($i == 4) { |
|
821 | + $clientstest[] = "-->"._("not implemented yet"); |
|
822 | 822 | } |
823 | 823 | $clientstest[] = "</td></tr></table></span>"; |
824 | 824 | $clientstest[] = '</ol>'; |
825 | 825 | } |
826 | 826 | echo '<div style="align:'.$end.';">'; |
827 | 827 | echo join('', $resultstoprint); |
828 | - echo '<span id="' . $prefix2 . '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>'; |
|
828 | + echo '<span id="'.$prefix2.'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>'; |
|
829 | 829 | print join('', $clientstest); |
830 | 830 | echo '</span>'; |
831 | 831 | echo '</div>'; |
@@ -839,7 +839,7 @@ discard block |
||
839 | 839 | // check if truncates/dies on Operator-Name |
840 | 840 | if ($my_profile !== NULL) { |
841 | 841 | echo "<div id='tabs-n'><fieldset class='option_container'> |
842 | - <legend><strong>" . _("Live login test") . "</strong></legend>"; |
|
842 | + <legend><strong>" . _("Live login test")."</strong></legend>"; |
|
843 | 843 | $prof_compl = $my_profile->getEapMethodsinOrderOfPreference(1); |
844 | 844 | if (count($prof_compl) > 0) { |
845 | 845 | $passwordReqired = FALSE; |
@@ -852,34 +852,34 @@ discard block |
||
852 | 852 | $clientCertRequired = TRUE; |
853 | 853 | } |
854 | 854 | } |
855 | - 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> |
|
856 | - <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> |
|
857 | - <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> |
|
855 | + 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> |
|
856 | + <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> |
|
857 | + <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> |
|
858 | 858 | <form enctype='multipart/form-data' id='live_form' accept-charset='UTF-8'> |
859 | 859 | <input type='hidden' name='test_type' value='udp_login'> |
860 | - <input type='hidden' name='lang' value='" . $gui->languageInstance->getLang() . "'> |
|
861 | - <input type='hidden' name='profile_id' value='" . $my_profile->identifier . "'> |
|
860 | + <input type='hidden' name='lang' value='" . $gui->languageInstance->getLang()."'> |
|
861 | + <input type='hidden' name='profile_id' value='" . $my_profile->identifier."'> |
|
862 | 862 | <table id='live_tests'>"; |
863 | 863 | // if any password based EAP methods are available enable this section |
864 | 864 | if ($passwordReqired) { |
865 | - echo "<tr><td colspan='2'><strong>" . _("Password-based EAP types") . "</strong></td></tr> |
|
866 | - <tr><td>" . _("Real (inner) username:") . "</td><td><input type='text' id='username' class='mandatory' name='username'/></td></tr>"; |
|
867 | - echo "<tr><td>" . _("Anonymous outer ID (optional):") . "</td><td><input type='text' id='outer_username' name='outer_username'/></td></tr>"; |
|
868 | - echo "<tr><td>" . _("Password:") . "</td><td><input type='text' id='password' class='mandatory' name='password'/></td></tr>"; |
|
865 | + echo "<tr><td colspan='2'><strong>"._("Password-based EAP types")."</strong></td></tr> |
|
866 | + <tr><td>" . _("Real (inner) username:")."</td><td><input type='text' id='username' class='mandatory' name='username'/></td></tr>"; |
|
867 | + echo "<tr><td>"._("Anonymous outer ID (optional):")."</td><td><input type='text' id='outer_username' name='outer_username'/></td></tr>"; |
|
868 | + echo "<tr><td>"._("Password:")."</td><td><input type='text' id='password' class='mandatory' name='password'/></td></tr>"; |
|
869 | 869 | } |
870 | 870 | // ask for cert + privkey if TLS-based method is active |
871 | 871 | if ($clientCertRequired) { |
872 | - echo "<tr><td colspan='2'><strong>" . _("Certificate-based EAP types") . "</strong></td></tr> |
|
873 | - <tr><td>" . _("Certificate file (.p12 or .pfx):") . "</td><td><input type='file' id='cert' accept='application/x-pkcs12' name='cert'/></td></tr> |
|
874 | - <tr><td>" . _("Certificate password, if any:") . "</td><td><input type='text' id='privkey' name='privkey_pass'/></td></tr> |
|
875 | - <tr><td>" . _("Username, if different from certificate Subject:") . "</td><td><input type='text' id='tls_username' name='tls_username'/></td></tr>"; |
|
872 | + echo "<tr><td colspan='2'><strong>"._("Certificate-based EAP types")."</strong></td></tr> |
|
873 | + <tr><td>" . _("Certificate file (.p12 or .pfx):")."</td><td><input type='file' id='cert' accept='application/x-pkcs12' name='cert'/></td></tr> |
|
874 | + <tr><td>" . _("Certificate password, if any:")."</td><td><input type='text' id='privkey' name='privkey_pass'/></td></tr> |
|
875 | + <tr><td>" . _("Username, if different from certificate Subject:")."</td><td><input type='text' id='tls_username' name='tls_username'/></td></tr>"; |
|
876 | 876 | } |
877 | - echo "<tr><td colspan='2'><button id='submit_credentials'>" . _("Submit credentials") . "</button></td></tr></table></form>"; |
|
877 | + echo "<tr><td colspan='2'><button id='submit_credentials'>"._("Submit credentials")."</button></td></tr></table></form>"; |
|
878 | 878 | echo "<div id='live_login_results' style='display:none'>"; |
879 | 879 | foreach (\config\Diagnostics::RADIUSTESTS['UDP-hosts'] as $hostindex => $host) { |
880 | 880 | print "<hr>"; |
881 | - printf(_("Testing from: %s"), "<strong>" . \config\Diagnostics::RADIUSTESTS['UDP-hosts'][$hostindex]['display_name'] . "</strong>"); |
|
882 | - print "<span style='position:relative'><img src='../resources/images/icons/loading51.gif' id='live_src" . $hostindex . "_img' style='width:24px; position: absolute; $start: 20px; bottom: 0px; '></span>"; |
|
881 | + printf(_("Testing from: %s"), "<strong>".\config\Diagnostics::RADIUSTESTS['UDP-hosts'][$hostindex]['display_name']."</strong>"); |
|
882 | + print "<span style='position:relative'><img src='../resources/images/icons/loading51.gif' id='live_src".$hostindex."_img' style='width:24px; position: absolute; $start: 20px; bottom: 0px; '></span>"; |
|
883 | 883 | print "<div id='eap_test$hostindex' class='eap_test_results'></div>"; |
884 | 884 | } |
885 | 885 | echo "</div>"; |
@@ -894,9 +894,9 @@ discard block |
||
894 | 894 | } |
895 | 895 | |
896 | 896 | if (isset($_POST['comefrom'])) { |
897 | - $return = htmlspecialchars_decode($_POST['comefrom']) . ( $inst_id ? "?inst_id=" . $inst_id : "" ); |
|
897 | + $return = htmlspecialchars_decode($_POST['comefrom']).($inst_id ? "?inst_id=".$inst_id : ""); |
|
898 | 898 | echo "<form method='post' action='$return' accept-charset='UTF-8'> |
899 | - <button type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_CLOSE . "'>" . sprintf(_("Return to %s administrator area"), core\common\Entity::$nomenclature_idp) . "</button>" |
|
899 | + <button type='submit' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_CLOSE."'>".sprintf(_("Return to %s administrator area"), core\common\Entity::$nomenclature_idp)."</button>" |
|
900 | 900 | . "</form>"; |
901 | 901 | } |
902 | 902 | if ($check_realm !== FALSE) { |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | * the receiving end to strip this marker and not add the title by itself. |
32 | 32 | * |
33 | 33 | */ |
34 | -require_once dirname(dirname(dirname((dirname(dirname(__FILE__)))))) . "/config/_config.php"; |
|
34 | +require_once dirname(dirname(dirname((dirname(dirname(__FILE__))))))."/config/_config.php"; |
|
35 | 35 | |
36 | 36 | $Gui = new \web\lib\user\Gui(); |
37 | 37 | |
@@ -41,46 +41,46 @@ discard block |
||
41 | 41 | $subpage = $_REQUEST['subpage']; |
42 | 42 | switch ($page) { |
43 | 43 | case 'about': |
44 | - include_once dirname(dirname(dirname(dirname(__FILE__)))) . "/user/about_cat.inc.php"; |
|
44 | + include_once dirname(dirname(dirname(dirname(__FILE__))))."/user/about_cat.inc.php"; |
|
45 | 45 | $out = "<div class='padding'>$out</div>"; |
46 | 46 | break; |
47 | 47 | case 'tou': |
48 | - include_once dirname(dirname(dirname(dirname(__FILE__)))) . "/user/tou.inc.php"; |
|
48 | + include_once dirname(dirname(dirname(dirname(__FILE__))))."/user/tou.inc.php"; |
|
49 | 49 | $out = "no_title<div> |
50 | 50 | <h1> |
51 | - " . $Tou['title'] . " |
|
51 | + " . $Tou['title']." |
|
52 | 52 | </h1> |
53 | -<div id='tou_1'>" . $Tou['subtitle'] . |
|
54 | - '<div style="direction:ltr">' . $Tou['short'] . "</div> |
|
53 | +<div id='tou_1'>" . $Tou['subtitle']. |
|
54 | + '<div style="direction:ltr">'.$Tou['short']."</div> |
|
55 | 55 | </div> |
56 | 56 | <div id='all_tou_link'><a href='javascript:showTOU()'>Click here to see the full terms</a></div> |
57 | 57 | <div id='tou_2' style='display:none; padding-top:20px; direction:ltr'>" . |
58 | - $Tou['full'] . " |
|
58 | + $Tou['full']." |
|
59 | 59 | </div> |
60 | 60 | </div> |
61 | 61 | "; |
62 | 62 | break; |
63 | 63 | case 'help': |
64 | - include_once dirname(dirname(dirname(dirname(__FILE__)))) . "/user/faq.inc.php"; |
|
64 | + include_once dirname(dirname(dirname(dirname(__FILE__))))."/user/faq.inc.php"; |
|
65 | 65 | switch ($subpage) { |
66 | 66 | case 'contact': |
67 | 67 | case 'idp_not_listed': |
68 | 68 | case 'device_not_listed': |
69 | 69 | case 'what_is_eduroam': |
70 | - $out = "no_title<div><h1>" . _("Help") . "</h1>"; |
|
70 | + $out = "no_title<div><h1>"._("Help")."</h1>"; |
|
71 | 71 | foreach ($Faq as $faqItem) { |
72 | 72 | if (!empty($faqItem['id']) && $faqItem['id'] == $subpage) { |
73 | - $out .= "<div><h3>" . $faqItem['title'] . "</h3>\n"; |
|
74 | - $out .= "" . $faqItem['text'] . "</div>\n"; |
|
73 | + $out .= "<div><h3>".$faqItem['title']."</h3>\n"; |
|
74 | + $out .= "".$faqItem['text']."</div>\n"; |
|
75 | 75 | } |
76 | 76 | } |
77 | 77 | $out .= "</div>"; |
78 | 78 | break; |
79 | 79 | case 'faq': |
80 | - $out = "no_title<div><h1>" . _("Frequently Asked Questions") . "</h1>"; |
|
80 | + $out = "no_title<div><h1>"._("Frequently Asked Questions")."</h1>"; |
|
81 | 81 | foreach ($Faq as $faqItem) { |
82 | - $out .= "<div><h3>" . $faqItem['title'] . "</h3>\n"; |
|
83 | - $out .= "" . $faqItem['text'] . "</div>\n"; |
|
82 | + $out .= "<div><h3>".$faqItem['title']."</h3>\n"; |
|
83 | + $out .= "".$faqItem['text']."</div>\n"; |
|
84 | 84 | } |
85 | 85 | $out .= "</div>"; |
86 | 86 | break; |
@@ -104,15 +104,15 @@ discard block |
||
104 | 104 | $rn = uniqid(); |
105 | 105 | $_SESSION['remindIdP'] = $rn; |
106 | 106 | $out .= "<input type='hidden' id='remindIdPs' value='$rn'>"; |
107 | - $out .= "<p><button type='button' onclick='goAdmin(); return(false);'>" . _("Login") . "</button>"; |
|
108 | - $out .= "<br/><br/><p>" . _("Did you forget with which Identity Provider you logged in to the system? We can try to find out if you specify the email address with which you were invited to the system in the box below. This may not work if you were invited from a third-party website via the AdminAPI.") . "</p>"; |
|
109 | - $out .= "<input id='remindIdP' type='text'/><button onclick='remindIdPF(); return false;'>" . _("Get IdP Reminder") . "</button>"; |
|
107 | + $out .= "<p><button type='button' onclick='goAdmin(); return(false);'>"._("Login")."</button>"; |
|
108 | + $out .= "<br/><br/><p>"._("Did you forget with which Identity Provider you logged in to the system? We can try to find out if you specify the email address with which you were invited to the system in the box below. This may not work if you were invited from a third-party website via the AdminAPI.")."</p>"; |
|
109 | + $out .= "<input id='remindIdP' type='text'/><button onclick='remindIdPF(); return false;'>"._("Get IdP Reminder")."</button>"; |
|
110 | 110 | $out .= "<div id='remindIdPd'><span id='remindIdPh'></span><ul id='remindIdPl'></ul></div>"; |
111 | 111 | $out = "<div class='padding'>$out</div>"; |
112 | 112 | } |
113 | 113 | break; |
114 | 114 | case 'develop': |
115 | - include_once dirname(dirname(dirname(dirname(__FILE__)))) . "/user/devel.inc.php"; |
|
115 | + include_once dirname(dirname(dirname(dirname(__FILE__))))."/user/devel.inc.php"; |
|
116 | 116 | $out = "<div class='padding'>$out</div>"; |
117 | 117 | break; |
118 | 118 | } |
@@ -325,7 +325,7 @@ discard block |
||
325 | 325 | $invitationObject = new SilverbulletInvitation($token); |
326 | 326 | $profile = new ProfileSilverbullet($invitationObject->profile); |
327 | 327 | $inst = new IdP($profile->institution); |
328 | - $loggerInstance->debug(5, "tokenStatus: done, got " . $invitationObject->invitationTokenStatus . ", " . $invitationObject->profile . ", " . $invitationObject->userId . ", " . $invitationObject->expiry . ", " . $invitationObject->invitationTokenString . "\n"); |
|
328 | + $loggerInstance->debug(5, "tokenStatus: done, got ".$invitationObject->invitationTokenStatus.", ".$invitationObject->profile.", ".$invitationObject->userId.", ".$invitationObject->expiry.", ".$invitationObject->invitationTokenString."\n"); |
|
329 | 329 | if ($invitationObject->invitationTokenStatus != SilverbulletInvitation::SB_TOKENSTATUS_VALID && $invitationObject->invitationTokenStatus != SilverbulletInvitation::SB_TOKENSTATUS_PARTIALLY_REDEEMED) { |
330 | 330 | throw new Exception("Attempt to generate a SilverBullet installer with an invalid/redeemed/expired token. The user should never have got that far!"); |
331 | 331 | } |
@@ -338,12 +338,12 @@ discard block |
||
338 | 338 | throw new Exception("Despite a valid token, the corresponding user was not found in database or database query error!"); |
339 | 339 | } |
340 | 340 | $expiryObject = mysqli_fetch_object(/** @scrutinizer ignore-type */ $userrow); |
341 | - $loggerInstance->debug(5, "EXP: " . $expiryObject->expiry . "\n"); |
|
341 | + $loggerInstance->debug(5, "EXP: ".$expiryObject->expiry."\n"); |
|
342 | 342 | $expiryDateObject = date_create_from_format("Y-m-d H:i:s", $expiryObject->expiry); |
343 | 343 | if ($expiryDateObject === FALSE) { |
344 | 344 | throw new Exception("The expiry date we got from the DB is bogus!"); |
345 | 345 | } |
346 | - $loggerInstance->debug(5, $expiryDateObject->format("Y-m-d H:i:s") . "\n"); |
|
346 | + $loggerInstance->debug(5, $expiryDateObject->format("Y-m-d H:i:s")."\n"); |
|
347 | 347 | // date_create with no parameters can't fail, i.e. is never FALSE |
348 | 348 | $validity = date_diff(/** @scrutinizer ignore-type */ date_create(), $expiryDateObject); |
349 | 349 | $expiryDays = $validity->days + 1; |
@@ -377,14 +377,14 @@ discard block |
||
377 | 377 | $exportedCertClear = ""; |
378 | 378 | openssl_pkcs12_export($cert, $exportedCertClear, $privateKey, "", ['extracerts' => [$issuingCaPem, $rootCaPem]]); |
379 | 379 | $pkey_3des = ""; |
380 | - openssl_pkey_export($privateKey, $pkey_3des, $importPassword, [ "encrypt_key_cipher" => OPENSSL_CIPHER_3DES ]); |
|
380 | + openssl_pkey_export($privateKey, $pkey_3des, $importPassword, ["encrypt_key_cipher" => OPENSSL_CIPHER_3DES]); |
|
381 | 381 | // store resulting cert CN and expiry date in separate columns into DB - do not store the cert data itself as it contains the private key! |
382 | 382 | // we need the *real* expiry date, not just the day-approximation |
383 | 383 | $x509 = new \core\common\X509(); |
384 | 384 | $certString = ""; |
385 | 385 | openssl_x509_export($cert, $certString); |
386 | 386 | $parsedCert = $x509->processCertificate($certString); |
387 | - $loggerInstance->debug(5, "CERTINFO: " . /** @scrutinizer ignore-type */ print_r($parsedCert['full_details'], true)); |
|
387 | + $loggerInstance->debug(5, "CERTINFO: "./** @scrutinizer ignore-type */ print_r($parsedCert['full_details'], true)); |
|
388 | 388 | $realExpiryDate = date_create_from_format("U", $parsedCert['full_details']['validTo_time_t'])->format("Y-m-d H:i:s"); |
389 | 389 | |
390 | 390 | // store new cert info in DB |
@@ -396,7 +396,7 @@ discard block |
||
396 | 396 | // let the RADIUS users know the actual username for CUI generation |
397 | 397 | $radiusDbs = DBConnection::handle("RADIUS"); // is an array of server conns |
398 | 398 | foreach ($radiusDbs as $oneRadiusDb) { |
399 | - $oneRadiusDb->exec("INSERT IGNORE INTO radcheck (username, attribute, op, value) VALUES (?, 'CUI-Source-Username', ':=', ?)", "ss", ($profile->getUserById($invitationObject->userId))[$invitationObject->userId] , $csr["USERNAME"]); |
|
399 | + $oneRadiusDb->exec("INSERT IGNORE INTO radcheck (username, attribute, op, value) VALUES (?, 'CUI-Source-Username', ':=', ?)", "ss", ($profile->getUserById($invitationObject->userId))[$invitationObject->userId], $csr["USERNAME"]); |
|
400 | 400 | } |
401 | 401 | |
402 | 402 | // return PKCS#12 data stream |
@@ -453,7 +453,7 @@ discard block |
||
453 | 453 | $username = ""; |
454 | 454 | while ($usernameIsUnique === FALSE) { |
455 | 455 | $usernameLocalPart = common\Entity::randomString(64 - 1 - strlen($realm), "0123456789abcdefghijklmnopqrstuvwxyz"); |
456 | - $username = $usernameLocalPart . "@" . $realm; |
|
456 | + $username = $usernameLocalPart."@".$realm; |
|
457 | 457 | $uniquenessQuery = $databaseHandle->exec("SELECT cn from silverbullet_certificate WHERE cn = ? AND ca_type = ?", "ss", $username, $certtype); |
458 | 458 | // SELECT -> resource, not boolean |
459 | 459 | if (mysqli_num_rows(/** @scrutinizer ignore-type */ $uniquenessQuery) == 0) { |