@@ -112,8 +112,8 @@ discard block |
||
| 112 | 112 | 'authorityinfoaccess' => _("authorityInfoAccess"), |
| 113 | 113 | 'subjectaltname' => _("SubjectAltName"), |
| 114 | 114 | ]; |
| 115 | - $jsondir = dirname(dirname(dirname(__FILE__))) . "/var/json_cache"; |
|
| 116 | - if ($token && is_dir($jsondir . '/' . $token)) { |
|
| 115 | + $jsondir = dirname(dirname(dirname(__FILE__)))."/var/json_cache"; |
|
| 116 | + if ($token && is_dir($jsondir.'/'.$token)) { |
|
| 117 | 117 | foreach (['realm', 'udp', 'clients', 'capath'] as $test_type) { |
| 118 | 118 | foreach (glob("$jsondir/$token/$test_type*") as $filename) { |
| 119 | 119 | $this->loggerInstance->debug(4, "\nIS_DIR $filename\n"); |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | $this->rfc7585suite = unserialize($this->allReachabilityResults['realm'][0]->rfc7585suite); |
| 132 | 132 | $this->srv = $this->allReachabilityResults['realm'][0]->srv; |
| 133 | 133 | $this->naptr = $this->allReachabilityResults['realm'][0]->naptr; |
| 134 | - $this->naptrValid= $this->allReachabilityResults['realm'][0]->naptr_valid; |
|
| 134 | + $this->naptrValid = $this->allReachabilityResults['realm'][0]->naptr_valid; |
|
| 135 | 135 | $this->hosts = $this->allReachabilityResults['realm'][0]->hosts; |
| 136 | 136 | $this->testSuite = unserialize($this->allReachabilityResults['realm'][0]->testsuite); |
| 137 | 137 | } |
@@ -191,9 +191,9 @@ discard block |
||
| 191 | 191 | } |
| 192 | 192 | } |
| 193 | 193 | |
| 194 | - public function isDynamic () |
|
| 194 | + public function isDynamic() |
|
| 195 | 195 | { |
| 196 | - if ($this->naptr> 0) { |
|
| 196 | + if ($this->naptr > 0) { |
|
| 197 | 197 | return TRUE; |
| 198 | 198 | } |
| 199 | 199 | return FALSE; |
@@ -203,17 +203,17 @@ discard block |
||
| 203 | 203 | * |
| 204 | 204 | * |
| 205 | 205 | */ |
| 206 | - public function printOverview () |
|
| 206 | + public function printOverview() |
|
| 207 | 207 | { |
| 208 | 208 | $out = []; |
| 209 | 209 | $out[] = "<fieldset class='option_container'> |
| 210 | 210 | <legend> |
| 211 | - <strong>" . _("Overview") . '</strong> |
|
| 211 | + <strong>" . _("Overview").'</strong> |
|
| 212 | 212 | </legend>'; |
| 213 | - $out[] = "<strong>" . _("DNS chekcs") . "</strong><div>"; |
|
| 213 | + $out[] = "<strong>"._("DNS chekcs")."</strong><div>"; |
|
| 214 | 214 | if ($this->naptr != \core\diag\RADIUSTests::RETVAL_NOTCONFIGURED) { |
| 215 | 215 | $out[] = "<table>"; |
| 216 | - $out[] = "<tr><td>" . _("Checking NAPTR existence:") . "</td><td>"; |
|
| 216 | + $out[] = "<tr><td>"._("Checking NAPTR existence:")."</td><td>"; |
|
| 217 | 217 | switch ($this->naptr) { |
| 218 | 218 | case \core\diag\RFC7585Tests::RETVAL_NONAPTR: |
| 219 | 219 | $out[] = _("This realm has no NAPTR records."); |
@@ -228,7 +228,7 @@ discard block |
||
| 228 | 228 | //print '<pre>'; print_r($out); print '</pre>'; exit; |
| 229 | 229 | // compliance checks for NAPTRs |
| 230 | 230 | if ($this->naptr > 0) { |
| 231 | - $out[] = "<tr><td>" . _("Checking NAPTR compliance (flag = S and regex = {empty}):") . "</td><td>"; |
|
| 231 | + $out[] = "<tr><td>"._("Checking NAPTR compliance (flag = S and regex = {empty}):")."</td><td>"; |
|
| 232 | 232 | switch ($this->naptrValid) { |
| 233 | 233 | case \core\diag\RADIUSTests::RETVAL_OK: |
| 234 | 234 | $out[] = "No issues found."; |
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | } |
| 242 | 242 | // SRV resolution |
| 243 | 243 | if ($this->naptr > 0 && $this->naptrValid == \core\diag\RADIUSTests::RETVAL_OK) { |
| 244 | - $out[] = "<tr><td>" . _("Checking SRVs:") . "</td><td>"; |
|
| 244 | + $out[] = "<tr><td>"._("Checking SRVs:")."</td><td>"; |
|
| 245 | 245 | switch ($this->srv) { |
| 246 | 246 | case \core\diag\RADIUSTests::RETVAL_SKIPPED: |
| 247 | 247 | $out[] = _("This check was skipped."); |
@@ -256,7 +256,7 @@ discard block |
||
| 256 | 256 | } |
| 257 | 257 | // IP addresses for the hosts |
| 258 | 258 | if ($this->naptr > 0 && $this->naptrValid == \core\diag\RADIUSTests::RETVAL_OK && $this->srv > 0) { |
| 259 | - $out[] = "<tr><td>" . _("Checking IP address resolution:") . "</td><td>"; |
|
| 259 | + $out[] = "<tr><td>"._("Checking IP address resolution:")."</td><td>"; |
|
| 260 | 260 | switch ($this->srv) { |
| 261 | 261 | case \core\diag\RADIUSTests::RETVAL_SKIPPED: |
| 262 | 262 | $out[] = _("This check was skipped."); |
@@ -275,28 +275,28 @@ discard block |
||
| 275 | 275 | if (count($this->testSuite->listerrors()) == 0) { |
| 276 | 276 | $out[] = _("with no DNS errors encountered. Congratulations!"); |
| 277 | 277 | } else { |
| 278 | - $out[] = _("but there were DNS errors! Check them!") . " " . _("You should re-run the tests after fixing the errors; more errors might be uncovered at that point. The exact error causes are listed below."); |
|
| 278 | + $out[] = _("but there were DNS errors! Check them!")." "._("You should re-run the tests after fixing the errors; more errors might be uncovered at that point. The exact error causes are listed below."); |
|
| 279 | 279 | $out[] = "<div class='notacceptable'><table>"; |
| 280 | 280 | foreach ($this->testSuite->listerrors() as $details) { |
| 281 | - $out[] = "<tr><td>" . $details['TYPE'] . "</td><td>" . $details['TARGET'] . "</td></tr>"; |
|
| 281 | + $out[] = "<tr><td>".$details['TYPE']."</td><td>".$details['TARGET']."</td></tr>"; |
|
| 282 | 282 | } |
| 283 | 283 | $out[] = "</table></div>"; |
| 284 | 284 | } |
| 285 | 285 | $out[] = '</div>'; |
| 286 | 286 | } else { |
| 287 | - $out[] = "<tr><td>" . _("Dynamic discovery test is not configured") . "</td><td>"; |
|
| 287 | + $out[] = "<tr><td>"._("Dynamic discovery test is not configured")."</td><td>"; |
|
| 288 | 288 | } |
| 289 | - $out[] = "<hr><strong>" . _("Static connectivity tests") . "</strong> |
|
| 289 | + $out[] = "<hr><strong>"._("Static connectivity tests")."</strong> |
|
| 290 | 290 | <table><tr> |
| 291 | 291 | <td class='icon_td'>"; |
| 292 | - $out[] = "<img src='" . $this->stateIcons[$this->globalLevelStatic] . "' id='main_static_ico' class='icon'></td><td id='main_static_result'>" . |
|
| 293 | - $this->globalInfo[$this->globalLevelStatic] . ' ' . _("See the appropriate tab for details.") . '</td> |
|
| 292 | + $out[] = "<img src='".$this->stateIcons[$this->globalLevelStatic]."' id='main_static_ico' class='icon'></td><td id='main_static_result'>". |
|
| 293 | + $this->globalInfo[$this->globalLevelStatic].' '._("See the appropriate tab for details.").'</td> |
|
| 294 | 294 | </tr></table>'; |
| 295 | 295 | if ($this->naptr > 0) { |
| 296 | - $out[] = "<hr><strong>" . _("Dynamic connectivity tests") . "</strong> |
|
| 296 | + $out[] = "<hr><strong>"._("Dynamic connectivity tests")."</strong> |
|
| 297 | 297 | <table><tr> |
| 298 | - <td class='icon_td'><img src='" . $this->stateIcons[$this->globalLevelDynamic] . "' id='main_dynamic_ico' class='icon'></td><td id='main_dynamic_result'>" . |
|
| 299 | - $this->globalInfo[$this->globalLevelDynamic] . ' ' . _("See the appropriate tab for details.") . '</td></tr></table>'; |
|
| 298 | + <td class='icon_td'><img src='" . $this->stateIcons[$this->globalLevelDynamic]."' id='main_dynamic_ico' class='icon'></td><td id='main_dynamic_result'>". |
|
| 299 | + $this->globalInfo[$this->globalLevelDynamic].' '._("See the appropriate tab for details.").'</td></tr></table>'; |
|
| 300 | 300 | } |
| 301 | 301 | $out[] = '</fieldset>'; |
| 302 | 302 | //print '<pre>'; print_r($out); print '</pre>'; exit; |
@@ -317,27 +317,27 @@ discard block |
||
| 317 | 317 | $result = $udp->result[0]; |
| 318 | 318 | //print '<pre>'; print_r($result); print '</pre>'; |
| 319 | 319 | $out[] = '<hr>'; |
| 320 | - $out[] = '<strong>' . sprintf(_("Testing from: %s"), \config\Diagnostics::RADIUSTESTS['UDP-hosts'][$hostindex]['display_name']) . '</strong>'; |
|
| 320 | + $out[] = '<strong>'.sprintf(_("Testing from: %s"), \config\Diagnostics::RADIUSTESTS['UDP-hosts'][$hostindex]['display_name']).'</strong>'; |
|
| 321 | 321 | $out[] = "<table id='results$hostindex' style='width:100%' class='udp_results'> |
| 322 | 322 | <tr> |
| 323 | -<td class='icon_td'><img src='" . $this->stateIcons[$result->level] . "' id='src" . $hostindex . "_img'></td> |
|
| 323 | +<td class='icon_td'><img src='".$this->stateIcons[$result->level]."' id='src".$hostindex."_img'></td> |
|
| 324 | 324 | <td id='src$hostindex' colspan=2> |
| 325 | 325 | "; |
| 326 | - $out[] = '<strong>' . ($result->server? $result->server : _("Connected to undetermined server")) . '</strong><br/>' . sprintf (_("elapsed time: %sms."), $result->time_millisec) . '<p>' . $result->message . '</p>'; |
|
| 326 | + $out[] = '<strong>'.($result->server ? $result->server : _("Connected to undetermined server")).'</strong><br/>'.sprintf(_("elapsed time: %sms."), $result->time_millisec).'<p>'.$result->message.'</p>'; |
|
| 327 | 327 | |
| 328 | 328 | if ($result->level > \core\common\Entity::L_OK && property_exists($result, 'cert_oddities')) { |
| 329 | 329 | foreach ($result->cert_oddities as $oddities) { |
| 330 | - $out[] = '<tr class="results_tr"><td> </td><td class="icon_td"><img src="' . $this->stateIcons[$oddities->level] . '"></td><td>' . $oddities->message . '</td></tr>'; |
|
| 330 | + $out[] = '<tr class="results_tr"><td> </td><td class="icon_td"><img src="'.$this->stateIcons[$oddities->level].'"></td><td>'.$oddities->message.'</td></tr>'; |
|
| 331 | 331 | } |
| 332 | 332 | } |
| 333 | 333 | $cert_data = ''; |
| 334 | 334 | foreach ($result->server_cert as $sckey => $sc) { |
| 335 | 335 | if (array_key_exists($sckey, $this->certFields)) { |
| 336 | - $cert_data .= '<dt>' . $this->certFields[$sckey] . '</dt><dd>' . $sc . '</dd>'; |
|
| 336 | + $cert_data .= '<dt>'.$this->certFields[$sckey].'</dt><dd>'.$sc.'</dd>'; |
|
| 337 | 337 | } |
| 338 | 338 | } |
| 339 | 339 | $out[] = "<tr class='server_cert' style='display: "; |
| 340 | - $out[] = ($result->server_cert? 'table-row' : 'none') . ";'><td> </td><td colspan=2><div><dl class='server_cert_list' style='display: none;'>"; |
|
| 340 | + $out[] = ($result->server_cert ? 'table-row' : 'none').";'><td> </td><td colspan=2><div><dl class='server_cert_list' style='display: none;'>"; |
|
| 341 | 341 | $out[] = $cert_data; |
| 342 | 342 | |
| 343 | 343 | $ext = ''; |
@@ -345,12 +345,12 @@ discard block |
||
| 345 | 345 | if ($ext) { |
| 346 | 346 | $ext .= '<br>'; |
| 347 | 347 | } |
| 348 | - $ext .= '<strong>' . $extkey . ': </strong>' . '<i>' . $extval . '</i>'; |
|
| 348 | + $ext .= '<strong>'.$extkey.': </strong>'.'<i>'.$extval.'</i>'; |
|
| 349 | 349 | } |
| 350 | 350 | if ($ext != '') { |
| 351 | - $out[] = '<dt>' . _('Extensions') . '</dt></dd><dd>' . $ext . '</dd>'; |
|
| 351 | + $out[] = '<dt>'._('Extensions').'</dt></dd><dd>'.$ext.'</dd>'; |
|
| 352 | 352 | } |
| 353 | - $out[] = "</dl><a href='' class='morelink'>" . _("show server certificate details") . "»</a></div></tr>"; |
|
| 353 | + $out[] = "</dl><a href='' class='morelink'>"._("show server certificate details")."»</a></div></tr>"; |
|
| 354 | 354 | |
| 355 | 355 | $out[] = "</td></tr></table>"; |
| 356 | 356 | } |
@@ -361,7 +361,7 @@ discard block |
||
| 361 | 361 | private function collectCAPath() |
| 362 | 362 | { |
| 363 | 363 | $capathtest = []; |
| 364 | - $capathtest[] = '<p><strong>' . _("Checking server handshake...") . "</strong><p>"; |
|
| 364 | + $capathtest[] = '<p><strong>'._("Checking server handshake...")."</strong><p>"; |
|
| 365 | 365 | foreach ($this->allReachabilityResults['capath'] as $capath) { |
| 366 | 366 | //print '<pre>'; print_r($capath); print '<pre>'; |
| 367 | 367 | $hostindex = $capath->hostindex; |
@@ -369,46 +369,46 @@ discard block |
||
| 369 | 369 | if ($capath->level == \core\common\Entity::L_OK && $capath->result == \core\diag\RADIUSTests::RETVAL_INVALID) { |
| 370 | 370 | $level = \core\common\Entity::L_WARN; |
| 371 | 371 | } |
| 372 | - $capathtest[] = '<p><strong>' . $this->hostMap[$capath->IP] . '</strong>'; |
|
| 372 | + $capathtest[] = '<p><strong>'.$this->hostMap[$capath->IP].'</strong>'; |
|
| 373 | 373 | $capathtest[] = '<ul style="list-style-type: none;" class="caresult"><li>'; |
| 374 | 374 | $capathtest[] = "<table id='caresults$hostindex' style='width:100%'> |
| 375 | 375 | <tr> |
| 376 | 376 | <td class='icon_td'><img src='"; |
| 377 | - $capathtest[] = $this->stateIcons[$level] . "' id='srcca" . $hostindex . "_img'></td> |
|
| 377 | + $capathtest[] = $this->stateIcons[$level]."' id='srcca".$hostindex."_img'></td> |
|
| 378 | 378 | <td id='srcca$hostindex'>"; |
| 379 | 379 | $more = ''; |
| 380 | 380 | //print '<pre>'; print_r($server_cert); print '</pre>';print $server_cert['title'].'<br>'; |
| 381 | 381 | if ($capath->certdata && $capath->certdata->subject != '') { |
| 382 | 382 | $more .= '<div class="more">'; |
| 383 | - $certdesc = '<br>' . $this->certFields['title'] . '<ul>'; |
|
| 383 | + $certdesc = '<br>'.$this->certFields['title'].'<ul>'; |
|
| 384 | 384 | if ($capath->certdata->subject) { |
| 385 | - $certdesc .= '<li>' . $this->certFields['c_subject'] . ': ' . $capath->certdata->subject; |
|
| 385 | + $certdesc .= '<li>'.$this->certFields['c_subject'].': '.$capath->certdata->subject; |
|
| 386 | 386 | } |
| 387 | 387 | if ($capath->certdata->issuer) { |
| 388 | - $certdesc .= '<li>' . $this->certFields['c_issuer'] . ': ' . $capath->certdata->issuer; |
|
| 388 | + $certdesc .= '<li>'.$this->certFields['c_issuer'].': '.$capath->certdata->issuer; |
|
| 389 | 389 | } |
| 390 | 390 | if ($capath->certdata->extensions) { |
| 391 | 391 | if ($capath->certdata->extensions->subjectaltname) { |
| 392 | - $certdesc .= '<li>' . $this->certFields['subjectaltname'] . ': ' . $capath->certdata->extensions->subjectaltname; |
|
| 392 | + $certdesc .= '<li>'.$this->certFields['subjectaltname'].': '.$capath->certdata->extensions->subjectaltname; |
|
| 393 | 393 | } |
| 394 | 394 | } |
| 395 | 395 | if ($capath->certdata->extensions->policies) { |
| 396 | - $certdesc .= '<li>' . $this->certFields['policies'] . ': ' . $capath->certdata->extensions->policies; |
|
| 396 | + $certdesc .= '<li>'.$this->certFields['policies'].': '.$capath->certdata->extensions->policies; |
|
| 397 | 397 | } |
| 398 | 398 | if ($capath->certdata->extensions->crldistributionpoints) { |
| 399 | - $certdesc .= '<li>' . $this->certFields['crldistributionpoints'] . ': ' . $capath->certdata->extensions->crldistributionpoints; |
|
| 399 | + $certdesc .= '<li>'.$this->certFields['crldistributionpoints'].': '.$capath->certdata->extensions->crldistributionpoints; |
|
| 400 | 400 | } |
| 401 | 401 | if ($capath->certdata->extensions->authorityinfoaccess) { |
| 402 | - $certdesc .= '<li>' . $this->certFields['authorityinfoaccess'] . ': ' . $capath->certdata->extensions->authorityinfoaccess; |
|
| 402 | + $certdesc .= '<li>'.$this->certFields['authorityinfoaccess'].': '.$capath->certdata->extensions->authorityinfoaccess; |
|
| 403 | 403 | } |
| 404 | 404 | |
| 405 | 405 | $certdesc .= '</ul>'; |
| 406 | - $more .= '<span class="morecontent"><span>' . $certdesc . |
|
| 407 | - '</span> <a href="" class="morelink">' . _("more") . '»</a></span></td></tr>'; |
|
| 406 | + $more .= '<span class="morecontent"><span>'.$certdesc. |
|
| 407 | + '</span> <a href="" class="morelink">'._("more").'»</a></span></td></tr>'; |
|
| 408 | 408 | } else { |
| 409 | 409 | $certdesc = '<br>'; |
| 410 | 410 | } |
| 411 | - $capathtest[] = '<div>' . ($capath->message!=''? $capath->message : _('Test failed')) . '</div>' . $more; |
|
| 411 | + $capathtest[] = '<div>'.($capath->message != '' ? $capath->message : _('Test failed')).'</div>'.$more; |
|
| 412 | 412 | $capathtest[] = '</td> |
| 413 | 413 | </tr> |
| 414 | 414 | </table>'; |
@@ -423,7 +423,7 @@ discard block |
||
| 423 | 423 | foreach ($this->allReachabilityResults['clients'] as $clients) { |
| 424 | 424 | //print '<pre>'; print_r($clients); print '</pre>'; |
| 425 | 425 | $hostindex = $clients->hostindex; |
| 426 | - $clientstest[] = '<p><strong>' . $this->hostMap[$clients->IP] . '</strong></p>'; |
|
| 426 | + $clientstest[] = '<p><strong>'.$this->hostMap[$clients->IP].'</strong></p>'; |
|
| 427 | 427 | $clientstest[] = "<span id='clientresults$hostindex'>"; |
| 428 | 428 | $clientstest[] = '<p></p>'; |
| 429 | 429 | if ($this->globalLevelDynamic != \core\common\Entity::L_ERROR) { |
@@ -433,9 +433,9 @@ discard block |
||
| 433 | 433 | //print '<pre>'; print_r($ca); print '</pre>'; |
| 434 | 434 | $srefused = 0; |
| 435 | 435 | $cliinfo = ''; |
| 436 | - $cliinfo .= '<li>' . _('Client certificate') . ' <b>' . $ca->clientcertinfo->from . |
|
| 437 | - '</b>' . ', ' . $ca->clientcertinfo->message . |
|
| 438 | - '<br> (CA: ' . $ca->clientcertinfo->issuer . ')<ul>'; |
|
| 436 | + $cliinfo .= '<li>'._('Client certificate').' <b>'.$ca->clientcertinfo->from. |
|
| 437 | + '</b>'.', '.$ca->clientcertinfo->message. |
|
| 438 | + '<br> (CA: '.$ca->clientcertinfo->issuer.')<ul>'; |
|
| 439 | 439 | foreach ($ca->certificate as $certificate) { |
| 440 | 440 | if ($certificate->returncode == \core\diag\RADIUSTests::RETVAL_CONNECTION_REFUSED) { |
| 441 | 441 | $srefused = 1; |
@@ -443,8 +443,8 @@ discard block |
||
| 443 | 443 | } |
| 444 | 444 | if ($srefused == 0) { |
| 445 | 445 | foreach ($ca->certificate as $certificate) { |
| 446 | - $cliinfo .= '<li><i>' . $certificate->message . |
|
| 447 | - ', ' . _("expected result: ") . $this->states[$certificate->expected] . '</i>'; |
|
| 446 | + $cliinfo .= '<li><i>'.$certificate->message. |
|
| 447 | + ', '._("expected result: ").$this->states[$certificate->expected].'</i>'; |
|
| 448 | 448 | $cliinfo .= '<ul style="list-style-type: none;">'; |
| 449 | 449 | $level = $certificate->returncode; |
| 450 | 450 | if ($level < 0) { |
@@ -456,11 +456,11 @@ discard block |
||
| 456 | 456 | $state = _("Server accepted this client certificate"); |
| 457 | 457 | } else { |
| 458 | 458 | if (property_exists($certificate, 'reason') && $certificate->reason == \core\diag\RADIUSTests::CERTPROB_UNKNOWN_CA) { |
| 459 | - $add = '<br>' . _('You should update your list of accredited CAs') . |
|
| 460 | - ' <a href=\"' . \config\Diagnostics::RADIUSTESTS['accreditedCAsURL'] . '\">' . |
|
| 461 | - _('Get it from here.') . '</a>'; |
|
| 459 | + $add = '<br>'._('You should update your list of accredited CAs'). |
|
| 460 | + ' <a href=\"'.\config\Diagnostics::RADIUSTESTS['accreditedCAsURL'].'\">'. |
|
| 461 | + _('Get it from here.').'</a>'; |
|
| 462 | 462 | } |
| 463 | - $state = _('Server did not accept this client certificate - reason') . ': ' . |
|
| 463 | + $state = _('Server did not accept this client certificate - reason').': '. |
|
| 464 | 464 | $certificate->resultcomment; |
| 465 | 465 | } |
| 466 | 466 | } else { |
@@ -469,14 +469,14 @@ discard block |
||
| 469 | 469 | $state = _('Server accepted this client certificate, but should not have'); |
| 470 | 470 | } else { |
| 471 | 471 | $level = \core\common\Entity::L_OK; |
| 472 | - $state = _('Server did not accept this client certificate') . ': ' . $certificate->resultcomment; |
|
| 472 | + $state = _('Server did not accept this client certificate').': '.$certificate->resultcomment; |
|
| 473 | 473 | } |
| 474 | 474 | } |
| 475 | - $cliinfo .= '<li><table><tbody><tr><td class="icon_td"><img class="icon" src="' . $this->stateIcons[$level] . '" style="width: 24px;"></td><td>' . $state; |
|
| 476 | - $cliinfo .= ' (' . sprintf(_('elapsed time: %sms.'), $certificate->time_millisec) . ' ) ' . $add . '</td></tr>'; |
|
| 475 | + $cliinfo .= '<li><table><tbody><tr><td class="icon_td"><img class="icon" src="'.$this->stateIcons[$level].'" style="width: 24px;"></td><td>'.$state; |
|
| 476 | + $cliinfo .= ' ('.sprintf(_('elapsed time: %sms.'), $certificate->time_millisec).' ) '.$add.'</td></tr>'; |
|
| 477 | 477 | $cliinfo .= '</tbody></table></ul></li>'; |
| 478 | 478 | if (property_exists($certificate, 'finalerror') && $certificate->finalerror == 1) { |
| 479 | - $cliinfo = '<li>' . _('Rest of tests for this CA skipped') . '</li>'; |
|
| 479 | + $cliinfo = '<li>'._('Rest of tests for this CA skipped').'</li>'; |
|
| 480 | 480 | } |
| 481 | 481 | } |
| 482 | 482 | $cliinfo .= '</ul>'; |
@@ -484,7 +484,7 @@ discard block |
||
| 484 | 484 | |
| 485 | 485 | if ($srefused > 0) { |
| 486 | 486 | $cliinfo = _('Connection refused'); |
| 487 | - $clientstest[] = "<table><tr><td class='icon_td' id='srcclient" . $hostindex . "_img'><img src='" . $this->stateIcons[\core\common\Entity::L_ERROR] . "'></td>" . |
|
| 487 | + $clientstest[] = "<table><tr><td class='icon_td' id='srcclient".$hostindex."_img'><img src='".$this->stateIcons[\core\common\Entity::L_ERROR]."'></td>". |
|
| 488 | 488 | "<td id='srcclient$hostindex'><p>$cliinfo</p></td></tr></table>"; |
| 489 | 489 | } else { |
| 490 | 490 | $clientstest[] = "<p>$cliinfo</p>"; |
@@ -492,9 +492,9 @@ discard block |
||
| 492 | 492 | } |
| 493 | 493 | |
| 494 | 494 | } else { |
| 495 | - $cliinfo = _('Test failed') ; |
|
| 496 | - $clientstest[] = "<table><tr><td class='icon_td' id='srcclient" . $hostindex . "_img'><img src='" . |
|
| 497 | - $this->stateIcons[\core\common\Entity::L_WARN] . "'></td>" . |
|
| 495 | + $cliinfo = _('Test failed'); |
|
| 496 | + $clientstest[] = "<table><tr><td class='icon_td' id='srcclient".$hostindex."_img'><img src='". |
|
| 497 | + $this->stateIcons[\core\common\Entity::L_WARN]."'></td>". |
|
| 498 | 498 | "<td id='srcclient$hostindex'>$cliinfo</td></tr></table>"; |
| 499 | 499 | } |
| 500 | 500 | } else { |
@@ -502,9 +502,9 @@ discard block |
||
| 502 | 502 | $clientstest[] = "<table id='clientsresults$hostindex' style='width:100%'> |
| 503 | 503 | <tr> |
| 504 | 504 | <td class='icon_td'><img src='"; |
| 505 | - $clientstest[] = $this->stateIcons[\core\common\Entity::L_ERROR] . "' id='srcclients" . $hostindex . "_img'></td> |
|
| 505 | + $clientstest[] = $this->stateIcons[\core\common\Entity::L_ERROR]."' id='srcclients".$hostindex."_img'></td> |
|
| 506 | 506 | <td id='srcclient$hostindex'>"; |
| 507 | - $clientstest[] = _("These tests were skipped because of previous errors.") . '</td></tr></table></ul>'; |
|
| 507 | + $clientstest[] = _("These tests were skipped because of previous errors.").'</td></tr></table></ul>'; |
|
| 508 | 508 | } |
| 509 | 509 | $clientstest[] = '</ol><p></p>'; |
| 510 | 510 | } |
@@ -515,7 +515,7 @@ discard block |
||
| 515 | 515 | { |
| 516 | 516 | $out = []; |
| 517 | 517 | $out[] = "<div id='dynamic_tests'><fieldset class='option_container'> |
| 518 | - <legend><strong>" . _("DYNAMIC connectivity tests") . "</strong></legend>"; |
|
| 518 | + <legend><strong>" . _("DYNAMIC connectivity tests")."</strong></legend>"; |
|
| 519 | 519 | |
| 520 | 520 | if (count($this->rfc7585suite->NAPTR_hostname_records) > 0) { |
| 521 | 521 | $capathtest = $this->collectCAPath(); |
@@ -526,17 +526,17 @@ discard block |
||
| 526 | 526 | if ($this->globalLevelDynamic == \core\common\Entity::L_OK && !$this->areFailed) { |
| 527 | 527 | $out[] = 'none'; |
| 528 | 528 | } |
| 529 | - $out[] = ';" id="dynamic_result_fail"><b>' . _("Some errors were found during the tests, see below") . '</b></div>'; |
|
| 529 | + $out[] = ';" id="dynamic_result_fail"><b>'._("Some errors were found during the tests, see below").'</b></div>'; |
|
| 530 | 530 | $out[] = '<div style="align:right; display: '; |
| 531 | 531 | if ($this->globalLevelDynamic != \core\common\Entity::L_OK || $this->areFailed) { |
| 532 | 532 | $out[] = 'none'; |
| 533 | 533 | } |
| 534 | - $out[] = '" id="dynamic_result_pass"><b>' . |
|
| 535 | - _("All tests passed, congratulations!") . '</b></div>' . |
|
| 536 | - '<div style="align:left;"><a href="" class="moreall"><i>' . _('Show detailed information for all tests') . '»</i></a></div>'; |
|
| 534 | + $out[] = '" id="dynamic_result_pass"><b>'. |
|
| 535 | + _("All tests passed, congratulations!").'</b></div>'. |
|
| 536 | + '<div style="align:left;"><a href="" class="moreall"><i>'._('Show detailed information for all tests').'»</i></a></div>'; |
|
| 537 | 537 | //print '<pre>'; print_r($clientstest); print '</pre>'; |
| 538 | 538 | $out[] = join('', $capathtest); |
| 539 | - $out[] = '<span id="clientstest" style="display: ;"><p><hr><b>' . _('Checking if certificates from CAs are accepted...') . '</b><p>' . _('A few client certificates will be tested to check if servers are resistant to some certificate problems.') . '<p>'; |
|
| 539 | + $out[] = '<span id="clientstest" style="display: ;"><p><hr><b>'._('Checking if certificates from CAs are accepted...').'</b><p>'._('A few client certificates will be tested to check if servers are resistant to some certificate problems.').'<p>'; |
|
| 540 | 540 | $out[] = join('', $clientstest); |
| 541 | 541 | $out[] = '</span>'; |
| 542 | 542 | $out[] = '</div>'; |