@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | if (type === 'idp' || type === 'sp') { |
39 | 39 | shtml = '<table><tbody><tr id="row_'+type+'_country"></tr>'; |
40 | 40 | shtml = shtml + '<tr id="row_'+type+'_institution" style="visibility: collapse;">'; |
41 | - shtml = shtml + '<td>' + <?php echo '"' . _("Select institiution:") . '"'; ?> + '</td><td></td></tr>'; |
|
41 | + shtml = shtml + '<td>' + <?php echo '"'._("Select institiution:").'"'; ?> + '</td><td></td></tr>'; |
|
42 | 42 | if (type === 'idp') { |
43 | 43 | shtml = shtml + '<tr id="row_idp_realm"></tr>'; |
44 | 44 | } |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | var options = ''; |
65 | 65 | var selecthead = ''; |
66 | 66 | if (type1 === 'sp' || type1 === 'idp') { |
67 | - selecthead = <?php echo '"<td>' . _("Select country or region:") . ' </td>"'; ?>; |
|
67 | + selecthead = <?php echo '"<td>'._("Select country or region:").' </td>"'; ?>; |
|
68 | 68 | selecthead = selecthead + '<td>\n'; |
69 | 69 | } |
70 | 70 | var select = '<select id="' + type1 + '_country" name="' + type1 + '_country" style="margin-left:0px; width:400px;">'; |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | options = ($('#'+type2+'_country').html()); |
73 | 73 | countryAddSelect(selecthead, select + options + '</select>', type1); |
74 | 74 | } else { |
75 | - var comment = <?php echo '"<br><br>' . _("Fetching country/region list") . '..."'; ?>; |
|
75 | + var comment = <?php echo '"<br><br>'._("Fetching country/region list").'..."'; ?>; |
|
76 | 76 | inProgress(1, comment); |
77 | 77 | $.ajax({ |
78 | 78 | url: "findRealm.php", |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | return false; |
110 | 110 | } |
111 | 111 | function testSociopath(realm, answer) { |
112 | - var comment = <?php echo '"' . _("Testing realm") . '..."'; ?>; |
|
112 | + var comment = <?php echo '"'._("Testing realm").'..."'; ?>; |
|
113 | 113 | inProgress(1, comment); |
114 | 114 | if ($('#tested_realm').length == 0) { |
115 | 115 | $('<input>').attr({ |
@@ -133,9 +133,9 @@ discard block |
||
133 | 133 | query = '<input type="hidden" id="tested_realm" value="' + realm + '">'; |
134 | 134 | } |
135 | 135 | query = query + '<div id="current_query">'+data['TEXT']+'</div>'; |
136 | - query = query + '<div><button class="diag_button" id="answer_yes">' + <?php echo '"' . _("Yes") . '"'; ?> + '</button>'; |
|
137 | - query = query + '<button style="margin-left:20px;" class="diag_button" id="answer_no">' + <?php echo '"' . _("No") . '"'; ?> + '</button>'; |
|
138 | - query = query + '<button style="margin-left:20px;" class="diag_button" id="answer_noidea">' + <?php echo '"' . _("I don't know") . '"'; ?> + '</button></div>'; |
|
136 | + query = query + '<div><button class="diag_button" id="answer_yes">' + <?php echo '"'._("Yes").'"'; ?> + '</button>'; |
|
137 | + query = query + '<button style="margin-left:20px;" class="diag_button" id="answer_no">' + <?php echo '"'._("No").'"'; ?> + '</button>'; |
|
138 | + query = query + '<button style="margin-left:20px;" class="diag_button" id="answer_noidea">' + <?php echo '"'._("I don't know").'"'; ?> + '</button></div>'; |
|
139 | 139 | $('#sociopath_queries').html(query); |
140 | 140 | $('#sociopath_query_area').show(); |
141 | 141 | } |
@@ -166,55 +166,55 @@ discard block |
||
166 | 166 | }); |
167 | 167 | } |
168 | 168 | function finalVerdict(realm, verdict) { |
169 | - var title = <?php echo '"' . _("Diagnostic tests results for selected realm") . '"'; ?>; |
|
169 | + var title = <?php echo '"'._("Diagnostic tests results for selected realm").'"'; ?>; |
|
170 | 170 | result = '<div class="padding">'; |
171 | 171 | result = result + '<div><h3>'; |
172 | - result = result + <?php echo '"' . _("The result for tested realm:") . ' "'; ?> + realm; |
|
172 | + result = result + <?php echo '"'._("The result for tested realm:").' "'; ?> + realm; |
|
173 | 173 | result = result + '</h3></p><div style="padding: 5px;"><div style="padding: 0px;">'; |
174 | - result = result + <?php echo '"' . _("The system identified") . '" '; ?> + ' '; |
|
174 | + result = result + <?php echo '"'._("The system identified").'" '; ?> + ' '; |
|
175 | 175 | result = result + Object.keys(verdict).length + ' '; |
176 | - result = result + <?php echo '"' . _("suspected areas which potentially can cause a problem.") . '"'; ?> + '<br>'; |
|
177 | - result = result + <?php echo '"' . _("Next to the problem description we show a speculated probability of this event.") . '"'; ?>; |
|
176 | + result = result + <?php echo '"'._("suspected areas which potentially can cause a problem.").'"'; ?> + '<br>'; |
|
177 | + result = result + <?php echo '"'._("Next to the problem description we show a speculated probability of this event.").'"'; ?>; |
|
178 | 178 | result = result + '</div><div style="padding: 5px;"><table>'; |
179 | 179 | k = 1; |
180 | 180 | for (key in verdict) { |
181 | 181 | result = result + '<tr><td>' + k + '.</td>'; |
182 | 182 | k = k + 1; |
183 | 183 | if (key === 'INFRA_DEVICE') { |
184 | - result = result + '<td>' + <?php echo '"' . _("Your device configuration is broken") . '"'; ?> + '</td>'; |
|
184 | + result = result + '<td>' + <?php echo '"'._("Your device configuration is broken").'"'; ?> + '</td>'; |
|
185 | 185 | } |
186 | 186 | if (key === 'INFRA_SP_80211') { |
187 | - result = result + '<td>' + <?php echo '"' . _("The Wi-Fi network in your vicinity has quality issues") . '"'; ?> + '</td>'; |
|
187 | + result = result + '<td>' + <?php echo '"'._("The Wi-Fi network in your vicinity has quality issues").'"'; ?> + '</td>'; |
|
188 | 188 | } |
189 | 189 | if (key === 'INFRA_SP_LAN') { |
190 | - result = result + '<td>' + <?php echo '"' . _("The network environment around you is broken") . '"'; ?> + '</td>'; |
|
190 | + result = result + '<td>' + <?php echo '"'._("The network environment around you is broken").'"'; ?> + '</td>'; |
|
191 | 191 | } |
192 | 192 | if (key === 'INFRA_SP_RADIUS') { |
193 | - result = result + '<td>' + <?php echo '"' . _("The RADIUS server of your service provider is the source of the problem") . '"'; ?> + '</td>'; |
|
193 | + result = result + '<td>' + <?php echo '"'._("The RADIUS server of your service provider is the source of the problem").'"'; ?> + '</td>'; |
|
194 | 194 | } |
195 | 195 | if (key === 'INFRA_IDP_AUTHBACKEND') { |
196 | - result = result + '<td>' + <?php echo '"' . _("The RADIUS server in your home institution is currently unable to authenticate you") . '"'; ?> + '</td>'; |
|
196 | + result = result + '<td>' + <?php echo '"'._("The RADIUS server in your home institution is currently unable to authenticate you").'"'; ?> + '</td>'; |
|
197 | 197 | } |
198 | 198 | if (key === 'INFRA_NRO_SP') { |
199 | - result = result + '<td>' + <?php echo '"' . _("The national server in the country/region you are visiting is not functioning correctly") . '"'; ?> + '</td>'; |
|
199 | + result = result + '<td>' + <?php echo '"'._("The national server in the country/region you are visiting is not functioning correctly").'"'; ?> + '</td>'; |
|
200 | 200 | } |
201 | 201 | if (key === 'INFRA_LINK_ETLR_NRO_SP') { |
202 | - result = result + '<td>' + <?php echo '"' . _("The link between the national server of the country/region you are visiting and the top-level server is broken") . '"'; ?> + '</td>'; |
|
202 | + result = result + '<td>' + <?php echo '"'._("The link between the national server of the country/region you are visiting and the top-level server is broken").'"'; ?> + '</td>'; |
|
203 | 203 | } |
204 | 204 | if (key === 'INFRA_LINK_ETLR_NRO_IdP') { |
205 | - result = result + '<td>' + <?php echo '"' . _("The link between the national server of your home country/region and the top-level server is broken") . '"'; ?> + '</td>'; |
|
205 | + result = result + '<td>' + <?php echo '"'._("The link between the national server of your home country/region and the top-level server is broken").'"'; ?> + '</td>'; |
|
206 | 206 | } |
207 | 207 | if (key === 'INFRA_ETLR') { |
208 | - result = result + '<td>' + <?php echo '"' . _("The communication to the top-level server is down") . '"'; ?> + '</td>'; |
|
208 | + result = result + '<td>' + <?php echo '"'._("The communication to the top-level server is down").'"'; ?> + '</td>'; |
|
209 | 209 | } |
210 | 210 | if (key === 'INFRA_NRO_IdP') { |
211 | - result = result + '<td>' + <?php echo '"' . _("The national server in your home country/region is not functioning properly.") . '"'; ?> + '</td>'; |
|
211 | + result = result + '<td>' + <?php echo '"'._("The national server in your home country/region is not functioning properly.").'"'; ?> + '</td>'; |
|
212 | 212 | } |
213 | 213 | if (key === 'INFRA_IdP_RADIUS') { |
214 | - result = result + '<td>' + <?php echo '"' . _("The RADIUS server of your home institution is the source of the problem") . '"'; ?> + '</td>'; |
|
214 | + result = result + '<td>' + <?php echo '"'._("The RADIUS server of your home institution is the source of the problem").'"'; ?> + '</td>'; |
|
215 | 215 | } |
216 | 216 | if (key === 'INFRA_NONEXISTENTREALM') { |
217 | - result = result + '<td>' + <?php echo '"' . _("This realm does not exist") . '"'; ?> + '</td>'; |
|
217 | + result = result + '<td>' + <?php echo '"'._("This realm does not exist").'"'; ?> + '</td>'; |
|
218 | 218 | } |
219 | 219 | result = result + '<td style="padding-left: 5px;">' + (verdict[key] * 100).toFixed(2) + "%</td></tr>"; |
220 | 220 | } |
@@ -292,8 +292,8 @@ discard block |
||
292 | 292 | function runConnectionTests(data, realm, user, token, wherefrom) { |
293 | 293 | dynamic_req = null; |
294 | 294 | udp_req = null; |
295 | - var running = <?php echo '"<img style=\'vertical-align:middle\' src=' . "'../resources/images/icons/loading51.gif' width='24' height='24'/><i>" . _('Running connectivity tests for this realm') . '...</i>"'; ?>; |
|
296 | - var testresult = "<a target='_blank' href='show_realmcheck.php?token=" + token + "'>" + <?php echo '"' . _("New tests results are available, click to see") . '"'; ?> + '</a>'; |
|
295 | + var running = <?php echo '"<img style=\'vertical-align:middle\' src='."'../resources/images/icons/loading51.gif' width='24' height='24'/><i>"._('Running connectivity tests for this realm').'...</i>"'; ?>; |
|
296 | + var testresult = "<a target='_blank' href='show_realmcheck.php?token=" + token + "'>" + <?php echo '"'._("New tests results are available, click to see").'"'; ?> + '</a>'; |
|
297 | 297 | if (wherefrom == 'diag') { |
298 | 298 | $('#tests_info_area').css('color', 'black'); |
299 | 299 | $('#tests_info_area').html(running); |
@@ -420,7 +420,7 @@ discard block |
||
420 | 420 | return requests; |
421 | 421 | } |
422 | 422 | function show_tests_result(token, level) { |
423 | - $('#tests_info_area').html(global_info[level] + ': ' + "<a target='_blank' href='show_realmcheck.php?token=" + token + "'>" + <?php echo '"' . _("See details") . '"'; ?> + '</a>'); |
|
423 | + $('#tests_info_area').html(global_info[level] + ': ' + "<a target='_blank' href='show_realmcheck.php?token=" + token + "'>" + <?php echo '"'._("See details").'"'; ?> + '</a>'); |
|
424 | 424 | if (level > 0) { |
425 | 425 | $('#tests_info_area').css('color', 'red'); |
426 | 426 | $('#tests_result').val('1'); |
@@ -428,9 +428,9 @@ discard block |
||
428 | 428 | $('#tests_info_area').css('color', 'black'); |
429 | 429 | $('#tests_result').val('0'); |
430 | 430 | } |
431 | - var info = global_info[level] + ': ' + "<a target='_blank' href='show_realmcheck.php?token=" + token + "'>" + <?php echo '"' . _("See details") . '"'; ?> + '</a>'; |
|
431 | + var info = global_info[level] + ': ' + "<a target='_blank' href='show_realmcheck.php?token=" + token + "'>" + <?php echo '"'._("See details").'"'; ?> + '</a>'; |
|
432 | 432 | if (level == 0) { |
433 | - info = info + '<br>' + <?php echo "'" . _("If you want to report your problem, fill fields bellow.") . "'";?>; |
|
433 | + info = info + '<br>' + <?php echo "'"._("If you want to report your problem, fill fields bellow.")."'"; ?>; |
|
434 | 434 | } |
435 | 435 | $('#tests_info_area').html(info); |
436 | 436 |
@@ -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 = []; |
@@ -50,8 +50,8 @@ discard block |
||
50 | 50 | $realmOu = filter_input(INPUT_GET, 'ou', FILTER_SANITIZE_STRING); |
51 | 51 | $forTests = filter_input(INPUT_GET, 'addtest', FILTER_SANITIZE_STRING); |
52 | 52 | $token = filter_input(INPUT_GET, 'token', FILTER_SANITIZE_STRING) ?? filter_input(INPUT_POST, 'token', FILTER_SANITIZE_STRING); |
53 | -if ($token && !is_dir($jsonDir . '/' . $token)) { |
|
54 | - mkdir($jsonDir . '/' . $token, 0777, true); |
|
53 | +if ($token && !is_dir($jsonDir.'/'.$token)) { |
|
54 | + mkdir($jsonDir.'/'.$token, 0777, true); |
|
55 | 55 | } |
56 | 56 | if (is_null($outerUser)) { |
57 | 57 | $outerUser = ''; |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | } |
87 | 87 | $admins = array(); |
88 | 88 | if ($allRealms[$found]['contact']) { |
89 | - $elems = explode(', ', $allRealms[$found]['contact']); |
|
89 | + $elems = explode(', ', $allRealms[$found]['contact']); |
|
90 | 90 | foreach ($elems as $admin) { |
91 | 91 | if (substr($admin, 0, 2) == 'e:') { |
92 | 92 | $admins[] = substr($admin, 3); |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | } |
110 | 110 | if ($forTests) { |
111 | 111 | $rfc7585suite = new \core\diag\RFC7585Tests($givenRealm); |
112 | - $testsuite = new \core\diag\RADIUSTests($givenRealm, "@" . $givenRealm); |
|
112 | + $testsuite = new \core\diag\RADIUSTests($givenRealm, "@".$givenRealm); |
|
113 | 113 | $naptr = $rfc7585suite->relevantNAPTR(); |
114 | 114 | if ($naptr != \core\diag\RADIUSTests::RETVAL_NOTCONFIGURED && $naptr > 0) { |
115 | 115 | $naptr_valid = $rfc7585suite->relevantNAPTRcompliance(); |
@@ -122,12 +122,12 @@ discard block |
||
122 | 122 | } |
123 | 123 | $toTest = array(); |
124 | 124 | foreach ($rfc7585suite->NAPTR_hostname_records as $hostindex => $addr) { |
125 | - $host = ($addr['family'] == "IPv6" ? "[" : "") . $addr['IP'] . ($addr['family'] == "IPv6" ? "]" : "") . ":" . $addr['port']; |
|
125 | + $host = ($addr['family'] == "IPv6" ? "[" : "").$addr['IP'].($addr['family'] == "IPv6" ? "]" : "").":".$addr['port']; |
|
126 | 126 | $expectedName = $addr['hostname']; |
127 | 127 | $toTest[$hostindex] = array( |
128 | 128 | 'host' => $host, |
129 | 129 | 'name' => $expectedName, |
130 | - 'bracketaddr' => ($addr["family"] == "IPv6" ? "[" . $addr["IP"] . "]" : $addr["IP"]) . ' TCP/' . $addr['port'] |
|
130 | + 'bracketaddr' => ($addr["family"] == "IPv6" ? "[".$addr["IP"]."]" : $addr["IP"]).' TCP/'.$addr['port'] |
|
131 | 131 | ); |
132 | 132 | } |
133 | 133 | $details['totest'] = $toTest; |
@@ -195,8 +195,8 @@ discard block |
||
195 | 195 | $loggerInstance->debug(4, $returnArray); |
196 | 196 | $json_data = json_encode($returnArray); |
197 | 197 | if ($token) { |
198 | - $loggerInstance->debug(4, $jsonDir . '/' . $token); |
|
199 | - file_put_contents($jsonDir . '/' . $token . '/realm' , $json_data); |
|
198 | + $loggerInstance->debug(4, $jsonDir.'/'.$token); |
|
199 | + file_put_contents($jsonDir.'/'.$token.'/realm', $json_data); |
|
200 | 200 | } |
201 | 201 | echo($json_data); |
202 | 202 |
@@ -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); |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | </h1> |
119 | 119 | <div id="debug_out" style="display: none"></div> |
120 | 120 | <div id="timestamp" style="min-width: 600px; max-width:800px" align="right"> |
121 | - <?php echo _("Tests timestamp: ") . $realmTests->getTimeStamp() . ' UTC'; ?> |
|
121 | + <?php echo _("Tests timestamp: ").$realmTests->getTimeStamp().' UTC'; ?> |
|
122 | 122 | </div> |
123 | 123 | <div id="tabs" style="min-width: 600px; max-width:800px"> |
124 | 124 | <ul> |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | <div id="tabs-1"> |
136 | 136 | <button id="run_tests" onclick="runRealmCheck('<?php echo $check_realm; ?>','<?php echo $outer_user; ?>','<?php echo $ourlocale; ?>')"><?php echo _("Repeat connectivity tests") ?></button> |
137 | 137 | <div id="test_area"></div> |
138 | - <?php print $realmTests->printOverview();?> |
|
138 | + <?php print $realmTests->printOverview(); ?> |
|
139 | 139 | |
140 | 140 | </div> |
141 | 141 | <div id="tabs-2"> |
@@ -158,9 +158,9 @@ discard block |
||
158 | 158 | } |
159 | 159 | } else { |
160 | 160 | if (is_null($token)) { |
161 | - echo '<p><h1>' . _("Token missing, no data can be presented") . '</h1>'; |
|
161 | + echo '<p><h1>'._("Token missing, no data can be presented").'</h1>'; |
|
162 | 162 | } else { |
163 | - echo '<p><h1>' . _("The token given in the request does not exists, no data can be presented") . '</h1>'; |
|
163 | + echo '<p><h1>'._("The token given in the request does not exists, no data can be presented").'</h1>'; |
|
164 | 164 | } |
165 | 165 | } |
166 | 166 | echo $deco->footer(); |
@@ -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']) { |
@@ -69,9 +69,9 @@ discard block |
||
69 | 69 | } else { |
70 | 70 | $my_profile = NULL; |
71 | 71 | if (isset($_REQUEST['outer_user'])) { |
72 | - $testsuite = new \core\diag\RADIUSTests($check_realm, $_REQUEST['outer_user'] . "@" . $check_realm); |
|
72 | + $testsuite = new \core\diag\RADIUSTests($check_realm, $_REQUEST['outer_user']."@".$check_realm); |
|
73 | 73 | } else { |
74 | - $testsuite = new \core\diag\RADIUSTests($check_realm, "@" . $check_realm); |
|
74 | + $testsuite = new \core\diag\RADIUSTests($check_realm, "@".$check_realm); |
|
75 | 75 | } |
76 | 76 | } |
77 | 77 | |
@@ -167,10 +167,10 @@ discard block |
||
167 | 167 | break; |
168 | 168 | case \core\common\Entity::L_REMARK: |
169 | 169 | case \core\common\Entity::L_WARN: |
170 | - $message = _("<strong>Test partially successful</strong>: authentication succeded.") . ' ' . $additional_message[$level]; |
|
170 | + $message = _("<strong>Test partially successful</strong>: authentication succeded.").' '.$additional_message[$level]; |
|
171 | 171 | break; |
172 | 172 | case \core\common\Entity::L_ERROR: |
173 | - $message = _("<strong>Test FAILED</strong>: authentication succeded.") . ' ' . $additional_message[$level]; |
|
173 | + $message = _("<strong>Test FAILED</strong>: authentication succeded.").' '.$additional_message[$level]; |
|
174 | 174 | break; |
175 | 175 | } |
176 | 176 | break; |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | case \core\diag\RADIUSTests::RETVAL_CONVERSATION_REJECT: |
222 | 222 | $level = $returnarray['result'][$i]['level']; |
223 | 223 | if ($level > \core\common\Entity::L_OK) { |
224 | - $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]; |
|
224 | + $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]; |
|
225 | 225 | } else { |
226 | 226 | $message = _("<strong>Test successful</strong>: a bidirectional RADIUS conversation with multiple round-trips was carried out, and ended in an Access-Reject as planned."); |
227 | 227 | } |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | $level = \core\common\Entity::L_ERROR; |
245 | 245 | break; |
246 | 246 | } |
247 | - $loggerInstance->debug(4, "SERVER=" . $returnarray['result'][$i]['server'] . "\n"); |
|
247 | + $loggerInstance->debug(4, "SERVER=".$returnarray['result'][$i]['server']."\n"); |
|
248 | 248 | $returnarray['result'][$i]['level'] = $level; |
249 | 249 | $returnarray['result'][$i]['message'] = $message; |
250 | 250 | break; |
@@ -261,9 +261,9 @@ discard block |
||
261 | 261 | } |
262 | 262 | // we tried to contact someone, and know how long that took |
263 | 263 | $returnarray['time_millisec'] = sprintf("%d", $rfc6614suite->TLS_CA_checks_result[$host]['time_millisec']); |
264 | - $timeDisplay = ' (' . sprintf(_("elapsed time: %d"), $rfc6614suite->TLS_CA_checks_result[$host]['time_millisec']) . ' ms)'; |
|
264 | + $timeDisplay = ' ('.sprintf(_("elapsed time: %d"), $rfc6614suite->TLS_CA_checks_result[$host]['time_millisec']).' ms)'; |
|
265 | 265 | if (isset($rfc6614suite->TLS_CA_checks_result[$host]['cert_oddity']) && ($rfc6614suite->TLS_CA_checks_result[$host]['cert_oddity'] == \core\diag\RADIUSTests::CERTPROB_UNKNOWN_CA)) { |
266 | - $returnarray['message'] = _("<strong>ERROR</strong>: the server presented a certificate which is from an unknown authority!") . $timeDisplay; |
|
266 | + $returnarray['message'] = _("<strong>ERROR</strong>: the server presented a certificate which is from an unknown authority!").$timeDisplay; |
|
267 | 267 | $returnarray['level'] = \core\common\Entity::L_ERROR; |
268 | 268 | $returnarray['result'] = $testresult; |
269 | 269 | break; |
@@ -273,7 +273,7 @@ discard block |
||
273 | 273 | $returnarray['level'] = \core\common\Entity::L_OK; |
274 | 274 | // override if the connection was with a mismatching server name |
275 | 275 | 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)) { |
276 | - $returnarray['message'] = _("<strong>WARNING</strong>: the server name as discovered in the SRV record does not match any name in the server certificate!") . $timeDisplay; |
|
276 | + $returnarray['message'] = _("<strong>WARNING</strong>: the server name as discovered in the SRV record does not match any name in the server certificate!").$timeDisplay; |
|
277 | 277 | $returnarray['level'] = \core\common\Entity::L_WARN; |
278 | 278 | } |
279 | 279 | switch ($rfc6614suite->TLS_CA_checks_result[$host]['status']) { |
@@ -331,13 +331,13 @@ discard block |
||
331 | 331 | throw new Exception("Unknown test requested: default case reached!"); |
332 | 332 | } |
333 | 333 | $returnarray['datetime'] = date("Y-m-d H:i:s"); |
334 | -if (!is_dir($jsonDir . '/' . $token)) { |
|
335 | - mkdir($jsonDir . '/' . $token, 0777, true); |
|
334 | +if (!is_dir($jsonDir.'/'.$token)) { |
|
335 | + mkdir($jsonDir.'/'.$token, 0777, true); |
|
336 | 336 | } |
337 | 337 | $json_data = json_encode($returnarray); |
338 | 338 | if ($token != '') { |
339 | - $loggerInstance->debug(4, $jsonDir . '/' . $returnarray['token']); |
|
340 | - file_put_contents($jsonDir . '/' . $token . '/' . $test_type . '_' . $hostindex, $json_data); |
|
339 | + $loggerInstance->debug(4, $jsonDir.'/'.$returnarray['token']); |
|
340 | + file_put_contents($jsonDir.'/'.$token.'/'.$test_type.'_'.$hostindex, $json_data); |
|
341 | 341 | } |
342 | 342 | echo($json_data); |
343 | 343 |