@@ -30,12 +30,12 @@ discard block |
||
30 | 30 | */ |
31 | 31 | |
32 | 32 | |
33 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
33 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
34 | 34 | |
35 | 35 | // we are referring to $_SESSION later in the file |
36 | 36 | \core\CAT::sessionStart(); |
37 | 37 | |
38 | -$jsonDir = dirname(dirname(dirname(dirname(__FILE__)))) . "/CAT/var/json_cache"; |
|
38 | +$jsonDir = dirname(dirname(dirname(dirname(__FILE__))))."/CAT/var/json_cache"; |
|
39 | 39 | |
40 | 40 | $loggerInstance = new \core\common\Logging(); |
41 | 41 | $returnArray = []; |
@@ -49,8 +49,8 @@ discard block |
||
49 | 49 | $realmOu = filter_input(INPUT_GET, 'ou', FILTER_SANITIZE_STRING); |
50 | 50 | $forTests = filter_input(INPUT_GET, 'addtest', FILTER_SANITIZE_STRING); |
51 | 51 | $token = filter_input(INPUT_GET, 'token', FILTER_SANITIZE_STRING) ?? filter_input(INPUT_POST, 'token', FILTER_SANITIZE_STRING); |
52 | -if ($token && !is_dir($jsonDir . '/' . $token)) { |
|
53 | - mkdir($jsonDir . '/' . $token, 0777, true); |
|
52 | +if ($token && !is_dir($jsonDir.'/'.$token)) { |
|
53 | + mkdir($jsonDir.'/'.$token, 0777, true); |
|
54 | 54 | } |
55 | 55 | if (!is_null($givenRealm)) { |
56 | 56 | $realmElems = explode('.', $givenRealm); |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | } |
83 | 83 | $admins = array(); |
84 | 84 | if ($allRealms[$found]['contact']) { |
85 | - $elems = explode(', ', $allRealms[$found]['contact']); |
|
85 | + $elems = explode(', ', $allRealms[$found]['contact']); |
|
86 | 86 | foreach ($elems as $admin) { |
87 | 87 | if (substr($admin, 0, 2) == 'e:') { |
88 | 88 | $admins[] = substr($admin, 3); |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | } |
106 | 106 | if ($forTests) { |
107 | 107 | $rfc7585suite = new \core\diag\RFC7585Tests($givenRealm); |
108 | - $testsuite = new \core\diag\RADIUSTests($givenRealm, "@" . $givenRealm); |
|
108 | + $testsuite = new \core\diag\RADIUSTests($givenRealm, "@".$givenRealm); |
|
109 | 109 | $naptr = $rfc7585suite->relevantNAPTR(); |
110 | 110 | if ($naptr != \core\diag\RADIUSTests::RETVAL_NOTCONFIGURED && $naptr > 0) { |
111 | 111 | $naptr_valid = $rfc7585suite->relevantNAPTRcompliance(); |
@@ -119,12 +119,12 @@ discard block |
||
119 | 119 | $loggerInstance->debug(4, "findRealm rfc7585suite end\n"); |
120 | 120 | $toTest = array(); |
121 | 121 | foreach ($rfc7585suite->NAPTR_hostname_records as $hostindex => $addr) { |
122 | - $host = ($addr['family'] == "IPv6" ? "[" : "") . $addr['IP'] . ($addr['family'] == "IPv6" ? "]" : "") . ":" . $addr['port']; |
|
122 | + $host = ($addr['family'] == "IPv6" ? "[" : "").$addr['IP'].($addr['family'] == "IPv6" ? "]" : "").":".$addr['port']; |
|
123 | 123 | $expectedName = $addr['hostname']; |
124 | 124 | $toTest[$hostindex] = array( |
125 | 125 | 'host' => $host, |
126 | 126 | 'name' => $expectedName, |
127 | - 'bracketaddr' => ($addr["family"] == "IPv6" ? "[" . $addr["IP"] . "]" : $addr["IP"]) . ' TCP/' . $addr['port'] |
|
127 | + 'bracketaddr' => ($addr["family"] == "IPv6" ? "[".$addr["IP"]."]" : $addr["IP"]).' TCP/'.$addr['port'] |
|
128 | 128 | ); |
129 | 129 | } |
130 | 130 | $details['totest'] = $toTest; |
@@ -196,8 +196,8 @@ discard block |
||
196 | 196 | $loggerInstance->debug(4, "findRealm return end\n"); |
197 | 197 | $json_data = json_encode($returnArray); |
198 | 198 | if ($token) { |
199 | - $loggerInstance->debug(4, $jsonDir . '/' . $token); |
|
200 | - file_put_contents($jsonDir . '/' . $token . '/realm' , $json_data); |
|
199 | + $loggerInstance->debug(4, $jsonDir.'/'.$token); |
|
200 | + file_put_contents($jsonDir.'/'.$token.'/realm', $json_data); |
|
201 | 201 | } |
202 | 202 | echo($json_data); |
203 | 203 |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | * |
25 | 25 | * @author Maja Górecka-Wolniewicz <[email protected]> |
26 | 26 | */ |
27 | -require_once dirname(dirname(__DIR__)) . "/config/_config.php"; |
|
27 | +require_once dirname(dirname(__DIR__))."/config/_config.php"; |
|
28 | 28 | |
29 | 29 | $loggerInstance = new \core\common\Logging(); |
30 | 30 | |
@@ -53,9 +53,9 @@ discard block |
||
53 | 53 | <script type="text/javascript" src="../external/jquery/jquery.js"></script> |
54 | 54 | <script type="text/javascript" src="../external/jquery/jquery-ui.js"></script> |
55 | 55 | <script type="text/javascript"> |
56 | -var morealltext = "<?php echo '<i>' . _("Show detailed information for all tests") . '»</i>' ?>"; |
|
57 | -var lessalltext = "<?php echo '<i>' . _("Hide detailed information for all tests") . '»</i>' ?>"; |
|
58 | -var moretext = "<?php echo _("more") . "»" ?>"; |
|
56 | +var morealltext = "<?php echo '<i>'._("Show detailed information for all tests").'»</i>' ?>"; |
|
57 | +var lessalltext = "<?php echo '<i>'._("Hide detailed information for all tests").'»</i>' ?>"; |
|
58 | +var moretext = "<?php echo _("more")."»" ?>"; |
|
59 | 59 | var lesstext = "<?php echo "«" ?>"; |
60 | 60 | $(document).ready(function () { |
61 | 61 | $('.caresult, .eap_test_results, .udp_results').on('click', '.morelink', function () { |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | </head> |
100 | 100 | <body> |
101 | 101 | <?php |
102 | -require dirname(__DIR__) . '/skins/modern/diag/js/diag_js.php'; |
|
102 | +require dirname(__DIR__).'/skins/modern/diag/js/diag_js.php'; |
|
103 | 103 | echo $deco->productheader("ADMIN"); |
104 | 104 | $check_realm = FALSE; |
105 | 105 | $token = filter_input(INPUT_GET, 'token', FILTER_SANITIZE_STRING); |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | </h1> |
118 | 118 | <div id="debug_out" style="display: none"></div> |
119 | 119 | <div id="timestamp" style="min-width: 600px; max-width:800px" align="right"> |
120 | - <?php echo _("Tests timestamp: ") . $realmTests->getTimeStamp() . ' UTC'; ?> |
|
120 | + <?php echo _("Tests timestamp: ").$realmTests->getTimeStamp().' UTC'; ?> |
|
121 | 121 | </div> |
122 | 122 | <div id="tabs" style="min-width: 600px; max-width:800px"> |
123 | 123 | <ul> |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | <div id="tabs-1"> |
135 | 135 | <button id="run_tests" onclick="runRealmCheck('<?php echo $check_realm; ?>','<?php echo $ourlocale; ?>')"><?php echo _("Repeat connectivity tests") ?></button> |
136 | 136 | <div id="test_area"></div> |
137 | - <?php print $realmTests->printOverview();?> |
|
137 | + <?php print $realmTests->printOverview(); ?> |
|
138 | 138 | |
139 | 139 | </div> |
140 | 140 | <div id="tabs-2"> |
@@ -157,9 +157,9 @@ discard block |
||
157 | 157 | } |
158 | 158 | } else { |
159 | 159 | if (is_null($token)) { |
160 | - echo '<p><h1>' . _("Token missing, no data can be presented") . '</h1>'; |
|
160 | + echo '<p><h1>'._("Token missing, no data can be presented").'</h1>'; |
|
161 | 161 | } else { |
162 | - echo '<p><h1>' . _("The token given in the request does not exists, no data can be presented") . '</h1>'; |
|
162 | + echo '<p><h1>'._("The token given in the request does not exists, no data can be presented").'</h1>'; |
|
163 | 163 | } |
164 | 164 | } |
165 | 165 | echo $deco->footer(); |
@@ -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 | $admin = filter_input(INPUT_GET, 'admin', FILTER_VALIDATE_INT); |
24 | 24 | $sp = filter_input(INPUT_GET, 'sp', FILTER_VALIDATE_INT); |
25 | 25 | $givenRealm = filter_input(INPUT_GET, 'realm', FILTER_VALIDATE_STRING); |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | unset($q_el[$idx]); |
36 | 36 | $q_r = preg_replace("/\?.*/", "", $_SERVER['REQUEST_URI']); |
37 | 37 | if (count($q_el)) { |
38 | - $q_r = $q_r . '?' . implode('&', $q_el); |
|
38 | + $q_r = $q_r.'?'.implode('&', $q_el); |
|
39 | 39 | } |
40 | 40 | $_SERVER['REQUEST_URI'] = $q_r; |
41 | 41 | } |
@@ -44,11 +44,11 @@ discard block |
||
44 | 44 | $auth->authenticate(); |
45 | 45 | } |
46 | 46 | if (isset($_SESSION['admin_diag_auth'])) { |
47 | - $admin = 1; |
|
47 | + $admin = 1; |
|
48 | 48 | unset($_SESSION['admin_diag_auth']); |
49 | 49 | } |
50 | 50 | $Gui = new \web\lib\user\Gui(); |
51 | 51 | $skinObject = new \web\lib\user\Skinjob($_REQUEST['skin'] ?? $_SESSION['skin'] ?? $fedskin[0] ?? \config\Master::APPEARANCE['skins'][0]); |
52 | -require "../skins/" . $skinObject->skin . "/diag/diag.php"; |
|
52 | +require "../skins/".$skinObject->skin."/diag/diag.php"; |
|
53 | 53 | |
54 | 54 |
@@ -20,14 +20,14 @@ discard block |
||
20 | 20 | * <base_url>/copyright.php after deploying the software |
21 | 21 | */ |
22 | 22 | |
23 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
23 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
24 | 24 | |
25 | 25 | $loggerInstance = new \core\common\Logging(); |
26 | 26 | $validator = new \web\lib\common\InputValidation(); |
27 | 27 | $languageInstance = new \core\common\Language(); |
28 | 28 | $languageInstance->setTextDomain("diagnostics"); |
29 | 29 | |
30 | -$jsonDir = dirname(dirname(dirname(dirname(__FILE__)))) . "/CAT/var/json_cache"; |
|
30 | +$jsonDir = dirname(dirname(dirname(dirname(__FILE__))))."/CAT/var/json_cache"; |
|
31 | 31 | |
32 | 32 | $additional_message = [ |
33 | 33 | \core\common\Entity::L_OK => '', |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | function disp_name($eap) |
46 | 46 | { |
47 | 47 | $displayName = \core\common\EAP::eapDisplayName($eap); |
48 | - return $displayName['OUTER'] . ( $displayName['INNER'] != '' ? '-' . $displayName['INNER'] : ''); |
|
48 | + return $displayName['OUTER'].($displayName['INNER'] != '' ? '-'.$displayName['INNER'] : ''); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | if (!isset($_REQUEST['test_type']) || !$_REQUEST['test_type']) { |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | $testsuite = new \core\diag\RADIUSTests($check_realm, $my_profile->getRealmCheckOuterUsername(), $my_profile->getEapMethodsinOrderOfPreference(1), $my_profile->getCollapsedAttributes()['eap:server_name'], $my_profile->getCollapsedAttributes()['eap:ca_file']); |
69 | 69 | } else { |
70 | 70 | $my_profile = NULL; |
71 | - $testsuite = new \core\diag\RADIUSTests($check_realm, "@" . $check_realm); |
|
71 | + $testsuite = new \core\diag\RADIUSTests($check_realm, "@".$check_realm); |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | |
@@ -163,10 +163,10 @@ discard block |
||
163 | 163 | break; |
164 | 164 | case \core\common\Entity::L_REMARK: |
165 | 165 | case \core\common\Entity::L_WARN: |
166 | - $message = _("<strong>Test partially successful</strong>: authentication succeded.") . ' ' . $additional_message[$level]; |
|
166 | + $message = _("<strong>Test partially successful</strong>: authentication succeded.").' '.$additional_message[$level]; |
|
167 | 167 | break; |
168 | 168 | case \core\common\Entity::L_ERROR: |
169 | - $message = _("<strong>Test FAILED</strong>: authentication succeded.") . ' ' . $additional_message[$level]; |
|
169 | + $message = _("<strong>Test FAILED</strong>: authentication succeded.").' '.$additional_message[$level]; |
|
170 | 170 | break; |
171 | 171 | } |
172 | 172 | break; |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | case \core\diag\RADIUSTests::RETVAL_CONVERSATION_REJECT: |
218 | 218 | $level = $returnarray['result'][$i]['level']; |
219 | 219 | if ($level > \core\common\Entity::L_OK) { |
220 | - $message = _("<strong>Test partially successful</strong>: a bidirectional RADIUS conversation with multiple round-trips was carried out, and ended in an Access-Reject as planned.") . ' ' . $additional_message[$level]; |
|
220 | + $message = _("<strong>Test partially successful</strong>: a bidirectional RADIUS conversation with multiple round-trips was carried out, and ended in an Access-Reject as planned.").' '.$additional_message[$level]; |
|
221 | 221 | } else { |
222 | 222 | $message = _("<strong>Test successful</strong>: a bidirectional RADIUS conversation with multiple round-trips was carried out, and ended in an Access-Reject as planned."); |
223 | 223 | } |
@@ -240,7 +240,7 @@ discard block |
||
240 | 240 | $level = \core\common\Entity::L_ERROR; |
241 | 241 | break; |
242 | 242 | } |
243 | - $loggerInstance->debug(4, "SERVER=" . $returnarray['result'][$i]['server'] . "\n"); |
|
243 | + $loggerInstance->debug(4, "SERVER=".$returnarray['result'][$i]['server']."\n"); |
|
244 | 244 | $returnarray['result'][$i]['level'] = $level; |
245 | 245 | $returnarray['result'][$i]['message'] = $message; |
246 | 246 | break; |
@@ -257,9 +257,9 @@ discard block |
||
257 | 257 | } |
258 | 258 | // we tried to contact someone, and know how long that took |
259 | 259 | $returnarray['time_millisec'] = sprintf("%d", $rfc6614suite->TLS_CA_checks_result[$host]['time_millisec']); |
260 | - $timeDisplay = ' (' . sprintf(_("elapsed time: %d"), $rfc6614suite->TLS_CA_checks_result[$host]['time_millisec']) . ' ms)'; |
|
260 | + $timeDisplay = ' ('.sprintf(_("elapsed time: %d"), $rfc6614suite->TLS_CA_checks_result[$host]['time_millisec']).' ms)'; |
|
261 | 261 | if (isset($rfc6614suite->TLS_CA_checks_result[$host]['cert_oddity']) && ($rfc6614suite->TLS_CA_checks_result[$host]['cert_oddity'] == \core\diag\RADIUSTests::CERTPROB_UNKNOWN_CA)) { |
262 | - $returnarray['message'] = _("<strong>ERROR</strong>: the server presented a certificate which is from an unknown authority!") . $timeDisplay; |
|
262 | + $returnarray['message'] = _("<strong>ERROR</strong>: the server presented a certificate which is from an unknown authority!").$timeDisplay; |
|
263 | 263 | $returnarray['level'] = \core\common\Entity::L_ERROR; |
264 | 264 | $returnarray['result'] = $testresult; |
265 | 265 | break; |
@@ -269,7 +269,7 @@ discard block |
||
269 | 269 | $returnarray['level'] = \core\common\Entity::L_OK; |
270 | 270 | // override if the connection was with a mismatching server name |
271 | 271 | if (isset($rfc6614suite->TLS_CA_checks_result[$host]['cert_oddity']) && ($rfc6614suite->TLS_CA_checks_result[$host]['cert_oddity'] == \core\diag\RADIUSTests::CERTPROB_DYN_SERVER_NAME_MISMATCH)) { |
272 | - $returnarray['message'] = _("<strong>WARNING</strong>: the server name as discovered in the SRV record does not match any name in the server certificate!") . $timeDisplay; |
|
272 | + $returnarray['message'] = _("<strong>WARNING</strong>: the server name as discovered in the SRV record does not match any name in the server certificate!").$timeDisplay; |
|
273 | 273 | $returnarray['level'] = \core\common\Entity::L_WARN; |
274 | 274 | } |
275 | 275 | switch ($rfc6614suite->TLS_CA_checks_result[$host]['status']) { |
@@ -327,13 +327,13 @@ discard block |
||
327 | 327 | throw new Exception("Unknown test requested: default case reached!"); |
328 | 328 | } |
329 | 329 | $returnarray['datetime'] = date("Y-m-d H:i:s"); |
330 | -if (!is_dir($jsonDir . '/' . $token)) { |
|
331 | - mkdir($jsonDir . '/' . $token, 0777, true); |
|
330 | +if (!is_dir($jsonDir.'/'.$token)) { |
|
331 | + mkdir($jsonDir.'/'.$token, 0777, true); |
|
332 | 332 | } |
333 | 333 | $json_data = json_encode($returnarray); |
334 | 334 | if ($token != '') { |
335 | - $loggerInstance->debug(4, $jsonDir . '/' . $returnarray['token']); |
|
336 | - file_put_contents($jsonDir . '/' . $token . '/' . $test_type . '_' . $hostindex, $json_data); |
|
335 | + $loggerInstance->debug(4, $jsonDir.'/'.$returnarray['token']); |
|
336 | + file_put_contents($jsonDir.'/'.$token.'/'.$test_type.'_'.$hostindex, $json_data); |
|
337 | 337 | } |
338 | 338 | echo($json_data); |
339 | 339 |
@@ -46,9 +46,9 @@ discard block |
||
46 | 46 | $Gui->loggerInstance->debug(4, $operatingSystem); |
47 | 47 | $uiElements = new web\lib\admin\UIElements(); |
48 | 48 | if ($operatingSystem) { |
49 | - print "recognisedOS = '" . $operatingSystem['device'] . "';\n"; |
|
49 | + print "recognisedOS = '".$operatingSystem['device']."';\n"; |
|
50 | 50 | } |
51 | -require dirname(__DIR__) . '/user/js/cat_js.php'; |
|
51 | +require dirname(__DIR__).'/user/js/cat_js.php'; |
|
52 | 52 | |
53 | 53 | ?> |
54 | 54 | </script> |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | <div id='wrap' style='background-image:url("<?php echo $Gui->skinObject->findResourceUrl("IMAGES", "beta.png"); ?>");'> |
61 | 61 | <form id="cat_form" name="cat_form" accept-charset="UTF-8" action="<?php echo $_SERVER['SCRIPT_NAME']; ?>" method="POST"> |
62 | 62 | <?php |
63 | -require dirname(__DIR__) . '/diag/js/diag_js.php'; |
|
63 | +require dirname(__DIR__).'/diag/js/diag_js.php'; |
|
64 | 64 | echo $divs->divHeading($visibility); |
65 | 65 | $Gui->languageInstance->setTextDomain("diagnostics"); |
66 | 66 | ?> |
@@ -78,12 +78,12 @@ discard block |
||
78 | 78 | </div> |
79 | 79 | <div id="main_body"> |
80 | 80 | <div id="user_page"> |
81 | - <?php echo $divs->divPagetitle(_("Diagnostics site") . " (<span style='color:red'>beta</span>)", ""); ?> |
|
81 | + <?php echo $divs->divPagetitle(_("Diagnostics site")." (<span style='color:red'>beta</span>)", ""); ?> |
|
82 | 82 | <div id="user_info" style='padding-top: 10px;'> |
83 | 83 | <div id='diagnostic_choice'> |
84 | - <?php echo _("The diagnostics system will do its best to identify and resolve your problems!") . ' ' . _("Please help the system by answering the questions as precisely as possible.") . "<br/>" . _("Are you a") . ' '; ?> |
|
85 | - <input type='radio' name='diagnostic_usertype' value='0'><?php echo _("end-user") . ' ' . _("or"); ?> |
|
86 | - <input type='radio' name='diagnostic_usertype' value='1' <?php if ($admin == 1) { echo " checked"; } ?> > <?php echo _("eduroam administrator") .'?'; ?> |
|
84 | + <?php echo _("The diagnostics system will do its best to identify and resolve your problems!").' '._("Please help the system by answering the questions as precisely as possible.")."<br/>"._("Are you a").' '; ?> |
|
85 | + <input type='radio' name='diagnostic_usertype' value='0'><?php echo _("end-user").' '._("or"); ?> |
|
86 | + <input type='radio' name='diagnostic_usertype' value='1' <?php if ($admin == 1) { echo " checked"; } ?> > <?php echo _("eduroam administrator").'?'; ?> |
|
87 | 87 | </div> |
88 | 88 | <div id='diagnostic_enduser' style='display: none;'> |
89 | 89 | <h2><?php echo _("Tools for End Users"); ?></h2> |
@@ -93,24 +93,24 @@ discard block |
||
93 | 93 | ?> |
94 | 94 | </p> |
95 | 95 | <?php |
96 | - echo '<div id="before_stage_1"><h3>' . _("The system needs some information on your home institution - issuer of your account") . '</h3>'; |
|
96 | + echo '<div id="before_stage_1"><h3>'._("The system needs some information on your home institution - issuer of your account").'</h3>'; |
|
97 | 97 | echo _("What is the realm part of your user account (the part behind the @ of 'your.username@<b>realm.tld</b>):"); |
98 | 98 | ?> |
99 | 99 | <input type='text' name='user_realm' id='user_realm' value=''> |
100 | 100 | <?php |
101 | - echo '<div id="realm_by_select"><br/>' . _("alternatively") . '<br/>'; |
|
102 | - echo _("You can select your home institution from the following list") . '<br/>'; |
|
101 | + echo '<div id="realm_by_select"><br/>'._("alternatively").'<br/>'; |
|
102 | + echo _("You can select your home institution from the following list").'<br/>'; |
|
103 | 103 | echo '<div id="select_idp_country"><a href="" id="idp_countries_list">'; |
104 | - echo '<span id="realmselect">' . _("Click to select your country/region and organisation") . '</span></a></div>'; |
|
104 | + echo '<span id="realmselect">'._("Click to select your country/region and organisation").'</span></a></div>'; |
|
105 | 105 | ?> |
106 | 106 | <div id="select_idp_area" style="display:none;"> |
107 | 107 | </div> |
108 | 108 | </div> |
109 | 109 | <div id="position_info"> |
110 | 110 | <?php |
111 | - echo '<h3>' . _("Optionally, to improve tests, you can provide information on your current location") . '</h3>'; |
|
111 | + echo '<h3>'._("Optionally, to improve tests, you can provide information on your current location").'</h3>'; |
|
112 | 112 | echo '<div id="select_sp_country"><a href="" id="sp_countries_list">'; |
113 | - echo '<span id="spselect">' . _("Click to select a location in which you have an eduroam problem") . '</span></a></div>'; |
|
113 | + echo '<span id="spselect">'._("Click to select a location in which you have an eduroam problem").'</span></a></div>'; |
|
114 | 114 | ?> |
115 | 115 | <div id="select_sp_area" style="display:none;"> |
116 | 116 | </div> |
@@ -143,9 +143,9 @@ discard block |
||
143 | 143 | echo 'none'; |
144 | 144 | } |
145 | 145 | echo ";'>"; |
146 | - echo '<h3>' . _("Which problem are you reporting?") . '</h3>'; |
|
147 | - echo '<input type="radio" name="problem_type" value="1"' . (($sp==1)? ' checked' : '') . '>'; |
|
148 | - echo _("SP contacting IdP due to technical problems or abuse") . '<br>'; |
|
146 | + echo '<h3>'._("Which problem are you reporting?").'</h3>'; |
|
147 | + echo '<input type="radio" name="problem_type" value="1"'.(($sp == 1) ? ' checked' : '').'>'; |
|
148 | + echo _("SP contacting IdP due to technical problems or abuse").'<br>'; |
|
149 | 149 | echo '<input type="radio" name="problem_type" value="2">'; |
150 | 150 | echo _("IdP contacting SP due to technical problems"); |
151 | 151 | echo "<div id='idp_contact_area'></div>"; |
@@ -154,9 +154,9 @@ discard block |
||
154 | 154 | echo "</div>"; |
155 | 155 | } else { |
156 | 156 | echo "0\">"; |
157 | - echo _("This service is for authenticated admins only.") . '<br>'; |
|
158 | - echo "<a href=\"diag.php?admin=1\">" . |
|
159 | - _("eduroam® admin access is needed") . "</a>"; |
|
157 | + echo _("This service is for authenticated admins only.").'<br>'; |
|
158 | + echo "<a href=\"diag.php?admin=1\">". |
|
159 | + _("eduroam® admin access is needed")."</a>"; |
|
160 | 160 | } |
161 | 161 | ?> |
162 | 162 | </div> |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | return false; |
233 | 233 | }); |
234 | 234 | $(document).on('change', '#idp_country' , function() { |
235 | - var comment = <?php echo '"' . _("Fetching institutions list") . '..."'; ?>; |
|
235 | + var comment = <?php echo '"'._("Fetching institutions list").'..."'; ?>; |
|
236 | 236 | var id = $(this).attr('id'); |
237 | 237 | var k = id.indexOf('_'); |
238 | 238 | var type = id.substr(0,k); |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | var shtml = ''; |
251 | 251 | var select = ''; |
252 | 252 | if (type !== 'asp') { |
253 | - shtml = <?php echo '"<td>' . _("Select institution:") . '</td><td>"'; ?>; |
|
253 | + shtml = <?php echo '"<td>'._("Select institution:").'</td><td>"'; ?>; |
|
254 | 254 | } |
255 | 255 | select = '<select id="' + type + '_inst" name="' + type + '_inst" style="margin-left:0px; width:400px;"><option value=""></option>'; |
256 | 256 | for (var i in institutions) { |
@@ -271,7 +271,7 @@ discard block |
||
271 | 271 | } else { |
272 | 272 | if (data.status === 0) { |
273 | 273 | inProgress(0); |
274 | - 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.") . '"'; ?>; |
|
274 | + 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.").'"'; ?>; |
|
275 | 275 | alert(msg); |
276 | 276 | $('#select_idp_country').show(); |
277 | 277 | $('#select_idp_area').hide(); |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | }, |
281 | 281 | error:function() { |
282 | 282 | inProgress(0); |
283 | - var msg = <?php echo '"' . _("Can not search in database. You have to provide the realm you are interested in.") . '"'; ?>; |
|
283 | + var msg = <?php echo '"'._("Can not search in database. You have to provide the realm you are interested in.").'"'; ?>; |
|
284 | 284 | alert(msg); |
285 | 285 | $('#select_idp_country').show(); |
286 | 286 | $('#select_idp_area').hide(); |
@@ -296,9 +296,9 @@ discard block |
||
296 | 296 | }); |
297 | 297 | $(document).on('change', '#select_sp_problem' , function() { |
298 | 298 | if ($('#select_sp_problem').val().substr(0,6) == 'abuse-') { |
299 | - $('#realm_in_db_admin').text(<?php echo '"' . _("Check if this realm is registered") . '"'; ?>); |
|
299 | + $('#realm_in_db_admin').text(<?php echo '"'._("Check if this realm is registered").'"'; ?>); |
|
300 | 300 | } else { |
301 | - $('#realm_in_db_admin').text(<?php echo '"' . _("Check this realm") . '"'; ?>); |
|
301 | + $('#realm_in_db_admin').text(<?php echo '"'._("Check this realm").'"'; ?>); |
|
302 | 302 | } |
303 | 303 | $('#realm_in_db_admin').hide(); |
304 | 304 | $('#admin_realm').val(''); |
@@ -306,7 +306,7 @@ discard block |
||
306 | 306 | clear_sp_question(); |
307 | 307 | }); |
308 | 308 | $(document).on('change', '#sp_country, #asp_country' , function() { |
309 | - var comment = <?php echo '"' . _("Fetching institutions list") . '..."'; ?>; |
|
309 | + var comment = <?php echo '"'._("Fetching institutions list").'..."'; ?>; |
|
310 | 310 | var id = $(this).attr('id'); |
311 | 311 | var k = id.indexOf('_'); |
312 | 312 | var type = id.substr(0,k); |
@@ -324,7 +324,7 @@ discard block |
||
324 | 324 | var shtml = ''; |
325 | 325 | var select = ''; |
326 | 326 | if (type !== 'asp') { |
327 | - shtml = <?php echo '"<td>' . _("Select institution:") . '</td><td>"'; ?>; |
|
327 | + shtml = <?php echo '"<td>'._("Select institution:").'</td><td>"'; ?>; |
|
328 | 328 | } |
329 | 329 | select = '<select id="' + type + '_inst" name="' + type + '_inst" style="margin-left:0px; width:400px;"><option value=""></option>'; |
330 | 330 | for (var i in hotspots) { |
@@ -347,7 +347,7 @@ discard block |
||
347 | 347 | inProgress(0); |
348 | 348 | var select = '<select id="' + type + '_inst" name="' + type + '_inst" style="margin-left:0px; width:400px;"><option value="">'; |
349 | 349 | var shtml = '<td></td><td>'; |
350 | - select = select + <?php echo '"' . _("Other location") . '"'; ?> + '</option></select></td>'; |
|
350 | + select = select + <?php echo '"'._("Other location").'"'; ?> + '</option></select></td>'; |
|
351 | 351 | if (type !== 'asp') { |
352 | 352 | $('#row_' + type + '_institution').html(''); |
353 | 353 | $('#row_' + type + '_institution').append(shtml + select); |
@@ -381,7 +381,7 @@ discard block |
||
381 | 381 | $('#start_test_area').hide(); |
382 | 382 | return false; |
383 | 383 | } |
384 | - var comment = <?php echo '"' . _("Fetching realms list") . '..."'; ?>; |
|
384 | + var comment = <?php echo '"'._("Fetching realms list").'..."'; ?>; |
|
385 | 385 | inProgress(1, comment); |
386 | 386 | $.ajax({ |
387 | 387 | url: "findRealm.php", |
@@ -393,7 +393,7 @@ discard block |
||
393 | 393 | var realms = data.realms; |
394 | 394 | var realmselect = ''; |
395 | 395 | if (realms.length > 1) { |
396 | - realmselect = <?php echo '"<td>' . _("Check realm(s):") . '</td>"'; ?>; |
|
396 | + realmselect = <?php echo '"<td>'._("Check realm(s):").'</td>"'; ?>; |
|
397 | 397 | realmselect = realmselect + '<td>' + "<span style='margin-left: 10px'>"; |
398 | 398 | for (var i in realms) { |
399 | 399 | realmselect = realmselect + '<input type="radio" name="realm" '; |
@@ -405,7 +405,7 @@ discard block |
||
405 | 405 | } |
406 | 406 | realmselect = realmselect + '</span></td>'; |
407 | 407 | } else { |
408 | - realmselect = <?php echo '"<td>' . _("Realm:") . '</td>"'; ?>; |
|
408 | + realmselect = <?php echo '"<td>'._("Realm:").'</td>"'; ?>; |
|
409 | 409 | realmselect = realmselect + '<td>' + "<span style='margin-left: 10px'>"; |
410 | 410 | realmselect = realmselect + realms[0] + '</span>'; |
411 | 411 | realmselect = realmselect + '<input type="hidden" name="realm" value="' + realms[0] + '">'; |
@@ -457,7 +457,7 @@ discard block |
||
457 | 457 | clear_sp_question(); |
458 | 458 | t = 1; |
459 | 459 | } |
460 | - var comment = <?php echo '"' . _("Running realm tests") . '..."'; ?>; |
|
460 | + var comment = <?php echo '"'._("Running realm tests").'..."'; ?>; |
|
461 | 461 | inProgress(1, comment); |
462 | 462 | /*waiting(comment);*/ |
463 | 463 | $.ajax({ |
@@ -516,7 +516,7 @@ discard block |
||
516 | 516 | testSociopath('', answer); |
517 | 517 | }); |
518 | 518 | $('#realmtest').click(function(event){ |
519 | - var comment = <?php echo '"<br><br>' . _("Running realm tests") . '..."'; ?>; |
|
519 | + var comment = <?php echo '"<br><br>'._("Running realm tests").'..."'; ?>; |
|
520 | 520 | inProgress(1, comment); |
521 | 521 | $('#start_test_area').hide(); |
522 | 522 | if ($('#select_sp_area').is(':hidden')) { |
@@ -564,13 +564,13 @@ discard block |
||
564 | 564 | reset_footer(); |
565 | 565 | testSociopath(realm, 0); |
566 | 566 | } else { |
567 | - var title = <?php echo '"' . _("Diagnostics results for selected realms") . '"'; ?>; |
|
568 | - result = '<div class="padding"><h3>' + <?php echo '"' . _("An unknown problem occured") . '"'; ?>; |
|
567 | + var title = <?php echo '"'._("Diagnostics results for selected realms").'"'; ?>; |
|
568 | + result = '<div class="padding"><h3>' + <?php echo '"'._("An unknown problem occured").'"'; ?>; |
|
569 | 569 | result = result + '</h3>' |
570 | 570 | if (r.length == 1) { |
571 | - result = result + <?php echo '"' . _("This test includes checking of the following realm") . '"'; ?>; |
|
571 | + result = result + <?php echo '"'._("This test includes checking of the following realm").'"'; ?>; |
|
572 | 572 | } else { |
573 | - result = result + <?php echo '"' . _("This test includes checking of the following realms") . '"'; ?>; |
|
573 | + result = result + <?php echo '"'._("This test includes checking of the following realms").'"'; ?>; |
|
574 | 574 | } |
575 | 575 | result = result + ': ' |
576 | 576 | for (var i=0; i < r.length; i++) { |
@@ -580,7 +580,7 @@ discard block |
||
580 | 580 | result = result + r[i]; |
581 | 581 | } |
582 | 582 | result = result + '.<br>'; |
583 | - result = result + <?php echo '"' . _("You should report this to") . '"'; ?> + ' <a href="mailto:[email protected]">[email protected]</a>'; |
|
583 | + result = result + <?php echo '"'._("You should report this to").'"'; ?> + ' <a href="mailto:[email protected]">[email protected]</a>'; |
|
584 | 584 | result = result + '</div>'; |
585 | 585 | $('#after_stage_1').hide(); |
586 | 586 | $('#before_stage_1').show(); |
@@ -648,43 +648,43 @@ discard block |
||
648 | 648 | success:function(data) { |
649 | 649 | if (data.status === 1) { |
650 | 650 | var result = ''; |
651 | - var title = <?php echo '"' . _("eduroam admin report submission") . '"'; ?>; |
|
651 | + var title = <?php echo '"'._("eduroam admin report submission").'"'; ?>; |
|
652 | 652 | result = '<div class="padding">'; |
653 | 653 | if (type == 'idp_send') { |
654 | - result = result + '<h3>'+ <?php echo '"' . _("SP contacting IdP due to technical problems or abuse") . '"'; ?> + '</h3>'; |
|
654 | + result = result + '<h3>'+ <?php echo '"'._("SP contacting IdP due to technical problems or abuse").'"'; ?> + '</h3>'; |
|
655 | 655 | result = result + '<table>'; |
656 | - result = result + '<tr><td>' + <?php echo '"' . _("Reason") . '"'; ?> + '</td><td>' + data.reason + '</td></tr>'; |
|
657 | - result = result + '<tr><td>' + <?php echo '"' . _("Event's timestamp") . '"'; ?> + '</td><td>' + data.timestamp + '</td></tr>'; |
|
658 | - result = result + '<tr><td>' + <?php echo '"' . _("Calling-Station-Id") . '"'; ?> + '</td><td>' + data.mac + '</td></tr>'; |
|
659 | - result = result + '<tr><td>' + <?php echo '"' . _("Additional description") . '"'; ?> +'</td><td>' + data.freetext + '</td></tr>'; |
|
660 | - result = result + '<tr><td>' + <?php echo '"' . _("An email to contact the reporter") . '"'; ?> + '</td><td>' + data.email + '</td></tr>'; |
|
661 | - result = result + '<tr><td>' + <?php echo '"' . _("Test result") . '" '; ?> +'</td><td>'; |
|
656 | + result = result + '<tr><td>' + <?php echo '"'._("Reason").'"'; ?> + '</td><td>' + data.reason + '</td></tr>'; |
|
657 | + result = result + '<tr><td>' + <?php echo '"'._("Event's timestamp").'"'; ?> + '</td><td>' + data.timestamp + '</td></tr>'; |
|
658 | + result = result + '<tr><td>' + <?php echo '"'._("Calling-Station-Id").'"'; ?> + '</td><td>' + data.mac + '</td></tr>'; |
|
659 | + result = result + '<tr><td>' + <?php echo '"'._("Additional description").'"'; ?> +'</td><td>' + data.freetext + '</td></tr>'; |
|
660 | + result = result + '<tr><td>' + <?php echo '"'._("An email to contact the reporter").'"'; ?> + '</td><td>' + data.email + '</td></tr>'; |
|
661 | + result = result + '<tr><td>' + <?php echo '"'._("Test result").'" '; ?> +'</td><td>'; |
|
662 | 662 | if (data.tests_result == 1) { |
663 | - result = result + <?php echo '"' . _("failure") . '"'; ?>; |
|
663 | + result = result + <?php echo '"'._("failure").'"'; ?>; |
|
664 | 664 | } else { |
665 | - result = result + <?php echo '"' . _("success") . '"'; ?>; |
|
665 | + result = result + <?php echo '"'._("success").'"'; ?>; |
|
666 | 666 | } |
667 | 667 | result = result + '</td></tr>'; |
668 | - result = result + '<tr><td>' + <?php echo '"' . _("Test URL") . '" '; ?> +'</td><td><a href="' + data.testurl + '">' + data.testurl + '</a></td></tr>'; |
|
669 | - result = result + '<tr><td>' + <?php echo '"' . _("Email to IdP administrators ") . '"'; ?> + ' '; |
|
668 | + result = result + '<tr><td>' + <?php echo '"'._("Test URL").'" '; ?> +'</td><td><a href="' + data.testurl + '">' + data.testurl + '</a></td></tr>'; |
|
669 | + result = result + '<tr><td>' + <?php echo '"'._("Email to IdP administrators ").'"'; ?> + ' '; |
|
670 | 670 | if (data.emailsent == 1) { |
671 | - result = result + <?php echo '"' . _("send successfully") . '"'; ?>; |
|
671 | + result = result + <?php echo '"'._("send successfully").'"'; ?>; |
|
672 | 672 | } else { |
673 | - result = result + <?php echo '"' . _("not sent - failure while sending") . '"'; ?>; |
|
673 | + result = result + <?php echo '"'._("not sent - failure while sending").'"'; ?>; |
|
674 | 674 | } |
675 | 675 | result = result + '</td><td></td></tr>'; |
676 | 676 | } |
677 | 677 | if (type == 'sp_send') { |
678 | - result = result + '<h3>'+ <?php echo '"' . _("IdP contacting SP due to technical problems or abuse") . '"'; ?> + '</h3>'; |
|
678 | + result = result + '<h3>'+ <?php echo '"'._("IdP contacting SP due to technical problems or abuse").'"'; ?> + '</h3>'; |
|
679 | 679 | result = result + '<table>'; |
680 | - result = result + '<tr><td>' + <?php echo '"' . _("Reason") . '"'; ?> + '</td><td>' + data.reason + '</td></tr>'; |
|
681 | - result = result + '<tr><td>' + <?php echo '"' . _("SP's Operator-Name") . '"'; ?> + '</td><td>' + data.opname + '</td></tr>'; |
|
682 | - result = result + '<tr><td>' + <?php echo '"' . _("User's outer ID") . '"'; ?> + '</td><td>' + data.outerid + '</td></tr>'; |
|
683 | - result = result + '<tr><td>' + <?php echo '"' . _("IdP email") . '"'; ?> + '</td><td>' + data.email + '</td></tr>'; |
|
684 | - result = result + '<tr><td>' + <?php echo '"' . _("Event's timestamp") . '"'; ?> + '</td><td>' + data.timestamp + '</td></tr>'; |
|
685 | - result = result + '<tr><td>' + <?php echo '"' . _("Calling-Station-Id") . '"'; ?> + '</td><td>' + data.mac + '</td></tr>'; |
|
686 | - result = result + '<tr><td>' + <?php echo '"' . _("Additional description") . '"'; ?> +'</td><td>' + data.freetext + '</td></tr>'; |
|
687 | - result = result + '<tr><td>' + <?php echo '"' . _("How to contact the user") . '"'; ?> +'</td><td>' + data.cdetails + '</td></tr>'; |
|
680 | + result = result + '<tr><td>' + <?php echo '"'._("Reason").'"'; ?> + '</td><td>' + data.reason + '</td></tr>'; |
|
681 | + result = result + '<tr><td>' + <?php echo '"'._("SP's Operator-Name").'"'; ?> + '</td><td>' + data.opname + '</td></tr>'; |
|
682 | + result = result + '<tr><td>' + <?php echo '"'._("User's outer ID").'"'; ?> + '</td><td>' + data.outerid + '</td></tr>'; |
|
683 | + result = result + '<tr><td>' + <?php echo '"'._("IdP email").'"'; ?> + '</td><td>' + data.email + '</td></tr>'; |
|
684 | + result = result + '<tr><td>' + <?php echo '"'._("Event's timestamp").'"'; ?> + '</td><td>' + data.timestamp + '</td></tr>'; |
|
685 | + result = result + '<tr><td>' + <?php echo '"'._("Calling-Station-Id").'"'; ?> + '</td><td>' + data.mac + '</td></tr>'; |
|
686 | + result = result + '<tr><td>' + <?php echo '"'._("Additional description").'"'; ?> +'</td><td>' + data.freetext + '</td></tr>'; |
|
687 | + result = result + '<tr><td>' + <?php echo '"'._("How to contact the user").'"'; ?> +'</td><td>' + data.cdetails + '</td></tr>'; |
|
688 | 688 | } |
689 | 689 | result = result + '</div>'; |
690 | 690 | showInfo(result, title); |
@@ -709,7 +709,7 @@ discard block |
||
709 | 709 | $(this).removeClass('visible_row').addClass('hidden_row'); |
710 | 710 | } |
711 | 711 | }); |
712 | - $('#admin_realm').attr('title', <?php echo '"' . _("Wrong format of realm") . '"'; ?>); |
|
712 | + $('#admin_realm').attr('title', <?php echo '"'._("Wrong format of realm").'"'; ?>); |
|
713 | 713 | } else { |
714 | 714 | $('#admin_realm').removeClass('error_input'); |
715 | 715 | $('#admin_realm').attr('title', ''); |
@@ -719,7 +719,7 @@ discard block |
||
719 | 719 | $(document).on('keyup change', '#email' , function() { |
720 | 720 | if ($(this).val().length == 0 || !isEmail($(this).val())) { |
721 | 721 | $('#email').addClass('error_input'); |
722 | - $('#email').attr('title', <?php echo '"' . _("Wrong format of email") . '"'; ?>); |
|
722 | + $('#email').attr('title', <?php echo '"'._("Wrong format of email").'"'; ?>); |
|
723 | 723 | } else { |
724 | 724 | $('#email').removeClass('error_input'); |
725 | 725 | $('#email').attr('title', ''); |
@@ -732,7 +732,7 @@ discard block |
||
732 | 732 | if ($('#mac').val().length > 0) { |
733 | 733 | if ($('#mac').val().length != 17) { |
734 | 734 | $('#mac').addClass('error_input'); |
735 | - $('#mac').attr('title', <?php echo '"' . _("MAC address is incomplete") . '"'; ?>); |
|
735 | + $('#mac').attr('title', <?php echo '"'._("MAC address is incomplete").'"'; ?>); |
|
736 | 736 | } else { |
737 | 737 | $('#mac').removeClass('error_input'); |
738 | 738 | $('#mac').attr('title', ''); |
@@ -741,7 +741,7 @@ discard block |
||
741 | 741 | if ($(this).attr('id') == 'email' && $(this).val().length > 0) { |
742 | 742 | if (!isEmail($(this).val())) { |
743 | 743 | $('#email').addClass('error_input'); |
744 | - $('#email').attr('title', <?php echo '"' . _("Wrong format of email") . '"'; ?>); |
|
744 | + $('#email').attr('title', <?php echo '"'._("Wrong format of email").'"'; ?>); |
|
745 | 745 | } else { |
746 | 746 | $('#email').removeClass('error_input'); |
747 | 747 | $('#email').attr('title', ''); |
@@ -750,7 +750,7 @@ discard block |
||
750 | 750 | if ($(this).attr('id') == 'outer_id' && $(this).val().length > 0) { |
751 | 751 | if (!isEmail($(this).val(), true)) { |
752 | 752 | $('#outer_id').addClass('error_input'); |
753 | - $('#outer_id').attr('title', <?php echo '"' . _("Wrong format of outer ID") . '"'; ?>); |
|
753 | + $('#outer_id').attr('title', <?php echo '"'._("Wrong format of outer ID").'"'; ?>); |
|
754 | 754 | } else { |
755 | 755 | $('#outer_id').removeClass('error_input'); |
756 | 756 | $('#outer_id').attr('title', ''); |
@@ -759,7 +759,7 @@ discard block |
||
759 | 759 | if ($(this).attr('id') == 'opname' && $('#opname').val().length > 0) { |
760 | 760 | if (!isOperatorName($(this).val())) { |
761 | 761 | $('#opname').addClass('error_input'); |
762 | - $('#opname').attr('title', <?php echo '"' . _("Wrong string given as OperatorName") . '"'; ?>); |
|
762 | + $('#opname').attr('title', <?php echo '"'._("Wrong string given as OperatorName").'"'; ?>); |
|
763 | 763 | $('#spmanually').show(); |
764 | 764 | } else { |
765 | 765 | $('#opname').removeClass('error_input'); |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | * <base_url>/copyright.php after deploying the software |
21 | 21 | */ |
22 | 22 | |
23 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
23 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
24 | 24 | |
25 | 25 | $auth = new \web\lib\admin\Authentication(); |
26 | 26 | $loggerInstance = new \core\common\Logging(); |
@@ -33,15 +33,15 @@ discard block |
||
33 | 33 | $myInstOriginal = $validator->existingIdP($_GET['inst_id'], $_SESSION['user']); |
34 | 34 | $instId = $myInstOriginal->identifier; |
35 | 35 | |
36 | -$hello = _("To whom it may concern,") . "\n\n"; |
|
37 | -$bye = _("This mail is merely a cross-check because these changes can be security-relevant. If the change was expected, you do not need to take any action.") . "\n\n" . |
|
38 | - _("Greetings, ") . "\n\n" . |
|
36 | +$hello = _("To whom it may concern,")."\n\n"; |
|
37 | +$bye = _("This mail is merely a cross-check because these changes can be security-relevant. If the change was expected, you do not need to take any action.")."\n\n". |
|
38 | + _("Greetings, ")."\n\n". |
|
39 | 39 | \config\Master::APPEARANCE['productname_long']; |
40 | 40 | |
41 | 41 | switch ($_POST['submitbutton']) { |
42 | 42 | case web\lib\common\FormElements::BUTTON_DELETE: |
43 | 43 | $myInstOriginal->destroy(); |
44 | - $loggerInstance->writeAudit($_SESSION['user'], "DEL", "IdP " . $instId); |
|
44 | + $loggerInstance->writeAudit($_SESSION['user'], "DEL", "IdP ".$instId); |
|
45 | 45 | header("Location: overview_user.php"); |
46 | 46 | exit; |
47 | 47 | case web\lib\common\FormElements::BUTTON_FLUSH_AND_RESTART: |
@@ -51,9 +51,9 @@ discard block |
||
51 | 51 | } |
52 | 52 | // flush all IdP attributes and send user to creation wizard |
53 | 53 | $myInstOriginal->flushAttributes(); |
54 | - $loggerInstance->writeAudit($_SESSION['user'], "DEL", "IdP starting over" . $instId); |
|
55 | - $text = $hello . |
|
56 | - sprintf(_("the %s %s / %s / (previously known as) '%s' has deleted all properties and is starting over freshly. This means that its not recognisable by its name any more, and it may assume a different name in the future. You will get another mail if and when the name change happens."), $ui->nomenclatureInst, strtoupper($myInstOriginal->federation), $myInstOriginal->identifier, $myInstOriginal->name) . "\n\n" . |
|
54 | + $loggerInstance->writeAudit($_SESSION['user'], "DEL", "IdP starting over".$instId); |
|
55 | + $text = $hello. |
|
56 | + sprintf(_("the %s %s / %s / (previously known as) '%s' has deleted all properties and is starting over freshly. This means that its not recognisable by its name any more, and it may assume a different name in the future. You will get another mail if and when the name change happens."), $ui->nomenclatureInst, strtoupper($myInstOriginal->federation), $myInstOriginal->identifier, $myInstOriginal->name)."\n\n". |
|
57 | 57 | $bye; |
58 | 58 | $fed = new core\Federation($myInstOriginal->federation); |
59 | 59 | foreach ($fed->listFederationAdmins() as $id) { |
@@ -72,19 +72,19 @@ discard block |
||
72 | 72 | exit(0); |
73 | 73 | } |
74 | 74 | $inst_name = $myInstOriginal->name; |
75 | - echo "<h1>" . sprintf(_("Submitted attributes for IdP '%s'"), $inst_name) . "</h1>"; |
|
75 | + echo "<h1>".sprintf(_("Submitted attributes for IdP '%s'"), $inst_name)."</h1>"; |
|
76 | 76 | echo "<table>"; |
77 | 77 | echo $optionParser->processSubmittedFields($myInstOriginal, $_POST, $_FILES); |
78 | 78 | echo "</table>"; |
79 | 79 | // delete cached logo, if present |
80 | - $dir = ROOT . '/web/downloads/logos/'; |
|
81 | - $globResult = glob($dir . $myInstOriginal->identifier . "_*.png"); |
|
80 | + $dir = ROOT.'/web/downloads/logos/'; |
|
81 | + $globResult = glob($dir.$myInstOriginal->identifier."_*.png"); |
|
82 | 82 | if ($globResult === FALSE) { // we should catch the improbable error condition |
83 | 83 | $globResult = []; |
84 | 84 | } |
85 | 85 | array_map('unlink', $globResult); |
86 | 86 | $loggerInstance->debug(4, "UNLINK from $dir\n"); |
87 | - $loggerInstance->writeAudit($_SESSION['user'], "MOD", "IdP " . $myInstOriginal->identifier . " - attributes changed"); |
|
87 | + $loggerInstance->writeAudit($_SESSION['user'], "MOD", "IdP ".$myInstOriginal->identifier." - attributes changed"); |
|
88 | 88 | |
89 | 89 | // re-instantiate ourselves... profiles need fresh data |
90 | 90 | $myInstReinstantiated = $validator->existingIdP($_GET['inst_id'], $_SESSION['user']); |
@@ -93,10 +93,10 @@ discard block |
||
93 | 93 | if (count($significantChanges) > 0) { |
94 | 94 | // send a notification/alert mail to someone we know is in charge |
95 | 95 | /// were made to the *Identity Provider* *LU* / integer number of IdP / (previously known as) Name |
96 | - $text = $hello . sprintf(_("significant changes were made to the %s %s / %s / (previously known as) '%s'."), $ui->nomenclatureInst, strtoupper($myInstOriginal->federation), $myInstOriginal->identifier, $myInstOriginal->name) . "\n\n"; |
|
96 | + $text = $hello.sprintf(_("significant changes were made to the %s %s / %s / (previously known as) '%s'."), $ui->nomenclatureInst, strtoupper($myInstOriginal->federation), $myInstOriginal->identifier, $myInstOriginal->name)."\n\n"; |
|
97 | 97 | if (isset($significantChanges[\core\IdP::INSTNAME_CHANGED])) { |
98 | - $text .= sprintf(_("The %s has changed its name. The details are below:"), $ui->nomenclatureInst) . "\n\n"; |
|
99 | - $text .= $significantChanges[\core\IdP::INSTNAME_CHANGED] . "\n\n"; |
|
98 | + $text .= sprintf(_("The %s has changed its name. The details are below:"), $ui->nomenclatureInst)."\n\n"; |
|
99 | + $text .= $significantChanges[\core\IdP::INSTNAME_CHANGED]."\n\n"; |
|
100 | 100 | } |
101 | 101 | $text .= $bye; |
102 | 102 | // (currently, send hard-wired to NRO - future: for linked insts, check eduroam DBv2 and send to registered admins directly) |
@@ -112,12 +112,12 @@ discard block |
||
112 | 112 | |
113 | 113 | if (isset(\config\ConfAssistant::CONSORTIUM['ssid']) && count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0) { |
114 | 114 | foreach (\config\ConfAssistant::CONSORTIUM['ssid'] as $ssidname) { |
115 | - $ssids[] = $ssidname . " " . (isset(\config\ConfAssistant::CONSORTIUM['tkipsupport']) && \config\ConfAssistant::CONSORTIUM['tkipsupport'] === TRUE ? _("(WPA2/AES and WPA/TKIP)") : _("(WPA2/AES)") ); |
|
115 | + $ssids[] = $ssidname." ".(isset(\config\ConfAssistant::CONSORTIUM['tkipsupport']) && \config\ConfAssistant::CONSORTIUM['tkipsupport'] === TRUE ? _("(WPA2/AES and WPA/TKIP)") : _("(WPA2/AES)")); |
|
116 | 116 | } |
117 | 117 | } |
118 | 118 | |
119 | 119 | foreach ($myInstReinstantiated->getAttributes("media:SSID") as $ssidname) { |
120 | - $ssids[] = $ssidname['value'] . " " . _("(WPA2/AES)"); |
|
120 | + $ssids[] = $ssidname['value']." "._("(WPA2/AES)"); |
|
121 | 121 | } |
122 | 122 | |
123 | 123 | echo "<table>"; |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | if (count($ssids) > 0) { |
126 | 126 | $printedlist = ""; |
127 | 127 | foreach ($ssids as $names) { |
128 | - $printedlist = $printedlist . "$names "; |
|
128 | + $printedlist = $printedlist."$names "; |
|
129 | 129 | } |
130 | 130 | echo $uiElements->boxOkay(sprintf(_("Your installers will configure the following SSIDs: <strong>%s</strong>"), $printedlist), _("SSIDs configured")); |
131 | 131 | } |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | // did we get an email address? then, show the silverbullet jumpstart button |
154 | 154 | // otherwise, issue a smartass comment |
155 | 155 | if (count($myInstReinstantiated->getAttributes("support:email")) > 0) { |
156 | - echo "<form method='post' action='edit_silverbullet.php?inst_id=$my_inst->identifier' accept-charset='UTF-8'><button type='submit'>" . sprintf(_("Continue to %s properties"), \core\ProfileSilverbullet::PRODUCTNAME) . "</button></form>"; |
|
156 | + echo "<form method='post' action='edit_silverbullet.php?inst_id=$my_inst->identifier' accept-charset='UTF-8'><button type='submit'>".sprintf(_("Continue to %s properties"), \core\ProfileSilverbullet::PRODUCTNAME)."</button></form>"; |
|
157 | 157 | } else { |
158 | 158 | echo "<table>"; |
159 | 159 | echo $uiElements->boxError(sprintf(_("You did not submit an e-mail address. This is required for %s. Please go to the %s dashboard and edit your helpdesk settings to include a helpdesk e-mail address."), core\ProfileSilverbullet::PRODUCTNAME, $ui->nomenclatureInst), _("No support e-mail!")); |
@@ -161,10 +161,10 @@ discard block |
||
161 | 161 | } |
162 | 162 | } |
163 | 163 | if (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_RADIUS'] == "LOCAL") { |
164 | - echo "<br/><form method='post' action='edit_profile.php?inst_id=$my_inst->identifier' accept-charset='UTF-8'><button type='submit'>" . _("Continue to RADIUS/EAP profile definition") . "</button></form>"; |
|
164 | + echo "<br/><form method='post' action='edit_profile.php?inst_id=$my_inst->identifier' accept-charset='UTF-8'><button type='submit'>"._("Continue to RADIUS/EAP profile definition")."</button></form>"; |
|
165 | 165 | } |
166 | 166 | } |
167 | - echo "<br/><form method='post' action='overview_user.php?inst_id=$my_inst->identifier' accept-charset='UTF-8'><button type='submit'>" . _("Continue to dashboard") . "</button></form>"; |
|
167 | + echo "<br/><form method='post' action='overview_user.php?inst_id=$my_inst->identifier' accept-charset='UTF-8'><button type='submit'>"._("Continue to dashboard")."</button></form>"; |
|
168 | 168 | |
169 | 169 | break; |
170 | 170 | default: |
@@ -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 | $auth = new \web\lib\admin\Authentication(); |
25 | 25 | $deco = new \web\lib\admin\PageDecoration(); |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | echo $deco->pageheader(sprintf(_("%s: Edit Profile - Result"), \config\Master::APPEARANCE['productname']), "ADMIN-IDP"); |
53 | 53 | } else { |
54 | 54 | $profile = $my_inst->newProfile(core\AbstractProfile::PROFILETYPE_RADIUS); |
55 | - $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP " . $my_inst->identifier . " - Profile created"); |
|
55 | + $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP ".$my_inst->identifier." - Profile created"); |
|
56 | 56 | echo $deco->pageheader(sprintf(_("%s: Profile wizard (step 3 completed)"), \config\Master::APPEARANCE['productname']), "ADMIN-IDP"); |
57 | 57 | } |
58 | 58 | if (!$profile instanceof \core\ProfileRADIUS) { |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | $uiElements = new web\lib\admin\UIElements(); |
114 | 114 | // set realm info, if submitted |
115 | 115 | if ($realm !== FALSE) { |
116 | - $profile->setRealm($anonLocal . "@" . $realm); |
|
116 | + $profile->setRealm($anonLocal."@".$realm); |
|
117 | 117 | echo $uiElements->boxOkay(sprintf(_("Realm: <strong>%s</strong>"), $realm)); |
118 | 118 | } else { |
119 | 119 | $profile->setRealm(""); |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | echo $uiElements->boxError(_("Realm check username cannot be configured: realm is missing!")); |
137 | 137 | } else { |
138 | 138 | $profile->setRealmcheckUser(true, $checkuser_name); |
139 | - echo $uiElements->boxOkay(sprintf(_("Special username for realm check is <strong>%s</strong>, the value is <strong>%s</strong>"), _("ON"), $checkuser_name . "@" . $realm)); |
|
139 | + echo $uiElements->boxOkay(sprintf(_("Special username for realm check is <strong>%s</strong>, the value is <strong>%s</strong>"), _("ON"), $checkuser_name."@".$realm)); |
|
140 | 140 | } |
141 | 141 | } else { |
142 | 142 | $profile->setRealmCheckUser(false); |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | } else { |
150 | 150 | $profile->setInputVerificationPreference($verify, $hint); |
151 | 151 | if ($hint !== FALSE) { |
152 | - $extratext = " " . sprintf(_("and the input field will be prefilled with '<strong>@%s</strong>'."), $realm); |
|
152 | + $extratext = " ".sprintf(_("and the input field will be prefilled with '<strong>@%s</strong>'."), $realm); |
|
153 | 153 | } else { |
154 | 154 | $extratext = "."; |
155 | 155 | } |
@@ -186,17 +186,17 @@ discard block |
||
186 | 186 | echo $uiElements->boxOkay(_("Redirection is <strong>OFF</strong>")); |
187 | 187 | } |
188 | 188 | |
189 | - $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile " . $profile->identifier . " - attributes changed"); |
|
189 | + $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile ".$profile->identifier." - attributes changed"); |
|
190 | 190 | |
191 | 191 | foreach (\core\common\EAP::listKnownEAPTypes() as $a) { |
192 | 192 | if ($a->getIntegerRep() == \core\common\EAP::INTEGER_SILVERBULLET) { // do not allow adding silverbullet via the backdoor |
193 | 193 | continue; |
194 | 194 | } |
195 | - if (isset($_POST[$a->getPrintableRep()]) && isset($_POST[$a->getPrintableRep() . "-priority"]) && is_numeric($_POST[$a->getPrintableRep() . "-priority"])) { |
|
196 | - $priority = (int) $_POST[$a->getPrintableRep() . "-priority"]; |
|
195 | + if (isset($_POST[$a->getPrintableRep()]) && isset($_POST[$a->getPrintableRep()."-priority"]) && is_numeric($_POST[$a->getPrintableRep()."-priority"])) { |
|
196 | + $priority = (int) $_POST[$a->getPrintableRep()."-priority"]; |
|
197 | 197 | // add EAP type to profile as requested, but ... |
198 | 198 | $profile->addSupportedEapMethod($a, $priority); |
199 | - $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile " . $profile->identifier . " - supported EAP types changed"); |
|
199 | + $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile ".$profile->identifier." - supported EAP types changed"); |
|
200 | 200 | } |
201 | 201 | } |
202 | 202 | // re-instantiate $profile, we need to do completion checks and need fresh data for isEapTypeDefinitionComplete() |
@@ -205,23 +205,23 @@ discard block |
||
205 | 205 | if (count($significantChanges) > 0) { |
206 | 206 | $myInstOriginal = new \core\IdP($profile->institution); |
207 | 207 | // send a notification/alert mail to someone we know is in charge |
208 | - $text = _("To whom it may concern,") . "\n\n"; |
|
208 | + $text = _("To whom it may concern,")."\n\n"; |
|
209 | 209 | /// were made to the *Identity Provider* *LU* / integer number of IdP / (previously known as) Name |
210 | - $text .= sprintf(_("significant changes were made to a RADIUS deployment profile of the %s %s / %s / '%s'."), $ui->nomenclatureInst, strtoupper($myInstOriginal->federation), $myInstOriginal->identifier, $myInstOriginal->name) . "\n\n"; |
|
210 | + $text .= sprintf(_("significant changes were made to a RADIUS deployment profile of the %s %s / %s / '%s'."), $ui->nomenclatureInst, strtoupper($myInstOriginal->federation), $myInstOriginal->identifier, $myInstOriginal->name)."\n\n"; |
|
211 | 211 | if (isset($significantChanges[\core\AbstractProfile::CA_CLASH_ADDED])) { |
212 | - $text .= _("WARNING! A new trusted root CA was added, and it has the exact same name as a previously existing root CA. This may (but does not necessarily) mean that this is an attempt to insert an unauthorised trust root by disguising as the genuine one. The details are below:") . "\n\n"; |
|
213 | - $text .= $significantChanges[\core\AbstractProfile::CA_CLASH_ADDED] . "\n\n"; |
|
212 | + $text .= _("WARNING! A new trusted root CA was added, and it has the exact same name as a previously existing root CA. This may (but does not necessarily) mean that this is an attempt to insert an unauthorised trust root by disguising as the genuine one. The details are below:")."\n\n"; |
|
213 | + $text .= $significantChanges[\core\AbstractProfile::CA_CLASH_ADDED]."\n\n"; |
|
214 | 214 | } |
215 | 215 | if (isset($significantChanges[\core\AbstractProfile::CA_ADDED])) { |
216 | 216 | $text .= _("A new trusted root CA was added. The details are below:\n\n"); |
217 | - $text .= $significantChanges[\core\AbstractProfile::CA_ADDED] . "\n\n"; |
|
217 | + $text .= $significantChanges[\core\AbstractProfile::CA_ADDED]."\n\n"; |
|
218 | 218 | } |
219 | 219 | if (isset($significantChanges[\core\AbstractProfile::SERVERNAME_ADDED])) { |
220 | - $text .= _("A new acceptable server name for the authentication server was added. The details are below:") . "\n\n"; |
|
221 | - $text .= $significantChanges[\core\AbstractProfile::SERVERNAME_ADDED] . "\n\n"; |
|
220 | + $text .= _("A new acceptable server name for the authentication server was added. The details are below:")."\n\n"; |
|
221 | + $text .= $significantChanges[\core\AbstractProfile::SERVERNAME_ADDED]."\n\n"; |
|
222 | 222 | } |
223 | - $text .= _("This mail is merely a cross-check because these changes can be security-relevant. If the change was expected, you do not need to take any action.") . "\n\n"; |
|
224 | - $text .= _("Greetings, ") . "\n\n" . \config\Master::APPEARANCE['productname_long']; |
|
223 | + $text .= _("This mail is merely a cross-check because these changes can be security-relevant. If the change was expected, you do not need to take any action.")."\n\n"; |
|
224 | + $text .= _("Greetings, ")."\n\n".\config\Master::APPEARANCE['productname_long']; |
|
225 | 225 | // (currently, send hard-wired to NRO - future: for linked insts, check eduroam DBv2 and send to registered admins directly) |
226 | 226 | $fed = new core\Federation($myInstOriginal->federation); |
227 | 227 | foreach ($fed->listFederationAdmins() as $id) { |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | // see if we can enable the EAP type, or if info is missing |
234 | 234 | $eapcompleteness = $reloadedProfile->isEapTypeDefinitionComplete($oneEap); |
235 | 235 | if ($eapcompleteness === true) { |
236 | - echo $uiElements->boxOkay(_("Supported EAP Type: ") . "<strong>" . $oneEap->getPrintableRep() . "</strong>"); |
|
236 | + echo $uiElements->boxOkay(_("Supported EAP Type: ")."<strong>".$oneEap->getPrintableRep()."</strong>"); |
|
237 | 237 | } else { |
238 | 238 | |
239 | 239 | if (is_array($eapcompleteness)) { |
@@ -242,11 +242,11 @@ discard block |
||
242 | 242 | $warntext = "<strong>"; |
243 | 243 | foreach ($eapcompleteness as $item) { |
244 | 244 | $iterator = $iterator + 1; |
245 | - $warntext .= $uiElements->displayName($item) . "</strong>".($iterator < $number ? ", " : "")."<strong>"; |
|
245 | + $warntext .= $uiElements->displayName($item)."</strong>".($iterator < $number ? ", " : "")."<strong>"; |
|
246 | 246 | } |
247 | 247 | $warntext .= "</strong>"; |
248 | 248 | } |
249 | - echo $uiElements->boxWarning(sprintf(_("Supported EAP Type <strong>%s</strong> is missing required information: %s !"), $oneEap->getPrintableRep(), $warntext) . "<br/>" . _("The EAP type was added to the profile, but you need to complete the missing information before we can produce installers for you.")); |
|
249 | + echo $uiElements->boxWarning(sprintf(_("Supported EAP Type <strong>%s</strong> is missing required information: %s !"), $oneEap->getPrintableRep(), $warntext)."<br/>"._("The EAP type was added to the profile, but you need to complete the missing information before we can produce installers for you.")); |
|
250 | 250 | } |
251 | 251 | } |
252 | 252 | $reloadedProfile->prepShowtime(); |
@@ -259,7 +259,7 @@ discard block |
||
259 | 259 | <?php |
260 | 260 | if (count($reloadedProfile->getEapMethodsinOrderOfPreference(1)) > 0) { |
261 | 261 | echo "<form method='post' action='overview_installers.php?inst_id=$my_inst->identifier&profile_id=$reloadedProfile->identifier' accept-charset='UTF-8'> |
262 | - <button type='submit'>" . _("Continue to Installer Fine-Tuning and Download") . "</button> |
|
262 | + <button type='submit'>"._("Continue to Installer Fine-Tuning and Download")."</button> |
|
263 | 263 | </form>"; |
264 | 264 | } |
265 | 265 | echo $deco->footer(); |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | */ |
27 | 27 | ?> |
28 | 28 | <?php |
29 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
29 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
30 | 30 | |
31 | 31 | $deco = new \web\lib\admin\PageDecoration(); |
32 | 32 | $validator = new \web\lib\common\InputValidation(); |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | } else { |
39 | 39 | $link = 'http://'; |
40 | 40 | } |
41 | -$link .= $_SERVER['SERVER_NAME'] . $_SERVER['SCRIPT_NAME']; |
|
41 | +$link .= $_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME']; |
|
42 | 42 | $link = htmlspecialchars($link); |
43 | 43 | |
44 | 44 | echo $deco->defaultPagePrelude(sprintf(_("%s: %s Dashboard"), \config\Master::APPEARANCE['productname'], $uiElements->nomenclatureHotspot)); |
@@ -99,21 +99,21 @@ discard block |
||
99 | 99 | <?php |
100 | 100 | if (\config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS'] !== NULL) { |
101 | 101 | echo "<tr> |
102 | - <td>" . _("Check another realm's reachability") . "</td> |
|
102 | + <td>" . _("Check another realm's reachability")."</td> |
|
103 | 103 | <td><form method='post' action='../diag/action_realmcheck.php?inst_id=$my_inst->identifier' accept-charset='UTF-8'> |
104 | 104 | <!--<input type='text' name='realm' id='realm'>--> |
105 | 105 | <input type='hidden' name='comefrom' id='comefrom' value='$link'/> |
106 | - <button id='realmcheck' style='cursor:pointer;' type='submit'>" . _("Go!") . "</button> |
|
106 | + <button id='realmcheck' style='cursor:pointer;' type='submit'>"._("Go!")."</button> |
|
107 | 107 | </form> |
108 | 108 | </td> |
109 | 109 | </tr>"; |
110 | 110 | } |
111 | 111 | if (\config\ConfAssistant::CONSORTIUM['name'] == "eduroam") { // SW: APPROVED |
112 | 112 | echo "<tr> |
113 | - <td>" . sprintf(_("Check %s server status"), $uiElements->nomenclatureFed) . "</td> |
|
113 | + <td>" . sprintf(_("Check %s server status"), $uiElements->nomenclatureFed)."</td> |
|
114 | 114 | <td> |
115 | 115 | <form action='https://monitor.eduroam.org/mon_direct.php' accept-charset='UTF-8'> |
116 | - <button style='cursor:pointer;' type='submit'>" . _("Go!") . "</button> |
|
116 | + <button style='cursor:pointer;' type='submit'>" . _("Go!")."</button> |
|
117 | 117 | </form> |
118 | 118 | </td> |
119 | 119 | </tr>"; |
@@ -124,10 +124,10 @@ discard block |
||
124 | 124 | <?php |
125 | 125 | $hotspotProfiles = $my_inst->listDeployments(); |
126 | 126 | if (count($hotspotProfiles) == 0) { // no profiles yet. |
127 | - echo "<h2>" . sprintf(_("There are not yet any known deployments for your %s."), $uiElements->nomenclatureHotspot) . "</h2>"; |
|
127 | + echo "<h2>".sprintf(_("There are not yet any known deployments for your %s."), $uiElements->nomenclatureHotspot)."</h2>"; |
|
128 | 128 | } |
129 | 129 | if (count($hotspotProfiles) > 0) { // no profiles yet. |
130 | - echo "<h2>" . sprintf(_("Deployments for this %s"), $uiElements->nomenclatureHotspot) . "</h2>"; |
|
130 | + echo "<h2>".sprintf(_("Deployments for this %s"), $uiElements->nomenclatureHotspot)."</h2>"; |
|
131 | 131 | // display an info box with the connection data |
132 | 132 | } |
133 | 133 | |
@@ -146,19 +146,19 @@ discard block |
||
146 | 146 | ?> |
147 | 147 | <div style='display: table-row; margin-bottom: 20px;'> |
148 | 148 | <div class='profilebox' style='display: table-cell;'> |
149 | - <h2><?php echo core\DeploymentManaged::PRODUCTNAME . " (<span style='color:" . ( $deploymentObject->status == \core\AbstractDeployment::INACTIVE ? "red;'>" . _("inactive") : "green;'>" . _("active") ) . "</span>)"; ?></h2> |
|
149 | + <h2><?php echo core\DeploymentManaged::PRODUCTNAME." (<span style='color:".($deploymentObject->status == \core\AbstractDeployment::INACTIVE ? "red;'>"._("inactive") : "green;'>"._("active"))."</span>)"; ?></h2> |
|
150 | 150 | <table> |
151 | 151 | <tr> |
152 | 152 | <td><strong><?php echo _("Your primary RADIUS server") ?></strong><br/> |
153 | 153 | <?php |
154 | 154 | if ($deploymentObject->host1_v4 !== NULL) { |
155 | - echo _("IPv4") . ": " . $deploymentObject->host1_v4; |
|
155 | + echo _("IPv4").": ".$deploymentObject->host1_v4; |
|
156 | 156 | } |
157 | 157 | if ($deploymentObject->host1_v4 !== NULL && $deploymentObject->host1_v6 !== NULL) { |
158 | 158 | echo "<br/>"; |
159 | 159 | } |
160 | 160 | if ($deploymentObject->host1_v6 !== NULL) { |
161 | - echo _("IPv6") . ": " . $deploymentObject->host1_v6; |
|
161 | + echo _("IPv6").": ".$deploymentObject->host1_v6; |
|
162 | 162 | } |
163 | 163 | ?> |
164 | 164 | </td> |
@@ -166,9 +166,9 @@ discard block |
||
166 | 166 | <td><?php echo $deploymentObject->port1; ?></td> |
167 | 167 | <td> |
168 | 168 | <?php |
169 | - echo "<img src='" . $radiusMessages[$deploymentObject->radius_status_1]['icon'] . |
|
170 | - "' alt='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] . |
|
171 | - "' title='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] . "'>"; |
|
169 | + echo "<img src='".$radiusMessages[$deploymentObject->radius_status_1]['icon']. |
|
170 | + "' alt='".$radiusMessages[$deploymentObject->radius_status_1]['text']. |
|
171 | + "' title='".$radiusMessages[$deploymentObject->radius_status_1]['text']."'>"; |
|
172 | 172 | ?> |
173 | 173 | </td> |
174 | 174 | </tr> |
@@ -176,22 +176,22 @@ discard block |
||
176 | 176 | <td><strong><?php echo _("Your backup RADIUS server") ?><br/></strong> |
177 | 177 | <?php |
178 | 178 | if ($deploymentObject->host2_v4 !== NULL) { |
179 | - echo _("IPv4") . ": " . $deploymentObject->host2_v4; |
|
179 | + echo _("IPv4").": ".$deploymentObject->host2_v4; |
|
180 | 180 | } |
181 | 181 | if ($deploymentObject->host2_v4 !== NULL && $deploymentObject->host2_v6 !== NULL) { |
182 | 182 | echo "<br/>"; |
183 | 183 | } |
184 | 184 | if ($deploymentObject->host2_v6 !== NULL) { |
185 | - echo _("IPv6") . ": " . $deploymentObject->host2_v6; |
|
185 | + echo _("IPv6").": ".$deploymentObject->host2_v6; |
|
186 | 186 | } |
187 | 187 | ?></td> |
188 | 188 | <td><?php echo _("RADIUS port number: ") ?></td> |
189 | 189 | <td><?php echo $deploymentObject->port2; ?></td> |
190 | 190 | <td> |
191 | 191 | <?php |
192 | - echo "<img src='" . $radiusMessages[$deploymentObject->radius_status_2]['icon'] . |
|
193 | - "' alt='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] . |
|
194 | - "' title='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] . "'>"; |
|
192 | + echo "<img src='".$radiusMessages[$deploymentObject->radius_status_2]['icon']. |
|
193 | + "' alt='".$radiusMessages[$deploymentObject->radius_status_2]['text']. |
|
194 | + "' title='".$radiusMessages[$deploymentObject->radius_status_2]['text']."'>"; |
|
195 | 195 | ?> |
196 | 196 | </td> |
197 | 197 | </tr> |
@@ -242,12 +242,12 @@ discard block |
||
242 | 242 | if (isset($res['FAILURE']) && $res['FAILURE'] > 0) { |
243 | 243 | echo '<br>'; |
244 | 244 | if ($res['FAILURE'] == 2) { |
245 | - echo ' <span style="color: red;">' . _("Activation failure.") . '</span>'; |
|
245 | + echo ' <span style="color: red;">'._("Activation failure.").'</span>'; |
|
246 | 246 | } else { |
247 | 247 | if (isset($_GET['res'][1]) && $_GET['res']['1'] == 'FAILURE') { |
248 | - echo ' <span style="color: red;">' . _("Activation failure for your primary RADIUS server.") . '</span>'; |
|
248 | + echo ' <span style="color: red;">'._("Activation failure for your primary RADIUS server.").'</span>'; |
|
249 | 249 | } else { |
250 | - echo ' <span style="color: red;">' . _("Activation failure for your backup RADIUS server.") . '</span>'; |
|
250 | + echo ' <span style="color: red;">'._("Activation failure for your backup RADIUS server.").'</span>'; |
|
251 | 251 | } |
252 | 252 | } |
253 | 253 | } |
@@ -267,12 +267,12 @@ discard block |
||
267 | 267 | if ($res['FAILURE'] > 0) { |
268 | 268 | echo '<br>'; |
269 | 269 | if ($res['FAILURE'] == 2) { |
270 | - echo ' <span style="color: red;">' . _("Failure during deactivation, your request is queued for handling") . '</span>'; |
|
270 | + echo ' <span style="color: red;">'._("Failure during deactivation, your request is queued for handling").'</span>'; |
|
271 | 271 | } else { |
272 | 272 | if (isset($_GET['res'][1]) && $_GET['res']['1'] == 'FAILURE') { |
273 | - echo ' <span style="color: red;">' . _("Deactivation failure for your primary RADIUS server, your request is queued.") . '</span>'; |
|
273 | + echo ' <span style="color: red;">'._("Deactivation failure for your primary RADIUS server, your request is queued.").'</span>'; |
|
274 | 274 | } else { |
275 | - echo ' <span style="color: red;">' . _("Deactivation failure for your backup RADIUS server, your request is queued.") . '</span>'; |
|
275 | + echo ' <span style="color: red;">'._("Deactivation failure for your backup RADIUS server, your request is queued.").'</span>'; |
|
276 | 276 | } |
277 | 277 | } |
278 | 278 | } |
@@ -112,8 +112,8 @@ discard block |
||
112 | 112 | 'authorityinfoaccess' => _("authorityInfoAccess"), |
113 | 113 | 'subjectaltname' => _("SubjectAltName"), |
114 | 114 | ]; |
115 | - $jsondir = dirname(dirname(dirname(__FILE__))) . "/var/json_cache"; |
|
116 | - if ($token && is_dir($jsondir . '/' . $token)) { |
|
115 | + $jsondir = dirname(dirname(dirname(__FILE__)))."/var/json_cache"; |
|
116 | + if ($token && is_dir($jsondir.'/'.$token)) { |
|
117 | 117 | foreach (['realm', 'udp', 'clients', 'capath'] as $test_type) { |
118 | 118 | foreach (glob("$jsondir/$token/$test_type*") as $filename) { |
119 | 119 | $this->loggerInstance->debug(4, "\nIS_DIR $filename\n"); |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | $this->rfc7585suite = unserialize($this->allReachabilityResults['realm'][0]->rfc7585suite); |
132 | 132 | $this->srv = $this->allReachabilityResults['realm'][0]->srv; |
133 | 133 | $this->naptr = $this->allReachabilityResults['realm'][0]->naptr; |
134 | - $this->naptrValid= $this->allReachabilityResults['realm'][0]->naptr_valid; |
|
134 | + $this->naptrValid = $this->allReachabilityResults['realm'][0]->naptr_valid; |
|
135 | 135 | $this->hosts = $this->allReachabilityResults['realm'][0]->hosts; |
136 | 136 | $this->testSuite = unserialize($this->allReachabilityResults['realm'][0]->testsuite); |
137 | 137 | } |
@@ -191,9 +191,9 @@ discard block |
||
191 | 191 | } |
192 | 192 | } |
193 | 193 | |
194 | - public function isDynamic () |
|
194 | + public function isDynamic() |
|
195 | 195 | { |
196 | - if ($this->naptr> 0) { |
|
196 | + if ($this->naptr > 0) { |
|
197 | 197 | return TRUE; |
198 | 198 | } |
199 | 199 | return FALSE; |
@@ -203,17 +203,17 @@ discard block |
||
203 | 203 | * |
204 | 204 | * |
205 | 205 | */ |
206 | - public function printOverview () |
|
206 | + public function printOverview() |
|
207 | 207 | { |
208 | 208 | $out = []; |
209 | 209 | $out[] = "<fieldset class='option_container'> |
210 | 210 | <legend> |
211 | - <strong>" . _("Overview") . '</strong> |
|
211 | + <strong>" . _("Overview").'</strong> |
|
212 | 212 | </legend>'; |
213 | - $out[] = "<strong>" . _("DNS chekcs") . "</strong><div>"; |
|
213 | + $out[] = "<strong>"._("DNS chekcs")."</strong><div>"; |
|
214 | 214 | if ($this->naptr != \core\diag\RADIUSTests::RETVAL_NOTCONFIGURED) { |
215 | 215 | $out[] = "<table>"; |
216 | - $out[] = "<tr><td>" . _("Checking NAPTR existence:") . "</td><td>"; |
|
216 | + $out[] = "<tr><td>"._("Checking NAPTR existence:")."</td><td>"; |
|
217 | 217 | switch ($this->naptr) { |
218 | 218 | case \core\diag\RFC7585Tests::RETVAL_NONAPTR: |
219 | 219 | $out[] = _("This realm has no NAPTR records."); |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | //print '<pre>'; print_r($out); print '</pre>'; exit; |
229 | 229 | // compliance checks for NAPTRs |
230 | 230 | if ($this->naptr > 0) { |
231 | - $out[] = "<tr><td>" . _("Checking NAPTR compliance (flag = S and regex = {empty}):") . "</td><td>"; |
|
231 | + $out[] = "<tr><td>"._("Checking NAPTR compliance (flag = S and regex = {empty}):")."</td><td>"; |
|
232 | 232 | switch ($this->naptrValid) { |
233 | 233 | case \core\diag\RADIUSTests::RETVAL_OK: |
234 | 234 | $out[] = "No issues found."; |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | } |
242 | 242 | // SRV resolution |
243 | 243 | if ($this->naptr > 0 && $this->naptrValid == \core\diag\RADIUSTests::RETVAL_OK) { |
244 | - $out[] = "<tr><td>" . _("Checking SRVs:") . "</td><td>"; |
|
244 | + $out[] = "<tr><td>"._("Checking SRVs:")."</td><td>"; |
|
245 | 245 | switch ($this->srv) { |
246 | 246 | case \core\diag\RADIUSTests::RETVAL_SKIPPED: |
247 | 247 | $out[] = _("This check was skipped."); |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | } |
257 | 257 | // IP addresses for the hosts |
258 | 258 | if ($this->naptr > 0 && $this->naptrValid == \core\diag\RADIUSTests::RETVAL_OK && $this->srv > 0) { |
259 | - $out[] = "<tr><td>" . _("Checking IP address resolution:") . "</td><td>"; |
|
259 | + $out[] = "<tr><td>"._("Checking IP address resolution:")."</td><td>"; |
|
260 | 260 | switch ($this->srv) { |
261 | 261 | case \core\diag\RADIUSTests::RETVAL_SKIPPED: |
262 | 262 | $out[] = _("This check was skipped."); |
@@ -275,28 +275,28 @@ discard block |
||
275 | 275 | if (count($this->testSuite->listerrors()) == 0) { |
276 | 276 | $out[] = _("with no DNS errors encountered. Congratulations!"); |
277 | 277 | } else { |
278 | - $out[] = _("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."); |
|
278 | + $out[] = _("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."); |
|
279 | 279 | $out[] = "<div class='notacceptable'><table>"; |
280 | 280 | foreach ($this->testSuite->listerrors() as $details) { |
281 | - $out[] = "<tr><td>" . $details['TYPE'] . "</td><td>" . $details['TARGET'] . "</td></tr>"; |
|
281 | + $out[] = "<tr><td>".$details['TYPE']."</td><td>".$details['TARGET']."</td></tr>"; |
|
282 | 282 | } |
283 | 283 | $out[] = "</table></div>"; |
284 | 284 | } |
285 | 285 | $out[] = '</div>'; |
286 | 286 | } else { |
287 | - $out[] = "<tr><td>" . _("Dynamic discovery test is not configured") . "</td><td>"; |
|
287 | + $out[] = "<tr><td>"._("Dynamic discovery test is not configured")."</td><td>"; |
|
288 | 288 | } |
289 | - $out[] = "<hr><strong>" . _("Static connectivity tests") . "</strong> |
|
289 | + $out[] = "<hr><strong>"._("Static connectivity tests")."</strong> |
|
290 | 290 | <table><tr> |
291 | 291 | <td class='icon_td'>"; |
292 | - $out[] = "<img src='" . $this->stateIcons[$this->globalLevelStatic] . "' id='main_static_ico' class='icon'></td><td id='main_static_result'>" . |
|
293 | - $this->globalInfo[$this->globalLevelStatic] . ' ' . _("See the appropriate tab for details.") . '</td> |
|
292 | + $out[] = "<img src='".$this->stateIcons[$this->globalLevelStatic]."' id='main_static_ico' class='icon'></td><td id='main_static_result'>". |
|
293 | + $this->globalInfo[$this->globalLevelStatic].' '._("See the appropriate tab for details.").'</td> |
|
294 | 294 | </tr></table>'; |
295 | 295 | if ($this->naptr > 0) { |
296 | - $out[] = "<hr><strong>" . _("Dynamic connectivity tests") . "</strong> |
|
296 | + $out[] = "<hr><strong>"._("Dynamic connectivity tests")."</strong> |
|
297 | 297 | <table><tr> |
298 | - <td class='icon_td'><img src='" . $this->stateIcons[$this->globalLevelDynamic] . "' id='main_dynamic_ico' class='icon'></td><td id='main_dynamic_result'>" . |
|
299 | - $this->globalInfo[$this->globalLevelDynamic] . ' ' . _("See the appropriate tab for details.") . '</td></tr></table>'; |
|
298 | + <td class='icon_td'><img src='" . $this->stateIcons[$this->globalLevelDynamic]."' id='main_dynamic_ico' class='icon'></td><td id='main_dynamic_result'>". |
|
299 | + $this->globalInfo[$this->globalLevelDynamic].' '._("See the appropriate tab for details.").'</td></tr></table>'; |
|
300 | 300 | } |
301 | 301 | $out[] = '</fieldset>'; |
302 | 302 | //print '<pre>'; print_r($out); print '</pre>'; exit; |
@@ -317,27 +317,27 @@ discard block |
||
317 | 317 | $result = $udp->result[0]; |
318 | 318 | //print '<pre>'; print_r($result); print '</pre>'; |
319 | 319 | $out[] = '<hr>'; |
320 | - $out[] = '<strong>' . sprintf(_("Testing from: %s"), \config\Diagnostics::RADIUSTESTS['UDP-hosts'][$hostindex]['display_name']) . '</strong>'; |
|
320 | + $out[] = '<strong>'.sprintf(_("Testing from: %s"), \config\Diagnostics::RADIUSTESTS['UDP-hosts'][$hostindex]['display_name']).'</strong>'; |
|
321 | 321 | $out[] = "<table id='results$hostindex' style='width:100%' class='udp_results'> |
322 | 322 | <tr> |
323 | -<td class='icon_td'><img src='" . $this->stateIcons[$result->level] . "' id='src" . $hostindex . "_img'></td> |
|
323 | +<td class='icon_td'><img src='".$this->stateIcons[$result->level]."' id='src".$hostindex."_img'></td> |
|
324 | 324 | <td id='src$hostindex' colspan=2> |
325 | 325 | "; |
326 | - $out[] = '<strong>' . ($result->server? $result->server : _("Connected to undetermined server")) . '</strong><br/>' . sprintf (_("elapsed time: %sms."), $result->time_millisec) . '<p>' . $result->message . '</p>'; |
|
326 | + $out[] = '<strong>'.($result->server ? $result->server : _("Connected to undetermined server")).'</strong><br/>'.sprintf(_("elapsed time: %sms."), $result->time_millisec).'<p>'.$result->message.'</p>'; |
|
327 | 327 | |
328 | 328 | if ($result->level > \core\common\Entity::L_OK && property_exists($result, 'cert_oddities')) { |
329 | 329 | foreach ($result->cert_oddities as $oddities) { |
330 | - $out[] = '<tr class="results_tr"><td> </td><td class="icon_td"><img src="' . $this->stateIcons[$oddities->level] . '"></td><td>' . $oddities->message . '</td></tr>'; |
|
330 | + $out[] = '<tr class="results_tr"><td> </td><td class="icon_td"><img src="'.$this->stateIcons[$oddities->level].'"></td><td>'.$oddities->message.'</td></tr>'; |
|
331 | 331 | } |
332 | 332 | } |
333 | 333 | $cert_data = ''; |
334 | 334 | foreach ($result->server_cert as $sckey => $sc) { |
335 | 335 | if (array_key_exists($sckey, $this->certFields)) { |
336 | - $cert_data .= '<dt>' . $this->certFields[$sckey] . '</dt><dd>' . $sc . '</dd>'; |
|
336 | + $cert_data .= '<dt>'.$this->certFields[$sckey].'</dt><dd>'.$sc.'</dd>'; |
|
337 | 337 | } |
338 | 338 | } |
339 | 339 | $out[] = "<tr class='server_cert' style='display: "; |
340 | - $out[] = ($result->server_cert? 'table-row' : 'none') . ";'><td> </td><td colspan=2><div><dl class='server_cert_list' style='display: none;'>"; |
|
340 | + $out[] = ($result->server_cert ? 'table-row' : 'none').";'><td> </td><td colspan=2><div><dl class='server_cert_list' style='display: none;'>"; |
|
341 | 341 | $out[] = $cert_data; |
342 | 342 | |
343 | 343 | $ext = ''; |
@@ -345,12 +345,12 @@ discard block |
||
345 | 345 | if ($ext) { |
346 | 346 | $ext .= '<br>'; |
347 | 347 | } |
348 | - $ext .= '<strong>' . $extkey . ': </strong>' . '<i>' . $extval . '</i>'; |
|
348 | + $ext .= '<strong>'.$extkey.': </strong>'.'<i>'.$extval.'</i>'; |
|
349 | 349 | } |
350 | 350 | if ($ext != '') { |
351 | - $out[] = '<dt>' . _('Extensions') . '</dt></dd><dd>' . $ext . '</dd>'; |
|
351 | + $out[] = '<dt>'._('Extensions').'</dt></dd><dd>'.$ext.'</dd>'; |
|
352 | 352 | } |
353 | - $out[] = "</dl><a href='' class='morelink'>" . _("show server certificate details") . "»</a></div></tr>"; |
|
353 | + $out[] = "</dl><a href='' class='morelink'>"._("show server certificate details")."»</a></div></tr>"; |
|
354 | 354 | |
355 | 355 | $out[] = "</td></tr></table>"; |
356 | 356 | } |
@@ -361,7 +361,7 @@ discard block |
||
361 | 361 | private function collectCAPath() |
362 | 362 | { |
363 | 363 | $capathtest = []; |
364 | - $capathtest[] = '<p><strong>' . _("Checking server handshake...") . "</strong><p>"; |
|
364 | + $capathtest[] = '<p><strong>'._("Checking server handshake...")."</strong><p>"; |
|
365 | 365 | foreach ($this->allReachabilityResults['capath'] as $capath) { |
366 | 366 | //print '<pre>'; print_r($capath); print '<pre>'; |
367 | 367 | $hostindex = $capath->hostindex; |
@@ -369,46 +369,46 @@ discard block |
||
369 | 369 | if ($capath->level == \core\common\Entity::L_OK && $capath->result == \core\diag\RADIUSTests::RETVAL_INVALID) { |
370 | 370 | $level = \core\common\Entity::L_WARN; |
371 | 371 | } |
372 | - $capathtest[] = '<p><strong>' . $this->hostMap[$capath->IP] . '</strong>'; |
|
372 | + $capathtest[] = '<p><strong>'.$this->hostMap[$capath->IP].'</strong>'; |
|
373 | 373 | $capathtest[] = '<ul style="list-style-type: none;" class="caresult"><li>'; |
374 | 374 | $capathtest[] = "<table id='caresults$hostindex' style='width:100%'> |
375 | 375 | <tr> |
376 | 376 | <td class='icon_td'><img src='"; |
377 | - $capathtest[] = $this->stateIcons[$level] . "' id='srcca" . $hostindex . "_img'></td> |
|
377 | + $capathtest[] = $this->stateIcons[$level]."' id='srcca".$hostindex."_img'></td> |
|
378 | 378 | <td id='srcca$hostindex'>"; |
379 | 379 | $more = ''; |
380 | 380 | //print '<pre>'; print_r($server_cert); print '</pre>';print $server_cert['title'].'<br>'; |
381 | 381 | if ($capath->certdata && $capath->certdata->subject != '') { |
382 | 382 | $more .= '<div class="more">'; |
383 | - $certdesc = '<br>' . $this->certFields['title'] . '<ul>'; |
|
383 | + $certdesc = '<br>'.$this->certFields['title'].'<ul>'; |
|
384 | 384 | if ($capath->certdata->subject) { |
385 | - $certdesc .= '<li>' . $this->certFields['c_subject'] . ': ' . $capath->certdata->subject; |
|
385 | + $certdesc .= '<li>'.$this->certFields['c_subject'].': '.$capath->certdata->subject; |
|
386 | 386 | } |
387 | 387 | if ($capath->certdata->issuer) { |
388 | - $certdesc .= '<li>' . $this->certFields['c_issuer'] . ': ' . $capath->certdata->issuer; |
|
388 | + $certdesc .= '<li>'.$this->certFields['c_issuer'].': '.$capath->certdata->issuer; |
|
389 | 389 | } |
390 | 390 | if ($capath->certdata->extensions) { |
391 | 391 | if ($capath->certdata->extensions->subjectaltname) { |
392 | - $certdesc .= '<li>' . $this->certFields['subjectaltname'] . ': ' . $capath->certdata->extensions->subjectaltname; |
|
392 | + $certdesc .= '<li>'.$this->certFields['subjectaltname'].': '.$capath->certdata->extensions->subjectaltname; |
|
393 | 393 | } |
394 | 394 | } |
395 | 395 | if ($capath->certdata->extensions->policies) { |
396 | - $certdesc .= '<li>' . $this->certFields['policies'] . ': ' . $capath->certdata->extensions->policies; |
|
396 | + $certdesc .= '<li>'.$this->certFields['policies'].': '.$capath->certdata->extensions->policies; |
|
397 | 397 | } |
398 | 398 | if ($capath->certdata->extensions->crldistributionpoints) { |
399 | - $certdesc .= '<li>' . $this->certFields['crldistributionpoints'] . ': ' . $capath->certdata->extensions->crldistributionpoints; |
|
399 | + $certdesc .= '<li>'.$this->certFields['crldistributionpoints'].': '.$capath->certdata->extensions->crldistributionpoints; |
|
400 | 400 | } |
401 | 401 | if ($capath->certdata->extensions->authorityinfoaccess) { |
402 | - $certdesc .= '<li>' . $this->certFields['authorityinfoaccess'] . ': ' . $capath->certdata->extensions->authorityinfoaccess; |
|
402 | + $certdesc .= '<li>'.$this->certFields['authorityinfoaccess'].': '.$capath->certdata->extensions->authorityinfoaccess; |
|
403 | 403 | } |
404 | 404 | |
405 | 405 | $certdesc .= '</ul>'; |
406 | - $more .= '<span class="morecontent"><span>' . $certdesc . |
|
407 | - '</span> <a href="" class="morelink">' . _("more") . '»</a></span></td></tr>'; |
|
406 | + $more .= '<span class="morecontent"><span>'.$certdesc. |
|
407 | + '</span> <a href="" class="morelink">'._("more").'»</a></span></td></tr>'; |
|
408 | 408 | } else { |
409 | 409 | $certdesc = '<br>'; |
410 | 410 | } |
411 | - $capathtest[] = '<div>' . ($capath->message!=''? $capath->message : _('Test failed')) . '</div>' . $more; |
|
411 | + $capathtest[] = '<div>'.($capath->message != '' ? $capath->message : _('Test failed')).'</div>'.$more; |
|
412 | 412 | $capathtest[] = '</td> |
413 | 413 | </tr> |
414 | 414 | </table>'; |
@@ -423,7 +423,7 @@ discard block |
||
423 | 423 | foreach ($this->allReachabilityResults['clients'] as $clients) { |
424 | 424 | //print '<pre>'; print_r($clients); print '</pre>'; |
425 | 425 | $hostindex = $clients->hostindex; |
426 | - $clientstest[] = '<p><strong>' . $this->hostMap[$clients->IP] . '</strong></p>'; |
|
426 | + $clientstest[] = '<p><strong>'.$this->hostMap[$clients->IP].'</strong></p>'; |
|
427 | 427 | $clientstest[] = "<span id='clientresults$hostindex'>"; |
428 | 428 | $clientstest[] = '<p></p>'; |
429 | 429 | if ($this->globalLevelDynamic != \core\common\Entity::L_ERROR) { |
@@ -433,9 +433,9 @@ discard block |
||
433 | 433 | //print '<pre>'; print_r($ca); print '</pre>'; |
434 | 434 | $srefused = 0; |
435 | 435 | $cliinfo = ''; |
436 | - $cliinfo .= '<li>' . _('Client certificate') . ' <b>' . $ca->clientcertinfo->from . |
|
437 | - '</b>' . ', ' . $ca->clientcertinfo->message . |
|
438 | - '<br> (CA: ' . $ca->clientcertinfo->issuer . ')<ul>'; |
|
436 | + $cliinfo .= '<li>'._('Client certificate').' <b>'.$ca->clientcertinfo->from. |
|
437 | + '</b>'.', '.$ca->clientcertinfo->message. |
|
438 | + '<br> (CA: '.$ca->clientcertinfo->issuer.')<ul>'; |
|
439 | 439 | foreach ($ca->certificate as $certificate) { |
440 | 440 | if ($certificate->returncode == \core\diag\RADIUSTests::RETVAL_CONNECTION_REFUSED) { |
441 | 441 | $srefused = 1; |
@@ -443,8 +443,8 @@ discard block |
||
443 | 443 | } |
444 | 444 | if ($srefused == 0) { |
445 | 445 | foreach ($ca->certificate as $certificate) { |
446 | - $cliinfo .= '<li><i>' . $certificate->message . |
|
447 | - ', ' . _("expected result: ") . $this->states[$certificate->expected] . '</i>'; |
|
446 | + $cliinfo .= '<li><i>'.$certificate->message. |
|
447 | + ', '._("expected result: ").$this->states[$certificate->expected].'</i>'; |
|
448 | 448 | $cliinfo .= '<ul style="list-style-type: none;">'; |
449 | 449 | $level = $certificate->returncode; |
450 | 450 | if ($level < 0) { |
@@ -456,11 +456,11 @@ discard block |
||
456 | 456 | $state = _("Server accepted this client certificate"); |
457 | 457 | } else { |
458 | 458 | if (property_exists($certificate, 'reason') && $certificate->reason == \core\diag\RADIUSTests::CERTPROB_UNKNOWN_CA) { |
459 | - $add = '<br>' . _('You should update your list of accredited CAs') . |
|
460 | - ' <a href=\"' . \config\Diagnostics::RADIUSTESTS['accreditedCAsURL'] . '\">' . |
|
461 | - _('Get it from here.') . '</a>'; |
|
459 | + $add = '<br>'._('You should update your list of accredited CAs'). |
|
460 | + ' <a href=\"'.\config\Diagnostics::RADIUSTESTS['accreditedCAsURL'].'\">'. |
|
461 | + _('Get it from here.').'</a>'; |
|
462 | 462 | } |
463 | - $state = _('Server did not accept this client certificate - reason') . ': ' . |
|
463 | + $state = _('Server did not accept this client certificate - reason').': '. |
|
464 | 464 | $certificate->resultcomment; |
465 | 465 | } |
466 | 466 | } else { |
@@ -469,14 +469,14 @@ discard block |
||
469 | 469 | $state = _('Server accepted this client certificate, but should not have'); |
470 | 470 | } else { |
471 | 471 | $level = \core\common\Entity::L_OK; |
472 | - $state = _('Server did not accept this client certificate') . ': ' . $certificate->resultcomment; |
|
472 | + $state = _('Server did not accept this client certificate').': '.$certificate->resultcomment; |
|
473 | 473 | } |
474 | 474 | } |
475 | - $cliinfo .= '<li><table><tbody><tr><td class="icon_td"><img class="icon" src="' . $this->stateIcons[$level] . '" style="width: 24px;"></td><td>' . $state; |
|
476 | - $cliinfo .= ' (' . sprintf(_('elapsed time: %sms.'), $certificate->time_millisec) . ' ) ' . $add . '</td></tr>'; |
|
475 | + $cliinfo .= '<li><table><tbody><tr><td class="icon_td"><img class="icon" src="'.$this->stateIcons[$level].'" style="width: 24px;"></td><td>'.$state; |
|
476 | + $cliinfo .= ' ('.sprintf(_('elapsed time: %sms.'), $certificate->time_millisec).' ) '.$add.'</td></tr>'; |
|
477 | 477 | $cliinfo .= '</tbody></table></ul></li>'; |
478 | 478 | if (property_exists($certificate, 'finalerror') && $certificate->finalerror == 1) { |
479 | - $cliinfo = '<li>' . _('Rest of tests for this CA skipped') . '</li>'; |
|
479 | + $cliinfo = '<li>'._('Rest of tests for this CA skipped').'</li>'; |
|
480 | 480 | } |
481 | 481 | } |
482 | 482 | $cliinfo .= '</ul>'; |
@@ -484,7 +484,7 @@ discard block |
||
484 | 484 | |
485 | 485 | if ($srefused > 0) { |
486 | 486 | $cliinfo = _('Connection refused'); |
487 | - $clientstest[] = "<table><tr><td class='icon_td' id='srcclient" . $hostindex . "_img'><img src='" . $this->stateIcons[\core\common\Entity::L_ERROR] . "'></td>" . |
|
487 | + $clientstest[] = "<table><tr><td class='icon_td' id='srcclient".$hostindex."_img'><img src='".$this->stateIcons[\core\common\Entity::L_ERROR]."'></td>". |
|
488 | 488 | "<td id='srcclient$hostindex'><p>$cliinfo</p></td></tr></table>"; |
489 | 489 | } else { |
490 | 490 | $clientstest[] = "<p>$cliinfo</p>"; |
@@ -492,9 +492,9 @@ discard block |
||
492 | 492 | } |
493 | 493 | |
494 | 494 | } else { |
495 | - $cliinfo = _('Test failed') ; |
|
496 | - $clientstest[] = "<table><tr><td class='icon_td' id='srcclient" . $hostindex . "_img'><img src='" . |
|
497 | - $this->stateIcons[\core\common\Entity::L_WARN] . "'></td>" . |
|
495 | + $cliinfo = _('Test failed'); |
|
496 | + $clientstest[] = "<table><tr><td class='icon_td' id='srcclient".$hostindex."_img'><img src='". |
|
497 | + $this->stateIcons[\core\common\Entity::L_WARN]."'></td>". |
|
498 | 498 | "<td id='srcclient$hostindex'>$cliinfo</td></tr></table>"; |
499 | 499 | } |
500 | 500 | } else { |
@@ -502,9 +502,9 @@ discard block |
||
502 | 502 | $clientstest[] = "<table id='clientsresults$hostindex' style='width:100%'> |
503 | 503 | <tr> |
504 | 504 | <td class='icon_td'><img src='"; |
505 | - $clientstest[] = $this->stateIcons[\core\common\Entity::L_ERROR] . "' id='srcclients" . $hostindex . "_img'></td> |
|
505 | + $clientstest[] = $this->stateIcons[\core\common\Entity::L_ERROR]."' id='srcclients".$hostindex."_img'></td> |
|
506 | 506 | <td id='srcclient$hostindex'>"; |
507 | - $clientstest[] = _("These tests were skipped because of previous errors.") . '</td></tr></table></ul>'; |
|
507 | + $clientstest[] = _("These tests were skipped because of previous errors.").'</td></tr></table></ul>'; |
|
508 | 508 | } |
509 | 509 | $clientstest[] = '</ol><p></p>'; |
510 | 510 | } |
@@ -515,7 +515,7 @@ discard block |
||
515 | 515 | { |
516 | 516 | $out = []; |
517 | 517 | $out[] = "<div id='dynamic_tests'><fieldset class='option_container'> |
518 | - <legend><strong>" . _("DYNAMIC connectivity tests") . "</strong></legend>"; |
|
518 | + <legend><strong>" . _("DYNAMIC connectivity tests")."</strong></legend>"; |
|
519 | 519 | |
520 | 520 | if (count($this->rfc7585suite->NAPTR_hostname_records) > 0) { |
521 | 521 | $capathtest = $this->collectCAPath(); |
@@ -526,17 +526,17 @@ discard block |
||
526 | 526 | if ($this->globalLevelDynamic == \core\common\Entity::L_OK && !$this->areFailed) { |
527 | 527 | $out[] = 'none'; |
528 | 528 | } |
529 | - $out[] = ';" id="dynamic_result_fail"><b>' . _("Some errors were found during the tests, see below") . '</b></div>'; |
|
529 | + $out[] = ';" id="dynamic_result_fail"><b>'._("Some errors were found during the tests, see below").'</b></div>'; |
|
530 | 530 | $out[] = '<div style="align:right; display: '; |
531 | 531 | if ($this->globalLevelDynamic != \core\common\Entity::L_OK || $this->areFailed) { |
532 | 532 | $out[] = 'none'; |
533 | 533 | } |
534 | - $out[] = '" id="dynamic_result_pass"><b>' . |
|
535 | - _("All tests passed, congratulations!") . '</b></div>' . |
|
536 | - '<div style="align:left;"><a href="" class="moreall"><i>' . _('Show detailed information for all tests') . '»</i></a></div>'; |
|
534 | + $out[] = '" id="dynamic_result_pass"><b>'. |
|
535 | + _("All tests passed, congratulations!").'</b></div>'. |
|
536 | + '<div style="align:left;"><a href="" class="moreall"><i>'._('Show detailed information for all tests').'»</i></a></div>'; |
|
537 | 537 | //print '<pre>'; print_r($clientstest); print '</pre>'; |
538 | 538 | $out[] = join('', $capathtest); |
539 | - $out[] = '<span id="clientstest" style="display: ;"><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>'; |
|
539 | + $out[] = '<span id="clientstest" style="display: ;"><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>'; |
|
540 | 540 | $out[] = join('', $clientstest); |
541 | 541 | $out[] = '</span>'; |
542 | 542 | $out[] = '</div>'; |