@@ -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 | } |
@@ -47,9 +47,9 @@ discard block |
||
47 | 47 | $dummy_inst1 = _("identity provider"); |
48 | 48 | $dummy_inst2 = _("organisation"); |
49 | 49 | // and do something useless with the strings so that there's no "unused" complaint |
50 | - if ( $dummy_NRO . $dummy_inst1 . $dummy_inst2 == "") { |
|
50 | + if ($dummy_NRO . $dummy_inst1 . $dummy_inst2 == "") { |
|
51 | 51 | // Oh well. |
52 | - explode(' ',$dummy_NRO); |
|
52 | + explode(' ', $dummy_NRO); |
|
53 | 53 | } |
54 | 54 | $this->nomenclature_fed = _(CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_federation']); |
55 | 55 | $this->nomenclature_inst = _(CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_institution']); |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | } |
188 | 188 | break; |
189 | 189 | case "boolean": |
190 | - $retval .= "<tr><td>" . $this->displayName($option['name']) . "</td><td>$language</td><td><strong>" . ($content == "on" ? _("on") : _("off") ) . "</strong></td></tr>"; |
|
190 | + $retval .= "<tr><td>" . $this->displayName($option['name']) . "</td><td>$language</td><td><strong>" . ($content == "on" ? _("on") : _("off")) . "</strong></td></tr>"; |
|
191 | 191 | break; |
192 | 192 | default: |
193 | 193 | $retval .= "<tr><td>" . $this->displayName($option['name']) . "</td><td>$language</td><td><strong>$content</strong></td></tr>"; |
@@ -314,7 +314,7 @@ discard block |
||
314 | 314 | |
315 | 315 | private function checkROWIDpresence($reference) { |
316 | 316 | $found = preg_match("/^ROWID-.*/", $reference); |
317 | - if ($found != 1) { // get excited on not-found AND on execution error |
|
317 | + if ($found != 1) { // get excited on not-found AND on execution error |
|
318 | 318 | throw new Exception("Error, ROWID expected."); |
319 | 319 | } |
320 | 320 | } |
@@ -337,7 +337,7 @@ discard block |
||
337 | 337 | |
338 | 338 | $details['name'] = preg_replace('/(.)\/(.)/', "$1<br/>$2", $details['name']); |
339 | 339 | $details['name'] = preg_replace('/\//', "", $details['name']); |
340 | - $certstatus = ( $details['root'] == 1 ? "R" : "I"); |
|
340 | + $certstatus = ($details['root'] == 1 ? "R" : "I"); |
|
341 | 341 | if ($details['ca'] == 0 && $details['root'] != 1) { |
342 | 342 | return "<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>"; |
343 | 343 | } |
@@ -482,15 +482,15 @@ discard block |
||
482 | 482 | $scale = sqrt($maxoccupy / $totallogopixels); |
483 | 483 | $loggerInstance->debug(4, "Scaling info: $scale, $maxoccupy, $totallogopixels\n"); |
484 | 484 | // determine final pixel size - round to multitude of $symbolsize to match exact symbol boundary |
485 | - $targetwidth = $symbolsize * (int)round($sizelogo[0] * $scale / $symbolsize); |
|
486 | - $targetheight = $symbolsize * (int)round($sizelogo[1] * $scale / $symbolsize); |
|
485 | + $targetwidth = $symbolsize * (int) round($sizelogo[0] * $scale / $symbolsize); |
|
486 | + $targetheight = $symbolsize * (int) round($sizelogo[1] * $scale / $symbolsize); |
|
487 | 487 | // paint white below the logo, in case it has transparencies (looks bad) |
488 | 488 | // have one symbol in each direction extra white space |
489 | 489 | $whiteimage = imagecreate($targetwidth + 2 * $symbolsize, $targetheight + 2 * $symbolsize); |
490 | 490 | imagecolorallocate($whiteimage, 255, 255, 255); |
491 | 491 | // also make sure the initial placement is a multitude of 12; otherwise "two half" symbols might be affected |
492 | - $targetplacementx = $symbolsize * (int)round(($sizeinput[0] / 2 - ($targetwidth - $symbolsize) / 2) / $symbolsize); |
|
493 | - $targetplacementy = $symbolsize * (int)round(($sizeinput[1] / 2 - ($targetheight - $symbolsize) / 2) / $symbolsize); |
|
492 | + $targetplacementx = $symbolsize * (int) round(($sizeinput[0] / 2 - ($targetwidth - $symbolsize) / 2) / $symbolsize); |
|
493 | + $targetplacementy = $symbolsize * (int) round(($sizeinput[1] / 2 - ($targetheight - $symbolsize) / 2) / $symbolsize); |
|
494 | 494 | imagecopyresized($inputgd, $whiteimage, $targetplacementx - $symbolsize, $targetplacementy - $symbolsize, 0, 0, $targetwidth + 2 * $symbolsize, $targetheight + 2 * $symbolsize, $targetwidth + 2 * $symbolsize, $targetheight + 2 * $symbolsize); |
495 | 495 | imagecopyresized($inputgd, $logogd, $targetplacementx, $targetplacementy, 0, 0, $targetwidth, $targetheight, $sizelogo[0], $sizelogo[1]); |
496 | 496 | ob_start(); |