@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | * License: see the web/copyright.inc.php file in the file structure or |
20 | 20 | * <base_url>/copyright.php after deploying the software |
21 | 21 | */ |
22 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
22 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
23 | 23 | $languageInstance = new \core\common\Language(); |
24 | 24 | $languageInstance->setTextDomain("diagnostics"); |
25 | 25 | $loggerInstance = new \core\common\Logging(); |
@@ -61,43 +61,43 @@ discard block |
||
61 | 61 | $select = "<div id='sp_abuse_problem'> |
62 | 62 | <select style='margin-left: 0px;' id='select_sp_problem'>"; |
63 | 63 | foreach ($sp_problem as $pname => $pdesc) { |
64 | - $select = $select . "<option value='$pname'>$pdesc</option>\n"; |
|
64 | + $select = $select."<option value='$pname'>$pdesc</option>\n"; |
|
65 | 65 | } |
66 | - $select = $select . "</select></div>"; |
|
66 | + $select = $select."</select></div>"; |
|
67 | 67 | $res = " |
68 | 68 | <input type='hidden' name='token' id='token' value=''> |
69 | 69 | <input type='hidden' name='tests_result' id='tests_result' value=''> |
70 | 70 | <table id='sp_questions'> |
71 | 71 | <tr> |
72 | - <td>" . _("Select your problem") . "</td> |
|
72 | + <td>" . _("Select your problem")."</td> |
|
73 | 73 | <td>$select</td> |
74 | 74 | </tr> |
75 | 75 | <tr> |
76 | - <td>" . _("What is the realm of the IdP in question?") . "</td> |
|
76 | + <td>"._("What is the realm of the IdP in question?")."</td> |
|
77 | 77 | <td> |
78 | 78 | <input type='text' name='admin_realm' id='admin_realm' value='$realmFromURL'> |
79 | - <button class='diag_button' id='realm_in_db_admin' style='display: none;' accesskey='R' type='button'>" . |
|
80 | - _("Check this realm") . |
|
79 | + <button class='diag_button' id='realm_in_db_admin' style='display: none;' accesskey='R' type='button'>". |
|
80 | + _("Check this realm"). |
|
81 | 81 | "</button> |
82 | 82 | <div id='tests_info_area'></div> |
83 | 83 | </td> |
84 | 84 | </tr> |
85 | 85 | <tr class='hidden_row'> |
86 | - <td>" . _("What is the authentication timestamp of the user session in question?") . "</td> |
|
86 | + <td>" . _("What is the authentication timestamp of the user session in question?")."</td> |
|
87 | 87 | <td><input type='text' id='timestamp' name='timestamp'> |
88 | 88 | <div id='datepicker'></div> |
89 | 89 | </td> |
90 | 90 | </tr> |
91 | 91 | <tr class='hidden_row'> |
92 | - <td>" . _("What is the MAC address of the user session in question?") . "</td> |
|
92 | + <td>" . _("What is the MAC address of the user session in question?")."</td> |
|
93 | 93 | <td><input type='text' id='mac' name='mac'></td> |
94 | 94 | </tr> |
95 | 95 | <tr class='hidden_row'> |
96 | - <td>" . _("Additional comments") . "</td> |
|
96 | + <td>" . _("Additional comments")."</td> |
|
97 | 97 | <td><textarea id='freetext' name='freetext' cols='60' rows='5'></textarea></td> |
98 | 98 | </tr> |
99 | 99 | <tr class='hidden_row'> |
100 | - <td>" . _("Please specify an email address on which the IdP can contact you") . "</td> |
|
100 | + <td>" . _("Please specify an email address on which the IdP can contact you")."</td> |
|
101 | 101 | <td><input type='text' id='email' name='email'></td> |
102 | 102 | </tr> |
103 | 103 | <tr> |
@@ -105,82 +105,82 @@ discard block |
||
105 | 105 | <td></td> |
106 | 106 | </tr> |
107 | 107 | <tr class='hidden_row' id='send_query_to_idp'> |
108 | - <td>" . _("Now you can send your query") . "</td> |
|
109 | - <td><button type='submit' class='diag_button' id='submit_idp_query' name='go'>" . _("Send") . "</button></td> |
|
108 | + <td>" . _("Now you can send your query")."</td> |
|
109 | + <td><button type='submit' class='diag_button' id='submit_idp_query' name='go'>" . _("Send")."</button></td> |
|
110 | 110 | </tr> |
111 | 111 | </table>"; |
112 | - $res = $res . $javascript; |
|
112 | + $res = $res.$javascript; |
|
113 | 113 | } |
114 | 114 | if ($queryType == 'idp') { |
115 | 115 | $select = "<div id='idp_reported_problem' style='display:;'> |
116 | 116 | <select style='margin-left:0px;' id='select_idp_problem'>"; |
117 | 117 | foreach ($idp_problem as $pname => $pdesc) { |
118 | - $select = $select . "<option value='$pname'>$pdesc</option>\n"; |
|
118 | + $select = $select."<option value='$pname'>$pdesc</option>\n"; |
|
119 | 119 | } |
120 | - $select = $select . "</select></div>"; |
|
120 | + $select = $select."</select></div>"; |
|
121 | 121 | $res = " |
122 | 122 | <table id='idp_questions'> |
123 | 123 | <tr> |
124 | - <td>" . _("Select your problem") . "</td> |
|
124 | + <td>" . _("Select your problem")."</td> |
|
125 | 125 | <td>$select</td> |
126 | 126 | </tr> |
127 | 127 | <tr> |
128 | - <td>" . _("Identify the SP by one of following means") . "</td> |
|
128 | + <td>"._("Identify the SP by one of following means")."</td> |
|
129 | 129 | <td></td> |
130 | 130 | </tr> |
131 | 131 | <tr id='by_opname'> |
132 | - <td>" . _("SP Operator-Name attribute") . "</td> |
|
132 | + <td>" . _("SP Operator-Name attribute")."</td> |
|
133 | 133 | <td><input type='text' id='opname' name='opname' value=''></td> |
134 | 134 | </tr> |
135 | 135 | <tr id='spmanually'> |
136 | - <td>" . _("Select the SP manually:") . "</td> |
|
136 | + <td>" . _("Select the SP manually:")."</td> |
|
137 | 137 | <td> |
138 | 138 | <div id='select_asp_country'><a href='' id='asp_countries_list'> |
139 | - <span id='opnameselect'>" . _("click to select country and organisation") . "</a></span> |
|
139 | + <span id='opnameselect'>" . _("click to select country and organisation")."</a></span> |
|
140 | 140 | </div> |
141 | 141 | <div id='select_asp_area'></div> |
142 | 142 | </td> |
143 | 143 | </tr> |
144 | 144 | <tr id='asp_desc' style='display: none;'> |
145 | - <td>" . _("or") . ' ' . _("at least describe the SP location") . "</td> |
|
145 | + <td>" . _("or").' '._("at least describe the SP location")."</td> |
|
146 | 146 | <td><input type='text' id='asp_location' name='asp_location' value=''></td> |
147 | 147 | </tr> |
148 | 148 | <tr> |
149 | - <td>" . _("What is the outer ID of the user session in question?") . "</td> |
|
149 | + <td>" . _("What is the outer ID of the user session in question?")."</td> |
|
150 | 150 | <td><input type='text' id='outer_id' name='outer_id' value=''></td> |
151 | 151 | </tr> |
152 | 152 | <tr> |
153 | - <td>" . _("What is the authentication timestamp of the user session in question?") . "</td> |
|
153 | + <td>" . _("What is the authentication timestamp of the user session in question?")."</td> |
|
154 | 154 | <td> |
155 | 155 | <input type='text' id='timestamp' name='timestamp'> |
156 | 156 | <div id='datepicker'></div> |
157 | 157 | </td> |
158 | 158 | </tr> |
159 | 159 | <tr> |
160 | - <td>" . _("What is the MAC address of the user session in question?") . "</td> |
|
160 | + <td>" . _("What is the MAC address of the user session in question?")."</td> |
|
161 | 161 | <td><input type='text' id='mac' name='mac'></td> |
162 | 162 | </tr> |
163 | 163 | <tr> |
164 | - <td>" . _("Additional comments about the problem") . "</td> |
|
164 | + <td>" . _("Additional comments about the problem")."</td> |
|
165 | 165 | <td><textarea id='freetext' name='freetext' cols='60' rows='5'></textarea></td> |
166 | 166 | </tr> |
167 | 167 | <tr> |
168 | - <td>" . _("Do you have any contact details by which the user wishes to be contacted by the SP?") . "</td> |
|
168 | + <td>" . _("Do you have any contact details by which the user wishes to be contacted by the SP?")."</td> |
|
169 | 169 | <td><textarea id='c_details' name='c_details' cols='60' rows='5'></textarea></td> |
170 | 170 | </tr> |
171 | 171 | <tr> |
172 | - <td>" . _("Please specify an email address on which the SP can contact you") . "</td> |
|
172 | + <td>" . _("Please specify an email address on which the SP can contact you")."</td> |
|
173 | 173 | <td><input type='text' id='email' name='email'></td> |
174 | 174 | </tr> |
175 | 175 | <tr class='hidden_row' id='send_query_to_sp'> |
176 | - <td>" . _("Now you can send your query") . "</td> |
|
177 | - <td><button type='submit' class='diag_button' id='submit_sp_query' name='go'>" . _("Send") . "</button></td> |
|
176 | + <td>" . _("Now you can send your query")."</td> |
|
177 | + <td><button type='submit' class='diag_button' id='submit_sp_query' name='go'>" . _("Send")."</button></td> |
|
178 | 178 | </tr> |
179 | 179 | </table>"; |
180 | - $res = $res . $javascript; |
|
180 | + $res = $res.$javascript; |
|
181 | 181 | } |
182 | 182 | if ($queryType == 'idp_send' || $queryType == 'sp_send') { |
183 | - include_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
183 | + include_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
184 | 184 | $cat = new \core\CAT(); |
185 | 185 | $returnArray = array(); |
186 | 186 | if (count((array) $o) > 0) { |
@@ -189,8 +189,8 @@ discard block |
||
189 | 189 | switch ($key) { |
190 | 190 | case 'realm': |
191 | 191 | $pos = strpos($value, '@'); |
192 | - if ($pos !== FALSE ) { |
|
193 | - $value = substr($value, $pos+1); |
|
192 | + if ($pos !== FALSE) { |
|
193 | + $value = substr($value, $pos + 1); |
|
194 | 194 | } |
195 | 195 | case 'email': |
196 | 196 | case 'mac': |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | $mail = \core\common\OutsideComm::mailHandle(); |
227 | 227 | $emails = ['[email protected]']; |
228 | 228 | //$emails = explode(',', $returnArray['idpcontact']); |
229 | - $mail->FromName = \config\Master::APPEARANCE['productname'] . " Notification System"; |
|
229 | + $mail->FromName = \config\Master::APPEARANCE['productname']." Notification System"; |
|
230 | 230 | foreach ($emails as $email) { |
231 | 231 | $mail->addAddress($email); |
232 | 232 | } |
@@ -236,11 +236,11 @@ discard block |
||
236 | 236 | } else { |
237 | 237 | $link = 'http://'; |
238 | 238 | } |
239 | - $link .= $_SERVER['SERVER_NAME'] . \core\CAT::getRootUrlPath() . '/diag/show_realmcheck.php?token=' . $returnArray['token']; |
|
239 | + $link .= $_SERVER['SERVER_NAME'].\core\CAT::getRootUrlPath().'/diag/show_realmcheck.php?token='.$returnArray['token']; |
|
240 | 240 | $returnArray['testurl'] = $link; |
241 | 241 | $mail->Subject = _('Suspected a technical problem with the IdP'); |
242 | - $txt = _("We suspect a technical problem with the IdP handling the realm") . ' ' . |
|
243 | - $returnArray['realm'] . ".\n"; |
|
242 | + $txt = _("We suspect a technical problem with the IdP handling the realm").' '. |
|
243 | + $returnArray['realm'].".\n"; |
|
244 | 244 | $txt .= _("The CAT diagnostic test was run for this realm during reporting.\n"); |
245 | 245 | $txt .= _("The overall result was "); |
246 | 246 | if ($returnArray['tests_result'] == 0) { |
@@ -248,15 +248,15 @@ discard block |
||
248 | 248 | } else { |
249 | 249 | $txt .= _("failure"); |
250 | 250 | } |
251 | - $txt .= ".\n" . _("To see details go to "); |
|
251 | + $txt .= ".\n"._("To see details go to "); |
|
252 | 252 | $txt .= "$link\n\n"; |
253 | - $txt .= _("The reported problem details are as follows") . "\n"; |
|
254 | - $txt .= _("timestamp") . ": " . $returnArray['timestamp'] . "\n"; |
|
255 | - $txt .= _("client MAC address") . ": " . $returnArray['mac'] . "\n"; |
|
253 | + $txt .= _("The reported problem details are as follows")."\n"; |
|
254 | + $txt .= _("timestamp").": ".$returnArray['timestamp']."\n"; |
|
255 | + $txt .= _("client MAC address").": ".$returnArray['mac']."\n"; |
|
256 | 256 | if ($returnArray['freetext']) { |
257 | - $txt .= _("additional comments") . ': ' . $returnArray['freetext'] . "\n"; |
|
257 | + $txt .= _("additional comments").': '.$returnArray['freetext']."\n"; |
|
258 | 258 | } |
259 | - $txt .= "\n" . _("You can contact the incident reporter at") . ' ' . $returnArray['email']; |
|
259 | + $txt .= "\n"._("You can contact the incident reporter at").' '.$returnArray['email']; |
|
260 | 260 | |
261 | 261 | $mail->Body = $txt; |
262 | 262 | $sent = $mail->send(); |
@@ -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'); |
@@ -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' type='submit'>" . _("Go!") . "</button> |
|
106 | + <button id='realmcheck' 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 type='submit'>" . _("Go!") . "</button> |
|
116 | + <button 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 | } |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | if ($this->allReachabilityResults['realm'][0]->realm) { |
126 | 126 | $this->realm = $this->allReachabilityResults['realm'][0]->realm; |
127 | 127 | foreach ($this->allReachabilityResults['realm'][0]->totest as $totest) { |
128 | - $this->hostMap[$totest->host] = $totest->bracketaddr; |
|
128 | + $this->hostMap[$totest->host] = $totest->bracketaddr; |
|
129 | 129 | } |
130 | 130 | $this->rfc7585suite = unserialize($this->allReachabilityResults['realm'][0]->rfc7585suite); |
131 | 131 | $this->srv = $this->allReachabilityResults['realm'][0]->srv; |
@@ -460,7 +460,7 @@ discard block |
||
460 | 460 | } else { |
461 | 461 | if (property_exists($certificate, 'reason') && $certificate->reason == \core\diag\RADIUSTests::CERTPROB_UNKNOWN_CA) { |
462 | 462 | $add = '<br>' . _('You should update your list of accredited CAs') . |
463 | - ' <a href=\"' . \config\Diagnostics::RADIUSTESTS['accreditedCAsURL'] . '\">' . |
|
463 | + ' <a href=\"' . \config\Diagnostics::RADIUSTESTS['accreditedCAsURL'] . '\">' . |
|
464 | 464 | _('Get it from here.') . '</a>'; |
465 | 465 | } |
466 | 466 | $state = _('Server did not accept this client certificate - reason') . ': ' . |
@@ -471,8 +471,8 @@ discard block |
||
471 | 471 | $level = \core\common\Entity::L_WARN; |
472 | 472 | $state = _('Server accepted this client certificate, but should not have'); |
473 | 473 | } else { |
474 | - $level = \core\common\Entity::L_OK; |
|
475 | - $state = _('Server did not accept this client certificate') . ': ' . $certificate->resultcomment; |
|
474 | + $level = \core\common\Entity::L_OK; |
|
475 | + $state = _('Server did not accept this client certificate') . ': ' . $certificate->resultcomment; |
|
476 | 476 | } |
477 | 477 | } |
478 | 478 | $cliinfo .= '<li><table><tbody><tr><td class="icon_td"><img class="icon" src="' . $this->stateIcons[$level] . '" style="width: 24px;"></td><td>' . $state; |
@@ -489,7 +489,7 @@ discard block |
||
489 | 489 | if ($srefused > 0) { |
490 | 490 | $cliinfo = _('Connection refused'); |
491 | 491 | $clientstest[] = "<table><tr><td class='icon_td' id='srcclient$hostindex_img'><img src='" . $this->stateIcons[\core\common\Entity::L_ERROR] . "'></td>" . |
492 | - "<td id='srcclient$hostname'><p>$cliinfo</p></td></tr></table>"; |
|
492 | + "<td id='srcclient$hostname'><p>$cliinfo</p></td></tr></table>"; |
|
493 | 493 | } else { |
494 | 494 | $clientstest[] = "<p>$cliinfo</p>"; |
495 | 495 | } |
@@ -111,8 +111,8 @@ discard block |
||
111 | 111 | 'authorityinfoaccess' => _("authorityInfoAccess"), |
112 | 112 | 'subjectaltname' => _("SubjectAltName"), |
113 | 113 | ]; |
114 | - $jsondir = dirname(dirname(dirname(__FILE__))) . "/var/json_cache"; |
|
115 | - if ($token && is_dir($jsondir . '/' . $token)) { |
|
114 | + $jsondir = dirname(dirname(dirname(__FILE__)))."/var/json_cache"; |
|
115 | + if ($token && is_dir($jsondir.'/'.$token)) { |
|
116 | 116 | foreach (['realm', 'udp', 'clients', 'capath'] as $test_type) { |
117 | 117 | foreach (glob("$jsondir/$token/$test_type*") as $filename) { |
118 | 118 | $this->loggerInstance->debug(4, "\nIS_DIR $filename\n"); |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | $this->rfc7585suite = unserialize($this->allReachabilityResults['realm'][0]->rfc7585suite); |
131 | 131 | $this->srv = $this->allReachabilityResults['realm'][0]->srv; |
132 | 132 | $this->naptr = $this->allReachabilityResults['realm'][0]->naptr; |
133 | - $this->naptrValid= $this->allReachabilityResults['realm'][0]->naptr_valid; |
|
133 | + $this->naptrValid = $this->allReachabilityResults['realm'][0]->naptr_valid; |
|
134 | 134 | $this->hosts = $this->allReachabilityResults['realm'][0]->hosts; |
135 | 135 | $this->testSuite = unserialize($this->allReachabilityResults['realm'][0]->testsuite); |
136 | 136 | } |
@@ -189,9 +189,9 @@ discard block |
||
189 | 189 | } |
190 | 190 | } |
191 | 191 | |
192 | - public function isDynamic () |
|
192 | + public function isDynamic() |
|
193 | 193 | { |
194 | - if ($this->naptr> 0) { |
|
194 | + if ($this->naptr > 0) { |
|
195 | 195 | return TRUE; |
196 | 196 | } |
197 | 197 | return FALSE; |
@@ -201,17 +201,17 @@ discard block |
||
201 | 201 | * |
202 | 202 | * |
203 | 203 | */ |
204 | - public function printOverview () |
|
204 | + public function printOverview() |
|
205 | 205 | { |
206 | 206 | $out = []; |
207 | 207 | $out[] = "<fieldset class='option_container'> |
208 | 208 | <legend> |
209 | - <strong>" . _("Overview") . '</strong> |
|
209 | + <strong>" . _("Overview").'</strong> |
|
210 | 210 | </legend>'; |
211 | - $out[] = "<strong>" . _("DNS chekcs") . "</strong><div>"; |
|
211 | + $out[] = "<strong>"._("DNS chekcs")."</strong><div>"; |
|
212 | 212 | if ($this->naptr != \core\diag\RADIUSTests::RETVAL_NOTCONFIGURED) { |
213 | 213 | $out[] = "<table>"; |
214 | - $out[] = "<tr><td>" . _("Checking NAPTR existence:") . "</td><td>"; |
|
214 | + $out[] = "<tr><td>"._("Checking NAPTR existence:")."</td><td>"; |
|
215 | 215 | switch ($this->naptr) { |
216 | 216 | case \core\diag\RFC7585Tests::RETVAL_NONAPTR: |
217 | 217 | $out[] = _("This realm has no NAPTR records."); |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | //print '<pre>'; print_r($out); print '</pre>'; exit; |
227 | 227 | // compliance checks for NAPTRs |
228 | 228 | if ($this->naptr > 0) { |
229 | - $out[] = "<tr><td>" . _("Checking NAPTR compliance (flag = S and regex = {empty}):") . "</td><td>"; |
|
229 | + $out[] = "<tr><td>"._("Checking NAPTR compliance (flag = S and regex = {empty}):")."</td><td>"; |
|
230 | 230 | switch ($this->naptrValid) { |
231 | 231 | case \core\diag\RADIUSTests::RETVAL_OK: |
232 | 232 | $out[] = "No issues found."; |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | } |
240 | 240 | // SRV resolution |
241 | 241 | if ($this->naptr > 0 && $this->naptrValid == \core\diag\RADIUSTests::RETVAL_OK) { |
242 | - $out[] = "<tr><td>" . _("Checking SRVs:") . "</td><td>"; |
|
242 | + $out[] = "<tr><td>"._("Checking SRVs:")."</td><td>"; |
|
243 | 243 | switch ($this->srv) { |
244 | 244 | case \core\diag\RADIUSTests::RETVAL_SKIPPED: |
245 | 245 | $out[] = _("This check was skipped."); |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | } |
255 | 255 | // IP addresses for the hosts |
256 | 256 | if ($this->naptr > 0 && $this->naptrValid == \core\diag\RADIUSTests::RETVAL_OK && $this->srv > 0) { |
257 | - $out[] = "<tr><td>" . _("Checking IP address resolution:") . "</td><td>"; |
|
257 | + $out[] = "<tr><td>"._("Checking IP address resolution:")."</td><td>"; |
|
258 | 258 | switch ($this->srv) { |
259 | 259 | case \core\diag\RADIUSTests::RETVAL_SKIPPED: |
260 | 260 | $out[] = _("This check was skipped."); |
@@ -273,33 +273,33 @@ discard block |
||
273 | 273 | if (count($this->testSuite->listerrors()) == 0) { |
274 | 274 | $out[] = _("with no DNS errors encountered. Congratulations!"); |
275 | 275 | } else { |
276 | - $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."); |
|
276 | + $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."); |
|
277 | 277 | $out[] = "<div class='notacceptable'><table>"; |
278 | 278 | foreach ($this->testSuite->listerrors() as $details) { |
279 | - $out[] = "<tr><td>" . $details['TYPE'] . "</td><td>" . $details['TARGET'] . "</td></tr>"; |
|
279 | + $out[] = "<tr><td>".$details['TYPE']."</td><td>".$details['TARGET']."</td></tr>"; |
|
280 | 280 | } |
281 | 281 | $out[] = "</table></div>"; |
282 | 282 | } |
283 | 283 | $out[] = '</div>'; |
284 | 284 | |
285 | 285 | foreach ($this->rfc7585suite->NAPTR_hostname_records as $hostindex => $addr) { |
286 | - $host = ($addr['family'] == "IPv6" ? "[" : "") . $addr['IP'] . ($addr['family'] == "IPv6" ? "]" : "") . ":" . $addr['port']; |
|
286 | + $host = ($addr['family'] == "IPv6" ? "[" : "").$addr['IP'].($addr['family'] == "IPv6" ? "]" : "").":".$addr['port']; |
|
287 | 287 | $expectedName = $addr['hostname']; |
288 | 288 | } |
289 | 289 | } else { |
290 | - $out[] = "<tr><td>" . _("Dynamic discovery test is not configured") . "</td><td>"; |
|
290 | + $out[] = "<tr><td>"._("Dynamic discovery test is not configured")."</td><td>"; |
|
291 | 291 | } |
292 | - $out[] = "<hr><strong>" . _("Static connectivity tests") . "</strong> |
|
292 | + $out[] = "<hr><strong>"._("Static connectivity tests")."</strong> |
|
293 | 293 | <table><tr> |
294 | 294 | <td class='icon_td'>"; |
295 | - $out[] = "<img src='" . $this->stateIcons[$this->globalLevelStatic] . "' id='main_static_ico' class='icon'></td><td id='main_static_result'>" . |
|
296 | - $this->globalInfo[$this->globalLevelStatic] . ' ' . _("See the appropriate tab for details.") . '</td> |
|
295 | + $out[] = "<img src='".$this->stateIcons[$this->globalLevelStatic]."' id='main_static_ico' class='icon'></td><td id='main_static_result'>". |
|
296 | + $this->globalInfo[$this->globalLevelStatic].' '._("See the appropriate tab for details.").'</td> |
|
297 | 297 | </tr></table>'; |
298 | 298 | if ($this->naptr > 0) { |
299 | - $out[] = "<hr><strong>" . _("Dynamic connectivity tests") . "</strong> |
|
299 | + $out[] = "<hr><strong>"._("Dynamic connectivity tests")."</strong> |
|
300 | 300 | <table><tr> |
301 | - <td class='icon_td'><img src='" . $this->stateIcons[$this->globalLevelDynamic] . "' id='main_dynamic_ico' class='icon'></td><td id='main_dynamic_result'>" . |
|
302 | - $this->globalInfo[$this->globalLevelDynamic] . ' ' . _("See the appropriate tab for details.") . '</td></tr></table>'; |
|
301 | + <td class='icon_td'><img src='" . $this->stateIcons[$this->globalLevelDynamic]."' id='main_dynamic_ico' class='icon'></td><td id='main_dynamic_result'>". |
|
302 | + $this->globalInfo[$this->globalLevelDynamic].' '._("See the appropriate tab for details.").'</td></tr></table>'; |
|
303 | 303 | } |
304 | 304 | $out[] = '</fieldset>'; |
305 | 305 | //print '<pre>'; print_r($out); print '</pre>'; exit; |
@@ -320,27 +320,27 @@ discard block |
||
320 | 320 | $result = $udp->result[0]; |
321 | 321 | //print '<pre>'; print_r($result); print '</pre>'; |
322 | 322 | $out[] = '<hr>'; |
323 | - $out[] = '<strong>' . sprintf(_("Testing from: %s"), \config\Diagnostics::RADIUSTESTS['UDP-hosts'][$hostindex]['display_name']) . '</strong>'; |
|
323 | + $out[] = '<strong>'.sprintf(_("Testing from: %s"), \config\Diagnostics::RADIUSTESTS['UDP-hosts'][$hostindex]['display_name']).'</strong>'; |
|
324 | 324 | $out[] = "<table id='results$hostindex' style='width:100%' class='udp_results'> |
325 | 325 | <tr> |
326 | -<td class='icon_td'><img src='" . $this->stateIcons[$result->level] . "' id='src" . $hostindex . "_img'></td> |
|
326 | +<td class='icon_td'><img src='".$this->stateIcons[$result->level]."' id='src".$hostindex."_img'></td> |
|
327 | 327 | <td id='src$hostindex' colspan=2> |
328 | 328 | "; |
329 | - $out[] = '<strong>' . ($result->server? $result->server : _("Connected to undetermined server")) . '</strong><br/>' . sprintf (_("elapsed time: %sms."), $result->time_millisec) . '<p>' . $result->message . '</p>'; |
|
329 | + $out[] = '<strong>'.($result->server ? $result->server : _("Connected to undetermined server")).'</strong><br/>'.sprintf(_("elapsed time: %sms."), $result->time_millisec).'<p>'.$result->message.'</p>'; |
|
330 | 330 | |
331 | 331 | if ($result->level > \core\common\Entity::L_OK && property_exists($result, 'cert_oddities')) { |
332 | 332 | foreach ($result->cert_oddities as $oddities) { |
333 | - $out[] = '<tr class="results_tr"><td> </td><td class="icon_td"><img src="' . $icons[$oddities->level] . '"></td><td>' . $oddities->message . '</td></tr>'; |
|
333 | + $out[] = '<tr class="results_tr"><td> </td><td class="icon_td"><img src="'.$icons[$oddities->level].'"></td><td>'.$oddities->message.'</td></tr>'; |
|
334 | 334 | } |
335 | 335 | } |
336 | 336 | $cert_data = ''; |
337 | 337 | foreach ($result->server_cert as $sckey => $sc) { |
338 | 338 | if (array_key_exists($sckey, $this->certFields)) { |
339 | - $cert_data .= '<dt>' . $this->certFields[$sckey] . '</dt><dd>' . $sc . '</dd>'; |
|
339 | + $cert_data .= '<dt>'.$this->certFields[$sckey].'</dt><dd>'.$sc.'</dd>'; |
|
340 | 340 | } |
341 | 341 | } |
342 | 342 | $out[] = "<tr class='server_cert' style='display: "; |
343 | - $out[] = ($result->server_cert? 'table-row' : 'none') . ";'><td> </td><td colspan=2><div><dl class='server_cert_list' style='display: none;'>"; |
|
343 | + $out[] = ($result->server_cert ? 'table-row' : 'none').";'><td> </td><td colspan=2><div><dl class='server_cert_list' style='display: none;'>"; |
|
344 | 344 | $out[] = $cert_data; |
345 | 345 | |
346 | 346 | $ext = ''; |
@@ -348,12 +348,12 @@ discard block |
||
348 | 348 | if ($ext) { |
349 | 349 | $ext .= '<br>'; |
350 | 350 | } |
351 | - $ext .= '<strong>' . $extkey . ': </strong>' . '<i>' . $extval . '</i>'; |
|
351 | + $ext .= '<strong>'.$extkey.': </strong>'.'<i>'.$extval.'</i>'; |
|
352 | 352 | } |
353 | 353 | if ($ext != '') { |
354 | - $out[] = '<dt>' . _('Extensions') . '</dt></dd><dd>' . $ext . '</dd>'; |
|
354 | + $out[] = '<dt>'._('Extensions').'</dt></dd><dd>'.$ext.'</dd>'; |
|
355 | 355 | } |
356 | - $out[] = "</dl><a href='' class='morelink'>" . _("show server certificate details") . "»</a></div></tr>"; |
|
356 | + $out[] = "</dl><a href='' class='morelink'>"._("show server certificate details")."»</a></div></tr>"; |
|
357 | 357 | |
358 | 358 | $out[] = "</td></tr></table>"; |
359 | 359 | } |
@@ -364,7 +364,7 @@ discard block |
||
364 | 364 | private function collectCAPath() |
365 | 365 | { |
366 | 366 | $capathtest = []; |
367 | - $capathtest[] = '<p><strong>' . _("Checking server handshake...") . "</strong><p>"; |
|
367 | + $capathtest[] = '<p><strong>'._("Checking server handshake...")."</strong><p>"; |
|
368 | 368 | foreach ($this->allReachabilityResults['capath'] as $capath) { |
369 | 369 | //print '<pre>'; print_r($capath); print '<pre>'; |
370 | 370 | $hostindex = $capath->hostindex; |
@@ -372,46 +372,46 @@ discard block |
||
372 | 372 | if ($capath->level == \core\common\Entity::L_OK && $capath->result == \core\diag\RADIUSTests::RETVAL_INVALID) { |
373 | 373 | $level = \core\common\Entity::L_WARN; |
374 | 374 | } |
375 | - $capathtest[] = '<p><strong>' . $this->hostMap[$capath->IP] . '</strong>'; |
|
375 | + $capathtest[] = '<p><strong>'.$this->hostMap[$capath->IP].'</strong>'; |
|
376 | 376 | $capathtest[] = '<ul style="list-style-type: none;" class="caresult"><li>'; |
377 | 377 | $capathtest[] = "<table id='caresults$hostindex' style='width:100%'> |
378 | 378 | <tr> |
379 | 379 | <td class='icon_td'><img src='"; |
380 | - $capathtest[] = $this->stateIcons[$level] . "' id='srcca" . $hostindex . "_img'></td> |
|
380 | + $capathtest[] = $this->stateIcons[$level]."' id='srcca".$hostindex."_img'></td> |
|
381 | 381 | <td id='srcca$hostindex'>"; |
382 | 382 | $more = ''; |
383 | 383 | //print '<pre>'; print_r($server_cert); print '</pre>';print $server_cert['title'].'<br>'; |
384 | 384 | if ($capath->certdata && $capath->certdata->subject != '') { |
385 | 385 | $more .= '<div class="more">'; |
386 | - $certdesc = '<br>' . $this->certFields['title'] . '<ul>'; |
|
386 | + $certdesc = '<br>'.$this->certFields['title'].'<ul>'; |
|
387 | 387 | if ($capath->certdata->subject) { |
388 | - $certdesc .= '<li>' . $this->certFields['c_subject'] . ': ' . $capath->certdata->subject; |
|
388 | + $certdesc .= '<li>'.$this->certFields['c_subject'].': '.$capath->certdata->subject; |
|
389 | 389 | } |
390 | 390 | if ($capath->certdata->issuer) { |
391 | - $certdesc .= '<li>' . $this->certFields['c_issuer'] . ': ' . $capath->certdata->issuer; |
|
391 | + $certdesc .= '<li>'.$this->certFields['c_issuer'].': '.$capath->certdata->issuer; |
|
392 | 392 | } |
393 | 393 | if ($capath->certdata->extensions) { |
394 | 394 | if ($capath->certdata->extensions->subjectaltname) { |
395 | - $certdesc .= '<li>' . $this->certFields['subjectaltname'] . ': ' . $capath->certdata->extensions->subjectaltname; |
|
395 | + $certdesc .= '<li>'.$this->certFields['subjectaltname'].': '.$capath->certdata->extensions->subjectaltname; |
|
396 | 396 | } |
397 | 397 | } |
398 | 398 | if ($capath->certdata->extensions->policies) { |
399 | - $certdesc .= '<li>' . $this->certFields['policies'] . ': ' . $capath->certdata->extensions->policies; |
|
399 | + $certdesc .= '<li>'.$this->certFields['policies'].': '.$capath->certdata->extensions->policies; |
|
400 | 400 | } |
401 | 401 | if ($capath->certdata->extensions->crldistributionpoints) { |
402 | - $certdesc .= '<li>' . $this->certFields['crldistributionpoints'] . ': ' . $capath->certdata->extensions->crldistributionpoints; |
|
402 | + $certdesc .= '<li>'.$this->certFields['crldistributionpoints'].': '.$capath->certdata->extensions->crldistributionpoints; |
|
403 | 403 | } |
404 | 404 | if ($capath->certdata->extensions->authorityinfoaccess) { |
405 | - $certdesc .= '<li>' . $this->certFields['authorityinfoaccess'] . ': ' . $capath->certdata->extensions->authorityinfoaccess; |
|
405 | + $certdesc .= '<li>'.$this->certFields['authorityinfoaccess'].': '.$capath->certdata->extensions->authorityinfoaccess; |
|
406 | 406 | } |
407 | 407 | |
408 | 408 | $certdesc .= '</ul>'; |
409 | - $more .= '<span class="morecontent"><span>' . $certdesc . |
|
410 | - '</span> <a href="" class="morelink">' . _("more") . '»</a></span></td></tr>'; |
|
409 | + $more .= '<span class="morecontent"><span>'.$certdesc. |
|
410 | + '</span> <a href="" class="morelink">'._("more").'»</a></span></td></tr>'; |
|
411 | 411 | } else { |
412 | 412 | $certdesc = '<br>'; |
413 | 413 | } |
414 | - $capathtest[] = '<div>' . ($capath->message!=''? $capath->message : _('Test failed')) . '</div>' . $more; |
|
414 | + $capathtest[] = '<div>'.($capath->message != '' ? $capath->message : _('Test failed')).'</div>'.$more; |
|
415 | 415 | $capathtest[] = '</td> |
416 | 416 | </tr> |
417 | 417 | </table>'; |
@@ -426,7 +426,7 @@ discard block |
||
426 | 426 | foreach ($this->allReachabilityResults['clients'] as $clients) { |
427 | 427 | //print '<pre>'; print_r($clients); print '</pre>'; |
428 | 428 | $hostindex = $clients->hostindex; |
429 | - $clientstest[] = '<p><strong>' . $this->hostMap[$clients->IP] . '</strong></p>'; |
|
429 | + $clientstest[] = '<p><strong>'.$this->hostMap[$clients->IP].'</strong></p>'; |
|
430 | 430 | $clientstest[] = "<span id='clientresults$hostindex'>"; |
431 | 431 | $clientstest[] = '<p></p>'; |
432 | 432 | if ($this->globalLevelDynamic != \core\common\Entity::L_ERROR) { |
@@ -436,9 +436,9 @@ discard block |
||
436 | 436 | //print '<pre>'; print_r($ca); print '</pre>'; |
437 | 437 | $srefused = 0; |
438 | 438 | $cliinfo = ''; |
439 | - $cliinfo .= '<li>' . _('Client certificate') . ' <b>' . $ca->clientcertinfo->from . |
|
440 | - '</b>' . ', ' . $ca->clientcertinfo->message . |
|
441 | - '<br> (CA: ' . $ca->clientcertinfo->issuer . ')<ul>'; |
|
439 | + $cliinfo .= '<li>'._('Client certificate').' <b>'.$ca->clientcertinfo->from. |
|
440 | + '</b>'.', '.$ca->clientcertinfo->message. |
|
441 | + '<br> (CA: '.$ca->clientcertinfo->issuer.')<ul>'; |
|
442 | 442 | foreach ($ca->certificate as $certificate) { |
443 | 443 | if ($certificate->returncode == \core\diag\RADIUSTests::RETVAL_CONNECTION_REFUSED) { |
444 | 444 | $srefused = 1; |
@@ -446,8 +446,8 @@ discard block |
||
446 | 446 | } |
447 | 447 | if ($srefused == 0) { |
448 | 448 | foreach ($ca->certificate as $certificate) { |
449 | - $cliinfo .= '<li><i>' . $certificate->message . |
|
450 | - ', ' . _("expected result: ") . $this->states[$certificate->expected] . '</i>'; |
|
449 | + $cliinfo .= '<li><i>'.$certificate->message. |
|
450 | + ', '._("expected result: ").$this->states[$certificate->expected].'</i>'; |
|
451 | 451 | $cliinfo .= '<ul style="list-style-type: none;">'; |
452 | 452 | $level = $certificate->returncode; |
453 | 453 | if ($level < 0) { |
@@ -459,11 +459,11 @@ discard block |
||
459 | 459 | $state = _("Server accepted this client certificate"); |
460 | 460 | } else { |
461 | 461 | if (property_exists($certificate, 'reason') && $certificate->reason == \core\diag\RADIUSTests::CERTPROB_UNKNOWN_CA) { |
462 | - $add = '<br>' . _('You should update your list of accredited CAs') . |
|
463 | - ' <a href=\"' . \config\Diagnostics::RADIUSTESTS['accreditedCAsURL'] . '\">' . |
|
464 | - _('Get it from here.') . '</a>'; |
|
462 | + $add = '<br>'._('You should update your list of accredited CAs'). |
|
463 | + ' <a href=\"'.\config\Diagnostics::RADIUSTESTS['accreditedCAsURL'].'\">'. |
|
464 | + _('Get it from here.').'</a>'; |
|
465 | 465 | } |
466 | - $state = _('Server did not accept this client certificate - reason') . ': ' . |
|
466 | + $state = _('Server did not accept this client certificate - reason').': '. |
|
467 | 467 | $certificate->resultcomment; |
468 | 468 | } |
469 | 469 | } else { |
@@ -472,14 +472,14 @@ discard block |
||
472 | 472 | $state = _('Server accepted this client certificate, but should not have'); |
473 | 473 | } else { |
474 | 474 | $level = \core\common\Entity::L_OK; |
475 | - $state = _('Server did not accept this client certificate') . ': ' . $certificate->resultcomment; |
|
475 | + $state = _('Server did not accept this client certificate').': '.$certificate->resultcomment; |
|
476 | 476 | } |
477 | 477 | } |
478 | - $cliinfo .= '<li><table><tbody><tr><td class="icon_td"><img class="icon" src="' . $this->stateIcons[$level] . '" style="width: 24px;"></td><td>' . $state; |
|
479 | - $cliinfo .= ' (' . sprintf(_('elapsed time: %sms.'), $certificate->time_millisec) . ' ) ' . $add . '</td></tr>'; |
|
478 | + $cliinfo .= '<li><table><tbody><tr><td class="icon_td"><img class="icon" src="'.$this->stateIcons[$level].'" style="width: 24px;"></td><td>'.$state; |
|
479 | + $cliinfo .= ' ('.sprintf(_('elapsed time: %sms.'), $certificate->time_millisec).' ) '.$add.'</td></tr>'; |
|
480 | 480 | $cliinfo .= '</tbody></table></ul></li>'; |
481 | 481 | if (property_exists($certificate, 'finalerror') && $certificate->finalerror == 1) { |
482 | - $cliinfo = '<li>' . _('Rest of tests for this CA skipped') . '</li>'; |
|
482 | + $cliinfo = '<li>'._('Rest of tests for this CA skipped').'</li>'; |
|
483 | 483 | } |
484 | 484 | } |
485 | 485 | $clients_level = max($clients_level, $level); |
@@ -488,7 +488,7 @@ discard block |
||
488 | 488 | |
489 | 489 | if ($srefused > 0) { |
490 | 490 | $cliinfo = _('Connection refused'); |
491 | - $clientstest[] = "<table><tr><td class='icon_td' id='srcclient$hostindex_img'><img src='" . $this->stateIcons[\core\common\Entity::L_ERROR] . "'></td>" . |
|
491 | + $clientstest[] = "<table><tr><td class='icon_td' id='srcclient$hostindex_img'><img src='".$this->stateIcons[\core\common\Entity::L_ERROR]."'></td>". |
|
492 | 492 | "<td id='srcclient$hostname'><p>$cliinfo</p></td></tr></table>"; |
493 | 493 | } else { |
494 | 494 | $clientstest[] = "<p>$cliinfo</p>"; |
@@ -497,9 +497,9 @@ discard block |
||
497 | 497 | $cliinfo .= '</ol>'; |
498 | 498 | } else { |
499 | 499 | $clients_level = \core\common\Entity::L_WARN; |
500 | - $cliinfo = _('Test failed') ; |
|
501 | - $clientstest[] = "<table><tr><td class='icon_td' id='srcclient$hostindex_img'><img src='" . |
|
502 | - $this->stateIcons[\core\common\Entity::L_WARN] . "'></td>" . |
|
500 | + $cliinfo = _('Test failed'); |
|
501 | + $clientstest[] = "<table><tr><td class='icon_td' id='srcclient$hostindex_img'><img src='". |
|
502 | + $this->stateIcons[\core\common\Entity::L_WARN]."'></td>". |
|
503 | 503 | "<td id='srcclient$hostname'>$cliinfo</td></tr></table>"; |
504 | 504 | } |
505 | 505 | } else { |
@@ -507,9 +507,9 @@ discard block |
||
507 | 507 | $clientstest[] = "<table id='clientsresults$hostindex' style='width:100%'> |
508 | 508 | <tr> |
509 | 509 | <td class='icon_td'><img src='"; |
510 | - $clientstest[] = $this->stateIcons[\core\common\Entity::L_ERROR] . "' id='srcclients" . $hostindex . "_img'></td> |
|
510 | + $clientstest[] = $this->stateIcons[\core\common\Entity::L_ERROR]."' id='srcclients".$hostindex."_img'></td> |
|
511 | 511 | <td id='srcclient$hostindex'>"; |
512 | - $clientstest[] = _("These tests were skipped because of previous errors.") . '</td></tr></table></ul>'; |
|
512 | + $clientstest[] = _("These tests were skipped because of previous errors.").'</td></tr></table></ul>'; |
|
513 | 513 | } |
514 | 514 | $clientstest[] = '</ol><p></p>'; |
515 | 515 | } |
@@ -520,7 +520,7 @@ discard block |
||
520 | 520 | { |
521 | 521 | $out = []; |
522 | 522 | $out[] = "<div id='dynamic_tests'><fieldset class='option_container'> |
523 | - <legend><strong>" . _("DYNAMIC connectivity tests") . "</strong></legend>"; |
|
523 | + <legend><strong>" . _("DYNAMIC connectivity tests")."</strong></legend>"; |
|
524 | 524 | |
525 | 525 | if (count($this->rfc7585suite->NAPTR_hostname_records) > 0) { |
526 | 526 | $capathtest = $this->collectCAPath(); |
@@ -531,17 +531,17 @@ discard block |
||
531 | 531 | if ($this->globalLevelDynamic == \core\common\Entity::L_OK && !$this->areFailed) { |
532 | 532 | $out[] = 'none'; |
533 | 533 | } |
534 | - $out[] = ';" id="dynamic_result_fail"><b>' . _("Some errors were found during the tests, see below") . '</b></div>'; |
|
534 | + $out[] = ';" id="dynamic_result_fail"><b>'._("Some errors were found during the tests, see below").'</b></div>'; |
|
535 | 535 | $out[] = '<div style="align:right; display: '; |
536 | 536 | if ($this->globalLevelDynamic != \core\common\Entity::L_OK || $this->areFailed) { |
537 | 537 | $out[] = 'none'; |
538 | 538 | } |
539 | - $out[] = '" id="dynamic_result_pass"><b>' . |
|
540 | - _("All tests passed, congratulations!") . '</b></div>' . |
|
541 | - '<div style="align:left;"><a href="" class="moreall"><i>' . _('Show detailed information for all tests') . '»</i></a></div>'; |
|
539 | + $out[] = '" id="dynamic_result_pass"><b>'. |
|
540 | + _("All tests passed, congratulations!").'</b></div>'. |
|
541 | + '<div style="align:left;"><a href="" class="moreall"><i>'._('Show detailed information for all tests').'»</i></a></div>'; |
|
542 | 542 | //print '<pre>'; print_r($clientstest); print '</pre>'; |
543 | 543 | $out[] = join('', $capathtest); |
544 | - $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>'; |
|
544 | + $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>'; |
|
545 | 545 | $out[] = join('', $clientstest); |
546 | 546 | $out[] = '</span>'; |
547 | 547 | $out[] = '</div>'; |