@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | if ($this->allReachabilityResults['realm'][0]->realm) { |
127 | 127 | $this->realm = $this->allReachabilityResults['realm'][0]->realm; |
128 | 128 | foreach ($this->allReachabilityResults['realm'][0]->totest as $totest) { |
129 | - $this->hostMap[$totest->host] = $totest->bracketaddr; |
|
129 | + $this->hostMap[$totest->host] = $totest->bracketaddr; |
|
130 | 130 | } |
131 | 131 | $this->rfc7585suite = unserialize($this->allReachabilityResults['realm'][0]->rfc7585suite); |
132 | 132 | $this->srv = $this->allReachabilityResults['realm'][0]->srv; |
@@ -457,7 +457,7 @@ discard block |
||
457 | 457 | } else { |
458 | 458 | if (property_exists($certificate, 'reason') && $certificate->reason == \core\diag\RADIUSTests::CERTPROB_UNKNOWN_CA) { |
459 | 459 | $add = '<br>'._('You should update your list of accredited CAs') . |
460 | - ' <a href=\"'.\config\Diagnostics::RADIUSTESTS['accreditedCAsURL'].'\">' . |
|
460 | + ' <a href=\"'.\config\Diagnostics::RADIUSTESTS['accreditedCAsURL'].'\">' . |
|
461 | 461 | _('Get it from here.').'</a>'; |
462 | 462 | } |
463 | 463 | $state = _('Server did not accept this client certificate - reason').': ' . |
@@ -468,8 +468,8 @@ discard block |
||
468 | 468 | $level = \core\common\Entity::L_WARN; |
469 | 469 | $state = _('Server accepted this client certificate, but should not have'); |
470 | 470 | } else { |
471 | - $level = \core\common\Entity::L_OK; |
|
472 | - $state = _('Server did not accept this client certificate').': '.$certificate->resultcomment; |
|
471 | + $level = \core\common\Entity::L_OK; |
|
472 | + $state = _('Server did not accept this client certificate').': '.$certificate->resultcomment; |
|
473 | 473 | } |
474 | 474 | } |
475 | 475 | $cliinfo .= '<li><table><tbody><tr><td class="icon_td"><img class="icon" src="'.$this->stateIcons[$level].'" style="width: 24px;"></td><td>'.$state; |
@@ -485,7 +485,7 @@ discard block |
||
485 | 485 | if ($srefused > 0) { |
486 | 486 | $cliinfo = _('Connection refused'); |
487 | 487 | $clientstest[] = "<table><tr><td class='icon_td' id='srcclient".$hostindex."_img'><img src='".$this->stateIcons[\core\common\Entity::L_ERROR]."'></td>" . |
488 | - "<td id='srcclient$hostindex'><p>$cliinfo</p></td></tr></table>"; |
|
488 | + "<td id='srcclient$hostindex'><p>$cliinfo</p></td></tr></table>"; |
|
489 | 489 | } else { |
490 | 490 | $clientstest[] = "<p>$cliinfo</p>"; |
491 | 491 | } |
@@ -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,7 +203,7 @@ 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'> |
@@ -289,13 +289,13 @@ discard block |
||
289 | 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 | 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'>" . |
|
298 | + <td class='icon_td'><img src='".$this->stateIcons[$this->globalLevelDynamic]."' id='main_dynamic_ico' class='icon'></td><td id='main_dynamic_result'>". |
|
299 | 299 | $this->globalInfo[$this->globalLevelDynamic].' '._("See the appropriate tab for details.").'</td></tr></table>'; |
300 | 300 | } |
301 | 301 | $out[] = '</fieldset>'; |
@@ -323,7 +323,7 @@ discard block |
||
323 | 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) { |
@@ -337,7 +337,7 @@ discard block |
||
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 = ''; |
@@ -403,12 +403,12 @@ discard block |
||
403 | 403 | } |
404 | 404 | |
405 | 405 | $certdesc .= '</ul>'; |
406 | - $more .= '<span class="morecontent"><span>'.$certdesc . |
|
406 | + $more .= '<span class="morecontent"><span>'.$certdesc. |
|
407 | 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>'; |
@@ -433,8 +433,8 @@ 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 . |
|
436 | + $cliinfo .= '<li>'._('Client certificate').' <b>'.$ca->clientcertinfo->from. |
|
437 | + '</b>'.', '.$ca->clientcertinfo->message. |
|
438 | 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) { |
@@ -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'].'\">' . |
|
459 | + $add = '<br>'._('You should update your list of accredited CAs'). |
|
460 | + ' <a href=\"'.\config\Diagnostics::RADIUSTESTS['accreditedCAsURL'].'\">'. |
|
461 | 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 { |
@@ -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 { |
@@ -504,7 +504,7 @@ discard block |
||
504 | 504 | <td class='icon_td'><img src='"; |
505 | 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 | } |
@@ -531,8 +531,8 @@ 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_pass"><b>' . |
|
535 | - _("All tests passed, congratulations!").'</b></div>' . |
|
534 | + $out[] = '" id="dynamic_result_pass"><b>'. |
|
535 | + _("All tests passed, congratulations!").'</b></div>'. |
|
536 | 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); |