@@ -315,7 +315,7 @@ discard block |
||
315 | 315 | $serverCandidates[IdPlist::geoDistance($adminLocation, ['lat' => $iterator->location_lat, 'lon' => $iterator->location_lon])] = $iterator->server_id; |
316 | 316 | } |
317 | 317 | if ($clients > $maxSupportedClients * 0.9) { |
318 | - $this->loggerInstance->debug(1, "A RADIUS server for Managed SP (" . $iterator->server_id . ") is serving at more than 90% capacity!"); |
|
318 | + $this->loggerInstance->debug(1, "A RADIUS server for Managed SP (".$iterator->server_id.") is serving at more than 90% capacity!"); |
|
319 | 319 | } |
320 | 320 | } |
321 | 321 | if (count($serverCandidates) == 0 && $federation != "DEFAULT") { |
@@ -339,7 +339,7 @@ discard block |
||
339 | 339 | */ |
340 | 340 | private function createTLScredentials() |
341 | 341 | { |
342 | - $clientName = "SP_" . $this->identifier . '-' . $this->institution; |
|
342 | + $clientName = "SP_".$this->identifier.'-'.$this->institution; |
|
343 | 343 | $dn = array( |
344 | 344 | "organizationName" => "eduroam", |
345 | 345 | "organizationalUnitName" => "eduroam Managed SP", |
@@ -353,13 +353,13 @@ discard block |
||
353 | 353 | openssl_pkey_export($privkey, $this->radsec_priv); |
354 | 354 | // Generate a certificate signing request |
355 | 355 | $csr = openssl_csr_new($dn, $privkey, |
356 | - array('digest_alg' => 'sha256', 'config' => ROOT . "/config/ManagedSPCerts/openssl.cnf")); |
|
356 | + array('digest_alg' => 'sha256', 'config' => ROOT."/config/ManagedSPCerts/openssl.cnf")); |
|
357 | 357 | // get CA certificate and private key |
358 | - $caprivkey = array(file_get_contents(ROOT . "/config/ManagedSPCerts/eduroamSP-CA.key"), |
|
358 | + $caprivkey = array(file_get_contents(ROOT."/config/ManagedSPCerts/eduroamSP-CA.key"), |
|
359 | 359 | \config\Master::MANAGEDSP['capass']); |
360 | - $cacert = file_get_contents(ROOT . "/config/ManagedSPCerts/eduroamSP-CA.pem"); |
|
360 | + $cacert = file_get_contents(ROOT."/config/ManagedSPCerts/eduroamSP-CA.pem"); |
|
361 | 361 | $clientcert = openssl_csr_sign($csr, $cacert, $caprivkey, \config\Master::MANAGEDSP['daystoexpiry'], |
362 | - array('digest_alg'=>'sha256', 'config' => ROOT . "/config/ManagedSPCerts/openssl.cnf"), rand()); |
|
362 | + array('digest_alg'=>'sha256', 'config' => ROOT."/config/ManagedSPCerts/openssl.cnf"), rand()); |
|
363 | 363 | openssl_x509_export($clientcert, $this->radsec_cert); |
364 | 364 | } |
365 | 365 | /** |
@@ -384,7 +384,7 @@ discard block |
||
384 | 384 | $conditional1 = "AND activity_time > DATE_SUB(NOW(), INTERVAL $backlog SECOND)"; |
385 | 385 | $conditional2 = ""; |
386 | 386 | } |
387 | - $stats = $this->databaseHandle->exec("SELECT activity_time, realm, mac, cui, result, ap_id, prot FROM activity WHERE operatorname = ? $conditional1 ORDER BY activity_time $conditional2", "s", $opName ); |
|
387 | + $stats = $this->databaseHandle->exec("SELECT activity_time, realm, mac, cui, result, ap_id, prot FROM activity WHERE operatorname = ? $conditional1 ORDER BY activity_time $conditional2", "s", $opName); |
|
388 | 388 | return mysqli_fetch_all($stats, \MYSQLI_ASSOC); |
389 | 389 | } |
390 | 390 | |
@@ -515,7 +515,7 @@ discard block |
||
515 | 515 | { |
516 | 516 | $customAttrib = $this->getAttributes("managedsp:operatorname"); |
517 | 517 | if (count($customAttrib) == 0) { |
518 | - return "1sp." . $this->identifier . "-" . $this->institution . \config\ConfAssistant::SILVERBULLET['realm_suffix']; |
|
518 | + return "1sp.".$this->identifier."-".$this->institution.\config\ConfAssistant::SILVERBULLET['realm_suffix']; |
|
519 | 519 | } |
520 | 520 | return $customAttrib[0]["value"]; |
521 | 521 | } |
@@ -530,14 +530,14 @@ discard block |
||
530 | 530 | private function sendToRADIUS(int $idx, $post) |
531 | 531 | { |
532 | 532 | $hostname = "radius_hostname_$idx"; |
533 | - $ch = curl_init("http://" . $this->$hostname . ':' . \config\Master::MANAGEDSP['radiusconfigport']); |
|
533 | + $ch = curl_init("http://".$this->$hostname.':'.\config\Master::MANAGEDSP['radiusconfigport']); |
|
534 | 534 | if ($ch === FALSE) { |
535 | 535 | $res = 'FAILURE'; |
536 | 536 | } else { |
537 | 537 | curl_setopt($ch, CURLOPT_USERAGENT, "CAT-ManagedSP"); |
538 | 538 | curl_setopt($ch, CURLOPT_POST, 1); |
539 | 539 | curl_setopt($ch, CURLOPT_POSTFIELDS, $post); |
540 | - $this->loggerInstance->debug(1, "Posting to http://" . $this->$hostname . ':' . \config\Master::MANAGEDSP['radiusconfigport'] . "/$post\n"); |
|
540 | + $this->loggerInstance->debug(1, "Posting to http://".$this->$hostname.':'.\config\Master::MANAGEDSP['radiusconfigport']."/$post\n"); |
|
541 | 541 | curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); |
542 | 542 | curl_setopt($ch, CURLOPT_HEADER, 0); |
543 | 543 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
@@ -576,19 +576,19 @@ discard block |
||
576 | 576 | } else { |
577 | 577 | $txt = $remove ? _('Profile deactivation failed') : _('Profile activation/modification failed'); |
578 | 578 | } |
579 | - $txt = $txt . ' '; |
|
579 | + $txt = $txt.' '; |
|
580 | 580 | if (array_count_values($response)[$status] == 2) { |
581 | - $txt = $txt . _('on both RADIUS servers: primary and backup') . '.'; |
|
581 | + $txt = $txt._('on both RADIUS servers: primary and backup').'.'; |
|
582 | 582 | } else { |
583 | 583 | if ($response['res[1]'] == $status) { |
584 | - $txt = $txt . _('on primary RADIUS server') . '.'; |
|
584 | + $txt = $txt._('on primary RADIUS server').'.'; |
|
585 | 585 | } else { |
586 | - $txt = $txt . _('on backup RADIUS server') . '.'; |
|
586 | + $txt = $txt._('on backup RADIUS server').'.'; |
|
587 | 587 | } |
588 | 588 | } |
589 | 589 | $mail = \core\common\OutsideComm::mailHandle(); |
590 | 590 | $email = $this->getAttributes("support:email")[0]['value']; |
591 | - $mail->FromName = \config\Master::APPEARANCE['productname'] . " Notification System"; |
|
591 | + $mail->FromName = \config\Master::APPEARANCE['productname']." Notification System"; |
|
592 | 592 | $mail->addAddress($email); |
593 | 593 | if ($status == 'OK') { |
594 | 594 | $mail->Subject = _('RADIUS profile update problem fixed'); |
@@ -622,7 +622,7 @@ discard block |
||
622 | 622 | return NULL; |
623 | 623 | } |
624 | 624 | $timeout = 10; |
625 | - curl_setopt($ch, CURLOPT_URL, 'http://' . $host); |
|
625 | + curl_setopt($ch, CURLOPT_URL, 'http://'.$host); |
|
626 | 626 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
627 | 627 | curl_setopt($ch, CURLOPT_TIMEOUT, $timeout); |
628 | 628 | curl_exec($ch); |
@@ -714,49 +714,49 @@ discard block |
||
714 | 714 | { |
715 | 715 | $toPost = ($onlyone ? array($onlyone => '') : array(1 => '', 2 => '')); |
716 | 716 | if ($torevoke != '') { |
717 | - $toPostTemplate = 'instid=' . $this->institution . '&deploymentid=' . $this->identifier . |
|
717 | + $toPostTemplate = 'instid='.$this->institution.'&deploymentid='.$this->identifier. |
|
718 | 718 | "&torevoke=$torevoke"; |
719 | 719 | foreach (array_keys($toPost) as $key) { |
720 | 720 | $toPost[$key] = $toPostTemplate; |
721 | 721 | } |
722 | 722 | } else { |
723 | 723 | $remove = ($this->status == \core\AbstractDeployment::INACTIVE) ? 0 : 1; |
724 | - $toPostTemplate = 'instid=' . $this->institution . '&deploymentid=' . $this->identifier . |
|
725 | - '&secret=' . $this->secret . |
|
726 | - '&country=' . $this->getAttributes("internal:country")[0]['value'] . |
|
727 | - '&pskkey=' . $this->pskkey . '&'; |
|
724 | + $toPostTemplate = 'instid='.$this->institution.'&deploymentid='.$this->identifier. |
|
725 | + '&secret='.$this->secret. |
|
726 | + '&country='.$this->getAttributes("internal:country")[0]['value']. |
|
727 | + '&pskkey='.$this->pskkey.'&'; |
|
728 | 728 | if ($remove) { |
729 | - $toPostTemplate = $toPostTemplate . 'remove=1&'; |
|
729 | + $toPostTemplate = $toPostTemplate.'remove=1&'; |
|
730 | 730 | } else { |
731 | - $toPostTemplate = $toPostTemplate . 'operatorname=' . $this->getOperatorName() . '&'; |
|
731 | + $toPostTemplate = $toPostTemplate.'operatorname='.$this->getOperatorName().'&'; |
|
732 | 732 | if ($this->getAttributes("managedsp:vlan")[0]['value'] ?? NULL) { |
733 | 733 | $allRealms = $this->getAllRealms(); |
734 | 734 | if (!empty($allRealms)) { |
735 | - $toPostTemplate = $toPostTemplate . 'vlan=' . $this->getAttributes("managedsp:vlan")[0]['value'] . '&'; |
|
736 | - $toPostTemplate = $toPostTemplate . 'realmforvlan[]=' . implode('&realmforvlan[]=', $allRealms) . '&'; |
|
735 | + $toPostTemplate = $toPostTemplate.'vlan='.$this->getAttributes("managedsp:vlan")[0]['value'].'&'; |
|
736 | + $toPostTemplate = $toPostTemplate.'realmforvlan[]='.implode('&realmforvlan[]=', $allRealms).'&'; |
|
737 | 737 | } |
738 | 738 | } |
739 | 739 | } |
740 | 740 | foreach (array_keys($toPost) as $key) { |
741 | - $elem = 'port' . $key; |
|
742 | - $toPost[$key] = $toPostTemplate . 'port=' . $this->$elem; |
|
741 | + $elem = 'port'.$key; |
|
742 | + $toPost[$key] = $toPostTemplate.'port='.$this->$elem; |
|
743 | 743 | } |
744 | 744 | } |
745 | 745 | $response = array(); |
746 | 746 | foreach ($toPost as $key => $value) { |
747 | - $this->loggerInstance->debug(1, 'toPost ' . $toPost[$key] . "\n"); |
|
747 | + $this->loggerInstance->debug(1, 'toPost '.$toPost[$key]."\n"); |
|
748 | 748 | // temporarly one server $response['res[' . $key . ']'] = $this->sendToRADIUS($key, $toPost[$key]); |
749 | 749 | //if ($key == 2) { |
750 | 750 | // $response['res[2]'] = 'OK'; |
751 | 751 | //} else { |
752 | - $response['res[' . $key . ']'] = $this->sendToRADIUS($key, $toPost[$key]); |
|
752 | + $response['res['.$key.']'] = $this->sendToRADIUS($key, $toPost[$key]); |
|
753 | 753 | //} |
754 | 754 | } |
755 | 755 | if ($onlyone) { |
756 | - $response['res[' . ($onlyone == 1) ? 2 : 1 . ']'] = \core\AbstractDeployment::RADIUS_OK; |
|
756 | + $response['res['.($onlyone == 1) ? 2 : 1.']'] = \core\AbstractDeployment::RADIUS_OK; |
|
757 | 757 | } |
758 | 758 | foreach (array('OK', 'FAILURE') as $status) { |
759 | - if ( ( ($status == 'OK' && $notify) || ($status == 'FAILURE') ) && ( in_array($status, $response) ) ) { |
|
759 | + if ((($status == 'OK' && $notify) || ($status == 'FAILURE')) && (in_array($status, $response))) { |
|
760 | 760 | $this->sendMailtoAdmin($remove, $response, $status); |
761 | 761 | } |
762 | 762 | } |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | |
22 | 22 | namespace core; |
23 | 23 | |
24 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
24 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
25 | 25 | |
26 | 26 | $instMgmt = new \core\UserManagement(); |
27 | 27 | $deco = new \web\lib\admin\PageDecoration(); |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | <?php echo $uiElements->infoblock($user->getAttributes(), "user", "User"); ?> |
62 | 62 | <tr> |
63 | 63 | <td> |
64 | - <?php echo "" . _("Unique Identifier") ?> |
|
64 | + <?php echo ""._("Unique Identifier") ?> |
|
65 | 65 | </td> |
66 | 66 | <td> |
67 | 67 | </td> |
@@ -74,14 +74,14 @@ discard block |
||
74 | 74 | <div> |
75 | 75 | <?php |
76 | 76 | if (\config\Master::DB['USER']['readonly'] === FALSE) { |
77 | - echo "<a href='edit_user.php'><button>" . _("Edit User Details") . "</button></a>"; |
|
77 | + echo "<a href='edit_user.php'><button>"._("Edit User Details")."</button></a>"; |
|
78 | 78 | } |
79 | 79 | |
80 | 80 | if ($user->isFederationAdmin()) { |
81 | - echo "<form action='overview_federation.php' method='GET' accept-charset='UTF-8'><button type='submit'>" . sprintf(_('Click here for %s management tasks'), $uiElements->nomenclatureFed) . "</button></form>"; |
|
81 | + echo "<form action='overview_federation.php' method='GET' accept-charset='UTF-8'><button type='submit'>".sprintf(_('Click here for %s management tasks'), $uiElements->nomenclatureFed)."</button></form>"; |
|
82 | 82 | } |
83 | 83 | if ($user->isSuperadmin()) { |
84 | - echo "<form action='112365365321.php' method='GET' accept-charset='UTF-8'><button type='submit'>" . _('Click here to access the superadmin page') . "</button></form>"; |
|
84 | + echo "<form action='112365365321.php' method='GET' accept-charset='UTF-8'><button type='submit'>"._('Click here to access the superadmin page')."</button></form>"; |
|
85 | 85 | } |
86 | 86 | ?> |
87 | 87 | </div> |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | if (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_SILVERBULLET'] == "LOCAL") { |
94 | 94 | $target = "https://wiki.geant.org/x/6Zg7Bw"; // Managed IdP manual |
95 | 95 | } |
96 | - $helptext = "<h3 style='display:inline;'>" . sprintf(_("(Need help? Refer to the <a href='%s'>%s administrator manual</a>)"), $target, $uiElements->nomenclatureParticipant) . "</h3>"; |
|
96 | + $helptext = "<h3 style='display:inline;'>".sprintf(_("(Need help? Refer to the <a href='%s'>%s administrator manual</a>)"), $target, $uiElements->nomenclatureParticipant)."</h3>"; |
|
97 | 97 | } else { |
98 | 98 | $helptext = ""; |
99 | 99 | } |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | // we need to run the Federation constructor |
103 | 103 | $cat = new \core\CAT; |
104 | 104 | /// first parameter: number of Identity Providers; second param is the literal configured term for 'Identity Provider' (you may or may not be able to add a plural suffix for your locale) |
105 | - echo "<h2>" . sprintf(ngettext("You are managing the following <span style='display:none'>%d </span>%s:", "You are managing the following <strong>%d</strong> %s:", sizeof($hasInst)), sizeof($hasInst), $uiElements->nomenclatureParticipant) . "</h2>"; |
|
105 | + echo "<h2>".sprintf(ngettext("You are managing the following <span style='display:none'>%d </span>%s:", "You are managing the following <strong>%d</strong> %s:", sizeof($hasInst)), sizeof($hasInst), $uiElements->nomenclatureParticipant)."</h2>"; |
|
106 | 106 | $instlist = []; |
107 | 107 | $my_idps = []; |
108 | 108 | $myFeds = []; |
@@ -194,14 +194,14 @@ discard block |
||
194 | 194 | <td> |
195 | 195 | <?php |
196 | 196 | if ($blessedUser && \config\Master::DB['INST']['readonly'] === FALSE) { |
197 | - echo "<div style='white-space: nowrap;'><form method='post' action='inc/manageAdmins.inc.php?inst_id=" . $the_inst->identifier . "' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'><button type='submit'>" . _("Add/Remove Administrators") . "</button></form></div>"; |
|
197 | + echo "<div style='white-space: nowrap;'><form method='post' action='inc/manageAdmins.inc.php?inst_id=".$the_inst->identifier."' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'><button type='submit'>"._("Add/Remove Administrators")."</button></form></div>"; |
|
198 | 198 | } |
199 | 199 | ?> |
200 | 200 | </td> |
201 | 201 | <td> <!-- danger zone --> |
202 | 202 | |
203 | 203 | <form action='edit_participant_result.php?inst_id=<?php echo $the_inst->identifier; ?>' method='post' accept-charset='UTF-8'> |
204 | - <button class='delete' type='submit' name='submitbutton' value='<?php echo \web\lib\common\FormElements::BUTTON_DELETE; ?>' onclick="return confirm('<?php echo ( \config\ConfAssistant::CONSORTIUM['selfservice_registration'] === NULL ? sprintf(_("After deleting the %s, you can not recreate it yourself - you need a new invitation token from the %s administrator!"), $uiElements->nomenclatureParticipant, $uiElements->nomenclatureFed) . " " : "" ) . sprintf(_("Do you really want to delete your %s %s?"), $uiElements->nomenclatureParticipant, $the_inst->name); ?>')"><?php echo sprintf(_("Delete %s"), $uiElements->nomenclatureParticipant); ?></button> |
|
204 | + <button class='delete' type='submit' name='submitbutton' value='<?php echo \web\lib\common\FormElements::BUTTON_DELETE; ?>' onclick="return confirm('<?php echo (\config\ConfAssistant::CONSORTIUM['selfservice_registration'] === NULL ? sprintf(_("After deleting the %s, you can not recreate it yourself - you need a new invitation token from the %s administrator!"), $uiElements->nomenclatureParticipant, $uiElements->nomenclatureFed)." " : "").sprintf(_("Do you really want to delete your %s %s?"), $uiElements->nomenclatureParticipant, $the_inst->name); ?>')"><?php echo sprintf(_("Delete %s"), $uiElements->nomenclatureParticipant); ?></button> |
|
205 | 205 | </form> |
206 | 206 | <form action='edit_participant_result.php?inst_id=<?php echo $the_inst->identifier; ?>' method='post' accept-charset='UTF-8'> |
207 | 207 | <button class='delete' type='submit' name='submitbutton' value='<?php echo \web\lib\common\FormElements::BUTTON_FLUSH_AND_RESTART; ?>' onclick="return confirm('<?php echo sprintf(_("This action will delete all properties of the %s and start over the configuration from scratch. Do you really want to reset all settings of the %s %s?"), $uiElements->nomenclatureParticipant, $uiElements->nomenclatureParticipant, $the_inst->name); ?>')"><?php echo sprintf(_("Reset all %s settings"), $uiElements->nomenclatureParticipant); ?></button> |
@@ -216,19 +216,19 @@ discard block |
||
216 | 216 | </table> |
217 | 217 | <?php |
218 | 218 | } else { |
219 | - echo "<h2>" . sprintf(_("You are not managing any %s."), $uiElements->nomenclatureParticipant) . "</h2>"; |
|
219 | + echo "<h2>".sprintf(_("You are not managing any %s."), $uiElements->nomenclatureParticipant)."</h2>"; |
|
220 | 220 | } |
221 | 221 | |
222 | 222 | if (\config\Master::DB['INST']['readonly'] === FALSE) { |
223 | 223 | if (\config\ConfAssistant::CONSORTIUM['selfservice_registration'] === NULL) { |
224 | - echo "<p>" . sprintf(_("Please ask your %s administrator to invite you to become an %s administrator."), $uiElements->nomenclatureFed, $uiElements->nomenclatureParticipant) . "</p>"; |
|
224 | + echo "<p>".sprintf(_("Please ask your %s administrator to invite you to become an %s administrator."), $uiElements->nomenclatureFed, $uiElements->nomenclatureParticipant)."</p>"; |
|
225 | 225 | echo "<hr/> |
226 | 226 | <div style='white-space: nowrap;'> |
227 | 227 | <form action='action_enrollment.php' method='get' accept-charset='UTF-8'>" . |
228 | - sprintf(_("Did you receive an invitation token to manage an %s? Please paste it here:"), $uiElements->nomenclatureParticipant) . |
|
228 | + sprintf(_("Did you receive an invitation token to manage an %s? Please paste it here:"), $uiElements->nomenclatureParticipant). |
|
229 | 229 | " <input type='text' id='token' name='token'/> |
230 | 230 | <button type='submit'>" . |
231 | - _("Go!") . " |
|
231 | + _("Go!")." |
|
232 | 232 | </button> |
233 | 233 | </form> |
234 | 234 | </div>"; |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | echo "<table>"; |
250 | 250 | foreach ($newInst as $inst) { |
251 | 251 | echo "<tr><th>"; |
252 | - $i =0; |
|
252 | + $i = 0; |
|
253 | 253 | foreach ($inst[1] as $lang => $name) { |
254 | 254 | if ($i > 0) { |
255 | 255 | echo "; "; |
@@ -262,7 +262,7 @@ discard block |
||
262 | 262 | echo "<input type='hidden' id='token' name='token' value='EDUGAIN-SELF-REGISTER'/>"; |
263 | 263 | $extid = strtoupper($inst[2]).'01-'.$inst[0]; |
264 | 264 | echo "<input type='hidden' name='extid' value='$extid'>"; |
265 | - echo "<button type='submit' accept-charset='UTF-8' onclick='javascript:window.confirm(\""._("Proceed with creating the CAT IdP?")."\")'>" ._("create CAT profile for this institution")."</button><br>"; |
|
265 | + echo "<button type='submit' accept-charset='UTF-8' onclick='javascript:window.confirm(\""._("Proceed with creating the CAT IdP?")."\")'>"._("create CAT profile for this institution")."</button><br>"; |
|
266 | 266 | echo "</form>"; |
267 | 267 | echo "</div></td></tr>"; |
268 | 268 | } |
@@ -275,7 +275,7 @@ discard block |
||
275 | 275 | <div style='white-space: nowrap;'> |
276 | 276 | <form action='action_enrollment.php' method='get'><button type='submit' accept-charset='UTF-8'> |
277 | 277 | <input type='hidden' id='token' name='token' value='SELF-REGISTER'/>" . |
278 | - sprintf(_("New %s Registration"), $uiElements->nomenclatureParticipant) . " |
|
278 | + sprintf(_("New %s Registration"), $uiElements->nomenclatureParticipant)." |
|
279 | 279 | </button> |
280 | 280 | </form> |
281 | 281 | </div>"; |
@@ -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 | $auth = new \web\lib\admin\Authentication(); |
32 | 32 | $deco = new \web\lib\admin\PageDecoration(); |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | $feds = $user->getAttributes("user:fedadmin"); |
71 | 71 | foreach ($feds as $oneFed) { |
72 | 72 | $theFed = new \core\Federation($oneFed['value']); |
73 | - printf("<h2>" . _("Certificate Information for %s %s")."</h2>", $uiElements->nomenclatureFed, $theFed->name); |
|
73 | + printf("<h2>"._("Certificate Information for %s %s")."</h2>", $uiElements->nomenclatureFed, $theFed->name); |
|
74 | 74 | foreach ($theFed->listTlsCertificates() as $oneCert) { |
75 | 75 | if ($oneCert['STATUS'] == "REQUESTED") { |
76 | 76 | $theFed->updateCertificateStatus($oneCert['REQSERIAL']); |
@@ -81,12 +81,12 @@ discard block |
||
81 | 81 | foreach ($theFed->listTlsCertificates() as $oneCert) { // fetch list a second time, in case we got a cert |
82 | 82 | $status = $oneCert['STATUS']; |
83 | 83 | echo "<tr>"; |
84 | - echo "<td>" . $oneCert['REQSERIAL'] . "</td><td>" . $oneCert['DN'] . "</td><td>" . $status . "</td><td>" . $oneCert['EXPIRY'] . "</td>"; |
|
84 | + echo "<td>".$oneCert['REQSERIAL']."</td><td>".$oneCert['DN']."</td><td>".$status."</td><td>".$oneCert['EXPIRY']."</td>"; |
|
85 | 85 | if ($status == "ISSUED") { |
86 | 86 | ?> |
87 | 87 | <td> |
88 | 88 | <form action='inc/showCert.inc.php' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8' method="POST"> |
89 | - <input type="hidden" name="certdata" value="<?php echo $oneCert['CERT'];?>"/> |
|
89 | + <input type="hidden" name="certdata" value="<?php echo $oneCert['CERT']; ?>"/> |
|
90 | 90 | <button type="submit">Display</button> |
91 | 91 | </form> |
92 | 92 | <td> |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | */ |
29 | 29 | ?> |
30 | 30 | <?php |
31 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
31 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
32 | 32 | |
33 | 33 | function displaySilverbulletPropertyWidget(&$theProfile, $readonly, &$uiElements) { |
34 | 34 | ?> |
@@ -45,14 +45,14 @@ discard block |
||
45 | 45 | <ul style='margin:1px'> |
46 | 46 | <?php |
47 | 47 | foreach ($completeness as $missing_attrib) { |
48 | - echo "<li>" . $uiElements->displayName($missing_attrib) . "</li>"; |
|
48 | + echo "<li>".$uiElements->displayName($missing_attrib)."</li>"; |
|
49 | 49 | } |
50 | 50 | ?> |
51 | 51 | </ul> |
52 | 52 | </div> |
53 | 53 | <?php |
54 | 54 | } else { |
55 | - echo sprintf(_("You can create up to %d users."), $maxusers[0]['value']) . "<br/>" . sprintf(_("Their credentials will carry the name <strong>%s</strong>."), $theProfile->realm); |
|
55 | + echo sprintf(_("You can create up to %d users."), $maxusers[0]['value'])."<br/>".sprintf(_("Their credentials will carry the name <strong>%s</strong>."), $theProfile->realm); |
|
56 | 56 | } |
57 | 57 | ?> |
58 | 58 | <br/> |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | if ($readonly === FALSE) { |
62 | 62 | ?> |
63 | 63 | <form action='edit_silverbullet.php?inst_id=<?php echo $theProfile->institution; ?>&profile_id=<?php echo $theProfile->identifier; ?>' method='POST'> |
64 | - <button <?php echo ( is_array($completeness) ? "disabled" : "" ); ?> type='submit' name='sb_action' value='sb_edit'><?php echo _("Manage User Base"); ?></button> |
|
64 | + <button <?php echo (is_array($completeness) ? "disabled" : ""); ?> type='submit' name='sb_action' value='sb_edit'><?php echo _("Manage User Base"); ?></button> |
|
65 | 65 | </form> |
66 | 66 | <?php |
67 | 67 | } |
@@ -97,21 +97,21 @@ discard block |
||
97 | 97 | $has_overrides = TRUE; |
98 | 98 | } |
99 | 99 | } |
100 | - $buffer_eaptypediv = "<div style='margin-bottom:40px; float:left;'>" . _("<strong>EAP Types</strong> (in order of preference):") . "<br/>"; |
|
100 | + $buffer_eaptypediv = "<div style='margin-bottom:40px; float:left;'>"._("<strong>EAP Types</strong> (in order of preference):")."<br/>"; |
|
101 | 101 | $typelist = $theProfile->getEapMethodsinOrderOfPreference(); |
102 | 102 | $allcomplete = TRUE; |
103 | 103 | foreach ($typelist as $eaptype) { |
104 | 104 | $buffer_eaptypediv .= $eaptype->getPrintableRep(); |
105 | 105 | $completeness = $theProfile->isEapTypeDefinitionComplete($eaptype); |
106 | 106 | if ($completeness === true) { |
107 | - $buffer_eaptypediv .= " <div class='acceptable'>" . _("OK") . "</div>"; |
|
107 | + $buffer_eaptypediv .= " <div class='acceptable'>"._("OK")."</div>"; |
|
108 | 108 | } else { |
109 | 109 | $buffer_eaptypediv .= " <div class='notacceptable'>"; |
110 | 110 | $buffer_eaptypediv .= _("Information needed!"); |
111 | 111 | if (is_array($completeness)) { |
112 | 112 | $buffer_eaptypediv .= "<ul style='margin:1px'>"; |
113 | 113 | foreach ($completeness as $missing_attrib) { |
114 | - $buffer_eaptypediv .= "<li>" . $uiElements->displayName($missing_attrib) . "</li>"; |
|
114 | + $buffer_eaptypediv .= "<li>".$uiElements->displayName($missing_attrib)."</li>"; |
|
115 | 115 | } |
116 | 116 | $buffer_eaptypediv .= "</ul>"; |
117 | 117 | } |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | foreach ($attribs as $attrib) { |
124 | 124 | if ($attrib['level'] == \core\Options::LEVEL_METHOD && !preg_match("/^internal:/", $attrib['name']) && !$justOnce) { |
125 | 125 | $justOnce = TRUE; |
126 | - $buffer_eaptypediv .= "<img src='../resources/images/icons/Tabler/square-rounded-letter-e-blue.svg' alt='" . _("Options on EAP Method/Device level are in effect.") . "'>"; |
|
126 | + $buffer_eaptypediv .= "<img src='../resources/images/icons/Tabler/square-rounded-letter-e-blue.svg' alt='"._("Options on EAP Method/Device level are in effect.")."'>"; |
|
127 | 127 | } |
128 | 128 | } |
129 | 129 | $buffer_eaptypediv .= "<br/>"; |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | if ($theProfile->isRedirected()) { |
150 | 150 | $iconData = $uiElements->iconData('PROFILES_REDIRECTED'); |
151 | 151 | $iconData['text'] = _("Profile redirected"); |
152 | - $buffer_headline .= "<br/>" . $uiElements->catIcon(($iconData)); |
|
152 | + $buffer_headline .= "<br/>".$uiElements->catIcon(($iconData)); |
|
153 | 153 | |
154 | 154 | } |
155 | 155 | |
@@ -157,15 +157,15 @@ discard block |
||
157 | 157 | switch ($certStatus) { |
158 | 158 | case core\AbstractProfile::CERT_STATUS_OK: |
159 | 159 | $iconData = $uiElements->iconData('CERT_STATUS_OK'); |
160 | - $buffer_headline .= "<br/>" . $uiElements->catIcon(($iconData)); |
|
160 | + $buffer_headline .= "<br/>".$uiElements->catIcon(($iconData)); |
|
161 | 161 | break; |
162 | 162 | case core\AbstractProfile::CERT_STATUS_WARN: |
163 | 163 | $iconData = $uiElements->iconData('CERT_STATUS_WARN'); |
164 | - $buffer_headline .= "<br/>" . $uiElements->catIcon(($iconData)); |
|
164 | + $buffer_headline .= "<br/>".$uiElements->catIcon(($iconData)); |
|
165 | 165 | break; |
166 | 166 | case core\AbstractProfile::CERT_STATUS_ERROR: |
167 | 167 | $iconData = $uiElements->iconData('CERT_STATUS_ERROR'); |
168 | - $buffer_headline .= "<br/>" . $uiElements->catIcon(($iconData)); |
|
168 | + $buffer_headline .= "<br/>".$uiElements->catIcon(($iconData)); |
|
169 | 169 | break; |
170 | 170 | } |
171 | 171 | $buffer_headline .= "</div>"; |
@@ -191,11 +191,11 @@ discard block |
||
191 | 191 | if (\config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS'] == "LOCAL") { |
192 | 192 | $diagUrl = "../diag/"; |
193 | 193 | } else { |
194 | - $diagUrl = \config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS'] . "/diag/"; |
|
194 | + $diagUrl = \config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS']."/diag/"; |
|
195 | 195 | } |
196 | 196 | ?> |
197 | - <form action='<?php echo $diagUrl . "action_realmcheck.php?inst_id=" . $theProfile->institution . "&profile_id=" . $theProfile->identifier ?>' method='post' accept-charset='UTF-8'> |
|
198 | - <input type='hidden' name='comefrom' value='<?php echo htmlspecialchars($link . $_SERVER['SCRIPT_NAME']); ?>'/> |
|
197 | + <form action='<?php echo $diagUrl."action_realmcheck.php?inst_id=".$theProfile->institution."&profile_id=".$theProfile->identifier ?>' method='post' accept-charset='UTF-8'> |
|
198 | + <input type='hidden' name='comefrom' value='<?php echo htmlspecialchars($link.$_SERVER['SCRIPT_NAME']); ?>'/> |
|
199 | 199 | <button type='submit' name='profile_action' value='check' <?php echo ($has_realm ? "" : "disabled='disabled'"); ?> title='<?php echo _("The realm can only be checked if you configure the realm!"); ?>'> |
200 | 200 | <?php echo _("Check realm reachability"); ?> |
201 | 201 | </button> |
@@ -242,9 +242,9 @@ discard block |
||
242 | 242 | ?> |
243 | 243 | <div style='display: flex;'> |
244 | 244 | <?php |
245 | - $idpLevelUrl = $link . dirname(dirname($_SERVER['SCRIPT_NAME'])) . "?idp=" . $theProfile->institution; |
|
246 | - $displayurl = $idpLevelUrl . "&profile=" . $theProfile->identifier; |
|
247 | - $QRurl = $idpLevelUrl . "&profile=" . $theProfile->identifier; |
|
245 | + $idpLevelUrl = $link.dirname(dirname($_SERVER['SCRIPT_NAME']))."?idp=".$theProfile->institution; |
|
246 | + $displayurl = $idpLevelUrl."&profile=".$theProfile->identifier; |
|
247 | + $QRurl = $idpLevelUrl."&profile=".$theProfile->identifier; |
|
248 | 248 | $qrCode = new \chillerlan\QRCode\QRCode(new \chillerlan\QRCode\QROptions([ |
249 | 249 | 'outputType' => \chillerlan\QRCode\QRCode::OUTPUT_IMAGE_PNG, |
250 | 250 | 'eccLevel' => \chillerlan\QRCode\QRCode::ECC_H, |
@@ -256,9 +256,9 @@ discard block |
||
256 | 256 | if (empty($rawQr)) { |
257 | 257 | throw new Exception("Something went seriously wrong during QR code generation!"); |
258 | 258 | } |
259 | - $uri = "data:image/png;base64," . base64_encode($uiElements->pngInjectConsortiumLogo($rawQr, web\lib\admin\UIElements::QRCODE_PIXELS_PER_SYMBOL)); |
|
259 | + $uri = "data:image/png;base64,".base64_encode($uiElements->pngInjectConsortiumLogo($rawQr, web\lib\admin\UIElements::QRCODE_PIXELS_PER_SYMBOL)); |
|
260 | 260 | $size = getimagesize($uri); |
261 | - echo "<img width='" . ($size[0] / 4) . "' height='" . ($size[1] / 4) . "' src='$uri' alt='QR-code'/>"; |
|
261 | + echo "<img width='".($size[0] / 4)."' height='".($size[1] / 4)."' src='$uri' alt='QR-code'/>"; |
|
262 | 262 | |
263 | 263 | //echo "<nobr>$displayurl</nobr></a>"; |
264 | 264 | echo "<p>$displayurl</p></a>"; |
@@ -287,7 +287,7 @@ discard block |
||
287 | 287 | $radius_status = array(); |
288 | 288 | $radius_status[0] = $deploymentObject->radius_status_1; |
289 | 289 | $radius_status[1] = $deploymentObject->radius_status_2; |
290 | - $cacert = file_get_contents(ROOT . "/config/ManagedSPCerts/eduroamSP-CA.pem"); |
|
290 | + $cacert = file_get_contents(ROOT."/config/ManagedSPCerts/eduroamSP-CA.pem"); |
|
291 | 291 | $retry = $deploymentObject->checkRADIUSHostandConfigDaemon(); |
292 | 292 | $isradiusready = radius_ready($deploymentObject); |
293 | 293 | if (is_array($retry)) { |
@@ -299,11 +299,11 @@ discard block |
||
299 | 299 | } |
300 | 300 | ?> |
301 | 301 | <div style='display: table-row_id;'> |
302 | - <div class='profilebox' id="profilebox_<?php echo $deploymentObject->identifier;?>" style='display: table-cell;'> |
|
302 | + <div class='profilebox' id="profilebox_<?php echo $deploymentObject->identifier; ?>" style='display: table-cell;'> |
|
303 | 303 | <h2><?php |
304 | 304 | switch ($deploymentObject->consortium) { |
305 | 305 | case "eduroam": |
306 | - $displayname = config\ConfAssistant::CONSORTIUM['name'] . " " . core\DeploymentManaged::PRODUCTNAME; |
|
306 | + $displayname = config\ConfAssistant::CONSORTIUM['name']." ".core\DeploymentManaged::PRODUCTNAME; |
|
307 | 307 | break; |
308 | 308 | case "OpenRoaming": |
309 | 309 | $displayname = "OpenRoaming ANP"; |
@@ -311,7 +311,7 @@ discard block |
||
311 | 311 | default: |
312 | 312 | throw new Exception("We are supposed to operate on a roaming consortium we don't know."); |
313 | 313 | } |
314 | - echo $displayname . " (<span style='color:" . ( $deploymentObject->status == \core\AbstractDeployment::INACTIVE ? "red;'>" . _("inactive") : "green;'>" . _("active") ) . "</span>)"; |
|
314 | + echo $displayname." (<span style='color:".($deploymentObject->status == \core\AbstractDeployment::INACTIVE ? "red;'>"._("inactive") : "green;'>"._("active"))."</span>)"; |
|
315 | 315 | ?></h2> |
316 | 316 | <table> |
317 | 317 | <caption><?php echo _("Deployment Details"); ?></caption> |
@@ -329,13 +329,13 @@ discard block |
||
329 | 329 | <td> |
330 | 330 | <?php |
331 | 331 | if ($deploymentObject->host1_v4 !== NULL) { |
332 | - echo _("IPv4") . ": " . $deploymentObject->host1_v4; |
|
332 | + echo _("IPv4").": ".$deploymentObject->host1_v4; |
|
333 | 333 | } |
334 | 334 | if ($deploymentObject->host1_v4 !== NULL && $deploymentObject->host1_v6 !== NULL) { |
335 | 335 | echo "<br/>"; |
336 | 336 | } |
337 | 337 | if ($deploymentObject->host1_v6 !== NULL) { |
338 | - echo _("IPv6") . ": " . $deploymentObject->host1_v6; |
|
338 | + echo _("IPv6").": ".$deploymentObject->host1_v6; |
|
339 | 339 | } |
340 | 340 | ?> |
341 | 341 | </td> |
@@ -351,9 +351,9 @@ discard block |
||
351 | 351 | <td> |
352 | 352 | <?php |
353 | 353 | if ($deploymentObject->status) { |
354 | - echo "<img src='" . $radiusMessages[$deploymentObject->radius_status_1]['icon'] . |
|
355 | - "' alt='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] . |
|
356 | - "' title='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] . "' class='cat-icon'>"; |
|
354 | + echo "<img src='".$radiusMessages[$deploymentObject->radius_status_1]['icon']. |
|
355 | + "' alt='".$radiusMessages[$deploymentObject->radius_status_1]['text']. |
|
356 | + "' title='".$radiusMessages[$deploymentObject->radius_status_1]['text']."' class='cat-icon'>"; |
|
357 | 357 | } |
358 | 358 | ?> |
359 | 359 | </td> |
@@ -365,13 +365,13 @@ discard block |
||
365 | 365 | <td> |
366 | 366 | <?php |
367 | 367 | if ($deploymentObject->host2_v4 !== NULL) { |
368 | - echo _("IPv4") . ": " . $deploymentObject->host2_v4; |
|
368 | + echo _("IPv4").": ".$deploymentObject->host2_v4; |
|
369 | 369 | } |
370 | 370 | if ($deploymentObject->host2_v4 !== NULL && $deploymentObject->host2_v6 !== NULL) { |
371 | 371 | echo "<br/>"; |
372 | 372 | } |
373 | 373 | if ($deploymentObject->host2_v6 !== NULL) { |
374 | - echo _("IPv6") . ": " . $deploymentObject->host2_v6; |
|
374 | + echo _("IPv6").": ".$deploymentObject->host2_v6; |
|
375 | 375 | } |
376 | 376 | ?> |
377 | 377 | </td> |
@@ -387,9 +387,9 @@ discard block |
||
387 | 387 | <td> |
388 | 388 | <?php |
389 | 389 | if ($deploymentObject->status) { |
390 | - echo "<img src='" . $radiusMessages[$deploymentObject->radius_status_2]['icon'] . |
|
391 | - "' alt='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] . |
|
392 | - "' title='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] . "' class='cat-icon'>"; |
|
390 | + echo "<img src='".$radiusMessages[$deploymentObject->radius_status_2]['icon']. |
|
391 | + "' alt='".$radiusMessages[$deploymentObject->radius_status_2]['text']. |
|
392 | + "' title='".$radiusMessages[$deploymentObject->radius_status_2]['text']."' class='cat-icon'>"; |
|
393 | 393 | } |
394 | 394 | ?> |
395 | 395 | </td> |
@@ -415,34 +415,34 @@ discard block |
||
415 | 415 | <tr> |
416 | 416 | <td><strong><?php echo _("RADSEC over TLS credentials"); ?></strong></td> |
417 | 417 | <td> |
418 | - <input type="hidden" id="priv_key_data_<?php echo $deploymentObject->identifier;?>" value="<?php echo $deploymentObject->radsec_priv;?>"> |
|
419 | - <input type="hidden" id="cert_data_<?php echo $deploymentObject->identifier;?>" value="<?php echo $deploymentObject->radsec_cert;?>"> |
|
420 | - <input type="hidden" id="ca_cert_data" value="<?php echo $cacert;?>"> |
|
421 | - <button class="sp_priv_key" id="priv_key_<?php echo $deploymentObject->identifier;?>" name="showc" type="submit"><?php echo _('private key');?></button> |
|
422 | - <button class="sp_cert" id="cert_<?php echo $deploymentObject->identifier;?>" name="showp" type="submit"><?php echo _('certificate');?></button> |
|
423 | - <button class="ca_cert" name="showca" type="submit"><?php echo _('CA certificate');?></button> |
|
424 | - <button name="sendzip" onclick="location.href='inc/sendzip.inc.php?inst_id=<?php echo $deploymentObject->institution;?>&dep_id=<?php echo $deploymentObject->identifier;?>'" type="button"><?php echo _('download ZIP-file with full data');?></button> |
|
418 | + <input type="hidden" id="priv_key_data_<?php echo $deploymentObject->identifier; ?>" value="<?php echo $deploymentObject->radsec_priv; ?>"> |
|
419 | + <input type="hidden" id="cert_data_<?php echo $deploymentObject->identifier; ?>" value="<?php echo $deploymentObject->radsec_cert; ?>"> |
|
420 | + <input type="hidden" id="ca_cert_data" value="<?php echo $cacert; ?>"> |
|
421 | + <button class="sp_priv_key" id="priv_key_<?php echo $deploymentObject->identifier; ?>" name="showc" type="submit"><?php echo _('private key'); ?></button> |
|
422 | + <button class="sp_cert" id="cert_<?php echo $deploymentObject->identifier; ?>" name="showp" type="submit"><?php echo _('certificate'); ?></button> |
|
423 | + <button class="ca_cert" name="showca" type="submit"><?php echo _('CA certificate'); ?></button> |
|
424 | + <button name="sendzip" onclick="location.href='inc/sendzip.inc.php?inst_id=<?php echo $deploymentObject->institution; ?>&dep_id=<?php echo $deploymentObject->identifier; ?>'" type="button"><?php echo _('download ZIP-file with full data'); ?></button> |
|
425 | 425 | </td> |
426 | 426 | </tr> |
427 | 427 | <tr> <td></td><td> |
428 | 428 | <?php |
429 | - echo _('Serial number:') . ' ' . $data['serialNumberHex'] . '<br>'; |
|
430 | - $dleft = floor(($data['validTo_time_t']-time())/(24*60*60)); |
|
429 | + echo _('Serial number:').' '.$data['serialNumberHex'].'<br>'; |
|
430 | + $dleft = floor(($data['validTo_time_t'] - time()) / (24 * 60 * 60)); |
|
431 | 431 | if ($dleft < 30) { |
432 | 432 | echo '<font color="red">'; |
433 | 433 | } |
434 | - echo _('Not valid after:') . ' '. date_create_from_format('ymdGis', substr($data['validTo'], 0, -1))->format('Y-m-d H:i:s') . ' UTC'; |
|
434 | + echo _('Not valid after:').' '.date_create_from_format('ymdGis', substr($data['validTo'], 0, -1))->format('Y-m-d H:i:s').' UTC'; |
|
435 | 435 | if ($dleft > 2) { |
436 | - echo '<br>' . _('Number of days to expiry:') . ' ' . $dleft; |
|
436 | + echo '<br>'._('Number of days to expiry:').' '.$dleft; |
|
437 | 437 | } else { |
438 | - echo '<br>' . _('If you are using RADSEC over TLS you should urgently renew your credentisls') . '!'; |
|
438 | + echo '<br>'._('If you are using RADSEC over TLS you should urgently renew your credentisls').'!'; |
|
439 | 439 | } |
440 | 440 | if ($dleft < 30) { echo '</font>'; } |
441 | 441 | ?></td></tr> |
442 | 442 | <tr> <td></td><td> |
443 | 443 | <?php |
444 | 444 | if ($deploymentObject->radsec_cert != NULL) { |
445 | - echo _('If your certificate is close to expiry or you need to create new RADSEC over TLS credentials') . '<br>' . |
|
445 | + echo _('If your certificate is close to expiry or you need to create new RADSEC over TLS credentials').'<br>'. |
|
446 | 446 | _('click on "Renew RADSEC over TLS credentials" button'); |
447 | 447 | } |
448 | 448 | ?> |
@@ -454,14 +454,14 @@ discard block |
||
454 | 454 | <tr> |
455 | 455 | <td><strong><?php echo _("RADSEC TLS-PSK identity"); ?></strong></td> |
456 | 456 | <td> |
457 | - SP_<?php echo $deploymentObject->identifier . '-' . $deploymentObject->institution;?> |
|
457 | + SP_<?php echo $deploymentObject->identifier.'-'.$deploymentObject->institution; ?> |
|
458 | 458 | </td> |
459 | 459 | </tr> |
460 | 460 | |
461 | 461 | <tr> |
462 | 462 | <td><strong><?php echo _("RADSEC TLS-PSK key"); ?></strong></td> |
463 | 463 | <td> |
464 | - <?php echo $deploymentObject->pskkey;?> |
|
464 | + <?php echo $deploymentObject->pskkey; ?> |
|
465 | 465 | </td> |
466 | 466 | </tr> |
467 | 467 | <?php } ?> |
@@ -515,12 +515,12 @@ discard block |
||
515 | 515 | if (array_key_exists('FAILURE', $res) && $res['FAILURE'] > 0) { |
516 | 516 | echo '<br>'; |
517 | 517 | if ($res['FAILURE'] == 2) { |
518 | - echo ' <span style="color: red;">' . _("Activation failure.") . '</span>'; |
|
518 | + echo ' <span style="color: red;">'._("Activation failure.").'</span>'; |
|
519 | 519 | } else { |
520 | 520 | if (isset($_GET['res'][1]) && $_GET['res']['1'] == 'FAILURE') { |
521 | - echo ' <span style="color: red;">' . _("Activation failure for your primary RADIUS server.") . '</span>'; |
|
521 | + echo ' <span style="color: red;">'._("Activation failure for your primary RADIUS server.").'</span>'; |
|
522 | 522 | } else { |
523 | - echo ' <span style="color: red;">' . _("Activation failure for your backup RADIUS server.") . '</span>'; |
|
523 | + echo ' <span style="color: red;">'._("Activation failure for your backup RADIUS server.").'</span>'; |
|
524 | 524 | } |
525 | 525 | } |
526 | 526 | } |
@@ -547,12 +547,12 @@ discard block |
||
547 | 547 | if (array_key_exists('FAILURE', $res) && $res['FAILURE'] > 0) { |
548 | 548 | echo '<br>'; |
549 | 549 | if ($res['FAILURE'] == 2) { |
550 | - echo ' <span style="color: red;">' . _("Failure during deactivation, your request is queued for handling") . '</span>'; |
|
550 | + echo ' <span style="color: red;">'._("Failure during deactivation, your request is queued for handling").'</span>'; |
|
551 | 551 | } else { |
552 | 552 | if (isset($_GET['res'][1]) && $_GET['res']['1'] == 'FAILURE') { |
553 | - echo ' <span style="color: red;">' . _("Deactivation failure for your primary RADIUS server, your request is queued.") . '</span>'; |
|
553 | + echo ' <span style="color: red;">'._("Deactivation failure for your primary RADIUS server, your request is queued.").'</span>'; |
|
554 | 554 | } else { |
555 | - echo ' <span style="color: red;">' . _("Deactivation failure for your backup RADIUS server, your request is queued.") . '</span>'; |
|
555 | + echo ' <span style="color: red;">'._("Deactivation failure for your backup RADIUS server, your request is queued.").'</span>'; |
|
556 | 556 | } |
557 | 557 | } |
558 | 558 | } |
@@ -575,29 +575,29 @@ discard block |
||
575 | 575 | </form> |
576 | 576 | </div> |
577 | 577 | </div> |
578 | - <?php if (!$isradiusready) { echo '<p>'. _("We are not able to handle a new configuration request requiring contact with RADIUS servers now.") . '<br>' . _("Check later.");} ?> |
|
578 | + <?php if (!$isradiusready) { echo '<p>'._("We are not able to handle a new configuration request requiring contact with RADIUS servers now.").'<br>'._("Check later."); } ?> |
|
579 | 579 | </div> |
580 | 580 | <div style='width:20px;'></div> <!-- QR code space, reserved --> |
581 | 581 | <div style='display: table-cell; min-width:200px;'> |
582 | - <?php $tablecaption = _("Hotspot Usage Statistics");?> |
|
582 | + <?php $tablecaption = _("Hotspot Usage Statistics"); ?> |
|
583 | 583 | <h1><?php echo $tablecaption; ?></h1> |
584 | - <h2><?php echo _("5 most recent authentications");?></h2> |
|
585 | - <p><?php echo _("(AP Identifier is a /-separated tuple of NAS-Identifier/NAS-IP-Address/NAS-IPv6-Address/Called-Station-Id)");?></p> |
|
584 | + <h2><?php echo _("5 most recent authentications"); ?></h2> |
|
585 | + <p><?php echo _("(AP Identifier is a /-separated tuple of NAS-Identifier/NAS-IP-Address/NAS-IPv6-Address/Called-Station-Id)"); ?></p> |
|
586 | 586 | <table class='authrecord'> |
587 | - <caption><?php echo $tablecaption;?></caption> |
|
587 | + <caption><?php echo $tablecaption; ?></caption> |
|
588 | 588 | <tr style='text-align: left;'> |
589 | - <th scope="col"><strong><?php echo _("Timestamp (UTC)");?></strong></th> |
|
590 | - <th scope="col"><strong><?php echo _("Realm");?></strong></th> |
|
591 | - <th scope="col"><strong><?php echo _("MAC Address");?></strong></th> |
|
592 | - <th scope="col"><strong><?php echo _("Chargeable-User-Identity");?></strong></th> |
|
593 | - <th scope="col"><strong><?php echo _("Result");?></strong></th> |
|
594 | - <th scope="col"><strong><?php echo _("AP Identifier");?></strong></th> |
|
595 | - <th scope="col"><strong><?php echo _("Protocol");?></strong></th> |
|
589 | + <th scope="col"><strong><?php echo _("Timestamp (UTC)"); ?></strong></th> |
|
590 | + <th scope="col"><strong><?php echo _("Realm"); ?></strong></th> |
|
591 | + <th scope="col"><strong><?php echo _("MAC Address"); ?></strong></th> |
|
592 | + <th scope="col"><strong><?php echo _("Chargeable-User-Identity"); ?></strong></th> |
|
593 | + <th scope="col"><strong><?php echo _("Result"); ?></strong></th> |
|
594 | + <th scope="col"><strong><?php echo _("AP Identifier"); ?></strong></th> |
|
595 | + <th scope="col"><strong><?php echo _("Protocol"); ?></strong></th> |
|
596 | 596 | </tr> |
597 | 597 | <?php |
598 | - $userAuthData = $deploymentObject->retrieveStatistics(0,5); |
|
598 | + $userAuthData = $deploymentObject->retrieveStatistics(0, 5); |
|
599 | 599 | foreach ($userAuthData as $oneRecord) { |
600 | - echo "<tr class='".($oneRecord['result'] == "OK" ? "auth-success" : "auth-fail" )."'>" |
|
600 | + echo "<tr class='".($oneRecord['result'] == "OK" ? "auth-success" : "auth-fail")."'>" |
|
601 | 601 | . "<td>".$oneRecord['activity_time']."</td>" |
602 | 602 | . "<td>".$oneRecord['realm']."</td>" |
603 | 603 | . "<td>".$oneRecord['mac']."</td>" |
@@ -817,7 +817,7 @@ discard block |
||
817 | 817 | } |
818 | 818 | ?> |
819 | 819 | </h2> |
820 | - <?php if(count($profiles_for_this_idp) > 1 && $readonly === FALSE && $editMode === 'fullaccess') { ?> |
|
820 | + <?php if (count($profiles_for_this_idp) > 1 && $readonly === FALSE && $editMode === 'fullaccess') { ?> |
|
821 | 821 | <form method='post' action='sort_profiles.php?inst_id=<?php echo $my_inst->identifier; ?>' accept-charset='UTF-8'> |
822 | 822 | <div> |
823 | 823 | <button type='submit' name='profile_sorting'> |
@@ -891,7 +891,7 @@ discard block |
||
891 | 891 | <div> |
892 | 892 | <input type="hidden" name="consortium" value="eduroam"/> |
893 | 893 | <button type='submit' <?php echo ($hasMail > 0 ? "" : "disabled"); ?> name='profile_action' value='new'> |
894 | - <?php echo sprintf(_("Add %s deployment ..."), \config\ConfAssistant::CONSORTIUM['name'] . " " . \core\DeploymentManaged::PRODUCTNAME); ?> |
|
894 | + <?php echo sprintf(_("Add %s deployment ..."), \config\ConfAssistant::CONSORTIUM['name']." ".\core\DeploymentManaged::PRODUCTNAME); ?> |
|
895 | 895 | </button> |
896 | 896 | <span style='color: red;'> |
897 | 897 | <?php if ($hasMail == 0) { |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | */ |
21 | 21 | ?> |
22 | 22 | <?php |
23 | -require_once dirname(dirname(dirname(dirname(__FILE__)))) . "/config/_config.php"; |
|
23 | +require_once dirname(dirname(dirname(dirname(__FILE__))))."/config/_config.php"; |
|
24 | 24 | |
25 | 25 | $auth = new \web\lib\admin\Authentication(); |
26 | 26 | $uiElements = new \web\lib\admin\UIElements(); |
@@ -57,30 +57,30 @@ discard block |
||
57 | 57 | <?php |
58 | 58 | echo sprintf(_("On this page, you can add a new %s to your %s. Please fill out the form below to send out an email invitation to the new %s administrator."), $uiElements->nomenclatureParticipant, $uiElements->nomenclatureFed, $uiElements->nomenclatureParticipant); |
59 | 59 | if (\config\Master::DB['enforce-external-sync']) { |
60 | - echo "<p>" . sprintf(_("You can either register a known %s (as defined in the %s database) or create a totally new %s."), $uiElements->nomenclatureParticipant, \config\ConfAssistant::CONSORTIUM['display_name'], $uiElements->nomenclatureParticipant) . "</p>"; |
|
61 | - echo "<p>" . sprintf(_("The latter one is typically for an %s which is yet in a testing phase and therefore doesn't appear in the %s database yet."), $uiElements->nomenclatureParticipant, \config\ConfAssistant::CONSORTIUM['display_name']) . "</p>"; |
|
60 | + echo "<p>".sprintf(_("You can either register a known %s (as defined in the %s database) or create a totally new %s."), $uiElements->nomenclatureParticipant, \config\ConfAssistant::CONSORTIUM['display_name'], $uiElements->nomenclatureParticipant)."</p>"; |
|
61 | + echo "<p>".sprintf(_("The latter one is typically for an %s which is yet in a testing phase and therefore doesn't appear in the %s database yet."), $uiElements->nomenclatureParticipant, \config\ConfAssistant::CONSORTIUM['display_name'])."</p>"; |
|
62 | 62 | } |
63 | 63 | ?> |
64 | 64 | <hr/> |
65 | 65 | <img alt='Loading ...' src='../resources/images/icons/loading51.gif' id='spin' style='position:absolute;left: 50%; top: 50%; transform: translate(-100px, -50px); display:none;'> |
66 | 66 | <form name='sendinvite' action='inc/sendinvite.inc.php' method='post' accept-charset='UTF-8'> |
67 | 67 | <table> |
68 | - <caption><?php echo _("Invitation Details");?></caption> |
|
68 | + <caption><?php echo _("Invitation Details"); ?></caption> |
|
69 | 69 | <tr> |
70 | - <th class="wai-invisible" scope="col"><?php echo _("From database or ad-hoc?");?></th> |
|
71 | - <th class="wai-invisible" scope="col"><?php echo _("Name");?></th> |
|
72 | - <th class="wai-invisible" scope="col"><?php echo _("Type");?></th> |
|
73 | - <th class="wai-invisible" scope="col"><?php echo _("Country");?></th> |
|
70 | + <th class="wai-invisible" scope="col"><?php echo _("From database or ad-hoc?"); ?></th> |
|
71 | + <th class="wai-invisible" scope="col"><?php echo _("Name"); ?></th> |
|
72 | + <th class="wai-invisible" scope="col"><?php echo _("Type"); ?></th> |
|
73 | + <th class="wai-invisible" scope="col"><?php echo _("Country"); ?></th> |
|
74 | 74 | </tr> |
75 | 75 | <?php |
76 | 76 | if (\config\Master::DB['enforce-external-sync']) { |
77 | 77 | echo "<tr><td> |
78 | - <input type='radio' name='creation' value='existing'>" . sprintf(_("Existing %s:"), $uiElements->nomenclatureParticipant) . "</input> |
|
78 | + <input type='radio' name='creation' value='existing'>" . sprintf(_("Existing %s:"), $uiElements->nomenclatureParticipant)."</input> |
|
79 | 79 | </td>"; |
80 | 80 | |
81 | 81 | echo "<td colspan='3'> |
82 | 82 | <select id='externals' name='externals' onchange='document.sendinvite.creation[0].checked=true; document.sendinvite.mailaddr.value=this.options[this.selectedIndex].id;'> |
83 | - <option value='FREETEXT'>" . sprintf(_("--- select %s here ---"),$uiElements->nomenclatureParticipant) . "</option>"; |
|
83 | + <option value='FREETEXT'>" . sprintf(_("--- select %s here ---"), $uiElements->nomenclatureParticipant)."</option>"; |
|
84 | 84 | |
85 | 85 | foreach ($feds as $fed_value) { |
86 | 86 | $thefed = new \core\Federation(strtoupper($fed_value['value'])); |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | $entities = $thefed->listExternalEntities(TRUE, NULL); |
90 | 90 | |
91 | 91 | foreach ($entities as $v) { |
92 | - echo "<option id='" . $v['contactlist'] . "' value='" . $fed_value['value']. '-' . $v['ID'] . "'>[" . $fed_value['value'] . "] " . $v['name'] . "</option>"; |
|
92 | + echo "<option id='".$v['contactlist']."' value='".$fed_value['value'].'-'.$v['ID']."'>[".$fed_value['value']."] ".$v['name']."</option>"; |
|
93 | 93 | } |
94 | 94 | } |
95 | 95 | |
@@ -98,16 +98,16 @@ discard block |
||
98 | 98 | ?> |
99 | 99 | <tr> |
100 | 100 | <td> |
101 | - <input type='radio' name='creation' value='new'><?php echo sprintf(_("New %s"),$uiElements->nomenclatureParticipant); ?></input> |
|
101 | + <input type='radio' name='creation' value='new'><?php echo sprintf(_("New %s"), $uiElements->nomenclatureParticipant); ?></input> |
|
102 | 102 | </td> |
103 | 103 | <td> |
104 | 104 | <?php echo _("Name"); ?><input type='text' size='30' id='name' name='name' onchange='document.sendinvite.creation[1].checked = true'/> |
105 | 105 | </td> |
106 | 106 | <td> |
107 | 107 | <select name="participant_type"> |
108 | - <option value="IdPSP" selected><?php printf(_("%s and %s"),$uiElements->nomenclatureIdP, $uiElements->nomenclatureHotspot)?></option> |
|
109 | - <option value="IdP"><?php printf(_("%s"),$uiElements->nomenclatureIdP)?></option> |
|
110 | - <option value="SP"><?php printf(_("%s"),$uiElements->nomenclatureHotspot)?></option> |
|
108 | + <option value="IdPSP" selected><?php printf(_("%s and %s"), $uiElements->nomenclatureIdP, $uiElements->nomenclatureHotspot)?></option> |
|
109 | + <option value="IdP"><?php printf(_("%s"), $uiElements->nomenclatureIdP)?></option> |
|
110 | + <option value="SP"><?php printf(_("%s"), $uiElements->nomenclatureHotspot)?></option> |
|
111 | 111 | </select> |
112 | 112 | </td> |
113 | 113 | <td><?php echo $uiElements->nomenclatureFed; ?> |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | * <base_url>/copyright.php after deploying the software |
21 | 21 | */ |
22 | 22 | |
23 | -require_once dirname(dirname(dirname(__DIR__))) . "/config/_config.php"; |
|
23 | +require_once dirname(dirname(dirname(__DIR__)))."/config/_config.php"; |
|
24 | 24 | |
25 | 25 | $auth = new \web\lib\admin\Authentication(); |
26 | 26 | $auth->authenticate(); |
@@ -102,9 +102,9 @@ discard block |
||
102 | 102 | $idp = $validator->existingIdP($_GET['inst_id']); |
103 | 103 | // editing IdPs is done from within the popup. When we're done, send the |
104 | 104 | // user back to the popup (append the result of the operation later) |
105 | - $redirectDestination = "manageAdmins.inc.php?inst_id=" . $idp->identifier . "&"; |
|
105 | + $redirectDestination = "manageAdmins.inc.php?inst_id=".$idp->identifier."&"; |
|
106 | 106 | if (count($validAddresses) == 0) { |
107 | - header("Location: $redirectDestination" . "invitation=INVALIDSYNTAX"); |
|
107 | + header("Location: $redirectDestination"."invitation=INVALIDSYNTAX"); |
|
108 | 108 | exit(1); |
109 | 109 | } |
110 | 110 | // is the user primary admin of this IdP? |
@@ -113,13 +113,13 @@ discard block |
||
113 | 113 | $fedadmin = $userObject->isFederationAdmin($idp->federation); |
114 | 114 | // check if he is either one, if not, complain |
115 | 115 | if (!$is_owner && !$fedadmin) { |
116 | - echo "<p>" . sprintf(_("Something's wrong... you are a %s admin, but not for the %s the requested %s belongs to!"), $uiElements->nomenclatureFed, $uiElements->nomenclatureFed, $uiElements->nomenclatureParticipant) . "</p>"; |
|
116 | + echo "<p>".sprintf(_("Something's wrong... you are a %s admin, but not for the %s the requested %s belongs to!"), $uiElements->nomenclatureFed, $uiElements->nomenclatureFed, $uiElements->nomenclatureParticipant)."</p>"; |
|
117 | 117 | exit(1); |
118 | 118 | } |
119 | 119 | |
120 | 120 | $prettyprintname = $idp->name; |
121 | 121 | $newtokens = $mgmt->createTokens($fedadmin, $validAddresses, $idp); |
122 | - $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP " . $idp->identifier . " - Token created for " . implode(",", $validAddresses)); |
|
122 | + $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP ".$idp->identifier." - Token created for ".implode(",", $validAddresses)); |
|
123 | 123 | $introtext = "CO-ADMIN"; |
124 | 124 | $participant_type = $idp->type; |
125 | 125 | break; |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | $participant_type = $validator->partType($_POST['participant_type']); |
136 | 136 | $new_idp_authorized_fedadmin = $userObject->isFederationAdmin($newcountry); |
137 | 137 | if ($new_idp_authorized_fedadmin !== TRUE) { |
138 | - throw new Exception("Something's wrong... you want to create a new " . $uiElements->nomenclatureParticipant . ", but are not a " . $uiElements->nomenclatureFed . " admin for the " . $uiElements->nomenclatureFed . " it should be in!"); |
|
138 | + throw new Exception("Something's wrong... you want to create a new ".$uiElements->nomenclatureParticipant.", but are not a ".$uiElements->nomenclatureFed." admin for the ".$uiElements->nomenclatureFed." it should be in!"); |
|
139 | 139 | } |
140 | 140 | $federation = $validator->existingFederation($newcountry); |
141 | 141 | $prettyprintname = $newinstname; |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | // send the user back to his federation overview page, append the result of the operation later |
144 | 144 | // do the token creation magic |
145 | 145 | $newtokens = $mgmt->createTokens(TRUE, $validAddresses, $newinstname, 0, $newcountry, $participant_type); |
146 | - $loggerInstance->writeAudit($_SESSION['user'], "NEW", "ORG FUTURE - Token created for $participant_type " . implode(",", $validAddresses)); |
|
146 | + $loggerInstance->writeAudit($_SESSION['user'], "NEW", "ORG FUTURE - Token created for $participant_type ".implode(",", $validAddresses)); |
|
147 | 147 | break; |
148 | 148 | case OPERATION_MODE_NEWFROMDB: |
149 | 149 | $redirectDestination = "../overview_federation.php?"; |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | $extinfo = $catInstance->getExternalDBEntityDetails($newexternalid, strtoupper($fedId).'01'); |
158 | 158 | $new_idp_authorized_fedadmin = $userObject->isFederationAdmin($extinfo['country']); |
159 | 159 | if ($new_idp_authorized_fedadmin !== TRUE) { |
160 | - throw new Exception("Something's wrong... you want to create a new " . $uiElements->nomenclatureParticipant . ", but are not a " . $uiElements->nomenclatureFed . " admin for the " . $uiElements->nomenclatureFed . " it should be in!"); |
|
160 | + throw new Exception("Something's wrong... you want to create a new ".$uiElements->nomenclatureParticipant.", but are not a ".$uiElements->nomenclatureFed." admin for the ".$uiElements->nomenclatureFed." it should be in!"); |
|
161 | 161 | } |
162 | 162 | $federation = $validator->existingFederation($extinfo['country']); |
163 | 163 | $newcountry = $extinfo['country']; |
@@ -181,14 +181,14 @@ discard block |
||
181 | 181 | $introtext = "EXISTING-FED"; |
182 | 182 | // do the token creation magic |
183 | 183 | $newtokens = $mgmt->createTokens(TRUE, $validAddresses, $prettyprintname, $newexternalid, $fedId); |
184 | - $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP FUTURE - Token created for " . implode(",", $validAddresses)); |
|
184 | + $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP FUTURE - Token created for ".implode(",", $validAddresses)); |
|
185 | 185 | break; |
186 | 186 | default: // includes OPERATION_MODE_INVALID |
187 | 187 | // second param is TRUE, so the variable *will* contain a string |
188 | 188 | // i.e. ignore Scrutinizer type warning later |
189 | 189 | $wrongcontent = print_r($_POST, TRUE); |
190 | 190 | echo "<pre>Wrong parameters in POST: |
191 | -" . htmlspecialchars(/** @scrutinizer ignore-type */ $wrongcontent) . " |
|
191 | +" . htmlspecialchars(/** @scrutinizer ignore-type */ $wrongcontent)." |
|
192 | 192 | </pre>"; |
193 | 193 | exit(1); |
194 | 194 | } |
@@ -213,14 +213,14 @@ discard block |
||
213 | 213 | } |
214 | 214 | |
215 | 215 | if (count($status) == 0) { |
216 | - header("Location: $redirectDestination" . "invitation=FAILURE"); |
|
216 | + header("Location: $redirectDestination"."invitation=FAILURE"); |
|
217 | 217 | exit; |
218 | 218 | } |
219 | 219 | $finalDestParams = "invitation=SUCCESS"; |
220 | 220 | if (count($status) < count($totalSegments)) { // only a subset of mails was sent, update status |
221 | 221 | $finalDestParams = "invitation=PARTIAL"; |
222 | 222 | } |
223 | -$finalDestParams .= "&successcount=" . count($status); |
|
223 | +$finalDestParams .= "&successcount=".count($status); |
|
224 | 224 | if ($allEncrypted === TRUE) { |
225 | 225 | $finalDestParams .= "&transportsecurity=ENCRYPTED"; |
226 | 226 | } elseif ($allClear === TRUE) { |
@@ -229,4 +229,4 @@ discard block |
||
229 | 229 | $finalDestParams .= "&transportsecurity=PARTIAL"; |
230 | 230 | } |
231 | 231 | |
232 | -header("Location: $redirectDestination" . $finalDestParams); |
|
232 | +header("Location: $redirectDestination".$finalDestParams); |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | */ |
21 | 21 | ?> |
22 | 22 | <?php |
23 | -require_once dirname(dirname(dirname(dirname(__FILE__)))) . "/config/_config.php"; |
|
23 | +require_once dirname(dirname(dirname(dirname(__FILE__))))."/config/_config.php"; |
|
24 | 24 | |
25 | 25 | $auth = new \web\lib\admin\Authentication(); |
26 | 26 | $auth->authenticate(); |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | |
36 | 36 | // if we have a pushed close button, submit attributes and send user back to the overview page |
37 | 37 | // if external DB sync is disabled globally, the user never gets to this page. If he came here *anyway* -> send him back immediately. |
38 | -if ((isset($_POST['submitbutton']) && $_POST['submitbutton'] == web\lib\common\FormElements::BUTTON_CLOSE ) || \config\Master::DB['enforce-external-sync'] == FALSE) { |
|
38 | +if ((isset($_POST['submitbutton']) && $_POST['submitbutton'] == web\lib\common\FormElements::BUTTON_CLOSE) || \config\Master::DB['enforce-external-sync'] == FALSE) { |
|
39 | 39 | header("Location: ../overview_federation.php"); |
40 | 40 | exit; |
41 | 41 | } |
@@ -92,9 +92,9 @@ discard block |
||
92 | 92 | $cat = new \core\CAT(); |
93 | 93 | switch ($my_inst->getExternalDBSyncState()) { |
94 | 94 | case \core\IdP::EXTERNAL_DB_SYNCSTATE_SYNCED: |
95 | - printf(_("This %s is linked to the %s database."), $uiElements->nomenclatureParticipant, \config\ConfAssistant::CONSORTIUM['display_name']) . "</p>"; |
|
96 | - echo "<p>" . sprintf(_("The following information about the IdP is stored in the %s DB and %s DB:"), \config\Master::APPEARANCE['productname'], \config\ConfAssistant::CONSORTIUM['display_name']) . "</p>"; |
|
97 | - echo "<table><tr><td>" . sprintf(_("Information in <strong>%s Database</strong>"), \config\Master::APPEARANCE['productname']) . "</td><td>" . sprintf(_("Information in <strong>%s Database</strong>"), \config\ConfAssistant::CONSORTIUM['display_name']) . "</td></tr>"; |
|
95 | + printf(_("This %s is linked to the %s database."), $uiElements->nomenclatureParticipant, \config\ConfAssistant::CONSORTIUM['display_name'])."</p>"; |
|
96 | + echo "<p>".sprintf(_("The following information about the IdP is stored in the %s DB and %s DB:"), \config\Master::APPEARANCE['productname'], \config\ConfAssistant::CONSORTIUM['display_name'])."</p>"; |
|
97 | + echo "<table><tr><td>".sprintf(_("Information in <strong>%s Database</strong>"), \config\Master::APPEARANCE['productname'])."</td><td>".sprintf(_("Information in <strong>%s Database</strong>"), \config\ConfAssistant::CONSORTIUM['display_name'])."</td></tr>"; |
|
98 | 98 | echo "<tr><td>"; |
99 | 99 | // left-hand side: CAT DB |
100 | 100 | echo "<table>"; |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | } else { |
107 | 107 | $language = \config\Master::LANGUAGES[$name['lang']]['display'] ?? "(unsupported language)"; |
108 | 108 | } |
109 | - echo "<tr><td>" . sprintf(_("%s Name (%s)"), $uiElements->nomenclatureParticipant, $language) . "</td><td>" . $name['value'] . "</td></tr>"; |
|
109 | + echo "<tr><td>".sprintf(_("%s Name (%s)"), $uiElements->nomenclatureParticipant, $language)."</td><td>".$name['value']."</td></tr>"; |
|
110 | 110 | } |
111 | 111 | |
112 | 112 | $admins = $my_inst->listOwners(); |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | if (count($username) == 0) { |
118 | 118 | $username[0]['value'] = _("Unnamed User"); |
119 | 119 | } |
120 | - echo "<tr><td>" . _("Administrator [invited as]") . "</td><td>" . $username[0]['value'] . " [" . $admin['MAIL'] . "]</td></tr>"; |
|
120 | + echo "<tr><td>"._("Administrator [invited as]")."</td><td>".$username[0]['value']." [".$admin['MAIL']."]</td></tr>"; |
|
121 | 121 | } |
122 | 122 | echo "</table>"; |
123 | 123 | // end of left-hand side |
@@ -127,38 +127,38 @@ discard block |
||
127 | 127 | $externalid = $extIdObject->external_db_id; |
128 | 128 | $ROid = $extIdObject->ROid; |
129 | 129 | if (is_bool($extIdObject)) { // we are in SYNCED state so this cannot happen |
130 | - throw new Exception("We are in SYNCSTATE_SYNCED but still there is no external DB Id available for the " . $uiElements->nomenclatureParticipant . "!"); |
|
130 | + throw new Exception("We are in SYNCSTATE_SYNCED but still there is no external DB Id available for the ".$uiElements->nomenclatureParticipant."!"); |
|
131 | 131 | } |
132 | 132 | |
133 | 133 | $extinfo = $cat->getExternalDBEntityDetails($externalid, $ROid); |
134 | 134 | |
135 | 135 | echo "<table>"; |
136 | 136 | foreach ($extinfo['names'] as $lang => $name) { |
137 | - echo "<tr><td>" . sprintf(_("%s Name (%s)"), $uiElements->nomenclatureParticipant, $lang) . "</td><td>$name</td>"; |
|
137 | + echo "<tr><td>".sprintf(_("%s Name (%s)"), $uiElements->nomenclatureParticipant, $lang)."</td><td>$name</td>"; |
|
138 | 138 | } |
139 | 139 | foreach ($extinfo['admins'] as $number => $admin_details) { |
140 | - echo "<tr><td>" . _("Administrator email") . "</td><td>" . $admin_details['email'] . "</td></tr>"; |
|
140 | + echo "<tr><td>"._("Administrator email")."</td><td>".$admin_details['email']."</td></tr>"; |
|
141 | 141 | } |
142 | 142 | echo "</table>"; |
143 | 143 | // end of right-hand side |
144 | 144 | echo "</td></tr></table>"; |
145 | - echo "<p>" . _("If this mapping is not correct any more, you can remove the link:") . " "; |
|
145 | + echo "<p>"._("If this mapping is not correct any more, you can remove the link:")." "; |
|
146 | 146 | echo "<form name='form-unlink-inst' action='inc/manageDBLink.inc.php?inst_id=$my_inst->identifier' method='post' accept-charset='UTF-8'>"; |
147 | - echo "<button type='submit' class='delete' name='submitbutton' id='submit' value='" . web\lib\common\FormElements::BUTTON_DELETE . "'>" . _("Unlink") . "</button></form>"; |
|
147 | + echo "<button type='submit' class='delete' name='submitbutton' id='submit' value='".web\lib\common\FormElements::BUTTON_DELETE."'>"._("Unlink")."</button></form>"; |
|
148 | 148 | break; |
149 | 149 | case \core\IdP::EXTERNAL_DB_SYNCSTATE_NOT_SYNCED: |
150 | 150 | $temparray = []; |
151 | - printf(_("This %s is not yet linked to the %s database."), $uiElements->nomenclatureParticipant, \config\ConfAssistant::CONSORTIUM['display_name']) . " "; |
|
152 | - echo "<strong>" . _("This means that its profiles are not made available on the user download page.") . "</strong> "; |
|
151 | + printf(_("This %s is not yet linked to the %s database."), $uiElements->nomenclatureParticipant, \config\ConfAssistant::CONSORTIUM['display_name'])." "; |
|
152 | + echo "<strong>"._("This means that its profiles are not made available on the user download page.")."</strong> "; |
|
153 | 153 | printf(_("You can link it to the %s database below."), \config\ConfAssistant::CONSORTIUM['display_name']); |
154 | 154 | $candidates = $my_inst->getExternalDBSyncCandidates($my_inst->type); |
155 | 155 | echo "<br/><form name='form-link-inst' action='inc/manageDBLink.inc.php?inst_id=$my_inst->identifier' method='post' accept-charset='UTF-8'>"; |
156 | - printf(_("Please select an entity from the %s DB which corresponds to this CAT %s."), \config\ConfAssistant::CONSORTIUM['display_name'], $uiElements->nomenclatureParticipant) . " "; |
|
156 | + printf(_("Please select an entity from the %s DB which corresponds to this CAT %s."), \config\ConfAssistant::CONSORTIUM['display_name'], $uiElements->nomenclatureParticipant)." "; |
|
157 | 157 | if (count($candidates) > 0) { |
158 | 158 | printf(_("Particularly promising entries (names in CAT and %s DB are a 100%% match) are on top of the list."), \config\ConfAssistant::CONSORTIUM['display_name']); |
159 | 159 | } |
160 | 160 | echo "<table>"; |
161 | - echo "<tr><th>" . _("Link to this entity?") . "</th><th>" . sprintf(_("%s Name"), $uiElements->nomenclatureParticipant) . "</th><th>" . _("Administrators") . "</th></tr>"; |
|
161 | + echo "<tr><th>"._("Link to this entity?")."</th><th>".sprintf(_("%s Name"), $uiElements->nomenclatureParticipant)."</th><th>"._("Administrators")."</th></tr>"; |
|
162 | 162 | |
163 | 163 | foreach ($candidates as $candidate) { |
164 | 164 | $info = $cat->getExternalDBEntityDetails($candidate, strtoupper($my_inst->federation).'01'); |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | } |
169 | 169 | echo "</td><td>"; |
170 | 170 | foreach ($info['admins'] as $number => $admin_details) { |
171 | - echo "[E-Mail] " . $admin_details['email'] . "<br/>"; |
|
171 | + echo "[E-Mail] ".$admin_details['email']."<br/>"; |
|
172 | 172 | } |
173 | 173 | echo "</td></tr>"; |
174 | 174 | $temparray[] = $candidate; |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | $buffer = ""; |
181 | 181 | |
182 | 182 | foreach ($unmappedentities as $v) { |
183 | - $buffer .= "<option value='" . $v['ID'] . "'>[ID " . $v['ID'] . "] " . $v['name'] . "</option>"; |
|
183 | + $buffer .= "<option value='".$v['ID']."'>[ID ".$v['ID']."] ".$v['name']."</option>"; |
|
184 | 184 | } |
185 | 185 | |
186 | 186 | if ($buffer != "") { |
@@ -191,9 +191,9 @@ discard block |
||
191 | 191 | } |
192 | 192 | // issue a big red warning if there are no link candidates at all in the federation |
193 | 193 | if (empty($buffer) && empty($candidates)) { |
194 | - echo "<tr><td style='color:#ff0000' colspan='2'>" . sprintf(_('There is no single unmapped %s in the external database for this %s!'), $uiElements->nomenclatureParticipant, $uiElements->nomenclatureFed) . "</td></tr>"; |
|
194 | + echo "<tr><td style='color:#ff0000' colspan='2'>".sprintf(_('There is no single unmapped %s in the external database for this %s!'), $uiElements->nomenclatureParticipant, $uiElements->nomenclatureFed)."</td></tr>"; |
|
195 | 195 | } |
196 | - echo "</table><button type='submit' name='submitbutton' id='submit' value='" . web\lib\common\FormElements::BUTTON_SAVE . "' disabled >" . _("Create Link") . "</button></form>"; |
|
196 | + echo "</table><button type='submit' name='submitbutton' id='submit' value='".web\lib\common\FormElements::BUTTON_SAVE."' disabled >"._("Create Link")."</button></form>"; |
|
197 | 197 | break; |
198 | 198 | default: |
199 | 199 | } |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | ?> |
31 | 31 | <?php |
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 | $auth = new \web\lib\admin\Authentication(); |
36 | 36 | $deco = new \web\lib\admin\PageDecoration(); |
@@ -44,24 +44,24 @@ discard block |
||
44 | 44 | |
45 | 45 | |
46 | 46 | if (!isset($_GET['token'])) { |
47 | - $elements->errorPage(_("Error creating new IdP binding!"),_("This page needs to be called with a valid invitation token!")); |
|
47 | + $elements->errorPage(_("Error creating new IdP binding!"), _("This page needs to be called with a valid invitation token!")); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | if (\config\ConfAssistant::CONSORTIUM['selfservice_registration'] === NULL && $_GET['token'] == "SELF-REGISTER") { |
51 | - $elements->errorPage(_("Error creating new IdP binding!"),_("You tried to register in self-service, but this deployment does not allow self-service!")); |
|
51 | + $elements->errorPage(_("Error creating new IdP binding!"), _("You tried to register in self-service, but this deployment does not allow self-service!")); |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | switch ($_GET['token']) { |
55 | 55 | case "EDUGAIN-SELF-REGISTER": |
56 | 56 | $token = "EDUGAIN-SELF-REGISTER"; |
57 | - $extIdUnfiltered = filter_input(INPUT_GET,'extid'); |
|
57 | + $extIdUnfiltered = filter_input(INPUT_GET, 'extid'); |
|
58 | 58 | $extIdArray = explode('-', htmlspecialchars(strip_tags($extIdUnfiltered)), 2); |
59 | 59 | $ROid = $extIdArray[0]; |
60 | 60 | $extId = $extIdArray[1]; |
61 | - $fed = new \core\Federation(strtoupper(substr($ROid,0,2))); |
|
61 | + $fed = new \core\Federation(strtoupper(substr($ROid, 0, 2))); |
|
62 | 62 | $newInstFlag = $fed->getAttributes('fed:autoregister-new-inst'); |
63 | 63 | if ($newInstFlag === []) { |
64 | - $elements->errorPage(_("Error creating new IdP!"),_("You tried to register in self-service, but this federation does not allow self-service!")); |
|
64 | + $elements->errorPage(_("Error creating new IdP!"), _("You tried to register in self-service, but this federation does not allow self-service!")); |
|
65 | 65 | } |
66 | 66 | // we must be sure that this person admins the ext institution |
67 | 67 | if ($validator->existingExtInstitution($extId, $userEmail, $ROid) === 1) { |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | // and check that this institution does not match anuthing in CAT. |
72 | 72 | $usermgmt = new \core\UserManagement(); |
73 | 73 | if ($usermgmt->checkForCatMatch($extId, $ROid) === 1) { |
74 | - $elements->errorPage(_("Error creating new IdP!"),_("You tried to register a new institution while it already has a match in CAT or your email is not not listed as admin for this institution in the eduroam DB!")); |
|
74 | + $elements->errorPage(_("Error creating new IdP!"), _("You tried to register a new institution while it already has a match in CAT or your email is not not listed as admin for this institution in the eduroam DB!")); |
|
75 | 75 | } |
76 | 76 | break; |
77 | 77 | case "SELF-REGISTER": |
@@ -80,23 +80,23 @@ discard block |
||
80 | 80 | $federation = \config\ConfAssistant::CONSORTIUM['selfservice_registration']; |
81 | 81 | break; |
82 | 82 | default: |
83 | - $tokenUnfiltered = $validator->token(filter_input(INPUT_GET,'token')); |
|
83 | + $tokenUnfiltered = $validator->token(filter_input(INPUT_GET, 'token')); |
|
84 | 84 | $token = htmlspecialchars(strip_tags($tokenUnfiltered)); |
85 | 85 | $checkval = $usermgmt->checkTokenValidity($token); |
86 | 86 | } |
87 | 87 | |
88 | 88 | if ($checkval < 0) { |
89 | 89 | echo $deco->pageheader(_("Error creating new IdP binding!"), "ADMIN-IDP"); |
90 | - echo "<h1>" . _("Error creating new IdP binding!") . "</h1>"; |
|
90 | + echo "<h1>"._("Error creating new IdP binding!")."</h1>"; |
|
91 | 91 | switch ($checkval) { |
92 | 92 | case \core\UserManagement::TOKENSTATUS_FAIL_ALREADYCONSUMED: |
93 | - echo "<p>" . sprintf(_("Sorry... this token has already been used. The %s is already created. If you got the invitation from a mailing list, probably someone else used it before you."), $elements->nomenclatureParticipant) . "</p>"; |
|
93 | + echo "<p>".sprintf(_("Sorry... this token has already been used. The %s is already created. If you got the invitation from a mailing list, probably someone else used it before you."), $elements->nomenclatureParticipant)."</p>"; |
|
94 | 94 | break; |
95 | 95 | case \core\UserManagement::TOKENSTATUS_FAIL_EXPIRED: |
96 | - echo "<p>" . sprintf(_("Sorry... this token has expired. Invitation tokens are valid for 24 hours. The %s administrator can create a new one for you."), $elements->nomenclatureFed) . "</p>"; |
|
96 | + echo "<p>".sprintf(_("Sorry... this token has expired. Invitation tokens are valid for 24 hours. The %s administrator can create a new one for you."), $elements->nomenclatureFed)."</p>"; |
|
97 | 97 | break; |
98 | 98 | default: |
99 | - echo "<p>" . _("Sorry... you have come to the enrollment page without a valid token. Are you a nasty person? If not, you should go to <a href='overview_user.php'>your profile page</a> instead.") . "</p>"; |
|
99 | + echo "<p>"._("Sorry... you have come to the enrollment page without a valid token. Are you a nasty person? If not, you should go to <a href='overview_user.php'>your profile page</a> instead.")."</p>"; |
|
100 | 100 | } |
101 | 101 | echo $deco->footer(); |
102 | 102 | throw new Exception("Terminating because something is wrong with the token we received."); |
@@ -110,17 +110,17 @@ discard block |
||
110 | 110 | switch ($token) { |
111 | 111 | case "EDUGAIN-SELF-REGISTER": |
112 | 112 | $newidp = $usermgmt->createIdPFromExternal($extId, $fed, $user); |
113 | - $loggerInstance->writeAudit($user, "MOD", "IdP " . $newidp->identifier . " - selfservice eduGAIN registration"); |
|
113 | + $loggerInstance->writeAudit($user, "MOD", "IdP ".$newidp->identifier." - selfservice eduGAIN registration"); |
|
114 | 114 | break; |
115 | 115 | case "SELF-REGISTER": |
116 | 116 | $fed = new \core\Federation($federation); |
117 | 117 | $newidp = new \core\IdP($fed->newIdP(core\IdP::TYPE_IDPSP, $user, "FED", "SELFSERVICE")); |
118 | - $loggerInstance->writeAudit($user, "MOD", "IdP " . $newidp->identifier . " - selfservice registration"); |
|
118 | + $loggerInstance->writeAudit($user, "MOD", "IdP ".$newidp->identifier." - selfservice registration"); |
|
119 | 119 | break; |
120 | 120 | default: |
121 | 121 | $newidp = $usermgmt->createIdPFromToken($token, $user); |
122 | 122 | $usermgmt->invalidateToken($token); |
123 | - $loggerInstance->writeAudit($user, "MOD", "IdP " . $newidp->identifier . " - Token used and invalidated"); |
|
123 | + $loggerInstance->writeAudit($user, "MOD", "IdP ".$newidp->identifier." - Token used and invalidated"); |
|
124 | 124 | break; |
125 | 125 | } |
126 | 126 |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | sprintf(_("%s: Do not terminate EAP"), \core\ProfileSilverbullet::PRODUCTNAME) => "fed:silverbullet-noterm", |
136 | 136 | sprintf(_("%s: max users per profile"), \core\ProfileSilverbullet::PRODUCTNAME) => "fed:silverbullet-maxusers", |
137 | 137 | sprintf(_("Mint %s with CA on creation"), $this->nomenclatureIdP) => "fed:minted_ca_file", |
138 | - sprintf(_("OpenRoaming: Allow %s Opt-In"),$this->nomenclatureParticipant) => "fed:openroaming", |
|
138 | + sprintf(_("OpenRoaming: Allow %s Opt-In"), $this->nomenclatureParticipant) => "fed:openroaming", |
|
139 | 139 | _("OpenRoaming: Custom NAPTR Target") => "fed:openroaming_customtarget", |
140 | 140 | _("Allow admins listed in eduroam DB to become admins for synced CAT institutions") => "fed:autoregister-synced", |
141 | 141 | _("Allow admins listed in eduroam DB to create new institutions") => "fed:autoregister-new-inst", |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | $find = array_keys($displayNames, $input, TRUE); |
150 | 150 | |
151 | 151 | if (count($find) == 0) { // this is an error! throw an Exception |
152 | - throw new \Exception("The translation of an option name was requested, but the option is not known to the system: " . htmlentities($input)); |
|
152 | + throw new \Exception("The translation of an option name was requested, but the option is not known to the system: ".htmlentities($input)); |
|
153 | 153 | } |
154 | 154 | \core\common\Entity::outOfThePotatoes(); |
155 | 155 | // none of the strings have HTML in them, only translators can provide own text for it -> no threat, but complained about by the security review |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | |
172 | 172 | foreach ($optionlist as $option) { |
173 | 173 | $type = $optioninfo->optionType($option['name']); |
174 | - if (preg_match('/^' . $class . '/', $option['name']) && $option['level'] == "$level") { |
|
174 | + if (preg_match('/^'.$class.'/', $option['name']) && $option['level'] == "$level") { |
|
175 | 175 | // all non-multilang attribs get this assignment ... |
176 | 176 | $language = ""; |
177 | 177 | $content = $option['value']; |
@@ -189,19 +189,19 @@ discard block |
||
189 | 189 | $locationMarkers[] = $coords; |
190 | 190 | break; |
191 | 191 | case "file": |
192 | - $retval .= "<tr><td>" . $this->displayName($option['name']) . "</td><td>$language</td><td>"; |
|
192 | + $retval .= "<tr><td>".$this->displayName($option['name'])."</td><td>$language</td><td>"; |
|
193 | 193 | switch ($option['name']) { |
194 | 194 | case "general:logo_file": |
195 | 195 | case "fed:logo_file": |
196 | - $retval .= $this->previewImageinHTML('ROWID-' . $option['level'] . '-' . $option['row_id']); |
|
196 | + $retval .= $this->previewImageinHTML('ROWID-'.$option['level'].'-'.$option['row_id']); |
|
197 | 197 | break; |
198 | 198 | case "eap:ca_file": |
199 | 199 | // fall-through intended: display both the same way |
200 | 200 | case "fed:minted_ca_file": |
201 | - $retval .= $this->previewCAinHTML('ROWID-' . $option['level'] . '-' . $option['row_id']); |
|
201 | + $retval .= $this->previewCAinHTML('ROWID-'.$option['level'].'-'.$option['row_id']); |
|
202 | 202 | break; |
203 | 203 | case "support:info_file": |
204 | - $retval .= $this->previewInfoFileinHTML('ROWID-' . $option['level'] . '-' . $option['row_id']); |
|
204 | + $retval .= $this->previewInfoFileinHTML('ROWID-'.$option['level'].'-'.$option['row_id']); |
|
205 | 205 | break; |
206 | 206 | default: |
207 | 207 | } |
@@ -211,10 +211,10 @@ discard block |
||
211 | 211 | // do not display the option at all; it gets auto-set by the ProfileSilverbullet constructor and doesn't have to be seen |
212 | 212 | break; |
213 | 213 | } |
214 | - $retval .= "<tr><td>" . $this->displayName($option['name']) . "</td><td>$language</td><td><strong>" . ($content == "on" ? _("on") : _("off") ) . "</strong></td></tr>"; |
|
214 | + $retval .= "<tr><td>".$this->displayName($option['name'])."</td><td>$language</td><td><strong>".($content == "on" ? _("on") : _("off"))."</strong></td></tr>"; |
|
215 | 215 | break; |
216 | 216 | default: |
217 | - $retval .= "<tr><td>" . $this->displayName($option['name']) . "</td><td>$language</td><td><strong>$content</strong></td></tr>"; |
|
217 | + $retval .= "<tr><td>".$this->displayName($option['name'])."</td><td>$language</td><td><strong>$content</strong></td></tr>"; |
|
218 | 218 | } |
219 | 219 | } |
220 | 220 | } |
@@ -223,11 +223,11 @@ discard block |
||
223 | 223 | $locationCount = 0; |
224 | 224 | foreach ($locationMarkers as $g) { |
225 | 225 | $locationCount++; |
226 | - $marker .= '<marker name="' . $locationCount . '" lat="' . $g['lat'] . '" lng="' . $g['lon'] . '" />'; |
|
226 | + $marker .= '<marker name="'.$locationCount.'" lat="'.$g['lat'].'" lng="'.$g['lon'].'" />'; |
|
227 | 227 | } |
228 | 228 | $marker .= '<\/markers>'; // some validator says this should be escaped |
229 | 229 | $jMarker = json_encode($locationMarkers); |
230 | - $retval .= '<tr><td><script>markers=\'' . $marker . '\'; jmarkers = \'' . $jMarker . '\';</script></td><td></td><td></td></tr>'; |
|
230 | + $retval .= '<tr><td><script>markers=\''.$marker.'\'; jmarkers = \''.$jMarker.'\';</script></td><td></td><td></td></tr>'; |
|
231 | 231 | } |
232 | 232 | \core\common\Entity::outOfThePotatoes(); |
233 | 233 | return $retval; |
@@ -243,11 +243,11 @@ discard block |
||
243 | 243 | \core\common\Entity::intoThePotatoes(); |
244 | 244 | $idpoptions = $myInst->getAttributes(); |
245 | 245 | $retval = "<div class='infobox'> |
246 | - <h2>" . sprintf(_("General %s details"), $this->nomenclatureParticipant) . "</h2> |
|
246 | + <h2>" . sprintf(_("General %s details"), $this->nomenclatureParticipant)."</h2> |
|
247 | 247 | <table> |
248 | 248 | <tr> |
249 | 249 | <td> |
250 | - " . _("Country:") . " |
|
250 | + " . _("Country:")." |
|
251 | 251 | </td> |
252 | 252 | <td> |
253 | 253 | </td> |
@@ -257,16 +257,16 @@ discard block |
||
257 | 257 | $retval .= $myFed->name; |
258 | 258 | $retval .= "</strong> |
259 | 259 | </td> |
260 | - </tr>" . $this->infoblock($idpoptions, "general", "IdP") . " |
|
260 | + </tr>" . $this->infoblock($idpoptions, "general", "IdP")." |
|
261 | 261 | </table> |
262 | 262 | </div>"; |
263 | 263 | |
264 | 264 | $blocks = [["support", _("Global Helpdesk Details")], ["media", _("Media Properties")]]; |
265 | 265 | foreach ($blocks as $block) { |
266 | 266 | $retval .= "<div class='infobox'> |
267 | - <h2>" . $block[1] . "</h2> |
|
267 | + <h2>" . $block[1]."</h2> |
|
268 | 268 | <table>" . |
269 | - $this->infoblock($idpoptions, $block[0], "IdP") . |
|
269 | + $this->infoblock($idpoptions, $block[0], "IdP"). |
|
270 | 270 | "</table> |
271 | 271 | </div>"; |
272 | 272 | } |
@@ -281,12 +281,12 @@ discard block |
||
281 | 281 | */ |
282 | 282 | private function displaySize(int $number) { |
283 | 283 | if ($number > 1024 * 1024) { |
284 | - return round($number / 1024 / 1024, 2) . " MiB"; |
|
284 | + return round($number / 1024 / 1024, 2)." MiB"; |
|
285 | 285 | } |
286 | 286 | if ($number > 1024) { |
287 | - return round($number / 1024, 2) . " KiB"; |
|
287 | + return round($number / 1024, 2)." KiB"; |
|
288 | 288 | } |
289 | - return $number . " B"; |
|
289 | + return $number." B"; |
|
290 | 290 | } |
291 | 291 | |
292 | 292 | /** |
@@ -341,7 +341,7 @@ discard block |
||
341 | 341 | $caExpiryTrashhold = \config\ConfAssistant::CERT_WARNINGS['expiry_warning']; |
342 | 342 | $rawResult = UIElements::getBlobFromDB($ref['table'], $ref['rowindex'], FALSE); |
343 | 343 | if (is_bool($rawResult)) { // we didn't actually get a CA! |
344 | - $retval = "<div class='ca-summary'>" . _("There was an error while retrieving the certificate from the database!") . "</div>"; |
|
344 | + $retval = "<div class='ca-summary'>"._("There was an error while retrieving the certificate from the database!")."</div>"; |
|
345 | 345 | \core\common\Entity::outOfThePotatoes(); |
346 | 346 | return $retval; |
347 | 347 | } |
@@ -357,8 +357,8 @@ discard block |
||
357 | 357 | |
358 | 358 | $details['name'] = preg_replace('/(.)\/(.)/', "$1<br/>$2", $details['name']); |
359 | 359 | $details['name'] = preg_replace('/\//', "", $details['name']); |
360 | - $certstatus = ( $details['root'] == 1 ? "R" : "I"); |
|
361 | - $certTooltip = ( $details['root'] == 1 ? _("Root CA") : _("Intermediate CA")); |
|
360 | + $certstatus = ($details['root'] == 1 ? "R" : "I"); |
|
361 | + $certTooltip = ($details['root'] == 1 ? _("Root CA") : _("Intermediate CA")); |
|
362 | 362 | $innerbgColor = "#0000ff"; |
363 | 363 | $leftBorderColor = "#00ff00"; |
364 | 364 | $message = ""; |
@@ -366,35 +366,35 @@ discard block |
||
366 | 366 | $leftBorderColor = "red"; |
367 | 367 | $message = _("This is a <strong>SERVER</strong> certificate!"); |
368 | 368 | if (\config\ConfAssistant::CERT_GUIDELINES !== '') { |
369 | - $message .= "<br/><a target='_blank' href='".\config\ConfAssistant::CERT_GUIDELINES."'>". _("more info")."</a>"; |
|
369 | + $message .= "<br/><a target='_blank' href='".\config\ConfAssistant::CERT_GUIDELINES."'>"._("more info")."</a>"; |
|
370 | 370 | } |
371 | 371 | $message .= "<br/>"; |
372 | - $retval = "<div class='ca-summary' style='border-left-color: $leftBorderColor'><div style='position:absolute; right: -15px; width:20px; height:20px; background-color:$innerbgColor; border-radius:10px; text-align: center;'><div style='padding-top:3px; font-weight:bold; color:#ffffff;'>S</div></div>" . $message . $details['name'] . "</div>"; |
|
372 | + $retval = "<div class='ca-summary' style='border-left-color: $leftBorderColor'><div style='position:absolute; right: -15px; width:20px; height:20px; background-color:$innerbgColor; border-radius:10px; text-align: center;'><div style='padding-top:3px; font-weight:bold; color:#ffffff;'>S</div></div>".$message.$details['name']."</div>"; |
|
373 | 373 | \core\common\Entity::outOfThePotatoes(); |
374 | 374 | return $retval; |
375 | 375 | } |
376 | 376 | $now = time(); |
377 | 377 | if ($now + \config\ConfAssistant::CERT_WARNINGS['expiry_critical'] > $details['full_details']['validTo_time_t']) { |
378 | 378 | $leftBorderColor = "red"; |
379 | - $message = _("Certificate expired!") . "<br>"; |
|
380 | - } elseif($now + \config\ConfAssistant::CERT_WARNINGS['expiry_warning'] > $details['full_details']['validTo_time_t'] - $caExpiryTrashhold) { |
|
379 | + $message = _("Certificate expired!")."<br>"; |
|
380 | + } elseif ($now + \config\ConfAssistant::CERT_WARNINGS['expiry_warning'] > $details['full_details']['validTo_time_t'] - $caExpiryTrashhold) { |
|
381 | 381 | if ($leftBorderColor == "#00ff00") { |
382 | 382 | $leftBorderColor = "yellow"; |
383 | 383 | } |
384 | - $message = _("Certificate close to expiry!") . "<br/>"; |
|
384 | + $message = _("Certificate close to expiry!")."<br/>"; |
|
385 | 385 | } |
386 | 386 | |
387 | 387 | if ($details['root'] == 1 && $details['basicconstraints_set'] == 0) { |
388 | 388 | if ($leftBorderColor == "#00ff00") { |
389 | 389 | $leftBorderColor = "yellow"; |
390 | 390 | } |
391 | - $message .= "<div style='max-width: 25em'><strong>" . _("Improper root certificate, required critical CA extension missing, will not reliably install!") . "</strong>"; |
|
391 | + $message .= "<div style='max-width: 25em'><strong>"._("Improper root certificate, required critical CA extension missing, will not reliably install!")."</strong>"; |
|
392 | 392 | if (\config\ConfAssistant::CERT_GUIDELINES !== '') { |
393 | - $message .= "<br/><a target='_blank' href='".\config\ConfAssistant::CERT_GUIDELINES."'>". _("more info")."</a>"; |
|
393 | + $message .= "<br/><a target='_blank' href='".\config\ConfAssistant::CERT_GUIDELINES."'>"._("more info")."</a>"; |
|
394 | 394 | } |
395 | 395 | $message .= "</div><br/>"; |
396 | 396 | } |
397 | - $retval = "<div class='ca-summary' style='border-left-color: $leftBorderColor'><div style='position:absolute; right: -15px; width:20px; height:20px; background-color:$innerbgColor; border-radius:10px; text-align: center;'><div title='$certTooltip' style='padding-top:3px; font-weight:bold; color:#ffffff;'>$certstatus</div></div>" . $message . $details['name'] . "<br>" . $this->displayName('eap:ca_vailduntil') . " " . gmdate('Y-m-d H:i:s', $details['full_details']['validTo_time_t']) . " UTC</div>"; |
|
397 | + $retval = "<div class='ca-summary' style='border-left-color: $leftBorderColor'><div style='position:absolute; right: -15px; width:20px; height:20px; background-color:$innerbgColor; border-radius:10px; text-align: center;'><div title='$certTooltip' style='padding-top:3px; font-weight:bold; color:#ffffff;'>$certstatus</div></div>".$message.$details['name']."<br>".$this->displayName('eap:ca_vailduntil')." ".gmdate('Y-m-d H:i:s', $details['full_details']['validTo_time_t'])." UTC</div>"; |
|
398 | 398 | \core\common\Entity::outOfThePotatoes(); |
399 | 399 | return $retval; |
400 | 400 | } |
@@ -407,7 +407,7 @@ discard block |
||
407 | 407 | */ |
408 | 408 | public function previewImageinHTML($imageReference) { |
409 | 409 | \core\common\Entity::intoThePotatoes(); |
410 | - $retval = "<img style='max-width:150px' src='inc/filepreview.php?id=" . $imageReference . "' alt='" . _("Preview of logo file") . "'/>"; |
|
410 | + $retval = "<img style='max-width:150px' src='inc/filepreview.php?id=".$imageReference."' alt='"._("Preview of logo file")."'/>"; |
|
411 | 411 | \core\common\Entity::outOfThePotatoes(); |
412 | 412 | return $retval; |
413 | 413 | } |
@@ -424,13 +424,13 @@ discard block |
||
424 | 424 | $ref = $validator->databaseReference($fileReference); |
425 | 425 | $fileBlob = UIElements::getBlobFromDB($ref['table'], $ref['rowindex'], FALSE); |
426 | 426 | if (is_bool($fileBlob)) { // we didn't actually get a file! |
427 | - $retval = "<div class='ca-summary'>" . _("There was an error while retrieving the file from the database!") . "</div>"; |
|
427 | + $retval = "<div class='ca-summary'>"._("There was an error while retrieving the file from the database!")."</div>"; |
|
428 | 428 | \core\common\Entity::outOfThePotatoes(); |
429 | 429 | return $retval; |
430 | 430 | } |
431 | 431 | $decodedFileBlob = base64_decode($fileBlob); |
432 | 432 | $fileinfo = new \finfo(); |
433 | - $retval = "<div class='ca-summary'>" . _("File exists") . " (" . $fileinfo->buffer($decodedFileBlob, FILEINFO_MIME_TYPE) . ", " . $this->displaySize(strlen($decodedFileBlob)) . ")<br/><a href='inc/filepreview.php?id=$fileReference'>" . _("Preview") . "</a></div>"; |
|
433 | + $retval = "<div class='ca-summary'>"._("File exists")." (".$fileinfo->buffer($decodedFileBlob, FILEINFO_MIME_TYPE).", ".$this->displaySize(strlen($decodedFileBlob)).")<br/><a href='inc/filepreview.php?id=$fileReference'>"._("Preview")."</a></div>"; |
|
434 | 434 | \core\common\Entity::outOfThePotatoes(); |
435 | 435 | return $retval; |
436 | 436 | } |
@@ -587,8 +587,8 @@ discard block |
||
587 | 587 | return ""; |
588 | 588 | } |
589 | 589 | |
590 | - $loggerInstance->debug(4, "Consortium logo is at: " . ROOT . "/web/resources/images/consortium_logo_large.png"); |
|
591 | - $logogd = imagecreatefrompng(ROOT . "/web/resources/images/consortium_logo_large.png"); |
|
590 | + $loggerInstance->debug(4, "Consortium logo is at: ".ROOT."/web/resources/images/consortium_logo_large.png"); |
|
591 | + $logogd = imagecreatefrompng(ROOT."/web/resources/images/consortium_logo_large.png"); |
|
592 | 592 | if ($logogd === FALSE) { // consortium logo is bogus; don't do anything |
593 | 593 | return ""; |
594 | 594 | } |
@@ -614,7 +614,7 @@ discard block |
||
614 | 614 | imagecolorallocate($whiteimage, 255, 255, 255); |
615 | 615 | // also make sure the initial placement is a multitude of 12; otherwise "two half" symbols might be affected |
616 | 616 | $targetplacementx = (int) ($symbolsize * round(($sizeinput[0] / 2 - ($targetwidth - $symbolsize + 1) / 2) / $symbolsize)); |
617 | - $targetplacementy = (int) ($symbolsize * round(($sizeinput[1] / 2 - ($targetheight - $symbolsize + 1 ) / 2) / $symbolsize)); |
|
617 | + $targetplacementy = (int) ($symbolsize * round(($sizeinput[1] / 2 - ($targetheight - $symbolsize + 1) / 2) / $symbolsize)); |
|
618 | 618 | imagecopyresized($inputgd, $whiteimage, $targetplacementx - $symbolsize, $targetplacementy - $symbolsize, 0, 0, $targetwidth + 2 * $symbolsize, $targetheight + 2 * $symbolsize, $targetwidth + 2 * $symbolsize, $targetheight + 2 * $symbolsize); |
619 | 619 | imagecopyresized($inputgd, $logogd, $targetplacementx, $targetplacementy, 0, 0, $targetwidth, $targetheight, $sizelogo[0], $sizelogo[1]); |
620 | 620 | ob_start(); |
@@ -664,9 +664,9 @@ discard block |
||
664 | 664 | $message = "Your configuration appears to be fine."; |
665 | 665 | break; |
666 | 666 | default: |
667 | - throw new Exception("The result code level " . $test->test_result['global'] . " is not defined!"); |
|
667 | + throw new Exception("The result code level ".$test->test_result['global']." is not defined!"); |
|
668 | 668 | } |
669 | - $out .= $this->boxFlexible($test->test_result['global'], "<br><strong>Test Summary</strong><br>" . $message . "<br>See below for details<br><hr>"); |
|
669 | + $out .= $this->boxFlexible($test->test_result['global'], "<br><strong>Test Summary</strong><br>".$message."<br>See below for details<br><hr>"); |
|
670 | 670 | foreach ($test->out as $testValue) { |
671 | 671 | foreach ($testValue as $o) { |
672 | 672 | $out .= $this->boxFlexible($o['level'], $o['message']); |