@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | |
| 105 | 105 | $optioninfo = \core\Options::instance(); |
| 106 | 106 | |
| 107 | - if (is_array($prepopulate) && ( count($prepopulate) > 1 || $class == "device-specific" || $class == "eap-specific")) { // editing... fill with values |
|
| 107 | + if (is_array($prepopulate) && (count($prepopulate) > 1 || $class == "device-specific" || $class == "eap-specific")) { // editing... fill with values |
|
| 108 | 108 | foreach ($prepopulate as $option) { |
| 109 | 109 | if (preg_match("/$class:/", $option['name']) && !preg_match("/(user:fedadmin)/", $option['name'])) { |
| 110 | 110 | $optiontypearray = $optioninfo->optionType($option['name']); |
@@ -272,7 +272,7 @@ discard block |
||
| 272 | 272 | $retval .= "<input readonly style='display:none' type='text' name='value[S$rowid-" . \core\Options::TYPECODE_TEXT . "]' id='S$rowid-input-text' value='$optionValue'>$link"; |
| 273 | 273 | break; |
| 274 | 274 | case \core\Options::TYPECODE_FILE: |
| 275 | - $retval .= "<input readonly type='text' name='value[S$rowid-".\core\Options::TYPECODE_STRING."]' id='S" . $rowid . "-input-string' style='display:none' value='" . urlencode($optionValue) . "'>"; |
|
| 275 | + $retval .= "<input readonly type='text' name='value[S$rowid-" . \core\Options::TYPECODE_STRING . "]' id='S" . $rowid . "-input-string' style='display:none' value='" . urlencode($optionValue) . "'>"; |
|
| 276 | 276 | $uiElements = new UIElements(); |
| 277 | 277 | switch ($optionName) { |
| 278 | 278 | case "eap:ca_file": |
@@ -340,7 +340,7 @@ discard block |
||
| 340 | 340 | $retval .= " |
| 341 | 341 | |
| 342 | 342 | <td> |
| 343 | - <button type='button' class='delete' onclick='deleteOption(" . ( $prefillValue !== NULL && $item == "general:geo_coordinates" ? $this->allLocationCount : 0 ) . ",\"option-S" . $rowid . "\")'>-</button> |
|
| 343 | + <button type='button' class='delete' onclick='deleteOption(" . ($prefillValue !== NULL && $item == "general:geo_coordinates" ? $this->allLocationCount : 0) . ",\"option-S" . $rowid . "\")'>-</button> |
|
| 344 | 344 | </td> |
| 345 | 345 | </tr>"; |
| 346 | 346 | return $retval; |
@@ -188,11 +188,11 @@ discard block |
||
| 188 | 188 | $logoCount = count($logosToPlace); |
| 189 | 189 | if ($logoCount > 0) { |
| 190 | 190 | $voffset = $freeTop; |
| 191 | - $freeSpace = (int)round($this->background['freeHeight'] / ($logoCount + 1)); |
|
| 191 | + $freeSpace = (int) round($this->background['freeHeight'] / ($logoCount + 1)); |
|
| 192 | 192 | foreach ($logosToPlace as $logo) { |
| 193 | 193 | $voffset += $freeSpace; |
| 194 | 194 | $logoSize = $logo->getImageGeometry(); |
| 195 | - $hoffset = (int)round(($bgImageSize['width'] - $logoSize['width']) / 2); |
|
| 195 | + $hoffset = (int) round(($bgImageSize['width'] - $logoSize['width']) / 2); |
|
| 196 | 196 | $bgImage->compositeImage($logo, $logo->getImageCompose(), $hoffset, $voffset); |
| 197 | 197 | $voffset += $logoSize['height']; |
| 198 | 198 | } |
@@ -233,7 +233,7 @@ discard block |
||
| 233 | 233 | ]; |
| 234 | 234 | $s = "support_" . $type . "_substitute"; |
| 235 | 235 | $substitute = $this->translateString($this->$s, $this->codePage); |
| 236 | - $returnValue = !empty($attr['support:' . $type][0]) ? $attr['support:' . $type][0] : $substitute; |
|
| 236 | + $returnValue = !empty($attr['support:' . $type][0]) ? $attr['support:' . $type][0] : $substitute; |
|
| 237 | 237 | return('!define ' . $supportString[$type] . ' "' . $returnValue . '"' . "\n"); |
| 238 | 238 | } |
| 239 | 239 | |
@@ -244,7 +244,7 @@ discard block |
||
| 244 | 244 | $fcontents .= "\n" . '!define USER_GROUP "' . $this->translateString(str_replace('"', '$\\"', $attr['profile:name'][0]), $this->codePage) . '" |
| 245 | 245 | '; |
| 246 | 246 | } |
| 247 | - $fcontents .= ' |
|
| 247 | + $fcontents .= ' |
|
| 248 | 248 | Caption "' . $this->translateString(sprintf(WindowsCommon::sprint_nsi(_("%s installer for %s")), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $attr['general:instname'][0]), $this->codePage) . '" |
| 249 | 249 | !define APPLICATION "' . $this->translateString(sprintf(WindowsCommon::sprint_nsi(_("%s installer for %s")), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $attr['general:instname'][0]), $this->codePage) . '" |
| 250 | 250 | !define VERSION "' . \core\CAT::VERSION_MAJOR . '.' . \core\CAT::VERSION_MINOR . '" |
@@ -266,11 +266,11 @@ discard block |
||
| 266 | 266 | $fcontents .= '!define REALM "' . $attr['internal:realm'][0] . '" |
| 267 | 267 | '; |
| 268 | 268 | } |
| 269 | - if(!empty($attr['internal:hint_userinput_suffix'][0]) && $attr['internal:hint_userinput_suffix'][0] == 1) { |
|
| 269 | + if (!empty($attr['internal:hint_userinput_suffix'][0]) && $attr['internal:hint_userinput_suffix'][0] == 1) { |
|
| 270 | 270 | $fcontents .= '!define HINT_USER_INPUT "' . $attr['internal:hint_userinput_suffix'][0] . '" |
| 271 | 271 | '; |
| 272 | 272 | } |
| 273 | - if(!empty($attr['internal:verify_userinput_suffix'][0]) && $attr['internal:verify_userinput_suffix'][0] == 1) { |
|
| 273 | + if (!empty($attr['internal:verify_userinput_suffix'][0]) && $attr['internal:verify_userinput_suffix'][0] == 1) { |
|
| 274 | 274 | $fcontents .= '!define VERIFY_USER_REALM_INPUT "' . $attr['internal:verify_userinput_suffix'][0] . '" |
| 275 | 275 | '; |
| 276 | 276 | } |
@@ -32,4 +32,4 @@ |
||
| 32 | 32 | |
| 33 | 33 | |
| 34 | 34 | // and now, serve actual data |
| 35 | -include("skins/".$skinObject->skin."/basic.php"); |
|
| 35 | +include("skins/" . $skinObject->skin . "/basic.php"); |
|
@@ -539,47 +539,47 @@ |
||
| 539 | 539 | ["SETTING" => CONFIG['APPEARANCE']['from-mail'], |
| 540 | 540 | "DEFVALUE" => "[email protected]", |
| 541 | 541 | "COMPLAINTSTRING" => "APPEARANCE/from-mail ", |
| 542 | - "REQUIRED" => FALSE,], |
|
| 542 | + "REQUIRED" => FALSE, ], |
|
| 543 | 543 | ["SETTING" => CONFIG['APPEARANCE']['support-contact']['url'], |
| 544 | 544 | "DEFVALUE" => "[email protected]?body=Only%20English%20language%20please!", |
| 545 | 545 | "COMPLAINTSTRING" => "APPEARANCE/support-contact/url ", |
| 546 | - "REQUIRED" => FALSE,], |
|
| 546 | + "REQUIRED" => FALSE, ], |
|
| 547 | 547 | ["SETTING" => CONFIG['APPEARANCE']['support-contact']['display'], |
| 548 | 548 | "DEFVALUE" => "[email protected]", |
| 549 | 549 | "COMPLAINTSTRING" => "APPEARANCE/support-contact/display ", |
| 550 | - "REQUIRED" => FALSE,], |
|
| 550 | + "REQUIRED" => FALSE, ], |
|
| 551 | 551 | ["SETTING" => CONFIG['APPEARANCE']['support-contact']['developer-mail'], |
| 552 | 552 | "DEFVALUE" => "[email protected]", |
| 553 | 553 | "COMPLAINTSTRING" => "APPEARANCE/support-contact/mail ", |
| 554 | - "REQUIRED" => FALSE,], |
|
| 554 | + "REQUIRED" => FALSE, ], |
|
| 555 | 555 | ["SETTING" => CONFIG['APPEARANCE']['abuse-mail'], |
| 556 | 556 | "DEFVALUE" => "[email protected]", |
| 557 | 557 | "COMPLAINTSTRING" => "APPEARANCE/abuse-mail ", |
| 558 | - "REQUIRED" => FALSE,], |
|
| 558 | + "REQUIRED" => FALSE, ], |
|
| 559 | 559 | ["SETTING" => CONFIG['APPEARANCE']['MOTD'], |
| 560 | 560 | "DEFVALUE" => "Release Candidate. All bugs to be shot on sight!", |
| 561 | 561 | "COMPLAINTSTRING" => "APPEARANCE/MOTD ", |
| 562 | - "REQUIRED" => FALSE,], |
|
| 562 | + "REQUIRED" => FALSE, ], |
|
| 563 | 563 | ["SETTING" => CONFIG['APPEARANCE']['webcert_CRLDP'], |
| 564 | 564 | "DEFVALUE" => ['list', 'of', 'CRL', 'pointers'], |
| 565 | 565 | "COMPLAINTSTRING" => "APPEARANCE/webcert_CRLDP ", |
| 566 | - "REQUIRED" => TRUE,], |
|
| 566 | + "REQUIRED" => TRUE, ], |
|
| 567 | 567 | ["SETTING" => CONFIG['APPEARANCE']['webcert_OCSP'], |
| 568 | 568 | "DEFVALUE" => ['list', 'of', 'OCSP', 'pointers'], |
| 569 | 569 | "COMPLAINTSTRING" => "APPEARANCE/webcert_OCSP ", |
| 570 | - "REQUIRED" => TRUE,], |
|
| 570 | + "REQUIRED" => TRUE, ], |
|
| 571 | 571 | ["SETTING" => CONFIG['DB']['INST']['host'], |
| 572 | 572 | "DEFVALUE" => "db.host.example", |
| 573 | 573 | "COMPLAINTSTRING" => "DB/INST ", |
| 574 | - "REQUIRED" => TRUE,], |
|
| 574 | + "REQUIRED" => TRUE, ], |
|
| 575 | 575 | ["SETTING" => CONFIG['DB']['INST']['host'], |
| 576 | 576 | "DEFVALUE" => "db.host.example", |
| 577 | 577 | "COMPLAINTSTRING" => "DB/USER ", |
| 578 | - "REQUIRED" => TRUE,], |
|
| 578 | + "REQUIRED" => TRUE, ], |
|
| 579 | 579 | ["SETTING" => CONFIG['DB']['EXTERNAL']['host'], |
| 580 | 580 | "DEFVALUE" => "customerdb.otherhost.example", |
| 581 | 581 | "COMPLAINTSTRING" => "DB/EXTERNAL ", |
| 582 | - "REQUIRED" => FALSE,], |
|
| 582 | + "REQUIRED" => FALSE, ], |
|
| 583 | 583 | ]; |
| 584 | 584 | |
| 585 | 585 | /** |
@@ -28,6 +28,6 @@ |
||
| 28 | 28 | $invitationObject = new core\SilverbulletInvitation($validator->token(filter_input(INPUT_POST, 'token'))); |
| 29 | 29 | header("Content-Type:text/html;charset=utf-8"); |
| 30 | 30 | ?> |
| 31 | -<h1 style='text-align:center;'><?php echo _("Invitation Token QR Code");?></h1> |
|
| 32 | -<img style='float:none' src='data:image/png;base64,<?php echo base64_encode($uiElements->pngInjectConsortiumLogo(\QRcode::png($invitationObject->link(), FALSE, QR_ECLEVEL_Q, 11), 11));?>'/> |
|
| 33 | -<p>(<a href='<?php echo $link;?>'><?php echo $link;?>)</a></p> |
|
| 31 | +<h1 style='text-align:center;'><?php echo _("Invitation Token QR Code"); ?></h1> |
|
| 32 | +<img style='float:none' src='data:image/png;base64,<?php echo base64_encode($uiElements->pngInjectConsortiumLogo(\QRcode::png($invitationObject->link(), FALSE, QR_ECLEVEL_Q, 11), 11)); ?>'/> |
|
| 33 | +<p>(<a href='<?php echo $link; ?>'><?php echo $link; ?>)</a></p> |
|
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | // it can be VALID (exists and not redeemed, EXPIRED, REDEEMED or INVALID (non existent) |
| 37 | 37 | $invitationObject = new core\SilverbulletInvitation($cleanToken); |
| 38 | 38 | } |
| 39 | -} elseif (isset($_SERVER['SSL_CLIENT_SAN_Email']) || isset($_SERVER['SSL_CLIENT_SAN_Email_0']) ) { |
|
| 39 | +} elseif (isset($_SERVER['SSL_CLIENT_SAN_Email']) || isset($_SERVER['SSL_CLIENT_SAN_Email_0'])) { |
|
| 40 | 40 | // maybe the user authenticated with his client cert? Then pick any of his |
| 41 | 41 | // tokens to go on |
| 42 | 42 | $certname = $_SERVER['SSL_CLIENT_SAN_Email'] ?? $_SERVER['SSL_CLIENT_SAN_Email_0']; |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | |
| 61 | 61 | $statusInfo = ["token" => $cleanToken, |
| 62 | 62 | "invitation_object" => $invitationObject, |
| 63 | - "OS" => $Gui->operatingSystem,]; |
|
| 63 | + "OS" => $Gui->operatingSystem, ]; |
|
| 64 | 64 | |
| 65 | 65 | if ($profile !== NULL) { |
| 66 | 66 | $attributes = $Gui->profileAttributes($profile->identifier); |
@@ -455,7 +455,7 @@ |
||
| 455 | 455 | $indexStatement = "$certstatus\t$expiryIndexTxt\t" . ($certstatus == "R" ? "$nowIndexTxt,unspecified" : "") . "\t$serialHex\tunknown\t/O=" . CONFIG_CONFASSISTANT['CONSORTIUM']['name'] . "/OU=$federation/CN=$cn/emailAddress=$cn\n"; |
| 456 | 456 | $logHandle->debug(4, "index.txt contents-to-be: $indexStatement"); |
| 457 | 457 | if (!file_put_contents($tempdir . "/index.txt", $indexStatement)) { |
| 458 | - $logHandle->debug(1,"Unable to write openssl index.txt file for revocation handling!"); |
|
| 458 | + $logHandle->debug(1, "Unable to write openssl index.txt file for revocation handling!"); |
|
| 459 | 459 | } |
| 460 | 460 | // index.txt.attr is dull but needs to exist |
| 461 | 461 | file_put_contents($tempdir . "/index.txt.attr", "unique_subject = yes\n"); |
@@ -133,7 +133,7 @@ |
||
| 133 | 133 | $certificatesNumber = ($certificatesResult ? $certificatesResult->num_rows : 0); |
| 134 | 134 | $this->loggerInstance->debug(5, "At token validation level, " . $certificatesNumber . " certificates exist.\n"); |
| 135 | 135 | $this->associatedCertificates = \core\ProfileSilverbullet::enumerateCertDetails(/** @scrutinizer ignore-type */ $certificatesResult); |
| 136 | - $this->activationsRemaining = (int)$this->activationsTotal - (int)$certificatesNumber; |
|
| 136 | + $this->activationsRemaining = (int) $this->activationsTotal - (int) $certificatesNumber; |
|
| 137 | 137 | switch ($certificatesNumber) { |
| 138 | 138 | case 0: |
| 139 | 139 | // find out if it has expired |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | */ |
| 11 | 11 | require_once(dirname(dirname(__DIR__)) . "/config/_config.php"); |
| 12 | 12 | $realm = filter_input(INPUT_GET, 'realm', FILTER_SANITIZE_STRING); |
| 13 | -$visited = filter_input(INPUT_GET,'visited', FILTER_SANITIZE_STRING); |
|
| 13 | +$visited = filter_input(INPUT_GET, 'visited', FILTER_SANITIZE_STRING); |
|
| 14 | 14 | if (session_status() != PHP_SESSION_ACTIVE) { |
| 15 | 15 | session_start(); |
| 16 | 16 | } |