@@ -21,12 +21,12 @@ discard block |
||
| 21 | 21 | */ |
| 22 | 22 | |
| 23 | 23 | require_once "autoloader.php"; |
| 24 | -require_once __DIR__ . "/../packageRoot.php"; |
|
| 24 | +require_once __DIR__."/../packageRoot.php"; |
|
| 25 | 25 | |
| 26 | 26 | // enable Composer autoloader, if exists |
| 27 | -include_once __DIR__ . "/../vendor/autoload.php"; |
|
| 27 | +include_once __DIR__."/../vendor/autoload.php"; |
|
| 28 | 28 | |
| 29 | -if (!file_exists(ROOT . "/config/Master.php")) { |
|
| 29 | +if (!file_exists(ROOT."/config/Master.php")) { |
|
| 30 | 30 | echo "Master configuration file not found. You need to configure the product! At least config/Master.php is required!"; |
| 31 | 31 | throw new Exception("Master config file not found!"); |
| 32 | 32 | } |
@@ -34,14 +34,14 @@ discard block |
||
| 34 | 34 | /* load sub-configs if we are dealing with those in this installation */ |
| 35 | 35 | |
| 36 | 36 | if (\config\Master::CONFIG['FUNCTIONALITY_LOCATIONS']['CONFASSISTANT_SILVERBULLET'] == 'LOCAL' || \config\Master::CONFIG['FUNCTIONALITY_LOCATIONS']['CONFASSISTANT_RADIUS'] == 'LOCAL') { |
| 37 | - if (!file_exists(ROOT . "/config/ConfAssistant.php")) { |
|
| 37 | + if (!file_exists(ROOT."/config/ConfAssistant.php")) { |
|
| 38 | 38 | echo "ConfAssistant configuration file not found. You need to configure the product!"; |
| 39 | 39 | throw new Exception("ConfAssistant config file not found!"); |
| 40 | 40 | } |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | if (\config\Master::CONFIG['FUNCTIONALITY_LOCATIONS']['DIAGNOSTICS'] == 'LOCAL') { |
| 44 | - if (!file_exists(ROOT . "/config/Diagnostics.php")) { |
|
| 44 | + if (!file_exists(ROOT."/config/Diagnostics.php")) { |
|
| 45 | 45 | echo "Diagnostics configuration file not found. You need to configure the product!"; |
| 46 | 46 | throw new Exception("Diagnostics config file not found!"); |
| 47 | 47 | } |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | * <base_url>/copyright.php after deploying the software |
| 20 | 20 | */ |
| 21 | 21 | |
| 22 | -require_once __DIR__ . "/../core/Psr4Autoloader.php"; |
|
| 22 | +require_once __DIR__."/../core/Psr4Autoloader.php"; |
|
| 23 | 23 | use core\autoloader\Psr4Autoloader; |
| 24 | 24 | |
| 25 | 25 | // instantiate the loader |
@@ -30,10 +30,10 @@ discard block |
||
| 30 | 30 | |
| 31 | 31 | // register the base directories for the namespace prefix |
| 32 | 32 | // include configuration |
| 33 | -$loader->addNamespace('config', __DIR__ ); |
|
| 33 | +$loader->addNamespace('config', __DIR__); |
|
| 34 | 34 | // include CAT/core library |
| 35 | -$loader->addNamespace('core', __DIR__ . "/../core"); |
|
| 35 | +$loader->addNamespace('core', __DIR__."/../core"); |
|
| 36 | 36 | // include CAT/devices library |
| 37 | -$loader->addNamespace('devices', __DIR__ . "/../devices"); |
|
| 37 | +$loader->addNamespace('devices', __DIR__."/../devices"); |
|
| 38 | 38 | // include CAT/web library |
| 39 | -$loader->addNamespace('web', __DIR__ . "/../web"); |
|
| 40 | 39 | \ No newline at end of file |
| 40 | +$loader->addNamespace('web', __DIR__."/../web"); |
|
| 41 | 41 | \ No newline at end of file |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | /* |
| 21 | 21 | * Class autoloader invocation, should be included prior to any other code at the entry points to the application |
| 22 | 22 | */ |
| 23 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
| 23 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
| 24 | 24 | |
| 25 | 25 | $auth = new \web\lib\admin\Authentication(); |
| 26 | 26 | $auth->authenticate(); |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | $fed = new \core\Federation($inst->federation); |
| 54 | 54 | $allowSb = $fed->getAttributes("fed:silverbullet"); |
| 55 | 55 | if (count($allowSb) == 0) { |
| 56 | - throw new Exception("We were told to create a new SB profile, but this " . \config\ConfAssistant::CONFIG['CONSORTIUM']['nomenclature_federation'] . " does not allow SB at all!"); |
|
| 56 | + throw new Exception("We were told to create a new SB profile, but this ".\config\ConfAssistant::CONFIG['CONSORTIUM']['nomenclature_federation']." does not allow SB at all!"); |
|
| 57 | 57 | } |
| 58 | 58 | // okay, new SB profiles are allowed. |
| 59 | 59 | // but is there a support:email attribute on inst level? |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | // Create one. |
| 65 | 65 | $newProfile = $inst->newProfile(core\AbstractProfile::PROFILETYPE_SILVERBULLET); |
| 66 | 66 | // and modify the REQUEST_URI to add the new profile ID |
| 67 | - $_SERVER['REQUEST_URI'] = $_SERVER['REQUEST_URI'] . "&profile_id=" . $newProfile->identifier; |
|
| 67 | + $_SERVER['REQUEST_URI'] = $_SERVER['REQUEST_URI']."&profile_id=".$newProfile->identifier; |
|
| 68 | 68 | $_GET['profile_id'] = $newProfile->identifier; |
| 69 | 69 | $profile = $newProfile; |
| 70 | 70 | } else { |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | break; |
| 133 | 133 | } |
| 134 | 134 | $properName = $validator->syntaxConformUser($elements[0]); |
| 135 | - $properDate = new DateTime($elements[1] . " 00:00:00"); |
|
| 135 | + $properDate = new DateTime($elements[1]." 00:00:00"); |
|
| 136 | 136 | $numberOfActivations = $elements[2] ?? 1; |
| 137 | 137 | $number = $validator->integer($numberOfActivations); |
| 138 | 138 | if ($number === FALSE) { // invalid input received, default to sane |
@@ -225,18 +225,18 @@ discard block |
||
| 225 | 225 | // warn and ask for confirmation unless already confirmed |
| 226 | 226 | if (!isset($_POST['insecureconfirm']) || $_POST['insecureconfirm'] != "CONFIRM") { |
| 227 | 227 | echo $deco->pageheader(_("Insecure mail domain!"), "ADMIN-IDP-USERS"); |
| 228 | - echo "<p>" . sprintf(_("The mail domain of the mail address <strong>%s</strong> is not secure: some or all of the mail servers are not accepting encrypted connections (no consistent support for STARTTLS)."), $properEmail) . "</p>"; |
|
| 229 | - echo "<p>" . _("The invitation would need to be sent in cleartext across the internet, and can possibly be read and abused by anyone in transit.") . "</p>"; |
|
| 230 | - echo "<p>" . _("Do you want the system to send this mail anyway?") . "</p>"; |
|
| 228 | + echo "<p>".sprintf(_("The mail domain of the mail address <strong>%s</strong> is not secure: some or all of the mail servers are not accepting encrypted connections (no consistent support for STARTTLS)."), $properEmail)."</p>"; |
|
| 229 | + echo "<p>"._("The invitation would need to be sent in cleartext across the internet, and can possibly be read and abused by anyone in transit.")."</p>"; |
|
| 230 | + echo "<p>"._("Do you want the system to send this mail anyway?")."</p>"; |
|
| 231 | 231 | echo $formtext; |
| 232 | - echo "<button type='submit' class='delete'>" . _("DO NOT SEND") . "</button>"; |
|
| 232 | + echo "<button type='submit' class='delete'>"._("DO NOT SEND")."</button>"; |
|
| 233 | 233 | echo "</form>"; |
| 234 | 234 | echo $formtext; |
| 235 | - echo "<input type='hidden' name='command' value='" . \web\lib\common\FormElements::BUTTON_SENDINVITATIONMAILBYCAT . "'</>"; |
|
| 235 | + echo "<input type='hidden' name='command' value='".\web\lib\common\FormElements::BUTTON_SENDINVITATIONMAILBYCAT."'</>"; |
|
| 236 | 236 | echo "<input type='hidden' name='address' value='$properEmail'</>"; |
| 237 | - echo "<input type='hidden' name='token' value='" . $invitationObject->invitationTokenString . "'</>"; |
|
| 237 | + echo "<input type='hidden' name='token' value='".$invitationObject->invitationTokenString."'</>"; |
|
| 238 | 238 | echo "<input type='hidden' name='insecureconfirm' value='CONFIRM'/>"; |
| 239 | - echo "<button type='submit'>" . _("Send anyway.") . "</button>"; |
|
| 239 | + echo "<button type='submit'>"._("Send anyway.")."</button>"; |
|
| 240 | 240 | echo "</form>"; |
| 241 | 241 | echo $deco->footer(); |
| 242 | 242 | exit; |
@@ -286,7 +286,7 @@ discard block |
||
| 286 | 286 | $allUsers = $profile->listAllUsers(); |
| 287 | 287 | $activeUsers = $profile->listActiveUsers(); |
| 288 | 288 | |
| 289 | -echo $deco->defaultPagePrelude(sprintf(_('Managing %s users'), \core\ProfileSilverbullet::PRODUCTNAME )); |
|
| 289 | +echo $deco->defaultPagePrelude(sprintf(_('Managing %s users'), \core\ProfileSilverbullet::PRODUCTNAME)); |
|
| 290 | 290 | |
| 291 | 291 | ?> |
| 292 | 292 | <script src='js/option_expand.js' type='text/javascript'></script> |
@@ -324,7 +324,7 @@ discard block |
||
| 324 | 324 | echo $deco->productHeader("ADMIN-IDP-USERS"); |
| 325 | 325 | ?> |
| 326 | 326 | <img src='../resources/images/icons/loading51.gif' id='spin' alt='loading...' style='position:absolute;left: 50%; top: 50%; transform: translate(-100px, -50px); display:none; z-index: 100;'> |
| 327 | - <?php echo $uiElements->instLevelInfoBoxes($inst);?> |
|
| 327 | + <?php echo $uiElements->instLevelInfoBoxes($inst); ?> |
|
| 328 | 328 | <div class='infobox'> |
| 329 | 329 | <h2><?php echo sprintf(_('Current %s users'), \core\ProfileSilverbullet::PRODUCTNAME); ?></h2> |
| 330 | 330 | <table> |
@@ -424,23 +424,23 @@ discard block |
||
| 424 | 424 | ?> |
| 425 | 425 | |
| 426 | 426 | <div class="sb-certificate-summary ca-summary" <?php echo $style; ?>> |
| 427 | - <div class="sb-certificate-details"><?php echo _("Device:") . " " . $display; ?> |
|
| 428 | - <br><?php echo _("Serial Number:") . " " . gmp_strval($oneCert->serial, 16); ?> |
|
| 429 | - <br><?php echo _("CN:") . " " . explode('@', $oneCert->username)[0] . "@…"; ?> |
|
| 430 | - <br><?php echo _("Expiry:") . " " . $oneCert->expiry; ?> |
|
| 431 | - <br><?php echo _("Issued:") . " " . $oneCert->issued; ?> |
|
| 427 | + <div class="sb-certificate-details"><?php echo _("Device:")." ".$display; ?> |
|
| 428 | + <br><?php echo _("Serial Number:")." ".gmp_strval($oneCert->serial, 16); ?> |
|
| 429 | + <br><?php echo _("CN:")." ".explode('@', $oneCert->username)[0]."@…"; ?> |
|
| 430 | + <br><?php echo _("Expiry:")." ".$oneCert->expiry; ?> |
|
| 431 | + <br><?php echo _("Issued:")." ".$oneCert->issued; ?> |
|
| 432 | 432 | </div> |
| 433 | 433 | <div style="text-align:right;padding-top: 5px; <?php echo $buttonStyle; ?>"> |
| 434 | 434 | <?php |
| 435 | 435 | if ($buttonText == "") { |
| 436 | 436 | echo "$formtext" |
| 437 | - . "<input type='hidden' name='certSerial' value='" . $oneCert->serial . "'/>" |
|
| 438 | - . "<input type='hidden' name='certAlgo' value='" . $oneCert->ca_type . "'/>" |
|
| 437 | + . "<input type='hidden' name='certSerial' value='".$oneCert->serial."'/>" |
|
| 438 | + . "<input type='hidden' name='certAlgo' value='".$oneCert->ca_type."'/>" |
|
| 439 | 439 | . "<button type='submit' " |
| 440 | 440 | . "name='command' " |
| 441 | - . "value='" . \web\lib\common\FormElements::BUTTON_REVOKECREDENTIAL . "' " |
|
| 441 | + . "value='".\web\lib\common\FormElements::BUTTON_REVOKECREDENTIAL."' " |
|
| 442 | 442 | . "class='delete' " |
| 443 | - . "onclick='return confirm(\"" . sprintf(_("The device in question will stop functioning with %s. The revocation cannot be undone. Are you sure you want to do this?"), \config\ConfAssistant::CONFIG['CONSORTIUM']['display_name']) . "\")'>" |
|
| 443 | + . "onclick='return confirm(\"".sprintf(_("The device in question will stop functioning with %s. The revocation cannot be undone. Are you sure you want to do this?"), \config\ConfAssistant::CONFIG['CONSORTIUM']['display_name'])."\")'>" |
|
| 444 | 444 | . _("Revoke") |
| 445 | 445 | . "</button>" |
| 446 | 446 | . "</form>"; |
@@ -466,38 +466,38 @@ discard block |
||
| 466 | 466 | $tokenHtmlBuffer .= "<tr class='sb-certificate-row'><td></td>"; |
| 467 | 467 | $jsEncodedBody = str_replace('\n', '%0D%0A', str_replace('"', '', json_encode($invitationObject->invitationMailBody()))); |
| 468 | 468 | $tokenHtmlBuffer .= "<td>"; |
| 469 | - $tokenHtmlBuffer .= sprintf(_("The invitation token %s is ready for sending! Choose how to send it:"),"<input type='text' readonly='readonly' style='background-color:lightgrey;' size='60' value='" . $invitationObject->link() . "' name='token' class='identifiedtokenarea-" . $invitationObject->identifier . "'>(…)<br/>"); |
|
| 469 | + $tokenHtmlBuffer .= sprintf(_("The invitation token %s is ready for sending! Choose how to send it:"), "<input type='text' readonly='readonly' style='background-color:lightgrey;' size='60' value='".$invitationObject->link()."' name='token' class='identifiedtokenarea-".$invitationObject->identifier."'>(…)<br/>"); |
|
| 470 | 470 | $tokenHtmlBuffer .= "<table> |
| 471 | 471 | <tr><td style='vertical-align:bottom;'>"._("E-Mail:")."</td><td> |
| 472 | 472 | $formtext |
| 473 | - <input type='hidden' value='" . $invitationObject->invitationTokenString . "' name='token'><br/> |
|
| 473 | + <input type='hidden' value='".$invitationObject->invitationTokenString."' name='token'><br/> |
|
| 474 | 474 | <input type='text' name='address' id='address-$invitationObject->identifier'/> |
| 475 | - <button type='button' onclick='window.location=\"mailto:\"+document.getElementById(\"address-$invitationObject->identifier\").value+\"?subject=" . $invitationObject->invitationMailSubject() . "&body=$jsEncodedBody\"; return false;'>" . _("Local mail client") . "</button> |
|
| 476 | - <button type='submit' name='command' onclick='document.getElementById(\"spin\").style.display =\"block\"' value='" . \web\lib\common\FormElements::BUTTON_SENDINVITATIONMAILBYCAT . "'>"._("Send with CAT")."</button> |
|
| 475 | + <button type='button' onclick='window.location=\"mailto:\"+document.getElementById(\"address-$invitationObject->identifier\").value+\"?subject=".$invitationObject->invitationMailSubject()."&body=$jsEncodedBody\"; return false;'>"._("Local mail client")."</button> |
|
| 476 | + <button type='submit' name='command' onclick='document.getElementById(\"spin\").style.display =\"block\"' value='" . \web\lib\common\FormElements::BUTTON_SENDINVITATIONMAILBYCAT."'>"._("Send with CAT")."</button> |
|
| 477 | 477 | </form> |
| 478 | 478 | </td></tr> |
| 479 | 479 | <tr><td style='vertical-align:bottom;'>"._("SMS:")."</td><td> |
| 480 | 480 | $formtext |
| 481 | - <input type='hidden' value='" . $invitationObject->invitationTokenString . "' name='token'><br/> |
|
| 481 | + <input type='hidden' value='".$invitationObject->invitationTokenString."' name='token'><br/> |
|
| 482 | 482 | <input type='text' name='smsnumber' /> |
| 483 | - <button type='submit' name='command' value='" . \web\lib\common\FormElements::BUTTON_SENDINVITATIONSMS . "'>" . _("Send in SMS...") . "</button> |
|
| 483 | + <button type='submit' name='command' value='" . \web\lib\common\FormElements::BUTTON_SENDINVITATIONSMS."'>"._("Send in SMS...")."</button> |
|
| 484 | 484 | </form> |
| 485 | 485 | </td></tr> |
| 486 | 486 | <tr><td style='vertical-align:bottom;'>"._("Manual:")."</td><td> |
| 487 | - <button type='button' class='clipboardButton' onclick='clipboardCopy(" . $invitationObject->identifier . ");'>" . _("Copy to Clipboard") . "</button> |
|
| 487 | + <button type='button' class='clipboardButton' onclick='clipboardCopy(" . $invitationObject->identifier.");'>"._("Copy to Clipboard")."</button> |
|
| 488 | 488 | <form style='display:inline-block;' method='post' action='inc/displayQRcode.inc.php' onsubmit='popupQRWindow(this); return false;' accept-charset='UTF-8'> |
| 489 | - <input type='hidden' value='" . $invitationObject->invitationTokenString . "' name='token'><br/> |
|
| 490 | - <button type='submit'>" . _("Display QR code") . "</button> |
|
| 489 | + <input type='hidden' value='" . $invitationObject->invitationTokenString."' name='token'><br/> |
|
| 490 | + <button type='submit'>" . _("Display QR code")."</button> |
|
| 491 | 491 | </form> |
| 492 | 492 | </td></tr> |
| 493 | 493 | |
| 494 | 494 | </table> |
| 495 | 495 | </td>"; |
| 496 | - $tokenHtmlBuffer .= "<td>" . _("Expiry Date:") . " " . $invitationObject->expiry . " UTC<br>" . _("Activations remaining:") . " " . sprintf(_("%d of %d"), $invitationObject->activationsRemaining, $invitationObject->activationsTotal) . "</td>"; |
|
| 496 | + $tokenHtmlBuffer .= "<td>"._("Expiry Date:")." ".$invitationObject->expiry." UTC<br>"._("Activations remaining:")." ".sprintf(_("%d of %d"), $invitationObject->activationsRemaining, $invitationObject->activationsTotal)."</td>"; |
|
| 497 | 497 | $tokenHtmlBuffer .= "<td>" |
| 498 | 498 | . $formtext |
| 499 | - . "<input type='hidden' name='invitationtoken' value='" . $invitationObject->invitationTokenString . "'/>" |
|
| 500 | - . "<button type='submit' name='command' value='" . \web\lib\common\FormElements::BUTTON_REVOKEINVITATION . "' class='delete'>"._("Revoke"). "</button></form>" |
|
| 499 | + . "<input type='hidden' name='invitationtoken' value='".$invitationObject->invitationTokenString."'/>" |
|
| 500 | + . "<button type='submit' name='command' value='".\web\lib\common\FormElements::BUTTON_REVOKEINVITATION."' class='delete'>"._("Revoke")."</button></form>" |
|
| 501 | 501 | . "</td></tr>"; |
| 502 | 502 | break; |
| 503 | 503 | case core\SilverbulletInvitation::SB_TOKENSTATUS_EXPIRED: |
@@ -519,7 +519,7 @@ discard block |
||
| 519 | 519 | <span><input type="text" maxlength="19" class="sb-date-picker" name="userexpiry" value="<?php echo $profile->getUserExpiryDate($oneUserId); ?>"> (UTC)</span> |
| 520 | 520 | </div> |
| 521 | 521 | <input type="hidden" name="userid" value="<?php echo $oneUserId; ?>"/> |
| 522 | - <button type="submit" name="command" value="<?php echo \web\lib\common\FormElements::BUTTON_CHANGEUSEREXPIRY ?>"><?php echo _("Update");?></button> |
|
| 522 | + <button type="submit" name="command" value="<?php echo \web\lib\common\FormElements::BUTTON_CHANGEUSEREXPIRY ?>"><?php echo _("Update"); ?></button> |
|
| 523 | 523 | </form> |
| 524 | 524 | </td> |
| 525 | 525 | <td> |
@@ -527,13 +527,13 @@ discard block |
||
| 527 | 527 | <?php |
| 528 | 528 | if ($hasOnePendingInvite || count($validCerts) > 0) { |
| 529 | 529 | $deletionText = sprintf(_("All of the currently active devices will stop functioning with %s. This cannot be undone. While the user can be re-activated later, they will then need to be re-provisioned with new invitation tokens. Are you sure you want to do this?"), \config\ConfAssistant::CONFIG['CONSORTIUM']['display_name']); |
| 530 | - echo $formtext . " |
|
| 530 | + echo $formtext." |
|
| 531 | 531 | <input type='hidden' name='userid' value='$oneUserId'/> |
| 532 | 532 | <button type='submit' " |
| 533 | 533 | . "name='command' " |
| 534 | - . "value='" . \web\lib\common\FormElements::BUTTON_DEACTIVATEUSER . "' " |
|
| 534 | + . "value='".\web\lib\common\FormElements::BUTTON_DEACTIVATEUSER."' " |
|
| 535 | 535 | . "class='delete' " |
| 536 | - . ( count($validCerts) > 0 ? "onclick='return confirm(\"".$deletionText."\")' " : "" ) |
|
| 536 | + . (count($validCerts) > 0 ? "onclick='return confirm(\"".$deletionText."\")' " : "") |
|
| 537 | 537 | . ">" |
| 538 | 538 | . _("Deactivate User") |
| 539 | 539 | . "</button> |
@@ -572,13 +572,13 @@ discard block |
||
| 572 | 572 | . ' If all accounts shown as active above are indeed still valid, please check the box below and push "Save".' |
| 573 | 573 | . ' If any of the accounts are stale, please deactivate them by pushing the corresponding button before doing this.'), \config\ConfAssistant::CONFIG['SILVERBULLET']['gracetime'] ?? core\ProfileSilverbullet::SB_ACKNOWLEDGEMENT_REQUIRED_DAYS); |
| 574 | 574 | |
| 575 | - echo $formtext . "<div style='padding-bottom: 20px;'>" |
|
| 575 | + echo $formtext."<div style='padding-bottom: 20px;'>" |
|
| 576 | 576 | . " |
| 577 | 577 | <p>$acknowledgeText</p> |
| 578 | 578 | <input type='checkbox' name='acknowledge' value='true'> |
| 579 | - <label>" . sprintf(_("I have verified that all configured users are still eligible for %s."),\config\ConfAssistant::CONFIG['CONSORTIUM']['display_name']) . "</label> |
|
| 579 | + <label>".sprintf(_("I have verified that all configured users are still eligible for %s."), \config\ConfAssistant::CONFIG['CONSORTIUM']['display_name'])."</label> |
|
| 580 | 580 | </div> |
| 581 | - <button type='submit' name='command' value='" . \web\lib\common\FormElements::BUTTON_ACKUSERELIGIBILITY . "'>"._("Save")."</button></form>"; |
|
| 581 | + <button type='submit' name='command' value='" . \web\lib\common\FormElements::BUTTON_ACKUSERELIGIBILITY."'>"._("Save")."</button></form>"; |
|
| 582 | 582 | } |
| 583 | 583 | ?> |
| 584 | 584 | </div> |
@@ -655,7 +655,7 @@ discard block |
||
| 655 | 655 | |
| 656 | 656 | <form action="overview_idp.php?inst_id=<?php echo $inst->identifier; ?>" method="POST"> |
| 657 | 657 | <p> |
| 658 | - <button type='submit' name='submitbutton' value="nomatter"><?php echo sprintf(_("Back to %s page"),$uiElements->nomenclatureInst);?></button> |
|
| 658 | + <button type='submit' name='submitbutton' value="nomatter"><?php echo sprintf(_("Back to %s page"), $uiElements->nomenclatureInst); ?></button> |
|
| 659 | 659 | </p> |
| 660 | 660 | </form> |
| 661 | 661 | <?php |
@@ -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::CONFIG['APPEARANCE']['productname'], $uiElements->nomenclatureInst)); |
@@ -84,10 +84,10 @@ discard block |
||
| 84 | 84 | $readonly = \config\Master::CONFIG['DB']['INST']['readonly']; |
| 85 | 85 | $profiles_for_this_idp = $my_inst->listProfiles(); |
| 86 | 86 | if (count($profiles_for_this_idp) == 0) { // no profiles yet. |
| 87 | - echo "<h2>" . sprintf(_("There are not yet any profiles for your %s."), $uiElements->nomenclatureInst) . "</h2>"; |
|
| 87 | + echo "<h2>".sprintf(_("There are not yet any profiles for your %s."), $uiElements->nomenclatureInst)."</h2>"; |
|
| 88 | 88 | } |
| 89 | 89 | if (count($profiles_for_this_idp) > 0) { // no profiles yet. |
| 90 | - echo "<h2>" . sprintf(_("Profiles for this %s"), $uiElements->nomenclatureInst) . "</h2>"; |
|
| 90 | + echo "<h2>".sprintf(_("Profiles for this %s"), $uiElements->nomenclatureInst)."</h2>"; |
|
| 91 | 91 | } |
| 92 | 92 | // if there is one profile and it is of type Silver Bullet, display a very |
| 93 | 93 | // simple widget with just a "Manage" button |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | echo _("Information needed!"); |
| 114 | 114 | echo "<ul style='margin:1px'>"; |
| 115 | 115 | foreach ($completeness as $missing_attrib) { |
| 116 | - echo "<li>" . $uiElements->displayName($missing_attrib) . "</li>"; |
|
| 116 | + echo "<li>".$uiElements->displayName($missing_attrib)."</li>"; |
|
| 117 | 117 | } |
| 118 | 118 | echo "</ul>"; |
| 119 | 119 | echo "</div>"; |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | if ($readonly === FALSE) { |
| 128 | 128 | ?> |
| 129 | 129 | <form action='edit_silverbullet.php?inst_id=<?php echo $my_inst->identifier; ?>&profile_id=<?php echo $profile_list->identifier; ?>' method='POST'> |
| 130 | - <button <?php echo ( is_array($completeness) ? "disabled" : "" ); ?> type='submit' name='sb_action' value='sb_edit'><?php echo _("Manage User Base"); ?></button> |
|
| 130 | + <button <?php echo (is_array($completeness) ? "disabled" : ""); ?> type='submit' name='sb_action' value='sb_edit'><?php echo _("Manage User Base"); ?></button> |
|
| 131 | 131 | </form> |
| 132 | 132 | <?php |
| 133 | 133 | } |
@@ -159,21 +159,21 @@ discard block |
||
| 159 | 159 | $has_overrides = TRUE; |
| 160 | 160 | } |
| 161 | 161 | } |
| 162 | - $buffer_eaptypediv = "<div style='margin-bottom:40px; float:left;'>" . _("<strong>EAP Types</strong> (in order of preference):") . "<br/>"; |
|
| 162 | + $buffer_eaptypediv = "<div style='margin-bottom:40px; float:left;'>"._("<strong>EAP Types</strong> (in order of preference):")."<br/>"; |
|
| 163 | 163 | $typelist = $profile_list->getEapMethodsinOrderOfPreference(); |
| 164 | 164 | $allcomplete = TRUE; |
| 165 | 165 | foreach ($typelist as $eaptype) { |
| 166 | 166 | $buffer_eaptypediv .= $eaptype->getPrintableRep(); |
| 167 | 167 | $completeness = $profile_list->isEapTypeDefinitionComplete($eaptype); |
| 168 | 168 | if ($completeness === true) { |
| 169 | - $buffer_eaptypediv .= " <div class='acceptable'>" . _("OK") . "</div>"; |
|
| 169 | + $buffer_eaptypediv .= " <div class='acceptable'>"._("OK")."</div>"; |
|
| 170 | 170 | } else { |
| 171 | 171 | $buffer_eaptypediv .= " <div class='notacceptable'>"; |
| 172 | 172 | $buffer_eaptypediv .= _("Information needed!"); |
| 173 | 173 | if (is_array($completeness)) { |
| 174 | 174 | $buffer_eaptypediv .= "<ul style='margin:1px'>"; |
| 175 | 175 | foreach ($completeness as $missing_attrib) { |
| 176 | - $buffer_eaptypediv .= "<li>" . $uiElements->displayName($missing_attrib) . "</li>"; |
|
| 176 | + $buffer_eaptypediv .= "<li>".$uiElements->displayName($missing_attrib)."</li>"; |
|
| 177 | 177 | } |
| 178 | 178 | $buffer_eaptypediv .= "</ul>"; |
| 179 | 179 | } |
@@ -185,12 +185,12 @@ discard block |
||
| 185 | 185 | foreach ($attribs as $attrib) { |
| 186 | 186 | if ($attrib['level'] == "Method" && !preg_match("/^internal:/", $attrib['name']) && !$justOnce) { |
| 187 | 187 | $justOnce = TRUE; |
| 188 | - $buffer_eaptypediv .= "<img src='../resources/images/icons/Letter-E-blue-icon.png' alt='" . _("Options on EAP Method/Device level are in effect.") . "'>"; |
|
| 188 | + $buffer_eaptypediv .= "<img src='../resources/images/icons/Letter-E-blue-icon.png' alt='"._("Options on EAP Method/Device level are in effect.")."'>"; |
|
| 189 | 189 | } |
| 190 | 190 | } |
| 191 | 191 | $buffer_eaptypediv .= "<br/>"; |
| 192 | 192 | } |
| 193 | - $buffer_headline = "<div style='padding-bottom:20px;'><h2 style='overflow:auto; display:inline; padding-bottom: 10px;'>" . sprintf(_("Profile: %s"), $profile_name) . "</h2>"; |
|
| 193 | + $buffer_headline = "<div style='padding-bottom:20px;'><h2 style='overflow:auto; display:inline; padding-bottom: 10px;'>".sprintf(_("Profile: %s"), $profile_name)."</h2>"; |
|
| 194 | 194 | |
| 195 | 195 | $buffer_headline .= "<span style='float:right;'>"; |
| 196 | 196 | $readiness = $profile_list->readinessLevel(); |
@@ -222,18 +222,18 @@ discard block |
||
| 222 | 222 | if (\config\Master::CONFIG['FUNCTIONALITY_LOCATIONS']['DIAGNOSTICS'] == "LOCAL") { |
| 223 | 223 | $diagUrl = "../diag/"; |
| 224 | 224 | } else { |
| 225 | - $diagUrl = \config\Master::CONFIG['FUNCTIONALITY_LOCATIONS']['DIAGNOSTICS'] . "/diag/"; |
|
| 225 | + $diagUrl = \config\Master::CONFIG['FUNCTIONALITY_LOCATIONS']['DIAGNOSTICS']."/diag/"; |
|
| 226 | 226 | } |
| 227 | - echo "<form action='" . $diagUrl . "action_realmcheck.php?inst_id=$my_inst->identifier&profile_id=$profile_list->identifier' method='post' accept-charset='UTF-8'> |
|
| 227 | + echo "<form action='".$diagUrl."action_realmcheck.php?inst_id=$my_inst->identifier&profile_id=$profile_list->identifier' method='post' accept-charset='UTF-8'> |
|
| 228 | 228 | <input type='hidden' name='comefrom' id='comefrom-$profilecount' value='$link'/> |
| 229 | - <button type='submit' name='profile_action' value='check' " . ($has_realm ? "" : "disabled='disabled' title='" . _("The realm can only be checked if you configure the realm!") . "'") . "> |
|
| 230 | - " . _("Check realm reachability") . " |
|
| 229 | + <button type='submit' name='profile_action' value='check' ".($has_realm ? "" : "disabled='disabled' title='"._("The realm can only be checked if you configure the realm!")."'")."> |
|
| 230 | + " . _("Check realm reachability")." |
|
| 231 | 231 | </button> |
| 232 | 232 | </form>"; |
| 233 | 233 | } |
| 234 | 234 | echo "<form action='overview_installers.php?inst_id=$my_inst->identifier&profile_id=$profile_list->identifier' method='post' accept-charset='UTF-8'> |
| 235 | - <button type='submit' name='profile_action' value='check' " . ($has_eaptypes ? "" : "disabled='disabled' title='" . _("You have not fully configured any supported EAP types!") . "'") . "> |
|
| 236 | - " . _("Installer Fine-Tuning and Download") . " |
|
| 235 | + <button type='submit' name='profile_action' value='check' ".($has_eaptypes ? "" : "disabled='disabled' title='"._("You have not fully configured any supported EAP types!")."'")."> |
|
| 236 | + " . _("Installer Fine-Tuning and Download")." |
|
| 237 | 237 | </button> |
| 238 | 238 | </form> |
| 239 | 239 | </div>"; |
@@ -242,11 +242,11 @@ discard block |
||
| 242 | 242 | echo " <div class='buttongroupprofilebox' style='clear:both;'> |
| 243 | 243 | <form action='edit_profile.php?inst_id=$my_inst->identifier&profile_id=$profile_list->identifier' method='post' accept-charset='UTF-8'> |
| 244 | 244 | <hr/> |
| 245 | - <button type='submit' name='profile_action' value='edit'>" . _("Edit") . "</button> |
|
| 245 | + <button type='submit' name='profile_action' value='edit'>"._("Edit")."</button> |
|
| 246 | 246 | </form> |
| 247 | 247 | <form action='edit_profile_result.php?inst_id=$my_inst->identifier&profile_id=$profile_list->identifier' method='post' accept-charset='UTF-8'> |
| 248 | - <button class='delete' type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_DELETE . "' onclick=\"return confirm('" . sprintf(_("Do you really want to delete the profile %s?"), $profile_name) . "')\"> |
|
| 249 | - " . _("Delete") . " |
|
| 248 | + <button class='delete' type='submit' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_DELETE."' onclick=\"return confirm('".sprintf(_("Do you really want to delete the profile %s?"), $profile_name)."')\"> |
|
| 249 | + " . _("Delete")." |
|
| 250 | 250 | </button> |
| 251 | 251 | </form> |
| 252 | 252 | </div>"; |
@@ -255,10 +255,10 @@ discard block |
||
| 255 | 255 | // dummy width to keep a little distance |
| 256 | 256 | echo "<div style='width:20px;'></div>"; |
| 257 | 257 | if ($readiness == core\AbstractProfile::READINESS_LEVEL_SHOWTIME) { |
| 258 | - $idpLevelUrl = ( isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on" ? 'https://' : 'http://') . $_SERVER['SERVER_NAME'] . dirname(dirname($_SERVER['SCRIPT_NAME'])) . "?idp=" . $my_inst->identifier; |
|
| 259 | - echo "<div style='display: table-cell; text-align:center;'><p><strong>" . _("User Download Link") . "</strong></p>"; |
|
| 260 | - $displayurl = $idpLevelUrl . "&profile=" . $profile_list->identifier; |
|
| 261 | - $QRurl = $idpLevelUrl . "&profile=" . $profile_list->identifier; |
|
| 258 | + $idpLevelUrl = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on" ? 'https://' : 'http://').$_SERVER['SERVER_NAME'].dirname(dirname($_SERVER['SCRIPT_NAME']))."?idp=".$my_inst->identifier; |
|
| 259 | + echo "<div style='display: table-cell; text-align:center;'><p><strong>"._("User Download Link")."</strong></p>"; |
|
| 260 | + $displayurl = $idpLevelUrl."&profile=".$profile_list->identifier; |
|
| 261 | + $QRurl = $idpLevelUrl."&profile=".$profile_list->identifier; |
|
| 262 | 262 | $qrCode = new \chillerlan\QRCode\QRCode(new \chillerlan\QRCode\QROptions([ |
| 263 | 263 | 'outputType' => \chillerlan\QRCode\QRCode::OUTPUT_IMAGE_PNG, |
| 264 | 264 | 'eccLevel' => \chillerlan\QRCode\QRCode::ECC_H, |
@@ -270,16 +270,16 @@ discard block |
||
| 270 | 270 | if ($rawQr === NULL) { |
| 271 | 271 | throw new Exception("Something went seriously wrong during QR code generation!"); |
| 272 | 272 | } |
| 273 | - $uri = "data:image/png;base64," . base64_encode($uiElements->pngInjectConsortiumLogo($rawQr, web\lib\admin\UIElements::QRCODE_PIXELS_PER_SYMBOL)); |
|
| 273 | + $uri = "data:image/png;base64,".base64_encode($uiElements->pngInjectConsortiumLogo($rawQr, web\lib\admin\UIElements::QRCODE_PIXELS_PER_SYMBOL)); |
|
| 274 | 274 | $size = getimagesize($uri); |
| 275 | - echo "<img width='" . ($size[0] / 4) . "' height='" . ($size[1] / 4) . "' src='$uri' alt='QR-code'/>"; |
|
| 275 | + echo "<img width='".($size[0] / 4)."' height='".($size[1] / 4)."' src='$uri' alt='QR-code'/>"; |
|
| 276 | 276 | |
| 277 | 277 | //echo "<nobr>$displayurl</nobr></a>"; |
| 278 | 278 | echo "<p>$displayurl</p></a>"; |
| 279 | 279 | echo "</div>"; |
| 280 | 280 | // dummy width to keep a little distance |
| 281 | 281 | echo "<div style='width:20px;'></div>"; |
| 282 | - echo "<div style='display: table-cell; min-width:200px;'><p><strong>" . _("User Downloads") . "</strong></p><table>"; |
|
| 282 | + echo "<div style='display: table-cell; min-width:200px;'><p><strong>"._("User Downloads")."</strong></p><table>"; |
|
| 283 | 283 | $stats = $profile_list->getUserDownloadStats(); |
| 284 | 284 | foreach ($stats as $dev => $count) { |
| 285 | 285 | echo "<tr><td><strong>$dev</strong></td><td>$count</td></tr>"; |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | |
| 28 | 28 | ?> |
| 29 | 29 | <?php |
| 30 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
| 30 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
| 31 | 31 | |
| 32 | 32 | $deco = new \web\lib\admin\PageDecoration(); |
| 33 | 33 | $validator = new \web\lib\common\InputValidation(); |
@@ -127,8 +127,8 @@ discard block |
||
| 127 | 127 | <?php |
| 128 | 128 | echo $uiElements->instLevelInfoBoxes($my_inst); |
| 129 | 129 | |
| 130 | - echo "<form enctype='multipart/form-data' action='edit_profile_result.php?inst_id=$my_inst->identifier" . ($my_profile !== NULL ? "&profile_id=" . $my_profile->identifier : "") . "' method='post' accept-charset='UTF-8'> |
|
| 131 | - <input type='hidden' name='MAX_FILE_SIZE' value='" . \config\Master::CONFIG['MAX_UPLOAD_SIZE'] . "'>"; |
|
| 130 | + echo "<form enctype='multipart/form-data' action='edit_profile_result.php?inst_id=$my_inst->identifier".($my_profile !== NULL ? "&profile_id=".$my_profile->identifier : "")."' method='post' accept-charset='UTF-8'> |
|
| 131 | + <input type='hidden' name='MAX_FILE_SIZE' value='" . \config\Master::CONFIG['MAX_UPLOAD_SIZE']."'>"; |
|
| 132 | 132 | $optionDisplay = new \web\lib\admin\OptionDisplay($profile_options, "Profile"); |
| 133 | 133 | ?> |
| 134 | 134 | <fieldset class="option_container"> |
@@ -137,19 +137,19 @@ discard block |
||
| 137 | 137 | </legend> |
| 138 | 138 | <?php |
| 139 | 139 | if ($wizardStyle) { |
| 140 | - echo "<p>" . _("We will now define a profile for your user group(s). You can add as many profiles as you like by choosing the appropriate button on the end of the page. After we are done, the wizard is finished and you will be taken to the main IdP administration page.") . "</p>"; |
|
| 140 | + echo "<p>"._("We will now define a profile for your user group(s). You can add as many profiles as you like by choosing the appropriate button on the end of the page. After we are done, the wizard is finished and you will be taken to the main IdP administration page.")."</p>"; |
|
| 141 | 141 | } |
| 142 | 142 | ?> |
| 143 | 143 | <h3><?php echo _("Profile Name and RADIUS realm"); ?></h3> |
| 144 | 144 | <?php |
| 145 | 145 | if ($wizardStyle) { |
| 146 | - echo "<p>" . _("First of all we need a name for the profile. This will be displayed to end users, so you may want to choose a descriptive name like 'Professors', 'Students of the Faculty of Bioscience', etc.") . "</p>"; |
|
| 147 | - echo "<p>" . _("Optionally, you can provide a longer descriptive text about who this profile is for. If you specify it, it will be displayed on the download page after the user has selected the profile name in the list.") . "</p>"; |
|
| 148 | - echo "<p>" . _("You can also tell us your RADIUS realm. "); |
|
| 146 | + echo "<p>"._("First of all we need a name for the profile. This will be displayed to end users, so you may want to choose a descriptive name like 'Professors', 'Students of the Faculty of Bioscience', etc.")."</p>"; |
|
| 147 | + echo "<p>"._("Optionally, you can provide a longer descriptive text about who this profile is for. If you specify it, it will be displayed on the download page after the user has selected the profile name in the list.")."</p>"; |
|
| 148 | + echo "<p>"._("You can also tell us your RADIUS realm. "); |
|
| 149 | 149 | if (\config\Master::CONFIG['FUNCTIONALITY_LOCATIONS']['DIAGNOSTICS'] !== NULL) { |
| 150 | 150 | printf(_("This is useful if you want to use the sanity check module later, which tests reachability of your realm in the %s infrastructure. "), \config\ConfAssistant::CONFIG['CONSORTIUM']['display_name']); |
| 151 | 151 | } |
| 152 | - echo _("It is required to enter the realm name if you want to support anonymous outer identities (see below).") . "</p>"; |
|
| 152 | + echo _("It is required to enter the realm name if you want to support anonymous outer identities (see below).")."</p>"; |
|
| 153 | 153 | } |
| 154 | 154 | |
| 155 | 155 | echo $optionDisplay->prefilledOptionTable("profile"); |
@@ -203,9 +203,9 @@ discard block |
||
| 203 | 203 | |
| 204 | 204 | <?php |
| 205 | 205 | if ($wizardStyle) { |
| 206 | - echo "<p>" . sprintf(_("Some installers support a feature called 'Anonymous outer identity'. If you don't know what this is, please read <a href='%s'>this article</a>."), "https://confluence.terena.org/display/H2eduroam/eap-types") . "</p>"; |
|
| 207 | - echo "<p>" . _("On some platforms, the installers can suggest username endings and/or verify the user input to contain the realm suffix.") . "</p>"; |
|
| 208 | - echo "<p>" . _("The realm check feature needs to know an outer ID which actually gets a chance to authenticate. If your RADIUS server lets only select usernames pass, it is useful to supply the information which of those (outer ID) username we can use for testing.") . "</p>"; |
|
| 206 | + echo "<p>".sprintf(_("Some installers support a feature called 'Anonymous outer identity'. If you don't know what this is, please read <a href='%s'>this article</a>."), "https://confluence.terena.org/display/H2eduroam/eap-types")."</p>"; |
|
| 207 | + echo "<p>"._("On some platforms, the installers can suggest username endings and/or verify the user input to contain the realm suffix.")."</p>"; |
|
| 208 | + echo "<p>"._("The realm check feature needs to know an outer ID which actually gets a chance to authenticate. If your RADIUS server lets only select usernames pass, it is useful to supply the information which of those (outer ID) username we can use for testing.")."</p>"; |
|
| 209 | 209 | } |
| 210 | 210 | ?> |
| 211 | 211 | <p> |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | </td> |
| 223 | 223 | <td> |
| 224 | 224 | <input type='checkbox' <?php |
| 225 | - echo ($verify != FALSE ? "checked" : "" ); |
|
| 225 | + echo ($verify != FALSE ? "checked" : ""); |
|
| 226 | 226 | ?> name='verify_support' onclick=' |
| 227 | 227 | if (this.form.elements["verify_support"].checked !== true || this.form.elements["realm"].value.length == 0) { |
| 228 | 228 | this.form.elements["hint_support"].setAttribute("disabled", "disabled"); |
@@ -230,48 +230,48 @@ discard block |
||
| 230 | 230 | this.form.elements["hint_support"].removeAttribute("disabled"); |
| 231 | 231 | } |
| 232 | 232 | ;'/> |
| 233 | - <span id='hint_label' style='<?php echo ($realm == "" ? "color:#999999" : "" ); ?>'> |
|
| 233 | + <span id='hint_label' style='<?php echo ($realm == "" ? "color:#999999" : ""); ?>'> |
|
| 234 | 234 | <?php echo _("Prefill user input with realm suffix:"); ?> |
| 235 | 235 | </span> |
| 236 | - <input type='checkbox' <?php echo ($verify == FALSE ? "disabled" : "" ); ?> name='hint_support' <?php echo ( $hint != FALSE ? "checked" : "" ); ?> /> |
|
| 236 | + <input type='checkbox' <?php echo ($verify == FALSE ? "disabled" : ""); ?> name='hint_support' <?php echo ($hint != FALSE ? "checked" : ""); ?> /> |
|
| 237 | 237 | </td> |
| 238 | 238 | </tr> |
| 239 | 239 | <tr> |
| 240 | 240 | |
| 241 | 241 | <!-- checkbox and input field for anonymity support, available only when realm is known--> |
| 242 | 242 | <td> |
| 243 | - <span id='anon_support_label' style='<?php echo ($realm == "" ? "color:#999999" : "" ); ?>'> |
|
| 243 | + <span id='anon_support_label' style='<?php echo ($realm == "" ? "color:#999999" : ""); ?>'> |
|
| 244 | 244 | <?php echo _("Enable Anonymous Outer Identity:"); ?> |
| 245 | 245 | </span> |
| 246 | 246 | </td> |
| 247 | 247 | <td> |
| 248 | - <input type='checkbox' <?php echo ($useAnon != FALSE ? "checked" : "" ) . ($realm == "" ? " disabled" : "" ); ?> name='anon_support' onclick=' |
|
| 248 | + <input type='checkbox' <?php echo ($useAnon != FALSE ? "checked" : "").($realm == "" ? " disabled" : ""); ?> name='anon_support' onclick=' |
|
| 249 | 249 | if (this.form.elements["anon_support"].checked !== true) { |
| 250 | 250 | this.form.elements["anon_local"].setAttribute("disabled", "disabled"); |
| 251 | 251 | } else { |
| 252 | 252 | this.form.elements["anon_local"].removeAttribute("disabled"); |
| 253 | 253 | } |
| 254 | 254 | ;'/> |
| 255 | - <input type='text' <?php echo ($checkuserOuter == FALSE ? "disabled" : "" ); ?> name='anon_local' value='<?php echo $anonLocal; ?>'/> |
|
| 255 | + <input type='text' <?php echo ($checkuserOuter == FALSE ? "disabled" : ""); ?> name='anon_local' value='<?php echo $anonLocal; ?>'/> |
|
| 256 | 256 | </td> |
| 257 | 257 | </tr> |
| 258 | 258 | <tr> |
| 259 | 259 | |
| 260 | 260 | <!-- checkbox and input field for check realm outer id, available only when realm is known--> |
| 261 | 261 | <td> |
| 262 | - <span id='checkuser_label' style='<?php echo ($realm == "" ? "color:#999999" : "" ); ?>'> |
|
| 262 | + <span id='checkuser_label' style='<?php echo ($realm == "" ? "color:#999999" : ""); ?>'> |
|
| 263 | 263 | <?php echo _("Use special Outer Identity for realm checks:"); ?> |
| 264 | 264 | </span> |
| 265 | 265 | </td> |
| 266 | 266 | <td> |
| 267 | - <input type='checkbox' <?php echo ($checkuserOuter != FALSE ? "checked" : "" ) . ($realm == "" ? " disabled" : "" ); ?> name='checkuser_support' onclick=' |
|
| 267 | + <input type='checkbox' <?php echo ($checkuserOuter != FALSE ? "checked" : "").($realm == "" ? " disabled" : ""); ?> name='checkuser_support' onclick=' |
|
| 268 | 268 | if (this.form.elements["checkuser_support"].checked !== true) { |
| 269 | 269 | this.form.elements["checkuser_local"].setAttribute("disabled", "disabled"); |
| 270 | 270 | } else { |
| 271 | 271 | this.form.elements["checkuser_local"].removeAttribute("disabled"); |
| 272 | 272 | } |
| 273 | 273 | ;'/> |
| 274 | - <input type='text' <?php echo ($checkuserOuter == FALSE ? "disabled" : "" ); ?> name='checkuser_local' value='<?php echo $checkuserValue; ?>'/> |
|
| 274 | + <input type='text' <?php echo ($checkuserOuter == FALSE ? "disabled" : ""); ?> name='checkuser_local' value='<?php echo $checkuserValue; ?>'/> |
|
| 275 | 275 | </td> |
| 276 | 276 | </tr> |
| 277 | 277 | </table> |
@@ -281,20 +281,20 @@ discard block |
||
| 281 | 281 | |
| 282 | 282 | <?php |
| 283 | 283 | if ($wizardStyle) { |
| 284 | - echo "<p>" . _("The CAT has a download area for end users. There, they will, for example, learn about the support pointers you entered earlier. The CAT can also immediately offer the installers for the profile for download. If you don't want that, you can instead enter a web site location where you want your users to be redirected to. You, as the administrator, can still download the profiles to place them on that page (see the 'Compatibility Matrix' button on the dashboard).") . "</p>"; |
|
| 284 | + echo "<p>"._("The CAT has a download area for end users. There, they will, for example, learn about the support pointers you entered earlier. The CAT can also immediately offer the installers for the profile for download. If you don't want that, you can instead enter a web site location where you want your users to be redirected to. You, as the administrator, can still download the profiles to place them on that page (see the 'Compatibility Matrix' button on the dashboard).")."</p>"; |
|
| 285 | 285 | } |
| 286 | 286 | ?> |
| 287 | 287 | <p> |
| 288 | 288 | |
| 289 | 289 | <?php |
| 290 | - echo "<span id='redirect_label' style='" . ($realm == "" ? "color:#999999" : "" ) . "'><label for='redirect'>" . _("Redirect end users to own web page:") . "</label></span> |
|
| 291 | - <input type='checkbox' name='redirect' id='redirect' " . ($blacklisted === FALSE ? "" : "checked " ) . "onclick=' |
|
| 290 | + echo "<span id='redirect_label' style='".($realm == "" ? "color:#999999" : "")."'><label for='redirect'>"._("Redirect end users to own web page:")."</label></span> |
|
| 291 | + <input type='checkbox' name='redirect' id='redirect' " . ($blacklisted === FALSE ? "" : "checked ")."onclick=' |
|
| 292 | 292 | if (this.form.elements[\"redirect\"].checked != true) { |
| 293 | 293 | this.form.elements[\"redirect_target\"].setAttribute(\"disabled\", \"disabled\"); |
| 294 | 294 | } else { |
| 295 | 295 | this.form.elements[\"redirect_target\"].removeAttribute(\"disabled\"); |
| 296 | 296 | };'/> |
| 297 | - <input type='text' name='redirect_target' " . ($blacklisted !== FALSE ? "value='$blacklisted'" : "disabled" ) . "/>"; |
|
| 297 | + <input type='text' name='redirect_target' " . ($blacklisted !== FALSE ? "value='$blacklisted'" : "disabled")."/>"; |
|
| 298 | 298 | ?> |
| 299 | 299 | </p> |
| 300 | 300 | |
@@ -303,7 +303,7 @@ discard block |
||
| 303 | 303 | <legend><strong><?php echo _("Supported EAP types"); ?></strong></legend> |
| 304 | 304 | <?php |
| 305 | 305 | if ($wizardStyle) { |
| 306 | - echo "<p>" . _("Now, we need to know which EAP types your IdP supports. If you support multiple EAP types, you can assign every type a priority (1=highest). This tool will always generate an automatic installer for the EAP type with the highest priority; only if the user's device can't use that EAP type, we will use an EAP type further down in the list.") . "</p>"; |
|
| 306 | + echo "<p>"._("Now, we need to know which EAP types your IdP supports. If you support multiple EAP types, you can assign every type a priority (1=highest). This tool will always generate an automatic installer for the EAP type with the highest priority; only if the user's device can't use that EAP type, we will use an EAP type further down in the list.")."</p>"; |
|
| 307 | 307 | } |
| 308 | 308 | ?> |
| 309 | 309 | <?php |
@@ -336,7 +336,7 @@ discard block |
||
| 336 | 336 | <?php |
| 337 | 337 | $D = []; |
| 338 | 338 | foreach ($prefill_methods as $prio => $value) { |
| 339 | - print '<li>' . $value->getPrintableRep() . "</li>\n"; |
|
| 339 | + print '<li>'.$value->getPrintableRep()."</li>\n"; |
|
| 340 | 340 | $D[$value->getPrintableRep()] = $prio; |
| 341 | 341 | } |
| 342 | 342 | ?> |
@@ -362,7 +362,7 @@ discard block |
||
| 362 | 362 | } |
| 363 | 363 | $display = $a->getPrintableRep(); |
| 364 | 364 | if (!isset($D[$a->getPrintableRep()])) { |
| 365 | - print '<li class="eap1">' . $a->getPrintableRep() . "</li>\n"; |
|
| 365 | + print '<li class="eap1">'.$a->getPrintableRep()."</li>\n"; |
|
| 366 | 366 | } |
| 367 | 367 | } |
| 368 | 368 | ?> |
@@ -375,8 +375,8 @@ discard block |
||
| 375 | 375 | foreach ($methods as $a) { |
| 376 | 376 | $display = $a->getPrintableRep(); |
| 377 | 377 | $v = isset($D[$display]) ? $D[$display] : ''; |
| 378 | - print '<input type="hidden" class="eapm" name="' . $display . '" id="EAP-' . $display . '" value="' . $display . '">'; |
|
| 379 | - print '<input type="hidden" class="eapmv" name="' . $display . '-priority" id="EAP-' . $display . '-priority" value="' . $v . '">'; |
|
| 378 | + print '<input type="hidden" class="eapm" name="'.$display.'" id="EAP-'.$display.'" value="'.$display.'">'; |
|
| 379 | + print '<input type="hidden" class="eapmv" name="'.$display.'-priority" id="EAP-'.$display.'-priority" value="'.$v.'">'; |
|
| 380 | 380 | } |
| 381 | 381 | ?> |
| 382 | 382 | <br style="clear:both;" /> |
@@ -396,11 +396,11 @@ discard block |
||
| 396 | 396 | foreach ($optionsAlreadySet as $optionNames) { |
| 397 | 397 | if (preg_match("/^support:/", $optionNames)) { |
| 398 | 398 | $has_support_options[$optionNames] = "SET"; |
| 399 | - $support_text .= "<li><strong>" . $uiElements->displayName($optionNames) . "</strong></li>"; |
|
| 399 | + $support_text .= "<li><strong>".$uiElements->displayName($optionNames)."</strong></li>"; |
|
| 400 | 400 | } |
| 401 | 401 | if (preg_match("/^media:/", $optionNames)) { |
| 402 | 402 | $has_media_options[$optionNames] = "SET"; |
| 403 | - $media_text .= "<li><strong>" . $uiElements->displayName($optionNames) . "</strong></li>"; |
|
| 403 | + $media_text .= "<li><strong>".$uiElements->displayName($optionNames)."</strong></li>"; |
|
| 404 | 404 | } |
| 405 | 405 | } |
| 406 | 406 | $fields = [ |
@@ -409,22 +409,22 @@ discard block |
||
| 409 | 409 | "media" => _("Media Properties for this profile")]; |
| 410 | 410 | |
| 411 | 411 | foreach ($fields as $name => $description) { |
| 412 | - echo "<fieldset class='option_container' id='" . $name . "_override'> |
|
| 412 | + echo "<fieldset class='option_container' id='".$name."_override'> |
|
| 413 | 413 | <legend><strong>$description</strong></legend> |
| 414 | 414 | <p>"; |
| 415 | 415 | |
| 416 | - if (count(${"has_" . $name . "_options"}) > 0) { |
|
| 417 | - printf(ngettext("The option %s is already defined IdP-wide. If you set it here on profile level, this setting will override the IdP-wide one.", "The options %s are already defined IdP-wide. If you set them here on profile level, these settings will override the IdP-wide ones.", count(${"has_" . $name . "_options"})), "<ul>" . ${$name . "_text"} . "</ul>"); |
|
| 416 | + if (count(${"has_".$name."_options"}) > 0) { |
|
| 417 | + printf(ngettext("The option %s is already defined IdP-wide. If you set it here on profile level, this setting will override the IdP-wide one.", "The options %s are already defined IdP-wide. If you set them here on profile level, these settings will override the IdP-wide ones.", count(${"has_".$name."_options"})), "<ul>".${$name."_text"}."</ul>"); |
|
| 418 | 418 | } |
| 419 | 419 | |
| 420 | 420 | echo "</p>"; |
| 421 | 421 | echo $optionDisplay->prefilledOptionTable($name); |
| 422 | - echo "<button type='button' class='newoption' onclick='getXML(\"$name\")'>" . _("Add new option") . "</button>"; |
|
| 422 | + echo "<button type='button' class='newoption' onclick='getXML(\"$name\")'>"._("Add new option")."</button>"; |
|
| 423 | 423 | echo "</fieldset>"; |
| 424 | 424 | } |
| 425 | 425 | |
| 426 | 426 | if ($wizardStyle) { |
| 427 | - echo "<p>" . _("When you are sure that everything is correct, please click on 'Save data' and you will be taken to your IdP Dashboard page.") . "</p>"; |
|
| 427 | + echo "<p>"._("When you are sure that everything is correct, please click on 'Save data' and you will be taken to your IdP Dashboard page.")."</p>"; |
|
| 428 | 428 | } |
| 429 | -echo "<p><button type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_SAVE . "'>" . _("Save data") . "</button><button type='button' class='delete' name='abortbutton' value='abort' onclick='javascript:window.location = \"overview_idp.php?inst_id=$my_inst->identifier\"'>" . _("Discard changes") . "</button></p></form>"; |
|
| 429 | +echo "<p><button type='submit' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_SAVE."'>"._("Save data")."</button><button type='button' class='delete' name='abortbutton' value='abort' onclick='javascript:window.location = \"overview_idp.php?inst_id=$my_inst->identifier\"'>"._("Discard changes")."</button></p></form>"; |
|
| 430 | 430 | echo $deco->footer(); |
@@ -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::CONFIG['APPEARANCE']['productname'], $uiElements->nomenclatureHotspot)); |
@@ -88,21 +88,21 @@ discard block |
||
| 88 | 88 | <?php |
| 89 | 89 | if (\config\Master::CONFIG['FUNCTIONALITY_LOCATIONS']['DIAGNOSTICS'] !== NULL) { |
| 90 | 90 | echo "<tr> |
| 91 | - <td>" . _("Check another realm's reachability") . "</td> |
|
| 91 | + <td>" . _("Check another realm's reachability")."</td> |
|
| 92 | 92 | <td><form method='post' action='../diag/action_realmcheck.php?inst_id=$my_inst->identifier' accept-charset='UTF-8'> |
| 93 | 93 | <input type='text' name='realm' id='realm'> |
| 94 | 94 | <input type='hidden' name='comefrom' id='comefrom' value='$link'/> |
| 95 | - <button type='submit'>" . _("Go!") . "</button> |
|
| 95 | + <button type='submit'>"._("Go!")."</button> |
|
| 96 | 96 | </form> |
| 97 | 97 | </td> |
| 98 | 98 | </tr>"; |
| 99 | 99 | } |
| 100 | 100 | if (\config\ConfAssistant::CONFIG['CONSORTIUM']['name'] == "eduroam") { // SW: APPROVED |
| 101 | 101 | echo "<tr> |
| 102 | - <td>" . sprintf(_("Check %s server status"), $uiElements->nomenclatureFed) . "</td> |
|
| 102 | + <td>" . sprintf(_("Check %s server status"), $uiElements->nomenclatureFed)."</td> |
|
| 103 | 103 | <td> |
| 104 | 104 | <form action='https://monitor.eduroam.org/mon_direct.php' accept-charset='UTF-8'> |
| 105 | - <button type='submit'>" . _("Go!") . "</button> |
|
| 105 | + <button type='submit'>" . _("Go!")."</button> |
|
| 106 | 106 | </form> |
| 107 | 107 | </td> |
| 108 | 108 | </tr>"; |
@@ -113,10 +113,10 @@ discard block |
||
| 113 | 113 | <?php |
| 114 | 114 | $hotspotProfiles = $my_inst->listDeployments(); |
| 115 | 115 | if (count($hotspotProfiles) == 0) { // no profiles yet. |
| 116 | - echo "<h2>" . sprintf(_("There are not yet any known deployments for your %s."), $uiElements->nomenclatureHotspot) . "</h2>"; |
|
| 116 | + echo "<h2>".sprintf(_("There are not yet any known deployments for your %s."), $uiElements->nomenclatureHotspot)."</h2>"; |
|
| 117 | 117 | } |
| 118 | 118 | if (count($hotspotProfiles) > 0) { // no profiles yet. |
| 119 | - echo "<h2>" . sprintf(_("Deployments for this %s"), $uiElements->nomenclatureHotspot) . "</h2>"; |
|
| 119 | + echo "<h2>".sprintf(_("Deployments for this %s"), $uiElements->nomenclatureHotspot)."</h2>"; |
|
| 120 | 120 | // display an info box with the connection data |
| 121 | 121 | } |
| 122 | 122 | |
@@ -124,19 +124,19 @@ discard block |
||
| 124 | 124 | ?> |
| 125 | 125 | <div style='display: table-row; margin-bottom: 20px;'> |
| 126 | 126 | <div class='profilebox' style='display: table-cell;'> |
| 127 | - <h2><?php echo core\DeploymentManaged::PRODUCTNAME . " (<span style='color:" . ( $deploymentObject->status == \core\AbstractDeployment::INACTIVE ? "red;'>" . _("inactive") : "green;'>" . _("active") ) . "</span>)"; ?></h2> |
|
| 127 | + <h2><?php echo core\DeploymentManaged::PRODUCTNAME." (<span style='color:".($deploymentObject->status == \core\AbstractDeployment::INACTIVE ? "red;'>"._("inactive") : "green;'>"._("active"))."</span>)"; ?></h2> |
|
| 128 | 128 | <table> |
| 129 | 129 | <tr> |
| 130 | 130 | <td><strong><?php echo _("Your primary RADIUS server") ?></strong><br/> |
| 131 | 131 | <?php |
| 132 | 132 | if ($deploymentObject->host1_v4 !== NULL) { |
| 133 | - echo _("IPv4") . ": " . $deploymentObject->host1_v4; |
|
| 133 | + echo _("IPv4").": ".$deploymentObject->host1_v4; |
|
| 134 | 134 | } |
| 135 | 135 | if ($deploymentObject->host1_v4 !== NULL && $deploymentObject->host1_v6 !== NULL) { |
| 136 | 136 | echo "<br/>"; |
| 137 | 137 | } |
| 138 | 138 | if ($deploymentObject->host1_v6 !== NULL) { |
| 139 | - echo _("IPv6") . ": " . $deploymentObject->host1_v6; |
|
| 139 | + echo _("IPv6").": ".$deploymentObject->host1_v6; |
|
| 140 | 140 | } |
| 141 | 141 | ?> |
| 142 | 142 | </td> |
@@ -147,13 +147,13 @@ discard block |
||
| 147 | 147 | <td><strong><?php echo _("Your backup RADIUS server") ?><br/></strong> |
| 148 | 148 | <?php |
| 149 | 149 | if ($deploymentObject->host2_v4 !== NULL) { |
| 150 | - echo _("IPv4") . ": " . $deploymentObject->host2_v4; |
|
| 150 | + echo _("IPv4").": ".$deploymentObject->host2_v4; |
|
| 151 | 151 | } |
| 152 | 152 | if ($deploymentObject->host2_v4 !== NULL && $deploymentObject->host2_v6 !== NULL) { |
| 153 | 153 | echo "<br/>"; |
| 154 | 154 | } |
| 155 | 155 | if ($deploymentObject->host2_v6 !== NULL) { |
| 156 | - echo _("IPv6") . ": " . $deploymentObject->host2_v6; |
|
| 156 | + echo _("IPv6").": ".$deploymentObject->host2_v6; |
|
| 157 | 157 | } |
| 158 | 158 | ?></td> |
| 159 | 159 | <td><?php echo _("RADIUS port number: ") ?></td> |
@@ -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 | $languageInstance = new \core\common\Language(); |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | $invitationObject = new core\SilverbulletInvitation($validator->token(filter_input(INPUT_POST, 'token'))); |
| 39 | 39 | header("Content-Type:text/html;charset=utf-8"); |
| 40 | 40 | ?> |
| 41 | -<h1 style='text-align:center;'><?php echo _("Invitation Token QR Code");?></h1> |
|
| 41 | +<h1 style='text-align:center;'><?php echo _("Invitation Token QR Code"); ?></h1> |
|
| 42 | 42 | <img style='float:none' src='data:image/png;base64,<?php |
| 43 | 43 | $size = 10; |
| 44 | 44 | $qrCode = new \chillerlan\QRCode\QRCode(new \chillerlan\QRCode\QROptions([ |
@@ -51,5 +51,5 @@ discard block |
||
| 51 | 51 | if ($rawQr === NULL) { |
| 52 | 52 | throw new Exception("Something went seriously wrong during QR code generation!"); |
| 53 | 53 | } |
| 54 | -echo base64_encode($uiElements->pngInjectConsortiumLogo($rawQr, $size));?>'/> |
|
| 55 | -<p>(<a href='<?php echo $invitationObject->link();?>'><?php echo $invitationObject->link();?>)</a></p> |
|
| 54 | +echo base64_encode($uiElements->pngInjectConsortiumLogo($rawQr, $size)); ?>'/> |
|
| 55 | +<p>(<a href='<?php echo $invitationObject->link(); ?>'><?php echo $invitationObject->link(); ?>)</a></p> |
|
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | ?> |
| 23 | 23 | <?php |
| 24 | 24 | |
| 25 | -require_once dirname(dirname(dirname(dirname(__FILE__)))) . "/config/_config.php"; |
|
| 25 | +require_once dirname(dirname(dirname(dirname(__FILE__))))."/config/_config.php"; |
|
| 26 | 26 | |
| 27 | 27 | $validator = new \web\lib\common\InputValidation(); |
| 28 | 28 | $idRaw = $_GET["id"] ?? ""; |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | // Set data type and caching for 30 days |
| 38 | 38 | $info = new finfo(); |
| 39 | 39 | $filetype = $info->buffer($finalBlob, FILEINFO_MIME_TYPE); |
| 40 | - header("Content-type: " . $filetype); |
|
| 40 | + header("Content-type: ".$filetype); |
|
| 41 | 41 | |
| 42 | 42 | switch ($filetype) { |
| 43 | 43 | case "text/rtf": // fall-through, same treatment |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | header("Cache-Control: must-revalidate"); |
| 55 | 55 | $offset = 60 * 60 * 24 * 30; |
| 56 | 56 | // gmdate can't possibly fail, because it operates on time() and an integer offset |
| 57 | - $ExpStr = "Expires: " . /** @scrutinizer ignore-type */ gmdate("D, d M Y H:i:s", time() + $offset) . " GMT"; |
|
| 57 | + $ExpStr = "Expires: "./** @scrutinizer ignore-type */ gmdate("D, d M Y H:i:s", time() + $offset)." GMT"; |
|
| 58 | 58 | header($ExpStr); |
| 59 | 59 | // Print out the image |
| 60 | 60 | echo $finalBlob; |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | $find = array_keys($displayNames, $input, TRUE); |
| 148 | 148 | |
| 149 | 149 | if (count($find) == 0) { // this is an error! throw an Exception |
| 150 | - throw new \Exception("The translation of an option name was requested, but the option is not known to the system: " . htmlentities($input)); |
|
| 150 | + throw new \Exception("The translation of an option name was requested, but the option is not known to the system: ".htmlentities($input)); |
|
| 151 | 151 | } |
| 152 | 152 | \core\common\Entity::outOfThePotatoes(); |
| 153 | 153 | return $find[0]; |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | |
| 169 | 169 | foreach ($optionlist as $option) { |
| 170 | 170 | $type = $optioninfo->optionType($option['name']); |
| 171 | - if (preg_match('/^' . $class . '/', $option['name']) && $option['level'] == "$level") { |
|
| 171 | + if (preg_match('/^'.$class.'/', $option['name']) && $option['level'] == "$level") { |
|
| 172 | 172 | // all non-multilang attribs get this assignment ... |
| 173 | 173 | $language = ""; |
| 174 | 174 | $content = $option['value']; |
@@ -186,19 +186,19 @@ discard block |
||
| 186 | 186 | $locationMarkers[] = $coords; |
| 187 | 187 | break; |
| 188 | 188 | case "file": |
| 189 | - $retval .= "<tr><td>" . $this->displayName($option['name']) . "</td><td>$language</td><td>"; |
|
| 189 | + $retval .= "<tr><td>".$this->displayName($option['name'])."</td><td>$language</td><td>"; |
|
| 190 | 190 | switch ($option['name']) { |
| 191 | 191 | case "general:logo_file": |
| 192 | 192 | case "fed:logo_file": |
| 193 | - $retval .= $this->previewImageinHTML('ROWID-' . $option['level'] . '-' . $option['row']); |
|
| 193 | + $retval .= $this->previewImageinHTML('ROWID-'.$option['level'].'-'.$option['row']); |
|
| 194 | 194 | break; |
| 195 | 195 | case "eap:ca_file": |
| 196 | 196 | // fall-through intended: display both the same way |
| 197 | 197 | case "fed:minted_ca_file": |
| 198 | - $retval .= $this->previewCAinHTML('ROWID-' . $option['level'] . '-' . $option['row']); |
|
| 198 | + $retval .= $this->previewCAinHTML('ROWID-'.$option['level'].'-'.$option['row']); |
|
| 199 | 199 | break; |
| 200 | 200 | case "support:info_file": |
| 201 | - $retval .= $this->previewInfoFileinHTML('ROWID-' . $option['level'] . '-' . $option['row']); |
|
| 201 | + $retval .= $this->previewInfoFileinHTML('ROWID-'.$option['level'].'-'.$option['row']); |
|
| 202 | 202 | break; |
| 203 | 203 | default: |
| 204 | 204 | } |
@@ -208,10 +208,10 @@ discard block |
||
| 208 | 208 | // do not display the option at all; it gets auto-set by the ProfileSilverbullet constructor and doesn't have to be seen |
| 209 | 209 | break; |
| 210 | 210 | } |
| 211 | - $retval .= "<tr><td>" . $this->displayName($option['name']) . "</td><td>$language</td><td><strong>" . ($content == "on" ? _("on") : _("off") ) . "</strong></td></tr>"; |
|
| 211 | + $retval .= "<tr><td>".$this->displayName($option['name'])."</td><td>$language</td><td><strong>".($content == "on" ? _("on") : _("off"))."</strong></td></tr>"; |
|
| 212 | 212 | break; |
| 213 | 213 | default: |
| 214 | - $retval .= "<tr><td>" . $this->displayName($option['name']) . "</td><td>$language</td><td><strong>$content</strong></td></tr>"; |
|
| 214 | + $retval .= "<tr><td>".$this->displayName($option['name'])."</td><td>$language</td><td><strong>$content</strong></td></tr>"; |
|
| 215 | 215 | } |
| 216 | 216 | } |
| 217 | 217 | } |
@@ -220,11 +220,11 @@ discard block |
||
| 220 | 220 | $locationCount = 0; |
| 221 | 221 | foreach ($locationMarkers as $g) { |
| 222 | 222 | $locationCount++; |
| 223 | - $marker .= '<marker name="' . $locationCount . '" lat="' . $g['lat'] . '" lng="' . $g['lon'] . '" />'; |
|
| 223 | + $marker .= '<marker name="'.$locationCount.'" lat="'.$g['lat'].'" lng="'.$g['lon'].'" />'; |
|
| 224 | 224 | } |
| 225 | 225 | $marker .= '<\/markers>'; // some validator says this should be escaped |
| 226 | 226 | $jMarker = json_encode($locationMarkers); |
| 227 | - $retval .= '<tr><td><script>markers=\'' . $marker . '\'; jmarkers = \'' . $jMarker . '\';</script></td><td></td><td></td></tr>'; |
|
| 227 | + $retval .= '<tr><td><script>markers=\''.$marker.'\'; jmarkers = \''.$jMarker.'\';</script></td><td></td><td></td></tr>'; |
|
| 228 | 228 | } |
| 229 | 229 | \core\common\Entity::outOfThePotatoes(); |
| 230 | 230 | return $retval; |
@@ -240,11 +240,11 @@ discard block |
||
| 240 | 240 | \core\common\Entity::intoThePotatoes(); |
| 241 | 241 | $idpoptions = $myInst->getAttributes(); |
| 242 | 242 | $retval = "<div class='infobox'> |
| 243 | - <h2>" . sprintf(_("General %s details"), $this->nomenclatureInst) . "</h2> |
|
| 243 | + <h2>" . sprintf(_("General %s details"), $this->nomenclatureInst)."</h2> |
|
| 244 | 244 | <table> |
| 245 | 245 | <tr> |
| 246 | 246 | <td> |
| 247 | - " . _("Country:") . " |
|
| 247 | + " . _("Country:")." |
|
| 248 | 248 | </td> |
| 249 | 249 | <td> |
| 250 | 250 | </td> |
@@ -254,16 +254,16 @@ discard block |
||
| 254 | 254 | $retval .= $myFed->name; |
| 255 | 255 | $retval .= "</strong> |
| 256 | 256 | </td> |
| 257 | - </tr>" . $this->infoblock($idpoptions, "general", "IdP") . " |
|
| 257 | + </tr>" . $this->infoblock($idpoptions, "general", "IdP")." |
|
| 258 | 258 | </table> |
| 259 | 259 | </div>"; |
| 260 | 260 | |
| 261 | 261 | $blocks = [["support", _("Global Helpdesk Details")], ["media", _("Media Properties")]]; |
| 262 | 262 | foreach ($blocks as $block) { |
| 263 | 263 | $retval .= "<div class='infobox'> |
| 264 | - <h2>" . $block[1] . "</h2> |
|
| 264 | + <h2>" . $block[1]."</h2> |
|
| 265 | 265 | <table>" . |
| 266 | - $this->infoblock($idpoptions, $block[0], "IdP") . |
|
| 266 | + $this->infoblock($idpoptions, $block[0], "IdP"). |
|
| 267 | 267 | "</table> |
| 268 | 268 | </div>"; |
| 269 | 269 | } |
@@ -278,12 +278,12 @@ discard block |
||
| 278 | 278 | */ |
| 279 | 279 | private function displaySize(int $number) { |
| 280 | 280 | if ($number > 1024 * 1024) { |
| 281 | - return round($number / 1024 / 1024, 2) . " MiB"; |
|
| 281 | + return round($number / 1024 / 1024, 2)." MiB"; |
|
| 282 | 282 | } |
| 283 | 283 | if ($number > 1024) { |
| 284 | - return round($number / 1024, 2) . " KiB"; |
|
| 284 | + return round($number / 1024, 2)." KiB"; |
|
| 285 | 285 | } |
| 286 | - return $number . " B"; |
|
| 286 | + return $number." B"; |
|
| 287 | 287 | } |
| 288 | 288 | |
| 289 | 289 | /** |
@@ -338,7 +338,7 @@ discard block |
||
| 338 | 338 | $ref = $validator->databaseReference($cAReference); |
| 339 | 339 | $rawResult = UIElements::getBlobFromDB($ref['table'], $ref['rowindex'], FALSE); |
| 340 | 340 | if (is_bool($rawResult)) { // we didn't actually get a CA! |
| 341 | - $retval = "<div class='ca-summary'>" . _("There was an error while retrieving the certificate from the database!") . "</div>"; |
|
| 341 | + $retval = "<div class='ca-summary'>"._("There was an error while retrieving the certificate from the database!")."</div>"; |
|
| 342 | 342 | \core\common\Entity::outOfThePotatoes(); |
| 343 | 343 | return $retval; |
| 344 | 344 | } |
@@ -354,13 +354,13 @@ discard block |
||
| 354 | 354 | |
| 355 | 355 | $details['name'] = preg_replace('/(.)\/(.)/', "$1<br/>$2", $details['name']); |
| 356 | 356 | $details['name'] = preg_replace('/\//', "", $details['name']); |
| 357 | - $certstatus = ( $details['root'] == 1 ? "R" : "I"); |
|
| 357 | + $certstatus = ($details['root'] == 1 ? "R" : "I"); |
|
| 358 | 358 | if ($details['ca'] == 0 && $details['root'] != 1) { |
| 359 | - $retval = "<div class='ca-summary' style='background-color:red'><div style='position:absolute; right: 0px; width:20px; height:20px; background-color:maroon; border-radius:10px; text-align: center;'><div style='padding-top:3px; font-weight:bold; color:#ffffff;'>S</div></div>" . _("This is a <strong>SERVER</strong> certificate!") . "<br/>" . $details['name'] . "</div>"; |
|
| 359 | + $retval = "<div class='ca-summary' style='background-color:red'><div style='position:absolute; right: 0px; width:20px; height:20px; background-color:maroon; border-radius:10px; text-align: center;'><div style='padding-top:3px; font-weight:bold; color:#ffffff;'>S</div></div>"._("This is a <strong>SERVER</strong> certificate!")."<br/>".$details['name']."</div>"; |
|
| 360 | 360 | \core\common\Entity::outOfThePotatoes(); |
| 361 | 361 | return $retval; |
| 362 | 362 | } |
| 363 | - $retval = "<div class='ca-summary' ><div style='position:absolute; right: 0px; width:20px; height:20px; background-color:#0000ff; border-radius:10px; text-align: center;'><div style='padding-top:3px; font-weight:bold; color:#ffffff;'>$certstatus</div></div>" . $details['name'] . "</div>"; |
|
| 363 | + $retval = "<div class='ca-summary' ><div style='position:absolute; right: 0px; width:20px; height:20px; background-color:#0000ff; border-radius:10px; text-align: center;'><div style='padding-top:3px; font-weight:bold; color:#ffffff;'>$certstatus</div></div>".$details['name']."</div>"; |
|
| 364 | 364 | \core\common\Entity::outOfThePotatoes(); |
| 365 | 365 | return $retval; |
| 366 | 366 | } |
@@ -373,7 +373,7 @@ discard block |
||
| 373 | 373 | */ |
| 374 | 374 | public function previewImageinHTML($imageReference) { |
| 375 | 375 | \core\common\Entity::intoThePotatoes(); |
| 376 | - $retval = "<img style='max-width:150px' src='inc/filepreview.php?id=" . $imageReference . "' alt='" . _("Preview of logo file") . "'/>"; |
|
| 376 | + $retval = "<img style='max-width:150px' src='inc/filepreview.php?id=".$imageReference."' alt='"._("Preview of logo file")."'/>"; |
|
| 377 | 377 | \core\common\Entity::outOfThePotatoes(); |
| 378 | 378 | return $retval; |
| 379 | 379 | } |
@@ -390,13 +390,13 @@ discard block |
||
| 390 | 390 | $ref = $validator->databaseReference($fileReference); |
| 391 | 391 | $fileBlob = UIElements::getBlobFromDB($ref['table'], $ref['rowindex'], FALSE); |
| 392 | 392 | if (is_bool($fileBlob)) { // we didn't actually get a file! |
| 393 | - $retval = "<div class='ca-summary'>" . _("There was an error while retrieving the file from the database!") . "</div>"; |
|
| 393 | + $retval = "<div class='ca-summary'>"._("There was an error while retrieving the file from the database!")."</div>"; |
|
| 394 | 394 | \core\common\Entity::outOfThePotatoes(); |
| 395 | 395 | return $retval; |
| 396 | 396 | } |
| 397 | 397 | $decodedFileBlob = base64_decode($fileBlob); |
| 398 | 398 | $fileinfo = new \finfo(); |
| 399 | - $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>"; |
|
| 399 | + $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>"; |
|
| 400 | 400 | \core\common\Entity::outOfThePotatoes(); |
| 401 | 401 | return $retval; |
| 402 | 402 | } |
@@ -424,7 +424,7 @@ discard block |
||
| 424 | 424 | $retval .= "<tr><td>"; |
| 425 | 425 | } |
| 426 | 426 | $finalCaption = ($caption !== NULL ? $caption : $uiMessages[$level]['text']); |
| 427 | - $retval .= "<img class='icon' src='" . $uiMessages[$level]['icon'] . "' alt='" . $finalCaption . "' title='" . $finalCaption . "'/>"; |
|
| 427 | + $retval .= "<img class='icon' src='".$uiMessages[$level]['icon']."' alt='".$finalCaption."' title='".$finalCaption."'/>"; |
|
| 428 | 428 | if (!$omittabletags) { |
| 429 | 429 | $retval .= "</td><td>"; |
| 430 | 430 | } |
@@ -505,8 +505,8 @@ discard block |
||
| 505 | 505 | return ""; |
| 506 | 506 | } |
| 507 | 507 | |
| 508 | - $loggerInstance->debug(4, "Consortium logo is at: " . ROOT . "/web/resources/images/consortium_logo_large.png"); |
|
| 509 | - $logogd = imagecreatefrompng(ROOT . "/web/resources/images/consortium_logo_large.png"); |
|
| 508 | + $loggerInstance->debug(4, "Consortium logo is at: ".ROOT."/web/resources/images/consortium_logo_large.png"); |
|
| 509 | + $logogd = imagecreatefrompng(ROOT."/web/resources/images/consortium_logo_large.png"); |
|
| 510 | 510 | if ($logogd === FALSE) { // consortium logo is bogus; don't do anything |
| 511 | 511 | return ""; |
| 512 | 512 | } |
@@ -532,7 +532,7 @@ discard block |
||
| 532 | 532 | imagecolorallocate($whiteimage, 255, 255, 255); |
| 533 | 533 | // also make sure the initial placement is a multitude of 12; otherwise "two half" symbols might be affected |
| 534 | 534 | $targetplacementx = (int) ($symbolsize * round(($sizeinput[0] / 2 - ($targetwidth - $symbolsize + 1) / 2) / $symbolsize)); |
| 535 | - $targetplacementy = (int) ($symbolsize * round(($sizeinput[1] / 2 - ($targetheight - $symbolsize + 1 ) / 2) / $symbolsize)); |
|
| 535 | + $targetplacementy = (int) ($symbolsize * round(($sizeinput[1] / 2 - ($targetheight - $symbolsize + 1) / 2) / $symbolsize)); |
|
| 536 | 536 | imagecopyresized($inputgd, $whiteimage, $targetplacementx - $symbolsize, $targetplacementy - $symbolsize, 0, 0, $targetwidth + 2 * $symbolsize, $targetheight + 2 * $symbolsize, $targetwidth + 2 * $symbolsize, $targetheight + 2 * $symbolsize); |
| 537 | 537 | imagecopyresized($inputgd, $logogd, $targetplacementx, $targetplacementy, 0, 0, $targetwidth, $targetheight, $sizelogo[0], $sizelogo[1]); |
| 538 | 538 | ob_start(); |