@@ -190,71 +190,71 @@ discard block |
||
190 | 190 | </div> |
191 | 191 | <?php |
192 | 192 | break; |
193 | - case "core\ProfileRADIUS": |
|
194 | - ?> |
|
195 | - <div style='padding-bottom:20px;'> |
|
193 | + case "core\ProfileRADIUS": |
|
194 | + ?> |
|
195 | + <div style='padding-bottom:20px;'> |
|
196 | 196 | <?php |
197 | - $profile_name = $profile_list->name; ?> |
|
198 | - <h2 style='overflow:auto; display:inline; padding-bottom: 10px;'><?php printf(_("Profile: %s"), $profile_name); ?></h2> |
|
197 | + $profile_name = $profile_list->name; ?> |
|
198 | + <h2 style='overflow:auto; display:inline; padding-bottom: 10px;'><?php printf(_("Profile: %s"), $profile_name); ?></h2> |
|
199 | 199 | <?php |
200 | - // see if there are any profile-level overrides |
|
201 | - $attribs = $profile_list->getAttributes(); |
|
202 | - // write things into a buffer; we need some function calls to determine |
|
203 | - // readiness - but want to display it before! |
|
204 | - $has_overrides = FALSE; |
|
205 | - foreach ($attribs as $attrib) { |
|
206 | - if ($attrib['level'] == \core\Options::LEVEL_PROFILE && !preg_match("/^(internal:|profile:name|profile:description|eap:)/", $attrib['name'])) { |
|
207 | - $has_overrides = TRUE; |
|
200 | + // see if there are any profile-level overrides |
|
201 | + $attribs = $profile_list->getAttributes(); |
|
202 | + // write things into a buffer; we need some function calls to determine |
|
203 | + // readiness - but want to display it before! |
|
204 | + $has_overrides = FALSE; |
|
205 | + foreach ($attribs as $attrib) { |
|
206 | + if ($attrib['level'] == \core\Options::LEVEL_PROFILE && !preg_match("/^(internal:|profile:name|profile:description|eap:)/", $attrib['name'])) { |
|
207 | + $has_overrides = TRUE; |
|
208 | + } |
|
208 | 209 | } |
209 | - } |
|
210 | - $buffer_eaptypediv = "<div style='margin-bottom:40px; float:left;'>" . _("<strong>EAP Types</strong> (in order of preference):") . "<br/>"; |
|
211 | - $typelist = $profile_list->getEapMethodsinOrderOfPreference(); |
|
212 | - $allcomplete = TRUE; |
|
213 | - foreach ($typelist as $eaptype) { |
|
214 | - $buffer_eaptypediv .= $eaptype->getPrintableRep(); |
|
215 | - $completeness = $profile_list->isEapTypeDefinitionComplete($eaptype); |
|
216 | - if ($completeness === true) { |
|
217 | - $buffer_eaptypediv .= " <div class='acceptable'>" . _("OK") . "</div>"; |
|
218 | - } else { |
|
219 | - $buffer_eaptypediv .= " <div class='notacceptable'>"; |
|
220 | - $buffer_eaptypediv .= _("Information needed!"); |
|
221 | - if (is_array($completeness)) { |
|
222 | - $buffer_eaptypediv .= "<ul style='margin:1px'>"; |
|
223 | - foreach ($completeness as $missing_attrib) { |
|
224 | - $buffer_eaptypediv .= "<li>" . $uiElements->displayName($missing_attrib) . "</li>"; |
|
210 | + $buffer_eaptypediv = "<div style='margin-bottom:40px; float:left;'>" . _("<strong>EAP Types</strong> (in order of preference):") . "<br/>"; |
|
211 | + $typelist = $profile_list->getEapMethodsinOrderOfPreference(); |
|
212 | + $allcomplete = TRUE; |
|
213 | + foreach ($typelist as $eaptype) { |
|
214 | + $buffer_eaptypediv .= $eaptype->getPrintableRep(); |
|
215 | + $completeness = $profile_list->isEapTypeDefinitionComplete($eaptype); |
|
216 | + if ($completeness === true) { |
|
217 | + $buffer_eaptypediv .= " <div class='acceptable'>" . _("OK") . "</div>"; |
|
218 | + } else { |
|
219 | + $buffer_eaptypediv .= " <div class='notacceptable'>"; |
|
220 | + $buffer_eaptypediv .= _("Information needed!"); |
|
221 | + if (is_array($completeness)) { |
|
222 | + $buffer_eaptypediv .= "<ul style='margin:1px'>"; |
|
223 | + foreach ($completeness as $missing_attrib) { |
|
224 | + $buffer_eaptypediv .= "<li>" . $uiElements->displayName($missing_attrib) . "</li>"; |
|
225 | + } |
|
226 | + $buffer_eaptypediv .= "</ul>"; |
|
225 | 227 | } |
226 | - $buffer_eaptypediv .= "</ul>"; |
|
228 | + $buffer_eaptypediv .= "</div>"; |
|
229 | + $allcomplete = FALSE; |
|
227 | 230 | } |
228 | - $buffer_eaptypediv .= "</div>"; |
|
229 | - $allcomplete = FALSE; |
|
230 | - } |
|
231 | - $attribs = $profile_list->getAttributes(); |
|
232 | - $justOnce = FALSE; |
|
233 | - foreach ($attribs as $attrib) { |
|
234 | - if ($attrib['level'] == \core\Options::LEVEL_METHOD && !preg_match("/^internal:/", $attrib['name']) && !$justOnce) { |
|
235 | - $justOnce = TRUE; |
|
236 | - $buffer_eaptypediv .= "<img src='../resources/images/icons/Letter-E-blue-icon.png' alt='" . _("Options on EAP Method/Device level are in effect.") . "'>"; |
|
231 | + $attribs = $profile_list->getAttributes(); |
|
232 | + $justOnce = FALSE; |
|
233 | + foreach ($attribs as $attrib) { |
|
234 | + if ($attrib['level'] == \core\Options::LEVEL_METHOD && !preg_match("/^internal:/", $attrib['name']) && !$justOnce) { |
|
235 | + $justOnce = TRUE; |
|
236 | + $buffer_eaptypediv .= "<img src='../resources/images/icons/Letter-E-blue-icon.png' alt='" . _("Options on EAP Method/Device level are in effect.") . "'>"; |
|
237 | + } |
|
237 | 238 | } |
239 | + $buffer_eaptypediv .= "<br/>"; |
|
238 | 240 | } |
239 | - $buffer_eaptypediv .= "<br/>"; |
|
240 | - } |
|
241 | - $buffer_eaptypediv .= "</div>"; |
|
241 | + $buffer_eaptypediv .= "</div>"; |
|
242 | 242 | |
243 | - $buffer_headline = "<span style='float:right;'>"; |
|
244 | - $readiness = $profile_list->readinessLevel(); |
|
245 | - if ($has_overrides) { |
|
246 | - $buffer_headline .= $uiElements->boxRemark("", _("Option override on profile level is in effect."), TRUE); |
|
247 | - } |
|
248 | - if (!$allcomplete) { |
|
249 | - $buffer_headline .= $uiElements->boxError("", _("The information in this profile is incomplete."), TRUE); |
|
250 | - } |
|
251 | - switch ($readiness) { |
|
243 | + $buffer_headline = "<span style='float:right;'>"; |
|
244 | + $readiness = $profile_list->readinessLevel(); |
|
245 | + if ($has_overrides) { |
|
246 | + $buffer_headline .= $uiElements->boxRemark("", _("Option override on profile level is in effect."), TRUE); |
|
247 | + } |
|
248 | + if (!$allcomplete) { |
|
249 | + $buffer_headline .= $uiElements->boxError("", _("The information in this profile is incomplete."), TRUE); |
|
250 | + } |
|
251 | + switch ($readiness) { |
|
252 | 252 | case core\AbstractProfile::READINESS_LEVEL_SHOWTIME: |
253 | 253 | $buffer_headline .= $uiElements->boxOkay("", _("This profile is shown on the user download interface."), TRUE); |
254 | 254 | break; |
255 | 255 | case core\AbstractProfile::READINESS_LEVEL_SUFFICIENTCONFIG: |
256 | 256 | $buffer_headline .= $uiElements->boxWarning("", sprintf(_("This profile is NOT shown on the user download interface, even though we have enough information to show. To enable the profile, add the attribute \"%s\" and tick the corresponding box."), $uiElements->displayName("profile:production")), TRUE); |
257 | - } |
|
257 | + } |
|
258 | 258 | |
259 | 259 | $buffer_headline .= "</span></div>"; |
260 | 260 | |
@@ -337,8 +337,8 @@ discard block |
||
337 | 337 | </div> |
338 | 338 | <?php |
339 | 339 | break; |
340 | - default: |
|
341 | - throw new Exception("We were asked to operate on something that is neither a RADIUS nor Silverbullet profile!"); |
|
340 | + default: |
|
341 | + throw new Exception("We were asked to operate on something that is neither a RADIUS nor Silverbullet profile!"); |
|
342 | 342 | } |
343 | 343 | ?> |
344 | 344 | <!-- dummy width to keep a little distance --> |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | */ |
27 | 27 | ?> |
28 | 28 | <?php |
29 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
29 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
30 | 30 | |
31 | 31 | $deco = new \web\lib\admin\PageDecoration(); |
32 | 32 | $validator = new \web\lib\common\InputValidation(); |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | } else { |
39 | 39 | $link = 'http://'; |
40 | 40 | } |
41 | -$link .= $_SERVER['SERVER_NAME'] . $_SERVER['SCRIPT_NAME']; |
|
41 | +$link .= $_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME']; |
|
42 | 42 | $link = htmlspecialchars($link); |
43 | 43 | |
44 | 44 | echo $deco->defaultPagePrelude(sprintf(_("%s: %s Dashboard"), \config\Master::APPEARANCE['productname'], $uiElements->nomenclatureParticipant)); |
@@ -165,14 +165,14 @@ discard block |
||
165 | 165 | <ul style='margin:1px'> |
166 | 166 | <?php |
167 | 167 | foreach ($completeness as $missing_attrib) { |
168 | - echo "<li>" . $uiElements->displayName($missing_attrib) . "</li>"; |
|
168 | + echo "<li>".$uiElements->displayName($missing_attrib)."</li>"; |
|
169 | 169 | } |
170 | 170 | ?> |
171 | 171 | </ul> |
172 | 172 | </div> |
173 | 173 | <?php |
174 | 174 | } else { |
175 | - echo sprintf(_("You can create up to %d users."), $maxusers[0]['value']) . "<br/>" . sprintf(_("Their credentials will carry the name <strong>%s</strong>."), $profile_list->realm); |
|
175 | + echo sprintf(_("You can create up to %d users."), $maxusers[0]['value'])."<br/>".sprintf(_("Their credentials will carry the name <strong>%s</strong>."), $profile_list->realm); |
|
176 | 176 | } |
177 | 177 | ?> |
178 | 178 | <br/> |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | if ($readonly === FALSE) { |
182 | 182 | ?> |
183 | 183 | <form action='edit_silverbullet.php?inst_id=<?php echo $my_inst->identifier; ?>&profile_id=<?php echo $profile_list->identifier; ?>' method='POST'> |
184 | - <button <?php echo ( is_array($completeness) ? "disabled" : "" ); ?> type='submit' name='sb_action' value='sb_edit'><?php echo _("Manage User Base"); ?></button> |
|
184 | + <button <?php echo (is_array($completeness) ? "disabled" : ""); ?> type='submit' name='sb_action' value='sb_edit'><?php echo _("Manage User Base"); ?></button> |
|
185 | 185 | </form> |
186 | 186 | <?php |
187 | 187 | } |
@@ -207,21 +207,21 @@ discard block |
||
207 | 207 | $has_overrides = TRUE; |
208 | 208 | } |
209 | 209 | } |
210 | - $buffer_eaptypediv = "<div style='margin-bottom:40px; float:left;'>" . _("<strong>EAP Types</strong> (in order of preference):") . "<br/>"; |
|
210 | + $buffer_eaptypediv = "<div style='margin-bottom:40px; float:left;'>"._("<strong>EAP Types</strong> (in order of preference):")."<br/>"; |
|
211 | 211 | $typelist = $profile_list->getEapMethodsinOrderOfPreference(); |
212 | 212 | $allcomplete = TRUE; |
213 | 213 | foreach ($typelist as $eaptype) { |
214 | 214 | $buffer_eaptypediv .= $eaptype->getPrintableRep(); |
215 | 215 | $completeness = $profile_list->isEapTypeDefinitionComplete($eaptype); |
216 | 216 | if ($completeness === true) { |
217 | - $buffer_eaptypediv .= " <div class='acceptable'>" . _("OK") . "</div>"; |
|
217 | + $buffer_eaptypediv .= " <div class='acceptable'>"._("OK")."</div>"; |
|
218 | 218 | } else { |
219 | 219 | $buffer_eaptypediv .= " <div class='notacceptable'>"; |
220 | 220 | $buffer_eaptypediv .= _("Information needed!"); |
221 | 221 | if (is_array($completeness)) { |
222 | 222 | $buffer_eaptypediv .= "<ul style='margin:1px'>"; |
223 | 223 | foreach ($completeness as $missing_attrib) { |
224 | - $buffer_eaptypediv .= "<li>" . $uiElements->displayName($missing_attrib) . "</li>"; |
|
224 | + $buffer_eaptypediv .= "<li>".$uiElements->displayName($missing_attrib)."</li>"; |
|
225 | 225 | } |
226 | 226 | $buffer_eaptypediv .= "</ul>"; |
227 | 227 | } |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | foreach ($attribs as $attrib) { |
234 | 234 | if ($attrib['level'] == \core\Options::LEVEL_METHOD && !preg_match("/^internal:/", $attrib['name']) && !$justOnce) { |
235 | 235 | $justOnce = TRUE; |
236 | - $buffer_eaptypediv .= "<img src='../resources/images/icons/Letter-E-blue-icon.png' alt='" . _("Options on EAP Method/Device level are in effect.") . "'>"; |
|
236 | + $buffer_eaptypediv .= "<img src='../resources/images/icons/Letter-E-blue-icon.png' alt='"._("Options on EAP Method/Device level are in effect.")."'>"; |
|
237 | 237 | } |
238 | 238 | } |
239 | 239 | $buffer_eaptypediv .= "<br/>"; |
@@ -271,7 +271,7 @@ discard block |
||
271 | 271 | if (\config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS'] == "LOCAL") { |
272 | 272 | $diagUrl = "../diag/"; |
273 | 273 | } else { |
274 | - $diagUrl = \config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS'] . "/diag/"; |
|
274 | + $diagUrl = \config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS']."/diag/"; |
|
275 | 275 | } |
276 | 276 | ?> |
277 | 277 | <form action='<?php echo $diagUrl."action_realmcheck.php?inst_id=".$my_inst->identifier."&profile_id=".$profile_list->identifier ?>' method='post' accept-charset='UTF-8'> |
@@ -308,9 +308,9 @@ discard block |
||
308 | 308 | ?> |
309 | 309 | <div style='display: flex;'> |
310 | 310 | <?php |
311 | - $idpLevelUrl = ( isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on" ? 'https://' : 'http://') . $_SERVER['SERVER_NAME'] . dirname(dirname($_SERVER['SCRIPT_NAME'])) . "?idp=" . $my_inst->identifier; |
|
312 | - $displayurl = $idpLevelUrl . "&profile=" . $profile_list->identifier; |
|
313 | - $QRurl = $idpLevelUrl . "&profile=" . $profile_list->identifier; |
|
311 | + $idpLevelUrl = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on" ? 'https://' : 'http://').$_SERVER['SERVER_NAME'].dirname(dirname($_SERVER['SCRIPT_NAME']))."?idp=".$my_inst->identifier; |
|
312 | + $displayurl = $idpLevelUrl."&profile=".$profile_list->identifier; |
|
313 | + $QRurl = $idpLevelUrl."&profile=".$profile_list->identifier; |
|
314 | 314 | $qrCode = new \chillerlan\QRCode\QRCode(new \chillerlan\QRCode\QROptions([ |
315 | 315 | 'outputType' => \chillerlan\QRCode\QRCode::OUTPUT_IMAGE_PNG, |
316 | 316 | 'eccLevel' => \chillerlan\QRCode\QRCode::ECC_H, |
@@ -322,9 +322,9 @@ discard block |
||
322 | 322 | if (empty($rawQr)) { |
323 | 323 | throw new Exception("Something went seriously wrong during QR code generation!"); |
324 | 324 | } |
325 | - $uri = "data:image/png;base64," . base64_encode($uiElements->pngInjectConsortiumLogo($rawQr, web\lib\admin\UIElements::QRCODE_PIXELS_PER_SYMBOL)); |
|
325 | + $uri = "data:image/png;base64,".base64_encode($uiElements->pngInjectConsortiumLogo($rawQr, web\lib\admin\UIElements::QRCODE_PIXELS_PER_SYMBOL)); |
|
326 | 326 | $size = getimagesize($uri); |
327 | - echo "<img width='" . ($size[0] / 4) . "' height='" . ($size[1] / 4) . "' src='$uri' alt='QR-code'/>"; |
|
327 | + echo "<img width='".($size[0] / 4)."' height='".($size[1] / 4)."' src='$uri' alt='QR-code'/>"; |
|
328 | 328 | |
329 | 329 | //echo "<nobr>$displayurl</nobr></a>"; |
330 | 330 | echo "<p>$displayurl</p></a>"; |
@@ -374,7 +374,7 @@ discard block |
||
374 | 374 | <div> |
375 | 375 | <input type="hidden" name="consortium" value="eduroam"/> |
376 | 376 | <button type='submit' <?php echo ($hasMail > 0 ? "" : "disabled"); ?> name='profile_action' value='new'> |
377 | - <?php echo sprintf(_("Add %s deployment ..."), \config\ConfAssistant::CONSORTIUM['name'] . " " . \core\DeploymentManaged::PRODUCTNAME); ?> |
|
377 | + <?php echo sprintf(_("Add %s deployment ..."), \config\ConfAssistant::CONSORTIUM['name']." ".\core\DeploymentManaged::PRODUCTNAME); ?> |
|
378 | 378 | </button> |
379 | 379 | |
380 | 380 | </div> |
@@ -400,7 +400,7 @@ discard block |
||
400 | 400 | <?php |
401 | 401 | $hotspotProfiles = $my_inst->listDeployments(); |
402 | 402 | if (count($hotspotProfiles) == 0) { // no profiles yet. |
403 | - echo "<h2>" . sprintf(_("There are not yet any known deployments for your %s."), $uiElements->nomenclatureHotspot) . "</h2>"; |
|
403 | + echo "<h2>".sprintf(_("There are not yet any known deployments for your %s."), $uiElements->nomenclatureHotspot)."</h2>"; |
|
404 | 404 | } |
405 | 405 | |
406 | 406 | foreach ($hotspotProfiles as $counter => $deploymentObject) { |
@@ -429,7 +429,7 @@ discard block |
||
429 | 429 | default: |
430 | 430 | throw new Exception("We are supposed to operate on a roaming consortium we don't know."); |
431 | 431 | } |
432 | - echo $displayname . " (<span style='color:" . ( $deploymentObject->status == \core\AbstractDeployment::INACTIVE ? "red;'>" . _("inactive") : "green;'>" . _("active") ) . "</span>)"; ?></h2> |
|
432 | + echo $displayname." (<span style='color:".($deploymentObject->status == \core\AbstractDeployment::INACTIVE ? "red;'>"._("inactive") : "green;'>"._("active"))."</span>)"; ?></h2> |
|
433 | 433 | <table> |
434 | 434 | <caption><?php echo _("Deployment Details"); ?></caption> |
435 | 435 | <tr> |
@@ -442,13 +442,13 @@ discard block |
||
442 | 442 | <td><strong><?php echo _("Your primary RADIUS server") ?></strong><br/> |
443 | 443 | <?php |
444 | 444 | if ($deploymentObject->host1_v4 !== NULL) { |
445 | - echo _("IPv4") . ": " . $deploymentObject->host1_v4; |
|
445 | + echo _("IPv4").": ".$deploymentObject->host1_v4; |
|
446 | 446 | } |
447 | 447 | if ($deploymentObject->host1_v4 !== NULL && $deploymentObject->host1_v6 !== NULL) { |
448 | 448 | echo "<br/>"; |
449 | 449 | } |
450 | 450 | if ($deploymentObject->host1_v6 !== NULL) { |
451 | - echo _("IPv6") . ": " . $deploymentObject->host1_v6; |
|
451 | + echo _("IPv6").": ".$deploymentObject->host1_v6; |
|
452 | 452 | } |
453 | 453 | ?> |
454 | 454 | </td> |
@@ -456,9 +456,9 @@ discard block |
||
456 | 456 | <td><?php echo $deploymentObject->port1; ?></td> |
457 | 457 | <td> |
458 | 458 | <?php |
459 | - echo "<img src='" . $radiusMessages[$deploymentObject->radius_status_1]['icon'] . |
|
460 | - "' alt='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] . |
|
461 | - "' title='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] . "'>"; |
|
459 | + echo "<img src='".$radiusMessages[$deploymentObject->radius_status_1]['icon']. |
|
460 | + "' alt='".$radiusMessages[$deploymentObject->radius_status_1]['text']. |
|
461 | + "' title='".$radiusMessages[$deploymentObject->radius_status_1]['text']."'>"; |
|
462 | 462 | ?> |
463 | 463 | </td> |
464 | 464 | </tr> |
@@ -466,22 +466,22 @@ discard block |
||
466 | 466 | <td><strong><?php echo _("Your backup RADIUS server") ?><br/></strong> |
467 | 467 | <?php |
468 | 468 | if ($deploymentObject->host2_v4 !== NULL) { |
469 | - echo _("IPv4") . ": " . $deploymentObject->host2_v4; |
|
469 | + echo _("IPv4").": ".$deploymentObject->host2_v4; |
|
470 | 470 | } |
471 | 471 | if ($deploymentObject->host2_v4 !== NULL && $deploymentObject->host2_v6 !== NULL) { |
472 | 472 | echo "<br/>"; |
473 | 473 | } |
474 | 474 | if ($deploymentObject->host2_v6 !== NULL) { |
475 | - echo _("IPv6") . ": " . $deploymentObject->host2_v6; |
|
475 | + echo _("IPv6").": ".$deploymentObject->host2_v6; |
|
476 | 476 | } |
477 | 477 | ?></td> |
478 | 478 | <td><?php echo _("RADIUS port number: ") ?></td> |
479 | 479 | <td><?php echo $deploymentObject->port2; ?></td> |
480 | 480 | <td> |
481 | 481 | <?php |
482 | - echo "<img src='" . $radiusMessages[$deploymentObject->radius_status_2]['icon'] . |
|
483 | - "' alt='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] . |
|
484 | - "' title='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] . "'>"; |
|
482 | + echo "<img src='".$radiusMessages[$deploymentObject->radius_status_2]['icon']. |
|
483 | + "' alt='".$radiusMessages[$deploymentObject->radius_status_2]['text']. |
|
484 | + "' title='".$radiusMessages[$deploymentObject->radius_status_2]['text']."'>"; |
|
485 | 485 | ?> |
486 | 486 | </td> |
487 | 487 | </tr> |
@@ -533,12 +533,12 @@ discard block |
||
533 | 533 | if (isset($res['FAILURE']) && $res['FAILURE'] > 0) { |
534 | 534 | echo '<br>'; |
535 | 535 | if ($res['FAILURE'] == 2) { |
536 | - echo ' <span style="color: red;">' . _("Activation failure.") . '</span>'; |
|
536 | + echo ' <span style="color: red;">'._("Activation failure.").'</span>'; |
|
537 | 537 | } else { |
538 | 538 | if (isset($_GET['res'][1]) && $_GET['res']['1'] == 'FAILURE') { |
539 | - echo ' <span style="color: red;">' . _("Activation failure for your primary RADIUS server.") . '</span>'; |
|
539 | + echo ' <span style="color: red;">'._("Activation failure for your primary RADIUS server.").'</span>'; |
|
540 | 540 | } else { |
541 | - echo ' <span style="color: red;">' . _("Activation failure for your backup RADIUS server.") . '</span>'; |
|
541 | + echo ' <span style="color: red;">'._("Activation failure for your backup RADIUS server.").'</span>'; |
|
542 | 542 | } |
543 | 543 | } |
544 | 544 | } |
@@ -558,12 +558,12 @@ discard block |
||
558 | 558 | if ($res['FAILURE'] > 0) { |
559 | 559 | echo '<br>'; |
560 | 560 | if ($res['FAILURE'] == 2) { |
561 | - echo ' <span style="color: red;">' . _("Failure during deactivation, your request is queued for handling") . '</span>'; |
|
561 | + echo ' <span style="color: red;">'._("Failure during deactivation, your request is queued for handling").'</span>'; |
|
562 | 562 | } else { |
563 | 563 | if (isset($_GET['res'][1]) && $_GET['res']['1'] == 'FAILURE') { |
564 | - echo ' <span style="color: red;">' . _("Deactivation failure for your primary RADIUS server, your request is queued.") . '</span>'; |
|
564 | + echo ' <span style="color: red;">'._("Deactivation failure for your primary RADIUS server, your request is queued.").'</span>'; |
|
565 | 565 | } else { |
566 | - echo ' <span style="color: red;">' . _("Deactivation failure for your backup RADIUS server, your request is queued.") . '</span>'; |
|
566 | + echo ' <span style="color: red;">'._("Deactivation failure for your backup RADIUS server, your request is queued.").'</span>'; |
|
567 | 567 | } |
568 | 568 | } |
569 | 569 | } |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | $optionClass = \core\Options::instance(); |
102 | 102 | $optionProps = $optionClass->optionType($optiontype); |
103 | 103 | $allowedValues = explode(',', substr($optionProps["flags"], 7)); |
104 | - if (in_array($incomingBinary,$allowedValues)) { |
|
104 | + if (in_array($incomingBinary, $allowedValues)) { |
|
105 | 105 | return TRUE; |
106 | 106 | } |
107 | 107 | return FALSE; |
@@ -346,14 +346,14 @@ discard block |
||
346 | 346 | case \core\Options::TYPECODE_TEXT: |
347 | 347 | case \core\Options::TYPECODE_COORDINATES: |
348 | 348 | case \core\Options::TYPECODE_INTEGER: |
349 | - $varName = $listOfEntries["$objId-" . self::VALIDATOR_FUNCTIONS[$optioninfo['type']]['field']]; |
|
349 | + $varName = $listOfEntries["$objId-".self::VALIDATOR_FUNCTIONS[$optioninfo['type']]['field']]; |
|
350 | 350 | if (!empty($varName)) { |
351 | 351 | $content = call_user_func_array([$this->validator, self::VALIDATOR_FUNCTIONS[$optioninfo['type']]['function']], array_merge([$varName], self::VALIDATOR_FUNCTIONS[$optioninfo['type']]['extraarg'])); |
352 | 352 | break; |
353 | 353 | } |
354 | 354 | continue 2; |
355 | 355 | case \core\Options::TYPECODE_BOOLEAN: |
356 | - $varName = $listOfEntries["$objId-" . \core\Options::TYPECODE_BOOLEAN]; |
|
356 | + $varName = $listOfEntries["$objId-".\core\Options::TYPECODE_BOOLEAN]; |
|
357 | 357 | if (!empty($varName)) { |
358 | 358 | $contentValid = $this->validator->boolean($varName); |
359 | 359 | if ($contentValid) { |
@@ -366,7 +366,7 @@ discard block |
||
366 | 366 | } |
367 | 367 | continue 2; |
368 | 368 | case \core\Options::TYPECODE_STRING: |
369 | - $previsionalContent = $listOfEntries["$objId-" . \core\Options::TYPECODE_STRING]; |
|
369 | + $previsionalContent = $listOfEntries["$objId-".\core\Options::TYPECODE_STRING]; |
|
370 | 370 | if (!empty($previsionalContent)) { |
371 | 371 | $content = $this->furtherStringChecks($objValue, $previsionalContent, $bad); |
372 | 372 | if ($content === FALSE) { |
@@ -377,7 +377,7 @@ discard block |
||
377 | 377 | continue 2; |
378 | 378 | |
379 | 379 | case \core\Options::TYPECODE_ENUM_OPENROAMING: |
380 | - $previsionalContent = $listOfEntries["$objId-" . \core\Options::TYPECODE_ENUM_OPENROAMING]; |
|
380 | + $previsionalContent = $listOfEntries["$objId-".\core\Options::TYPECODE_ENUM_OPENROAMING]; |
|
381 | 381 | if (!empty($previsionalContent)) { |
382 | 382 | $content = $this->furtherStringChecks($objValue, $previsionalContent, $bad); |
383 | 383 | if ($content === FALSE) { |
@@ -388,15 +388,15 @@ discard block |
||
388 | 388 | continue 2; |
389 | 389 | case \core\Options::TYPECODE_FILE: |
390 | 390 | // this is either actually an uploaded file, or a reference to a DB entry of a previously uploaded file |
391 | - $reference = $listOfEntries["$objId-" . \core\Options::TYPECODE_STRING]; |
|
391 | + $reference = $listOfEntries["$objId-".\core\Options::TYPECODE_STRING]; |
|
392 | 392 | if (!empty($reference)) { // was already in, by ROWID reference, extract |
393 | 393 | // ROWID means it's a multi-line string (simple strings are inline in the form; so allow whitespace) |
394 | 394 | $content = $this->validator->string(urldecode($reference), TRUE); |
395 | 395 | break; |
396 | 396 | } |
397 | - $fileName = $listOfEntries["$objId-" . \core\Options::TYPECODE_FILE] ?? ""; |
|
397 | + $fileName = $listOfEntries["$objId-".\core\Options::TYPECODE_FILE] ?? ""; |
|
398 | 398 | if ($fileName != "") { // let's do the download |
399 | - $rawContent = \core\common\OutsideComm::downloadFile("file:///" . $fileName); |
|
399 | + $rawContent = \core\common\OutsideComm::downloadFile("file:///".$fileName); |
|
400 | 400 | |
401 | 401 | if ($rawContent === FALSE || !$this->checkUploadSanity($objValue, $rawContent)) { |
402 | 402 | $bad[] = $objValue; |
@@ -407,7 +407,7 @@ discard block |
||
407 | 407 | } |
408 | 408 | continue 2; |
409 | 409 | default: |
410 | - throw new Exception("Internal Error: Unknown option type " . $objValue . "!"); |
|
410 | + throw new Exception("Internal Error: Unknown option type ".$objValue."!"); |
|
411 | 411 | } |
412 | 412 | // lang can be NULL here, if it's not a multilang attribute, or a ROWID reference. Never mind that. |
413 | 413 | $retval[] = ["$objValue" => ["lang" => $languageFlag, "content" => $content]]; |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | public function divSilverbullet() { |
125 | 125 | $retval = " |
126 | 126 | <div id='silverbullet'>" |
127 | - .$this->Gui->textTemplates->templates[user\SB_GO_AWAY] . |
|
127 | + .$this->Gui->textTemplates->templates[user\SB_GO_AWAY]. |
|
128 | 128 | "</div> |
129 | 129 | "; |
130 | 130 | return $retval; |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | <div id='profiles'> <!-- this is the profile selection filled during run time --> |
223 | 223 | <div id='profiles_h' class='sub_h'>".$this->Gui->textTemplates->templates[user\PROFILE_SELECTION]." |
224 | 224 | </div>" . |
225 | - "<select id='profile_list'></select><div id='profile_desc' class='profile_desc'></div>" . |
|
225 | + "<select id='profile_list'></select><div id='profile_desc' class='profile_desc'></div>". |
|
226 | 226 | "</div>"; |
227 | 227 | } |
228 | 228 | |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | public function divInstitution($selectButton = TRUE) { |
251 | 251 | $retval = "<div id='institution_name'> |
252 | 252 | <span id='inst_name_span'></span> <div id='inst_extra_text'></div><!-- this will be filled with the IdP name -->" . |
253 | - ($selectButton ? "<a id='select_another' class='signin' href=\"\">".$this->Gui->textTemplates->templates[user\INSTITUTION_SELECTION]."</a>" : "") . |
|
253 | + ($selectButton ? "<a id='select_another' class='signin' href=\"\">".$this->Gui->textTemplates->templates[user\INSTITUTION_SELECTION]."</a>" : ""). |
|
254 | 254 | "</div>"; |
255 | 255 | $retval .= $this->emptyImage('idp_logo', 'IdP Logo'); |
256 | 256 | return $retval; |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | public function divSilverbullet() { |
125 | 125 | $retval = " |
126 | 126 | <div id='silverbullet'>" |
127 | - .$this->Gui->textTemplates->templates[user\SB_GO_AWAY] . |
|
127 | + .$this->Gui->textTemplates->templates[user\SB_GO_AWAY] . |
|
128 | 128 | "</div> |
129 | 129 | "; |
130 | 130 | return $retval; |
@@ -293,8 +293,8 @@ discard block |
||
293 | 293 | } |
294 | 294 | |
295 | 295 | $retval .= "<td><button name='$d' class='other_os' id='$d'>".$D['display']."</button>" |
296 | - ."</td>" |
|
297 | - ."<td><button name='$d' class='more_info_b' id='info_b_$d'>i</button></td></tr>\n"; |
|
296 | + ."</td>" |
|
297 | + ."<td><button name='$d' class='more_info_b' id='info_b_$d'>i</button></td></tr>\n"; |
|
298 | 298 | $deviceIndex++; |
299 | 299 | } |
300 | 300 | $retval .= "</tbody>"; |
@@ -341,7 +341,7 @@ discard block |
||
341 | 341 | <tr> |
342 | 342 | <td>" . |
343 | 343 | $this->Gui->catCopyright |
344 | - ." |
|
344 | + ." |
|
345 | 345 | </td>"; |
346 | 346 | |
347 | 347 | if (!empty(\config\Master::APPEARANCE['privacy_notice_url'])) { |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | */ |
113 | 113 | public function prefilledOptionTable(string $attributePrefix, $fed) |
114 | 114 | { |
115 | - $retval = "<table id='expandable_$attributePrefix" . "_options'>"; |
|
115 | + $retval = "<table id='expandable_$attributePrefix"."_options'>"; |
|
116 | 116 | |
117 | 117 | $prepopulate = []; |
118 | 118 | foreach ($this->listOfOptions as $existingAttribute) { |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | $prepopulate[] = $existingAttribute; |
121 | 121 | } |
122 | 122 | } |
123 | - if (is_array($prepopulate) && ( count($prepopulate) > 0 || $attributePrefix == "device-specific" || $attributePrefix == "eap-specific" )) { // editing... fill with values |
|
123 | + if (is_array($prepopulate) && (count($prepopulate) > 0 || $attributePrefix == "device-specific" || $attributePrefix == "eap-specific")) { // editing... fill with values |
|
124 | 124 | $retval .= $this->addOptionEdit($attributePrefix, $prepopulate); |
125 | 125 | } else { |
126 | 126 | $retval .= $this->addOptionNew($attributePrefix, $fed); |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | $optiontypearray = $optioninfo->optionType($option['name']); |
154 | 154 | $loggerInstance = new \core\common\Logging(); |
155 | 155 | $loggerInstance->debug(5, "About to execute optiontext with PREFILL!\n"); |
156 | - $retval .= $this->optiontext([$option['name']], ($optiontypearray["type"] == "file" ? 'ROWID-' . $option['level'] . '-' . $option['row'] : $option['value']), $option['lang']); |
|
156 | + $retval .= $this->optiontext([$option['name']], ($optiontypearray["type"] == "file" ? 'ROWID-'.$option['level'].'-'.$option['row'] : $option['value']), $option['lang']); |
|
157 | 157 | } |
158 | 158 | } |
159 | 159 | return $retval; |
@@ -252,18 +252,18 @@ discard block |
||
252 | 252 | } |
253 | 253 | $descriptions["media:force_proxy"] = sprintf(_("The format of this option is: IPv4|IPv6|hostname:port . Forcing your users through a content filter of your own is a significant invasion of user self-determination. It also has technical issues. Please throughly read the discussion at %s before specifying a proxy with this option. This feature is currently experimental and only has an effect in Apple installers."), "https://github.com/GEANT/CAT/issues/96"); |
254 | 254 | $descriptions["managedsp:realmforvlan"] = sprintf(_("If you are also using %s, then your own realm is automatically tagged with the VLAN you choose, there is no need to add it here manually."), \core\ProfileSilverbullet::PRODUCTNAME); |
255 | - $descriptions["media:openroaming"] = sprintf(_("By opting in to OpenRoaming, you agree to be bound by the %s."), "eduroam Ecosystem Broker OpenRoaming Identity Provider Policy") . |
|
256 | - " " . |
|
257 | - sprintf(_("Note that your requirement to inform users about the OpenRoaming End User Terms and Conditions is fulfilled when directing your end users to the %s download portal for installer download. Any other means of providing the installers needs to present this information via its own channel."), \config\Master::APPEARANCE['productname']) . |
|
258 | - " " . |
|
259 | - _("You are also aware that for best technical interoperability, you need to add a DNS entry into the DNS zone of your RADIUS realm.") . |
|
260 | - " " . |
|
255 | + $descriptions["media:openroaming"] = sprintf(_("By opting in to OpenRoaming, you agree to be bound by the %s."), "eduroam Ecosystem Broker OpenRoaming Identity Provider Policy"). |
|
256 | + " ". |
|
257 | + sprintf(_("Note that your requirement to inform users about the OpenRoaming End User Terms and Conditions is fulfilled when directing your end users to the %s download portal for installer download. Any other means of providing the installers needs to present this information via its own channel."), \config\Master::APPEARANCE['productname']). |
|
258 | + " ". |
|
259 | + _("You are also aware that for best technical interoperability, you need to add a DNS entry into the DNS zone of your RADIUS realm."). |
|
260 | + " ". |
|
261 | 261 | _("Read the instructions in the wiki."); |
262 | 262 | \core\common\Entity::outOfThePotatoes(); |
263 | 263 | if (!isset($descriptions[$input])) { |
264 | 264 | return ""; |
265 | 265 | } |
266 | - return "<span class='tooltip' id='S$rowid-tooltip-$input' style='display:" . ($isVisible ? "block" : "none") . "' onclick='alert(\"" . $descriptions[$input] . "\")'><img src='../resources/images/icons/question-mark-icon.png" . "'></span>"; |
|
266 | + return "<span class='tooltip' id='S$rowid-tooltip-$input' style='display:".($isVisible ? "block" : "none")."' onclick='alert(\"".$descriptions[$input]."\")'><img src='../resources/images/icons/question-mark-icon.png"."'></span>"; |
|
267 | 267 | } |
268 | 268 | |
269 | 269 | /** |
@@ -277,19 +277,19 @@ discard block |
||
277 | 277 | private function selectElement($rowid, $list) |
278 | 278 | { |
279 | 279 | $jsmagic = "onchange=' |
280 | - if (/#ML#/.test(document.getElementById(\"option-S" . $rowid . "-select\").value)) { |
|
280 | + if (/#ML#/.test(document.getElementById(\"option-S" . $rowid."-select\").value)) { |
|
281 | 281 | document.getElementById(\"S$rowid-input-langselect\").style.display = \"block\"; |
282 | 282 | } else { |
283 | 283 | document.getElementById(\"S$rowid-input-langselect\").style.display = \"none\"; |
284 | 284 | }"; |
285 | 285 | foreach (array_keys($this->htmlDatatypeTexts) as $key) { |
286 | - $jsmagic .= "if (/#" . $key . "#/.test(document.getElementById(\"option-S" . $rowid . "-select\").value)) { |
|
287 | - document.getElementById(\"S$rowid-input-file\").style.display = \"" . ($key == \core\Options::TYPECODE_FILE ? "block" : "none") . "\"; |
|
288 | - document.getElementById(\"S$rowid-input-text\").style.display = \"" . ($key == \core\Options::TYPECODE_TEXT ? "block" : "none") . "\"; |
|
289 | - document.getElementById(\"S$rowid-input-string\").style.display = \"" . ($key == \core\Options::TYPECODE_STRING ? "block" : "none") . "\"; |
|
290 | - document.getElementById(\"S$rowid-input-enum_openroaming\").style.display = \"" . ($key == \core\Options::TYPECODE_ENUM_OPENROAMING ? "block" : "none") . "\"; |
|
291 | - document.getElementById(\"S$rowid-input-boolean\").style.display = \"" . ($key == \core\Options::TYPECODE_BOOLEAN ? "block" : "none") . "\"; |
|
292 | - document.getElementById(\"S$rowid-input-integer\").style.display = \"" . ($key == \core\Options::TYPECODE_INTEGER ? "block" : "none") . "\"; |
|
286 | + $jsmagic .= "if (/#".$key."#/.test(document.getElementById(\"option-S".$rowid."-select\").value)) { |
|
287 | + document.getElementById(\"S$rowid-input-file\").style.display = \"".($key == \core\Options::TYPECODE_FILE ? "block" : "none")."\"; |
|
288 | + document.getElementById(\"S$rowid-input-text\").style.display = \"".($key == \core\Options::TYPECODE_TEXT ? "block" : "none")."\"; |
|
289 | + document.getElementById(\"S$rowid-input-string\").style.display = \"".($key == \core\Options::TYPECODE_STRING ? "block" : "none")."\"; |
|
290 | + document.getElementById(\"S$rowid-input-enum_openroaming\").style.display = \"".($key == \core\Options::TYPECODE_ENUM_OPENROAMING ? "block" : "none")."\"; |
|
291 | + document.getElementById(\"S$rowid-input-boolean\").style.display = \"".($key == \core\Options::TYPECODE_BOOLEAN ? "block" : "none")."\"; |
|
292 | + document.getElementById(\"S$rowid-input-integer\").style.display = \"".($key == \core\Options::TYPECODE_INTEGER ? "block" : "none")."\"; |
|
293 | 293 | } |
294 | 294 | "; |
295 | 295 | // hide all tooltips (each is a <span>, and there are no other <span>s) |
@@ -320,7 +320,7 @@ discard block |
||
320 | 320 | $value = array_shift($list); |
321 | 321 | $listtype = $optioninfo->optionType($value); |
322 | 322 | $retval .= $uiElements->displayName($value); |
323 | - $retval .= "<input type='hidden' name='option[S$rowid]' value='$value#" . $listtype["type"] . "#" . $listtype["flag"] . "#'/>"; |
|
323 | + $retval .= "<input type='hidden' name='option[S$rowid]' value='$value#".$listtype["type"]."#".$listtype["flag"]."#'/>"; |
|
324 | 324 | $activelisttype = $listtype; |
325 | 325 | $tooltips = $this->tooltip($rowid, $value, TRUE); |
326 | 326 | break; |
@@ -328,7 +328,7 @@ discard block |
||
328 | 328 | $retval .= "<select id='option-S$rowid-select' name='option[S$rowid]' $jsmagic>"; |
329 | 329 | foreach ($list as $value) { |
330 | 330 | $listtype = $optioninfo->optionType($value); |
331 | - $retval .= "<option id='option-S$rowid-v-$value' value='$value#" . $listtype["type"] . "#" . $listtype["flag"] . "#' "; |
|
331 | + $retval .= "<option id='option-S$rowid-v-$value' value='$value#".$listtype["type"]."#".$listtype["flag"]."#' "; |
|
332 | 332 | if ($iterator == $this->optionIterator) { |
333 | 333 | $retval .= "selected='selected'"; |
334 | 334 | $activelisttype = $listtype; |
@@ -336,7 +336,7 @@ discard block |
||
336 | 336 | } else { |
337 | 337 | $tooltips .= $this->tooltip($rowid, $value, FALSE); |
338 | 338 | } |
339 | - $retval .= ">" . $uiElements->displayName($value) . "</option>"; |
|
339 | + $retval .= ">".$uiElements->displayName($value)."</option>"; |
|
340 | 340 | $iterator++; |
341 | 341 | } |
342 | 342 | |
@@ -362,9 +362,9 @@ discard block |
||
362 | 362 | private function selectLanguage($rowid, $makeVisible) |
363 | 363 | { |
364 | 364 | \core\common\Entity::intoThePotatoes(); |
365 | - $retval = "<select style='display:" . ($makeVisible ? "block" : "none") . "' name='value[S$rowid-lang]' id='S" . $rowid . "-input-langselect'> |
|
366 | - <option value='' name='select_language' selected>" . _("select language") . "</option> |
|
367 | - <option value='C' name='all_languages'>" . _("default/other languages") . "</option>"; |
|
365 | + $retval = "<select style='display:".($makeVisible ? "block" : "none")."' name='value[S$rowid-lang]' id='S".$rowid."-input-langselect'> |
|
366 | + <option value='' name='select_language' selected>" . _("select language")."</option> |
|
367 | + <option value='C' name='all_languages'>" . _("default/other languages")."</option>"; |
|
368 | 368 | foreach (\config\Master::LANGUAGES as $langindex => $possibleLang) { |
369 | 369 | $thislang = $possibleLang['display']; |
370 | 370 | $retval .= "<option value='$langindex' name='$langindex'>$thislang</option>"; |
@@ -385,7 +385,7 @@ discard block |
||
385 | 385 | { |
386 | 386 | $retval = ""; |
387 | 387 | foreach ($this->htmlDatatypeTexts as $key => $type) { |
388 | - $retval .= "<" . $type['html'] . " style='display:" . ($activetype['type'] == $key ? "block" : "none") . "' name='value[S$rowid-$key]' id='S" . $rowid . "-input-" . $key . "'" . $type['tail'] . ">"; |
|
388 | + $retval .= "<".$type['html']." style='display:".($activetype['type'] == $key ? "block" : "none")."' name='value[S$rowid-$key]' id='S".$rowid."-input-".$key."'".$type['tail'].">"; |
|
389 | 389 | } |
390 | 390 | return $retval; |
391 | 391 | } |
@@ -401,11 +401,11 @@ discard block |
||
401 | 401 | { |
402 | 402 | // first column: the <select> element with the names of options and their field-toggling JS magic |
403 | 403 | $selectorInfo = $this->selectElement($rowid, $list); |
404 | - $retval = "<td>" . $selectorInfo["TEXT"] . "</td>"; |
|
404 | + $retval = "<td>".$selectorInfo["TEXT"]."</td>"; |
|
405 | 405 | // second column: the <select> element for language selection - only visible if the active option is multi-lang |
406 | - $retval .= "<td>" . $this->selectLanguage($rowid, $selectorInfo['ACTIVE']['flag'] == "ML") . "</td>"; |
|
406 | + $retval .= "<td>".$this->selectLanguage($rowid, $selectorInfo['ACTIVE']['flag'] == "ML")."</td>"; |
|
407 | 407 | // third column: the actual input fields; the data type of the active option is visible, all others hidden |
408 | - $retval .= "<td>" . $this->inputFields($rowid, $selectorInfo['ACTIVE']) . "</td>"; |
|
408 | + $retval .= "<td>".$this->inputFields($rowid, $selectorInfo['ACTIVE'])."</td>"; |
|
409 | 409 | return $retval; |
410 | 410 | } |
411 | 411 | |
@@ -429,20 +429,20 @@ discard block |
||
429 | 429 | $retval .= "<td>"; |
430 | 430 | $uiElements = new UIElements(); |
431 | 431 | $listtype = $optioninfo->optionType($optionName); |
432 | - $retval .= "<span style='display:flex;'>" . $uiElements->displayName($optionName); |
|
433 | - $retval .= $this->tooltip($rowid, $optionName, TRUE) . "</span>"; |
|
434 | - $retval .= "<input type='hidden' id='option-S$rowid-select' name='option[S$rowid]' value='$optionName#" . $listtype["type"] . "#" . $listtype["flag"] . "#' ></td>"; |
|
432 | + $retval .= "<span style='display:flex;'>".$uiElements->displayName($optionName); |
|
433 | + $retval .= $this->tooltip($rowid, $optionName, TRUE)."</span>"; |
|
434 | + $retval .= "<input type='hidden' id='option-S$rowid-select' name='option[S$rowid]' value='$optionName#".$listtype["type"]."#".$listtype["flag"]."#' ></td>"; |
|
435 | 435 | |
436 | 436 | // language tag if any |
437 | 437 | $retval .= "<td>"; |
438 | 438 | if ($listtype["flag"] == "ML") { |
439 | 439 | |
440 | - $language = "(" . strtoupper($optionLang) . ")"; |
|
440 | + $language = "(".strtoupper($optionLang).")"; |
|
441 | 441 | if ($optionLang == 'C') { |
442 | 442 | $language = _("(default/other languages)"); |
443 | 443 | } |
444 | 444 | $retval .= $language; |
445 | - $retval .= "<input type='hidden' name='value[S$rowid-lang]' id='S" . $rowid . "-input-langselect' value='" . $optionLang . "' style='display:block'>"; |
|
445 | + $retval .= "<input type='hidden' name='value[S$rowid-lang]' id='S".$rowid."-input-langselect' value='".$optionLang."' style='display:block'>"; |
|
446 | 446 | } |
447 | 447 | $retval .= "</td>"; |
448 | 448 | // attribute content |
@@ -452,12 +452,12 @@ discard block |
||
452 | 452 | case \core\Options::TYPECODE_COORDINATES: |
453 | 453 | $this->allLocationCount = $this->allLocationCount + 1; |
454 | 454 | // display of the locations varies by map provider |
455 | - $classname = "\web\lib\admin\Map" . \config\ConfAssistant::MAPPROVIDER['PROVIDER']; |
|
455 | + $classname = "\web\lib\admin\Map".\config\ConfAssistant::MAPPROVIDER['PROVIDER']; |
|
456 | 456 | $link = $classname::optionListDisplayCode($optionValue, $this->allLocationCount); |
457 | - $retval .= "<input readonly style='display:none' type='text' name='value[S$rowid-" . \core\Options::TYPECODE_TEXT . "]' id='S$rowid-input-text' value='$optionValue'>$link"; |
|
457 | + $retval .= "<input readonly style='display:none' type='text' name='value[S$rowid-".\core\Options::TYPECODE_TEXT."]' id='S$rowid-input-text' value='$optionValue'>$link"; |
|
458 | 458 | break; |
459 | 459 | case \core\Options::TYPECODE_FILE: |
460 | - $retval .= "<input readonly type='text' name='value[S$rowid-" . \core\Options::TYPECODE_STRING . "]' id='S" . $rowid . "-input-string' style='display:none' value='" . urlencode($optionValue) . "'>"; |
|
460 | + $retval .= "<input readonly type='text' name='value[S$rowid-".\core\Options::TYPECODE_STRING."]' id='S".$rowid."-input-string' style='display:none' value='".urlencode($optionValue)."'>"; |
|
461 | 461 | $uiElements = new UIElements(); |
462 | 462 | switch ($optionName) { |
463 | 463 | case "eap:ca_file": |
@@ -479,7 +479,7 @@ discard block |
||
479 | 479 | break; |
480 | 480 | case \core\Options::TYPECODE_ENUM_OPENROAMING: // is a string after all |
481 | 481 | $displayedVariant = $this->enumPrettyPrints[$optionValue]; |
482 | - $retval .= "<strong>$displayedVariant</strong><input type='hidden' name='value[S$rowid-" . $listtype['type'] . "]' id='S" . $rowid . "-input-" . $listtype["type"] . "' value=\"" . htmlspecialchars($optionValue) . "\" style='display:block'>"; |
|
482 | + $retval .= "<strong>$displayedVariant</strong><input type='hidden' name='value[S$rowid-".$listtype['type']."]' id='S".$rowid."-input-".$listtype["type"]."' value=\"".htmlspecialchars($optionValue)."\" style='display:block'>"; |
|
483 | 483 | break; |
484 | 484 | case \core\Options::TYPECODE_STRING: |
485 | 485 | // fall-thorugh is intentional; mostly identical HTML code for the three types |
@@ -487,11 +487,11 @@ discard block |
||
487 | 487 | // fall-thorugh is intentional; mostly identical HTML code for the three types |
488 | 488 | case \core\Options::TYPECODE_TEXT: |
489 | 489 | $displayedVariant = $optionValue; // for all three types, value tag and actual display are identical |
490 | - $retval .= "<strong>$displayedVariant</strong><input type='hidden' name='value[S$rowid-" . $listtype['type'] . "]' id='S" . $rowid . "-input-" . $listtype["type"] . "' value=\"" . htmlspecialchars($optionValue) . "\" style='display:block'>"; |
|
490 | + $retval .= "<strong>$displayedVariant</strong><input type='hidden' name='value[S$rowid-".$listtype['type']."]' id='S".$rowid."-input-".$listtype["type"]."' value=\"".htmlspecialchars($optionValue)."\" style='display:block'>"; |
|
491 | 491 | break; |
492 | 492 | case \core\Options::TYPECODE_BOOLEAN: |
493 | 493 | $displayedVariant = ($optionValue == "on" ? _("on") : _("off")); |
494 | - $retval .= "<strong>$displayedVariant</strong><input type='hidden' name='value[S$rowid-" . $listtype['type'] . "]' id='S" . $rowid . "-input-" . $listtype["type"] . "' value=\"" . htmlspecialchars($optionValue) . "\" style='display:block'>"; |
|
494 | + $retval .= "<strong>$displayedVariant</strong><input type='hidden' name='value[S$rowid-".$listtype['type']."]' id='S".$rowid."-input-".$listtype["type"]."' value=\"".htmlspecialchars($optionValue)."\" style='display:block'>"; |
|
495 | 495 | break; |
496 | 496 | default: |
497 | 497 | // this should never happen! |
@@ -537,10 +537,10 @@ discard block |
||
537 | 537 | <td> |
538 | 538 | <button type='button' class='delete' onclick='"; |
539 | 539 | if ($prefillValue !== NULL && $item == "general:geo_coordinates") { |
540 | - $funcname = "Map" . \config\ConfAssistant::MAPPROVIDER['PROVIDER'] . 'DeleteCoord'; |
|
541 | - $retval .= 'if (typeof ' . $funcname . ' === "function") { ' . $funcname . '(' . $this->allLocationCount . '); } '; |
|
540 | + $funcname = "Map".\config\ConfAssistant::MAPPROVIDER['PROVIDER'].'DeleteCoord'; |
|
541 | + $retval .= 'if (typeof '.$funcname.' === "function") { '.$funcname.'('.$this->allLocationCount.'); } '; |
|
542 | 542 | } |
543 | - $retval .= 'deleteOption("option-S' . $rowid . '")'; |
|
543 | + $retval .= 'deleteOption("option-S'.$rowid.'")'; |
|
544 | 544 | $retval .= "'>-</button> |
545 | 545 | </td> |
546 | 546 | </tr>"; |
@@ -404,7 +404,7 @@ discard block |
||
404 | 404 | 'hs20' => 1, |
405 | 405 | 'message' => sprintf(_("Before you proceed with installation on Android systems, please make sure that you have installed the %s application. This application is available from these sites: %s and will use the configuration file downloaded from CAT to create all necessary settings."), |
406 | 406 | "geteduroam", |
407 | - "<a target='_blank' href='https://play.google.com/store/apps/details?id=app.eduroam.geteduroam'>Google Play</a>, <a target='_blank' href='geteduroam-stable.apk'>" . _("as local download") . "</a>"), |
|
407 | + "<a target='_blank' href='https://play.google.com/store/apps/details?id=app.eduroam.geteduroam'>Google Play</a>, <a target='_blank' href='geteduroam-stable.apk'>"._("as local download")."</a>"), |
|
408 | 408 | ], |
409 | 409 | ], |
410 | 410 | |
@@ -418,7 +418,7 @@ discard block |
||
418 | 418 | 'mime' => 'application/eap-config', |
419 | 419 | 'message' => sprintf(_("Before you proceed with installation on Android systems, please make sure that you have installed the %s application. This application is available from these sites: %s and will use the configuration file downloaded from CAT to create all necessary settings."), |
420 | 420 | "geteduroam", |
421 | - "<a target='_blank' href='https://play.google.com/store/apps/details?id=app.eduroam.geteduroam'>Google Play</a>, <a target='_blank' href='geteduroam-stable.apk'>" . _("as local download") . "</a>"), |
|
421 | + "<a target='_blank' href='https://play.google.com/store/apps/details?id=app.eduroam.geteduroam'>Google Play</a>, <a target='_blank' href='geteduroam-stable.apk'>"._("as local download")."</a>"), |
|
422 | 422 | ], |
423 | 423 | ], |
424 | 424 | 'android_4_7' => [ |
@@ -431,7 +431,7 @@ discard block |
||
431 | 431 | 'mime' => 'application/eap-config', |
432 | 432 | 'message' => sprintf(_("Before you proceed with installation on Android systems, please make sure that you have installed the %s application. This application is available from these sites: %s and will use the configuration file downloaded from CAT to create all necessary settings."), |
433 | 433 | "eduroamCAT", |
434 | - "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>" . _("as local download") . "</a>"), |
|
434 | + "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>"._("as local download")."</a>"), |
|
435 | 435 | ], |
436 | 436 | ], |
437 | 437 | |
@@ -446,7 +446,7 @@ discard block |
||
446 | 446 | 'mime' => 'application/eap-config', |
447 | 447 | 'message' => sprintf(_("Before you proceed with installation on Android systems, please make sure that you have installed the %s application. This application is available from these sites: %s and will use the configuration file downloaded from CAT to create all necessary settings."), |
448 | 448 | "eduroamCAT", |
449 | - "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>" . _("as local download") . "</a>"), |
|
449 | + "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>"._("as local download")."</a>"), |
|
450 | 450 | ], |
451 | 451 | ], |
452 | 452 | 'android_pie' => [ |
@@ -460,7 +460,7 @@ discard block |
||
460 | 460 | 'mime' => 'application/eap-config', |
461 | 461 | 'message' => sprintf(_("Before you proceed with installation on Android systems, please make sure that you have installed the %s application. This application is available from these sites: %s and will use the configuration file downloaded from CAT to create all necessary settings."), |
462 | 462 | "eduroamCAT", |
463 | - "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>" . _("as local download") . "</a>"), |
|
463 | + "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>"._("as local download")."</a>"), |
|
464 | 464 | ], |
465 | 465 | ], |
466 | 466 | 'android_oreo' => [ |
@@ -474,7 +474,7 @@ discard block |
||
474 | 474 | 'mime' => 'application/eap-config', |
475 | 475 | 'message' => sprintf(_("Before you proceed with installation on Android systems, please make sure that you have installed the %s application. This application is available from these sites: %s and will use the configuration file downloaded from CAT to create all necessary settings."), |
476 | 476 | "eduroamCAT", |
477 | - "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>" . _("as local download") . "</a>"), |
|
477 | + "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>"._("as local download")."</a>"), |
|
478 | 478 | ], |
479 | 479 | ], |
480 | 480 | 'android_nougat' => [ |
@@ -488,7 +488,7 @@ discard block |
||
488 | 488 | 'mime' => 'application/eap-config', |
489 | 489 | 'message' => sprintf(_("Before you proceed with installation on Android systems, please make sure that you have installed the %s application. This application is available from these sites: %s and will use the configuration file downloaded from CAT to create all necessary settings."), |
490 | 490 | "eduroamCAT", |
491 | - "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>" . _("as local download") . "</a>"), |
|
491 | + "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>"._("as local download")."</a>"), |
|
492 | 492 | ], |
493 | 493 | ], |
494 | 494 | 'android_marshmallow' => [ |
@@ -502,7 +502,7 @@ discard block |
||
502 | 502 | 'mime' => 'application/eap-config', |
503 | 503 | 'message' => sprintf(_("Before you proceed with installation on Android systems, please make sure that you have installed the %s application. This application is available from these sites: %s and will use the configuration file downloaded from CAT to create all necessary settings."), |
504 | 504 | "eduroamCAT", |
505 | - "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>" . _("as local download") . "</a>"), |
|
505 | + "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>"._("as local download")."</a>"), |
|
506 | 506 | ], |
507 | 507 | ], |
508 | 508 | 'android_lollipop' => [ |
@@ -516,7 +516,7 @@ discard block |
||
516 | 516 | 'mime' => 'application/eap-config', |
517 | 517 | 'message' => sprintf(_("Before you proceed with installation on Android systems, please make sure that you have installed the %s application. This application is available from these sites: %s and will use the configuration file downloaded from CAT to create all necessary settings."), |
518 | 518 | "eduroamCAT", |
519 | - "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>" . _("as local download") . "</a>"), |
|
519 | + "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>"._("as local download")."</a>"), |
|
520 | 520 | ], |
521 | 521 | ], |
522 | 522 | 'android_kitkat' => [ |
@@ -530,7 +530,7 @@ discard block |
||
530 | 530 | 'mime' => 'application/eap-config', |
531 | 531 | 'message' => sprintf(_("Before you proceed with installation on Android systems, please make sure that you have installed the %s application. This application is available from these sites: %s and will use the configuration file downloaded from CAT to create all necessary settings."), |
532 | 532 | "eduroamCAT", |
533 | - "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>" . _("as local download") . "</a>"), |
|
533 | + "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>"._("as local download")."</a>"), |
|
534 | 534 | ], |
535 | 535 | ], |
536 | 536 | 'android_43' => [ |
@@ -544,7 +544,7 @@ discard block |
||
544 | 544 | 'mime' => 'application/eap-config', |
545 | 545 | 'message' => sprintf(_("Before you proceed with installation on Android systems, please make sure that you have installed the %s application. This application is available from these sites: %s and will use the configuration file downloaded from CAT to create all necessary settings."), |
546 | 546 | "eduroamCAT", |
547 | - "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>" . _("as local download") . "</a>"), |
|
547 | + "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>"._("as local download")."</a>"), |
|
548 | 548 | ], |
549 | 549 | ], |
550 | 550 | 'android_legacy' => [ |
@@ -166,27 +166,27 @@ discard block |
||
166 | 166 | { |
167 | 167 | // it could match CN or sAN:DNS, we don't care which |
168 | 168 | if (isset($this->TLS_CA_checks_result[$host]['certdata']['subject'])) { |
169 | - $this->loggerInstance->debug(4, "Checking expected server name " . $this->expectedName . " against Subject: "); |
|
169 | + $this->loggerInstance->debug(4, "Checking expected server name ".$this->expectedName." against Subject: "); |
|
170 | 170 | $this->loggerInstance->debug(4, $this->TLS_CA_checks_result[$host]['certdata']['subject']); |
171 | 171 | // we are checking against accidental misconfig, not attacks, so loosely checking against end of string is appropriate |
172 | - if (preg_match("/CN=" . $this->expectedName . "/", $this->TLS_CA_checks_result[$host]['certdata']['subject']) === 1) { |
|
172 | + if (preg_match("/CN=".$this->expectedName."/", $this->TLS_CA_checks_result[$host]['certdata']['subject']) === 1) { |
|
173 | 173 | return TRUE; |
174 | 174 | } |
175 | 175 | } |
176 | 176 | if (isset($this->TLS_CA_checks_result[$host]['certdata']['extensions']['subjectaltname'])) { |
177 | - $this->loggerInstance->debug(4, "Checking expected server name " . $this->expectedName . " against sANs: "); |
|
177 | + $this->loggerInstance->debug(4, "Checking expected server name ".$this->expectedName." against sANs: "); |
|
178 | 178 | $this->loggerInstance->debug(4, $this->TLS_CA_checks_result[$host]['certdata']['extensions']['subjectaltname']); |
179 | 179 | $testNames = $this->TLS_CA_checks_result[$host]['certdata']['extensions']['subjectaltname']; |
180 | 180 | if (!is_array($testNames)) { |
181 | 181 | $testNames = [$testNames]; |
182 | 182 | } |
183 | 183 | foreach ($testNames as $oneName) { |
184 | - if (preg_match("/" . $this->expectedName . "/", $oneName) === 1) { |
|
184 | + if (preg_match("/".$this->expectedName."/", $oneName) === 1) { |
|
185 | 185 | return TRUE; |
186 | 186 | } |
187 | 187 | } |
188 | 188 | } |
189 | - $this->loggerInstance->debug(3, "Tried to check expected server name " . $this->expectedName . " but neither CN nor sANs matched."); |
|
189 | + $this->loggerInstance->debug(3, "Tried to check expected server name ".$this->expectedName." but neither CN nor sANs matched."); |
|
190 | 190 | |
191 | 191 | $this->TLS_CA_checks_result[$host]['cert_oddity'] = RADIUSTests::CERTPROB_DYN_SERVER_NAME_MISMATCH; |
192 | 192 | return FALSE; |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | $this->TLS_clients_checks_result[$host]['ca'][$type]['certificate'][$k]['status'] = $cert['status']; |
217 | 217 | $this->TLS_clients_checks_result[$host]['ca'][$type]['certificate'][$k]['message'] = $this->TLS_certkeys[$cert['status']]; |
218 | 218 | $this->TLS_clients_checks_result[$host]['ca'][$type]['certificate'][$k]['expected'] = $cert['expected']; |
219 | - $add = ' -cert ' . ROOT . '/config/cli-certs/' . $cert['public'] . ' -key ' . ROOT . '/config/cli-certs/' . $cert['private']; |
|
219 | + $add = ' -cert '.ROOT.'/config/cli-certs/'.$cert['public'].' -key '.ROOT.'/config/cli-certs/'.$cert['private']; |
|
220 | 220 | if (!isset($this->TLS_clients_checks_result[$host]['ca'][$type]['certificate'][$k])) { |
221 | 221 | $this->TLS_clients_checks_result[$host]['ca'][$type]['certificate'][$k] = []; |
222 | 222 | } |
@@ -261,11 +261,11 @@ discard block |
||
261 | 261 | // but code analysers want this more explicit, so here is this extra |
262 | 262 | // call to escapeshellarg() |
263 | 263 | $escapedHost = escapeshellarg($host); |
264 | - $this->loggerInstance->debug(4, \config\Master::PATHS['openssl'] . " s_client -connect " . $escapedHost . " -tls1 -CApath " . ROOT . "/config/ca-certs/$this->consortium/ $arg 2>&1\n"); |
|
264 | + $this->loggerInstance->debug(4, \config\Master::PATHS['openssl']." s_client -connect ".$escapedHost." -tls1 -CApath ".ROOT."/config/ca-certs/$this->consortium/ $arg 2>&1\n"); |
|
265 | 265 | $time_start = microtime(true); |
266 | 266 | $opensslbabble = []; |
267 | 267 | $result = 999; // likely to become zero by openssl; don't want to initialise to zero, could cover up exec failures |
268 | - exec(\config\Master::PATHS['openssl'] . " s_client -connect " . $escapedHost . " -no_ssl3 -CApath " . ROOT . "/config/ca-certs/$this->consortium/ $arg 2>&1", $opensslbabble, $result); |
|
268 | + exec(\config\Master::PATHS['openssl']." s_client -connect ".$escapedHost." -no_ssl3 -CApath ".ROOT."/config/ca-certs/$this->consortium/ $arg 2>&1", $opensslbabble, $result); |
|
269 | 269 | $time_stop = microtime(true); |
270 | 270 | $testresults['time_millisec'] = floor(($time_stop - $time_start) * 1000); |
271 | 271 | $testresults['returncode'] = $result; |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | * <base_url>/copyright.php after deploying the software |
20 | 20 | */ |
21 | 21 | |
22 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
22 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
23 | 23 | |
24 | 24 | $auth = new \web\lib\admin\Authentication(); |
25 | 25 | $deco = new \web\lib\admin\PageDecoration(); |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | } |
44 | 44 | $profileToBeDel = $validator->existingProfile($_GET['profile_id'], $my_inst->identifier); |
45 | 45 | $profileToBeDel->destroy(); |
46 | - $loggerInstance->writeAudit($_SESSION['user'], "DEL", "Profile " . $profileToBeDel->identifier); |
|
46 | + $loggerInstance->writeAudit($_SESSION['user'], "DEL", "Profile ".$profileToBeDel->identifier); |
|
47 | 47 | header("Location: overview_org.php?inst_id=$my_inst->identifier"); |
48 | 48 | exit; |
49 | 49 | case web\lib\common\FormElements::BUTTON_SAVE: |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | echo $deco->pageheader(sprintf(_("%s: Edit Profile - Result"), \config\Master::APPEARANCE['productname']), "ADMIN-IDP"); |
53 | 53 | } else { |
54 | 54 | $profile = $my_inst->newProfile(core\AbstractProfile::PROFILETYPE_RADIUS); |
55 | - $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP " . $my_inst->identifier . " - Profile created"); |
|
55 | + $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP ".$my_inst->identifier." - Profile created"); |
|
56 | 56 | echo $deco->pageheader(sprintf(_("%s: Profile wizard (step 3 completed)"), \config\Master::APPEARANCE['productname']), "ADMIN-IDP"); |
57 | 57 | } |
58 | 58 | if (!$profile instanceof \core\ProfileRADIUS) { |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | $uiElements = new web\lib\admin\UIElements(); |
122 | 122 | // set realm info, if submitted |
123 | 123 | if ($realm !== FALSE) { |
124 | - $profile->setRealm($anonLocal . "@" . $realm); |
|
124 | + $profile->setRealm($anonLocal."@".$realm); |
|
125 | 125 | echo $uiElements->boxOkay(sprintf(_("Realm: <strong>%s</strong>"), $realm)); |
126 | 126 | } else { |
127 | 127 | $profile->setRealm(""); |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | echo $uiElements->boxError(_("Realm check username cannot be configured: realm is missing!")); |
148 | 148 | } else { |
149 | 149 | $profile->setRealmcheckUser(true, $checkuser_name); |
150 | - echo $uiElements->boxOkay(sprintf(_("Special username for realm check is <strong>%s</strong>, the value is <strong>%s</strong>"), _("ON"), $checkuser_name . "@" . $realm)); |
|
150 | + echo $uiElements->boxOkay(sprintf(_("Special username for realm check is <strong>%s</strong>, the value is <strong>%s</strong>"), _("ON"), $checkuser_name."@".$realm)); |
|
151 | 151 | } |
152 | 152 | } else { |
153 | 153 | $profile->setRealmCheckUser(false); |
@@ -159,12 +159,12 @@ discard block |
||
159 | 159 | $extratext = ""; |
160 | 160 | if (!empty($realm)) { |
161 | 161 | if ($hint !== FALSE) { |
162 | - $extratext = " " . sprintf(_("The realm portion MUST be exactly '...@%s'."), $realm); |
|
162 | + $extratext = " ".sprintf(_("The realm portion MUST be exactly '...@%s'."), $realm); |
|
163 | 163 | } else { |
164 | - $extratext = " " . sprintf(_("The realm portion MUST end with '%s' but sub-realms of it are allowed (i.e. 'user@%s' and 'user@<...>.%s' are both acceptable)."), $realm, $realm, $realm); |
|
164 | + $extratext = " ".sprintf(_("The realm portion MUST end with '%s' but sub-realms of it are allowed (i.e. 'user@%s' and 'user@<...>.%s' are both acceptable)."), $realm, $realm, $realm); |
|
165 | 165 | } |
166 | 166 | } |
167 | - echo $uiElements->boxOkay(_("Where possible, supplicants will verify that username inputs contain a syntactically correct realm.") . $extratext); |
|
167 | + echo $uiElements->boxOkay(_("Where possible, supplicants will verify that username inputs contain a syntactically correct realm.").$extratext); |
|
168 | 168 | } else { |
169 | 169 | $profile->setInputVerificationPreference(false, false); |
170 | 170 | } |
@@ -196,30 +196,30 @@ discard block |
||
196 | 196 | echo $uiElements->boxOkay(_("Redirection is <strong>OFF</strong>")); |
197 | 197 | } |
198 | 198 | |
199 | - $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile " . $profile->identifier . " - attributes changed"); |
|
199 | + $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile ".$profile->identifier." - attributes changed"); |
|
200 | 200 | // reload the profile to ingest new CA and server names if any; before checking EAP completeness |
201 | 201 | $reloadedProfileNr1 = \core\ProfileFactory::instantiate($profile->identifier); |
202 | 202 | foreach (\core\common\EAP::listKnownEAPTypes() as $a) { |
203 | 203 | if ($a->getIntegerRep() == \core\common\EAP::INTEGER_SILVERBULLET) { // do not allow adding silverbullet via the backdoor |
204 | 204 | continue; |
205 | 205 | } |
206 | - if (isset($_POST[$a->getPrintableRep()]) && isset($_POST[$a->getPrintableRep() . "-priority"]) && is_numeric($_POST[$a->getPrintableRep() . "-priority"])) { |
|
207 | - $priority = (int) $_POST[$a->getPrintableRep() . "-priority"]; |
|
206 | + if (isset($_POST[$a->getPrintableRep()]) && isset($_POST[$a->getPrintableRep()."-priority"]) && is_numeric($_POST[$a->getPrintableRep()."-priority"])) { |
|
207 | + $priority = (int) $_POST[$a->getPrintableRep()."-priority"]; |
|
208 | 208 | // add EAP type to profile as requested, but ... |
209 | 209 | $reloadedProfileNr1->addSupportedEapMethod($a, $priority); |
210 | - $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile " . $reloadedProfileNr1->identifier . " - supported EAP types changed"); |
|
210 | + $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile ".$reloadedProfileNr1->identifier." - supported EAP types changed"); |
|
211 | 211 | // see if we can enable the EAP type, or if info is missing |
212 | 212 | $eapcompleteness = $reloadedProfileNr1->isEapTypeDefinitionComplete($a); |
213 | 213 | if ($eapcompleteness === true) { |
214 | - echo $uiElements->boxOkay(_("Supported EAP Type: ") . "<strong>" . $a->getPrintableRep() . "</strong>"); |
|
214 | + echo $uiElements->boxOkay(_("Supported EAP Type: ")."<strong>".$a->getPrintableRep()."</strong>"); |
|
215 | 215 | } else { |
216 | 216 | $warntext = ""; |
217 | 217 | if (is_array($eapcompleteness)) { |
218 | 218 | foreach ($eapcompleteness as $item) { |
219 | - $warntext .= "<strong>" . $uiElements->displayName($item) . "</strong> "; |
|
219 | + $warntext .= "<strong>".$uiElements->displayName($item)."</strong> "; |
|
220 | 220 | } |
221 | 221 | } |
222 | - echo $uiElements->boxWarning(sprintf(_("Supported EAP Type: <strong>%s</strong> is missing required information %s !"), $a->getPrintableRep(), $warntext) . "<br/>" . _("The EAP type was added to the profile, but you need to complete the missing information before we can produce installers for you.")); |
|
222 | + echo $uiElements->boxWarning(sprintf(_("Supported EAP Type: <strong>%s</strong> is missing required information %s !"), $a->getPrintableRep(), $warntext)."<br/>"._("The EAP type was added to the profile, but you need to complete the missing information before we can produce installers for you.")); |
|
223 | 223 | } |
224 | 224 | } |
225 | 225 | } |
@@ -230,23 +230,23 @@ discard block |
||
230 | 230 | if (count($significantChanges) > 0) { |
231 | 231 | $myInstOriginal = new \core\IdP($profile->institution); |
232 | 232 | // send a notification/alert mail to someone we know is in charge |
233 | - $text = _("To whom it may concern,") . "\n\n"; |
|
233 | + $text = _("To whom it may concern,")."\n\n"; |
|
234 | 234 | /// were made to the *Identity Provider* *LU* / integer number of IdP / (previously known as) Name |
235 | - $text .= sprintf(_("significant changes were made to a RADIUS deployment profile of the %s %s / %s / '%s'."), $ui->nomenclatureInst, strtoupper($myInstOriginal->federation), $myInstOriginal->identifier, $myInstOriginal->name) . "\n\n"; |
|
235 | + $text .= sprintf(_("significant changes were made to a RADIUS deployment profile of the %s %s / %s / '%s'."), $ui->nomenclatureInst, strtoupper($myInstOriginal->federation), $myInstOriginal->identifier, $myInstOriginal->name)."\n\n"; |
|
236 | 236 | if (isset($significantChanges[\core\AbstractProfile::CA_CLASH_ADDED])) { |
237 | - $text .= _("WARNING! A new trusted root CA was added, and it has the exact same name as a previously existing root CA. This may (but does not necessarily) mean that this is an attempt to insert an unauthorised trust root by disguising as the genuine one. The details are below:") . "\n\n"; |
|
238 | - $text .= $significantChanges[\core\AbstractProfile::CA_CLASH_ADDED] . "\n\n"; |
|
237 | + $text .= _("WARNING! A new trusted root CA was added, and it has the exact same name as a previously existing root CA. This may (but does not necessarily) mean that this is an attempt to insert an unauthorised trust root by disguising as the genuine one. The details are below:")."\n\n"; |
|
238 | + $text .= $significantChanges[\core\AbstractProfile::CA_CLASH_ADDED]."\n\n"; |
|
239 | 239 | } |
240 | 240 | if (isset($significantChanges[\core\AbstractProfile::CA_ADDED])) { |
241 | - $text .= _("A new trusted root CA was added. The details are below:") . "\n\n"; |
|
242 | - $text .= $significantChanges[\core\AbstractProfile::CA_ADDED] . "\n\n"; |
|
241 | + $text .= _("A new trusted root CA was added. The details are below:")."\n\n"; |
|
242 | + $text .= $significantChanges[\core\AbstractProfile::CA_ADDED]."\n\n"; |
|
243 | 243 | } |
244 | 244 | if (isset($significantChanges[\core\AbstractProfile::SERVERNAME_ADDED])) { |
245 | - $text .= _("A new acceptable server name for the authentication server was added. The details are below:") . "\n\n"; |
|
246 | - $text .= $significantChanges[\core\AbstractProfile::SERVERNAME_ADDED] . "\n\n"; |
|
245 | + $text .= _("A new acceptable server name for the authentication server was added. The details are below:")."\n\n"; |
|
246 | + $text .= $significantChanges[\core\AbstractProfile::SERVERNAME_ADDED]."\n\n"; |
|
247 | 247 | } |
248 | - $text .= _("This mail is merely a cross-check because these changes can be security-relevant. If the change was expected, you do not need to take any action.") . "\n\n"; |
|
249 | - $text .= _("Greetings, ") . "\n\n" . \config\Master::APPEARANCE['productname_long']; |
|
248 | + $text .= _("This mail is merely a cross-check because these changes can be security-relevant. If the change was expected, you do not need to take any action.")."\n\n"; |
|
249 | + $text .= _("Greetings, ")."\n\n".\config\Master::APPEARANCE['productname_long']; |
|
250 | 250 | // (currently, send hard-wired to NRO - future: for linked insts, check eduroam DBv2 and send to registered admins directly) |
251 | 251 | $fed = new core\Federation($myInstOriginal->federation); |
252 | 252 | foreach ($fed->listFederationAdmins() as $id) { |
@@ -303,14 +303,14 @@ discard block |
||
303 | 303 | $oneHostOkay = FALSE; |
304 | 304 | $testCandidates = []; |
305 | 305 | foreach ($dnsChecks->NAPTR_hostname_records as $oneServer) { |
306 | - $testCandidates[$oneServer['hostname']][] = ($oneServer['family'] == "IPv4" ? $oneServer['IP'] : "[" . $oneServer['IP'] . "]") . ":" . $oneServer['port']; |
|
306 | + $testCandidates[$oneServer['hostname']][] = ($oneServer['family'] == "IPv4" ? $oneServer['IP'] : "[".$oneServer['IP']."]").":".$oneServer['port']; |
|
307 | 307 | } |
308 | 308 | foreach ($testCandidates as $oneHost => $listOfIPs) { |
309 | 309 | $connectionTests = new core\diag\RFC6614Tests(array_values($listOfIPs), $oneHost, "openroaming"); |
310 | 310 | // for now (no OpenRoaming client certs available) only run server-side tests |
311 | 311 | foreach ($listOfIPs as $oneIP) { |
312 | 312 | $connectionResult = $connectionTests->cApathCheck($oneIP); |
313 | - if ($connectionResult != core\diag\AbstractTest::RETVAL_OK || ( isset($connectionTests->TLS_CA_checks_result['cert_oddity']) && count($connectionTests->TLS_CA_checks_result['cert_oddity']) > 0)) { |
|
313 | + if ($connectionResult != core\diag\AbstractTest::RETVAL_OK || (isset($connectionTests->TLS_CA_checks_result['cert_oddity']) && count($connectionTests->TLS_CA_checks_result['cert_oddity']) > 0)) { |
|
314 | 314 | $allHostsOkay = FALSE; |
315 | 315 | } else { |
316 | 316 | $oneHostOkay = TRUE; |
@@ -345,7 +345,7 @@ discard block |
||
345 | 345 | <?php |
346 | 346 | if (count($reloadedProfileNr2->getEapMethodsinOrderOfPreference(1)) > 0) { |
347 | 347 | echo "<form method='post' action='overview_installers.php?inst_id=$my_inst->identifier&profile_id=$reloadedProfileNr2->identifier' accept-charset='UTF-8'> |
348 | - <button type='submit'>" . _("Continue to Installer Fine-Tuning and Download") . "</button> |
|
348 | + <button type='submit'>"._("Continue to Installer Fine-Tuning and Download")."</button> |
|
349 | 349 | </form>"; |
350 | 350 | } |
351 | 351 | echo $deco->footer(); |
@@ -44,8 +44,8 @@ discard block |
||
44 | 44 | $operatingSystem = $Gui->detectOS(); |
45 | 45 | $Gui->loggerInstance->debug(4, $operatingSystem); |
46 | 46 | if ($operatingSystem) { |
47 | - print "recognisedOS = '".$operatingSystem['device'] . "';\n"; |
|
48 | - print "recognisedOShs20 = '".$operatingSystem['hs20'] . "';\n"; |
|
47 | + print "recognisedOS = '".$operatingSystem['device']."';\n"; |
|
48 | + print "recognisedOShs20 = '".$operatingSystem['hs20']."';\n"; |
|
49 | 49 | $vendorlogo = $Gui->skinObject->findResourceUrl("IMAGES", "vendorlogo/"); |
50 | 50 | if ($vendorlogo !== FALSE) { |
51 | 51 | print "vendorlogo = '$vendorlogo';\n"; |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | } |
55 | 55 | } |
56 | 56 | |
57 | -print 'downloadMessage = "'.$Gui->textTemplates->templates[\web\lib\user\DOWNLOAD_MESSAGE] . '";'; |
|
57 | +print 'downloadMessage = "'.$Gui->textTemplates->templates[\web\lib\user\DOWNLOAD_MESSAGE].'";'; |
|
58 | 58 | //TODO modify this based on OS detection |
59 | 59 | $userAgent = $_SERVER['HTTP_USER_AGENT'] ?? ""; |
60 | 60 | if (preg_match('/Android/', $userAgent)) { |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | <?php echo $divs->divHeading($visibility); ?> |
84 | 84 | <div id="main_page"> |
85 | 85 | <div id="loading_ico"> |
86 | - <?php echo _("Authenticating") . "..." ?><br><img src="<?php echo $Gui->skinObject->findResourceUrl("IMAGES", "icons/loading51.gif"); ?>" alt="Authenticating ..."/> |
|
86 | + <?php echo _("Authenticating")."..." ?><br><img src="<?php echo $Gui->skinObject->findResourceUrl("IMAGES", "icons/loading51.gif"); ?>" alt="Authenticating ..."/> |
|
87 | 87 | </div> |
88 | 88 | <div id="info_overlay"> <!-- device info --> |
89 | 89 | <div id="info_window"></div> |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | * <base_url>/copyright.php after deploying the software |
20 | 20 | */ |
21 | 21 | |
22 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
22 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
23 | 23 | |
24 | 24 | $deco = new \web\lib\admin\PageDecoration(); |
25 | 25 | $uiElements = new web\lib\admin\UIElements(); |
@@ -50,16 +50,16 @@ discard block |
||
50 | 50 | <div class="infobox"> |
51 | 51 | <h2><?php $tablecaption = _("Your Personal Information"); echo $tablecaption; ?></h2> |
52 | 52 | <table> |
53 | - <caption><?php echo $tablecaption;?></caption> |
|
53 | + <caption><?php echo $tablecaption; ?></caption> |
|
54 | 54 | <tr> |
55 | - <th class="wai-invisible" scope="col"><?php echo _("Property Type");?></th> |
|
56 | - <th class="wai-invisible" scope="col"><?php echo _("Language if applicable");?></th> |
|
57 | - <th class="wai-invisible" scope="col"><?php echo _("Property Value");?></th> |
|
55 | + <th class="wai-invisible" scope="col"><?php echo _("Property Type"); ?></th> |
|
56 | + <th class="wai-invisible" scope="col"><?php echo _("Language if applicable"); ?></th> |
|
57 | + <th class="wai-invisible" scope="col"><?php echo _("Property Value"); ?></th> |
|
58 | 58 | </tr> |
59 | 59 | <?php echo $uiElements->infoblock($user->getAttributes(), "user", "User"); ?> |
60 | 60 | <tr> |
61 | 61 | <td> |
62 | - <?php echo "" . _("Unique Identifier") ?> |
|
62 | + <?php echo ""._("Unique Identifier") ?> |
|
63 | 63 | </td> |
64 | 64 | <td> |
65 | 65 | </td> |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | $mgmt = new \core\UserManagement(); |
75 | 75 | |
76 | 76 | if (!$user->isFederationAdmin()) { |
77 | - echo "<p>" . sprintf(_("You are not a %s manager."), $uiElements->nomenclatureFed) . "</p>"; |
|
77 | + echo "<p>".sprintf(_("You are not a %s manager."), $uiElements->nomenclatureFed)."</p>"; |
|
78 | 78 | echo $deco->footer(); |
79 | 79 | exit(0); |
80 | 80 | } |
@@ -88,16 +88,16 @@ discard block |
||
88 | 88 | <?php $tablecaption2 = sprintf(_("%s Properties: %s"), $uiElements->nomenclatureFed, $thefed->name); echo $tablecaption2; ?> |
89 | 89 | </h2> |
90 | 90 | <table> |
91 | - <caption><?php echo $tablecaption2;?></caption> |
|
91 | + <caption><?php echo $tablecaption2; ?></caption> |
|
92 | 92 | <tr> |
93 | - <th class="wai-invisible" scope="col"><?php echo _("Property Type");?></th> |
|
94 | - <th class="wai-invisible" scope="col"><?php echo _("Language if applicable");?></th> |
|
95 | - <th class="wai-invisible" scope="col"><?php echo _("Property Value");?></th> |
|
93 | + <th class="wai-invisible" scope="col"><?php echo _("Property Type"); ?></th> |
|
94 | + <th class="wai-invisible" scope="col"><?php echo _("Language if applicable"); ?></th> |
|
95 | + <th class="wai-invisible" scope="col"><?php echo _("Property Value"); ?></th> |
|
96 | 96 | </tr> |
97 | 97 | <!-- fed properties --> |
98 | 98 | <tr> |
99 | 99 | <td> |
100 | - <?php echo "" . _("Country") ?> |
|
100 | + <?php echo ""._("Country") ?> |
|
101 | 101 | </td> |
102 | 102 | <td> |
103 | 103 | </td> |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | default: |
179 | 179 | throw new Exception("Error: unknown encryption status of invitation!?!"); |
180 | 180 | } |
181 | - echo $uiElements->boxRemark(ngettext("The invitation email was sent successfully.", "All invitation emails were sent successfully.", $counter) . " " . $cryptText, _("Sent successfully.")); |
|
181 | + echo $uiElements->boxRemark(ngettext("The invitation email was sent successfully.", "All invitation emails were sent successfully.", $counter)." ".$cryptText, _("Sent successfully.")); |
|
182 | 182 | break; |
183 | 183 | case "FAILURE": |
184 | 184 | echo $uiElements->boxError(_("No invitation email could be sent!"), _("Sending failure!")); |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | default: |
199 | 199 | throw new Exception("Error: unknown encryption status of invitation!?!"); |
200 | 200 | } |
201 | - echo $uiElements->boxWarning(sprintf(_("Some invitation emails were sent successfully (%s in total), the others failed."), $counter) . " " . $cryptText, _("Partial success.")); |
|
201 | + echo $uiElements->boxWarning(sprintf(_("Some invitation emails were sent successfully (%s in total), the others failed."), $counter)." ".$cryptText, _("Partial success.")); |
|
202 | 202 | break; |
203 | 203 | case "INVALIDSYNTAX": |
204 | 204 | echo $uiElements->boxError(_("The invitation email address was malformed, no invitation was sent!"), _("The invitation email address was malformed, no invitation was sent!")); |
@@ -214,27 +214,27 @@ discard block |
||
214 | 214 | } else { |
215 | 215 | $link = 'http://'; |
216 | 216 | } |
217 | - $link .= $_SERVER['SERVER_NAME'] . $_SERVER['SCRIPT_NAME']; |
|
217 | + $link .= $_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME']; |
|
218 | 218 | $link = htmlspecialchars($link); |
219 | 219 | if (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_RADIUS'] == 'LOCAL' && \config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS'] == 'LOCAL') { |
220 | 220 | echo "<table><tr> |
221 | - <td>" . sprintf(_("Diagnose reachability and connection parameters of any %s %s"), \config\ConfAssistant::CONSORTIUM['display_name'], $uiElements->nomenclatureInst) . "</td> |
|
221 | + <td>" . sprintf(_("Diagnose reachability and connection parameters of any %s %s"), \config\ConfAssistant::CONSORTIUM['display_name'], $uiElements->nomenclatureInst)."</td> |
|
222 | 222 | <td><form method='post' action='../diag/action_realmcheck.php' accept-charset='UTF-8'> |
223 | 223 | <input type='hidden' name='comefrom' id='comefrom' value='$link'/> |
224 | - <button id='realmcheck' style='cursor:pointer;' type='submit'>" . _("Go!") . "</button> |
|
224 | + <button id='realmcheck' style='cursor:pointer;' type='submit'>"._("Go!")."</button> |
|
225 | 225 | </form> |
226 | 226 | </td> |
227 | 227 | </tr> |
228 | 228 | </table>"; |
229 | 229 | } |
230 | 230 | if (\config\ConfAssistant::CONSORTIUM['name'] == 'eduroam') { |
231 | - $helptext = "<h3>" . sprintf(_("Need help? Refer to the <a href='%s'>%s manual</a>"), "https://wiki.geant.org/x/qJg7Bw", $uiElements->nomenclatureFed) . "</h3>"; |
|
231 | + $helptext = "<h3>".sprintf(_("Need help? Refer to the <a href='%s'>%s manual</a>"), "https://wiki.geant.org/x/qJg7Bw", $uiElements->nomenclatureFed)."</h3>"; |
|
232 | 232 | } else { |
233 | 233 | $helptext = ""; |
234 | 234 | } |
235 | 235 | ?> |
236 | 236 | <table class='user_overview' style='border:0px;'> |
237 | - <caption><?php echo _("Participant Details");?></caption> |
|
237 | + <caption><?php echo _("Participant Details"); ?></caption> |
|
238 | 238 | <tr> |
239 | 239 | <th scope='col'><?php echo _("Configured / Visible / OpenRoaming"); ?></th> |
240 | 240 | <th scope='col'><?php echo sprintf(_("%s Name"), $uiElements->nomenclatureInst); ?></th> |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | $pending_invites = $mgmt->listPendingInvitations(); |
244 | 244 | |
245 | 245 | if (\config\Master::DB['enforce-external-sync']) { |
246 | - echo "<th scope='col'>" . sprintf(_("%s Database Sync Status"), \config\ConfAssistant::CONSORTIUM['display_name']) . "</th>"; |
|
246 | + echo "<th scope='col'>".sprintf(_("%s Database Sync Status"), \config\ConfAssistant::CONSORTIUM['display_name'])."</th>"; |
|
247 | 247 | } |
248 | 248 | ?> |
249 | 249 | <th scope='col'> |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | foreach ($feds as $onefed) { |
259 | 259 | $thefed = new \core\Federation(strtoupper($onefed['value'])); |
260 | 260 | /// nomenclature for 'federation', federation name, nomenclature for 'inst' |
261 | - echo "<tr><td colspan='8'><strong>" . sprintf(_("The following %s are in your %s %s:"), $uiElements->nomenclatureInst, $uiElements->nomenclatureFed, '<span style="color:green">' . $thefed->name . '</span>') . "</strong></td></tr>"; |
|
261 | + echo "<tr><td colspan='8'><strong>".sprintf(_("The following %s are in your %s %s:"), $uiElements->nomenclatureInst, $uiElements->nomenclatureFed, '<span style="color:green">'.$thefed->name.'</span>')."</strong></td></tr>"; |
|
262 | 262 | |
263 | 263 | // extract only pending invitations for *this* fed |
264 | 264 | $display_pendings = FALSE; |
@@ -283,9 +283,9 @@ discard block |
||
283 | 283 | // deployment status; need to dive into profiles for this |
284 | 284 | // show happy eyeballs if at least one profile is configured/showtime |
285 | 285 | echo "<td>"; |
286 | - echo ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_CONFIGURED ? "C" : "-" ) |
|
286 | + echo ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_CONFIGURED ? "C" : "-") |
|
287 | 287 | . " " |
288 | - . ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_SHOWTIME ? "V" : "-" ) |
|
288 | + . ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_SHOWTIME ? "V" : "-") |
|
289 | 289 | . " " |
290 | 290 | . "<span style='color:"; |
291 | 291 | switch ($idp_instance->maxOpenRoamingStatus()) { |
@@ -320,23 +320,23 @@ discard block |
||
320 | 320 | } |
321 | 321 | } |
322 | 322 | echo "<td style='vertical-align:top;'> |
323 | - <input type='hidden' name='inst' value='" . $index . "'>" . $idp_instance->name . (empty($listOfSilverbulletRealms) ? "" : "<ul><li>" ) . implode("</li><li>", $listOfSilverbulletRealms) . (empty($listOfSilverbulletRealms) ? "" : "</li><ul>" ) . " |
|
323 | + <input type='hidden' name='inst' value='" . $index."'>".$idp_instance->name.(empty($listOfSilverbulletRealms) ? "" : "<ul><li>").implode("</li><li>", $listOfSilverbulletRealms).(empty($listOfSilverbulletRealms) ? "" : "</li><ul>")." |
|
324 | 324 | </td>"; |
325 | 325 | // external DB sync, if configured as being necessary |
326 | 326 | if (\config\Master::DB['enforce-external-sync']) { |
327 | 327 | echo "<td style='display: ruby;'>"; |
328 | 328 | if ($readonly === FALSE) { |
329 | - echo "<form method='post' action='inc/manageDBLink.inc.php?inst_id=" . $idp_instance->identifier . "' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'> |
|
330 | - <button type='submit'>" . _("Manage DB Link") . "</button></form> "; |
|
329 | + echo "<form method='post' action='inc/manageDBLink.inc.php?inst_id=".$idp_instance->identifier."' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'> |
|
330 | + <button type='submit'>" . _("Manage DB Link")."</button></form> "; |
|
331 | 331 | } |
332 | 332 | switch ($idp_instance->getExternalDBSyncState()) { |
333 | 333 | case \core\IdP::EXTERNAL_DB_SYNCSTATE_NOTSUBJECTTOSYNCING: |
334 | 334 | break; |
335 | 335 | case \core\IdP::EXTERNAL_DB_SYNCSTATE_SYNCED: |
336 | - echo "<div class='acceptable'>" . _("Linked") . "</div>"; |
|
336 | + echo "<div class='acceptable'>"._("Linked")."</div>"; |
|
337 | 337 | break; |
338 | 338 | case \core\IdP::EXTERNAL_DB_SYNCSTATE_NOT_SYNCED: |
339 | - echo "<div class='notacceptable'>" . _("NOT linked") . "</div>"; |
|
339 | + echo "<div class='notacceptable'>"._("NOT linked")."</div>"; |
|
340 | 340 | |
341 | 341 | |
342 | 342 | break; |
@@ -349,9 +349,9 @@ discard block |
||
349 | 349 | echo "<td style='vertical-align: top;'>"; |
350 | 350 | if ($readonly === FALSE) { |
351 | 351 | echo "<div style='white-space: nowrap;'> |
352 | - <form method='post' action='inc/manageAdmins.inc.php?inst_id=" . $index . "' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'> |
|
352 | + <form method='post' action='inc/manageAdmins.inc.php?inst_id=" . $index."' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'> |
|
353 | 353 | <button type='submit'>" . |
354 | - _("Add/Remove Administrators") . " |
|
354 | + _("Add/Remove Administrators")." |
|
355 | 355 | </button> |
356 | 356 | </form> |
357 | 357 | </div>"; |
@@ -364,7 +364,7 @@ discard block |
||
364 | 364 | echo "<tr> |
365 | 365 | <td colspan='2'> |
366 | 366 | <strong>" . |
367 | - sprintf(_("Pending invitations in the %s:"), $uiElements->nomenclatureFed) . " |
|
367 | + sprintf(_("Pending invitations in the %s:"), $uiElements->nomenclatureFed)." |
|
368 | 368 | </strong> |
369 | 369 | </td> |
370 | 370 | </tr>"; |
@@ -372,16 +372,16 @@ discard block |
||
372 | 372 | if (strtoupper($oneinvite['country']) == strtoupper($thefed->tld)) { |
373 | 373 | echo "<tr> |
374 | 374 | <td>" . |
375 | - $oneinvite['name'] . " |
|
375 | + $oneinvite['name']." |
|
376 | 376 | </td> |
377 | 377 | <td>" . |
378 | - $oneinvite['mail'] . " |
|
378 | + $oneinvite['mail']." |
|
379 | 379 | </td> |
380 | 380 | <td colspan=2>"; |
381 | 381 | if ($readonly === FALSE) { |
382 | 382 | echo "<form method='post' action='overview_federation.php' accept-charset='UTF-8'> |
383 | - <input type='hidden' name='invitation_id' value='" . $oneinvite['token'] . "'/> |
|
384 | - <button class='delete' type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_DELETE . "'>" . _("Revoke Invitation") . "</button> " |
|
383 | + <input type='hidden' name='invitation_id' value='" . $oneinvite['token']."'/> |
|
384 | + <button class='delete' type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_DELETE."'>"._("Revoke Invitation")."</button> " |
|
385 | 385 | . sprintf(_("(expires %s)"), $oneinvite['expiry']) |
386 | 386 | . "</form>"; |
387 | 387 | } |