@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | <th>Device</th> |
119 | 119 | <th>Admin Downloads</th> |
120 | 120 | <th>User Downloads (classic)</th> |
121 | - <th>User Downloads (<?php echo \core\ProfileSilverbullet::PRODUCTNAME;?>)</th> |
|
121 | + <th>User Downloads (<?php echo \core\ProfileSilverbullet::PRODUCTNAME; ?>)</th> |
|
122 | 122 | <th>User Downloads (total)</th> |
123 | 123 | </tr> |
124 | 124 | <?php |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | $admin_query = $dbHandle->exec("SELECT SUM(downloads_admin) AS admin, SUM(downloads_user) AS user, SUM(downloads_silverbullet) as silverbullet FROM downloads WHERE device_id = '$index'"); |
131 | 131 | // SELECT -> mysqli_result, not boolean |
132 | 132 | while ($a = mysqli_fetch_object(/** @scrutinizer ignore-type */ $admin_query)) { |
133 | - echo "<td>" . $device_array['display'] . "</td><td>" . $a->admin . "</td><td>" . $a->user . "</td><td>" . $a->silverbullet . "</td><td>" . sprintf("%s",$a->user + $a->silverbullet) . "</td>"; |
|
133 | + echo "<td>" . $device_array['display'] . "</td><td>" . $a->admin . "</td><td>" . $a->user . "</td><td>" . $a->silverbullet . "</td><td>" . sprintf("%s", $a->user + $a->silverbullet) . "</td>"; |
|
134 | 134 | $gross_admin = $gross_admin + $a->admin; |
135 | 135 | $gross_user = $gross_user + $a->user; |
136 | 136 | $gross_silverbullet = $gross_silverbullet + $a->silverbullet; |
@@ -30,16 +30,16 @@ |
||
30 | 30 | * destination. |
31 | 31 | */ |
32 | 32 | |
33 | -$tempdir = __DIR__."/temp_ocsp"; |
|
33 | +$tempdir = __DIR__ . "/temp_ocsp"; |
|
34 | 34 | mkdir($tempdir); |
35 | 35 | |
36 | 36 | $allStatements = $dbLink->exec("SELECT serial_number,OCSP FROM silverbullet_certificate WHERE serial_number IS NOT NULL AND expiry > NOW() AND OCSP_timestamp > DATE_SUB(NOW(), INTERVAL 8 DAY)"); |
37 | 37 | // SELECT -> mysqli_result, not boolean |
38 | 38 | while ($statementRow = mysqli_fetch_object(/** @scrutinizer ignore-type */ $allStatements)) { |
39 | 39 | # echo "Writing OCSP statement for serial number $statementRow->serial_number\n"; |
40 | - $filename = strtoupper(dechex($statementRow->serial_number)).".der"; |
|
40 | + $filename = strtoupper(dechex($statementRow->serial_number)) . ".der"; |
|
41 | 41 | if (strlen($filename) % 2 == 1) { |
42 | 42 | $filename = "0" . $filename; |
43 | 43 | } |
44 | - file_put_contents($tempdir."/$filename", $statementRow->OCSP); |
|
44 | + file_put_contents($tempdir . "/$filename", $statementRow->OCSP); |
|
45 | 45 | } |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | case "core\User": |
115 | 115 | return $this->userName; |
116 | 116 | default: |
117 | - throw new Exception("Operating on a class where we don't know the relevant identifier in the DB - ".get_class($this)."!"); |
|
117 | + throw new Exception("Operating on a class where we don't know the relevant identifier in the DB - " . get_class($this) . "!"); |
|
118 | 118 | } |
119 | 119 | } |
120 | 120 | |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | $handle = DBConnection::handle("INST"); |
246 | 246 | $blobQuery = $handle->exec("SELECT option_value from $table WHERE row = $row"); |
247 | 247 | // SELECT -> returns resource, not boolean |
248 | - while ($returnedData = /** @scrutinizer ignore-type */ mysqli_fetch_object($blobQuery)) { |
|
248 | + while ($returnedData = /** @scrutinizer ignore-type */ mysqli_fetch_object($blobQuery)) { |
|
249 | 249 | $blob = $returnedData->option_value; |
250 | 250 | } |
251 | 251 | if (!isset($blob)) { |
@@ -549,7 +549,7 @@ |
||
549 | 549 | if (count($logoAttribute) == 0) { |
550 | 550 | return(NULL); |
551 | 551 | } |
552 | - $this->loggerInstance->debug(4,"RESIZE:$width:$height\n"); |
|
552 | + $this->loggerInstance->debug(4, "RESIZE:$width:$height\n"); |
|
553 | 553 | $meta = $this->processImage($logoAttribute[0]['value'], $logoFile, $width, $height, $resize); |
554 | 554 | $filetype = $meta['filetype']; |
555 | 555 | $expiresString = $meta['expires']; |
@@ -124,7 +124,7 @@ |
||
124 | 124 | * @return string |
125 | 125 | */ |
126 | 126 | private function zipInstaller($attr) { |
127 | - if (count($attr)==0) { |
|
127 | + if (count($attr) == 0) { |
|
128 | 128 | // never mind, just checking. You CAN use the $attr array to extract |
129 | 129 | // information about the IdP/Profile if there's a need |
130 | 130 | } |
@@ -103,9 +103,9 @@ discard block |
||
103 | 103 | $dummy_inst2 = _("organisation"); |
104 | 104 | // and do something useless with the strings so that there's no "unused" complaint |
105 | 105 | // by Scrutinizer |
106 | - if( $dummy_NRO . $dummy_inst1 . $dummy_inst2 == "") { |
|
106 | + if ($dummy_NRO . $dummy_inst1 . $dummy_inst2 == "") { |
|
107 | 107 | // oh well. |
108 | - explode(' ',$dummy_NRO); |
|
108 | + explode(' ', $dummy_NRO); |
|
109 | 109 | } |
110 | 110 | |
111 | 111 | $this->nomenclature_fed = _(CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_federation']); |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | } |
215 | 215 | if (isset($this->attributes['general:logo_file'])) { |
216 | 216 | $this->loggerInstance->debug(5, "saving IDP logo\n"); |
217 | - $this->attributes['internal:logo_file'] = $this->saveLogoFile($this->attributes['general:logo_file'],'idp'); |
|
217 | + $this->attributes['internal:logo_file'] = $this->saveLogoFile($this->attributes['general:logo_file'], 'idp'); |
|
218 | 218 | } |
219 | 219 | if (isset($this->attributes['fed:logo_file'])) { |
220 | 220 | $this->loggerInstance->debug(5, "saving FED logo\n"); |
@@ -586,7 +586,7 @@ discard block |
||
586 | 586 | * @return array list of filenames and the mime types |
587 | 587 | * @throws Exception |
588 | 588 | */ |
589 | - private function saveLogoFile($logos,$type) { |
|
589 | + private function saveLogoFile($logos, $type) { |
|
590 | 590 | $iterator = 0; |
591 | 591 | $returnarray = []; |
592 | 592 | foreach ($logos as $blob) { |
@@ -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 | } |
@@ -14,6 +14,6 @@ |
||
14 | 14 | $validator = new \web\lib\common\InputValidation(); |
15 | 15 | |
16 | 16 | echo "<pre>"; |
17 | -echo "Testing ".$validator->realm(filter_input(INPUT_GET,'realm', FILTER_SANITIZE_STRING))." in ".$validator->string(filter_input(INPUT_GET, 'visited', FILTER_SANITIZE_STRING)); |
|
17 | +echo "Testing " . $validator->realm(filter_input(INPUT_GET, 'realm', FILTER_SANITIZE_STRING)) . " in " . $validator->string(filter_input(INPUT_GET, 'visited', FILTER_SANITIZE_STRING)); |
|
18 | 18 | print_r($telepath->magic()); |
19 | 19 | echo "</pre>"; |
@@ -29,6 +29,6 @@ |
||
29 | 29 | $link = \core\ProfileSilverbullet::generateTokenLink($cleanToken); |
30 | 30 | header("Content-Type:text/html;charset=utf-8"); |
31 | 31 | ?> |
32 | -<h1 style='text-align:center;'><?php echo _("Invitation Token QR Code");?></h1> |
|
33 | -<img style='float:none' src='data:image/png;base64,<?php echo base64_encode($uiElements->pngInjectConsortiumLogo(\QRcode::png($link, FALSE, QR_ECLEVEL_Q, 11), 11));?>'/> |
|
34 | -<p>(<a href='<?php echo $link;?>'><?php echo $link;?>)</a></p> |
|
32 | +<h1 style='text-align:center;'><?php echo _("Invitation Token QR Code"); ?></h1> |
|
33 | +<img style='float:none' src='data:image/png;base64,<?php echo base64_encode($uiElements->pngInjectConsortiumLogo(\QRcode::png($link, FALSE, QR_ECLEVEL_Q, 11), 11)); ?>'/> |
|
34 | +<p>(<a href='<?php echo $link; ?>'><?php echo $link; ?>)</a></p> |