@@ -98,7 +98,7 @@ |
||
98 | 98 | $country[$key] = $row['country']; |
99 | 99 | $name[$key] = $row['name']; |
100 | 100 | } |
101 | - echo "<tr><th>" . sprintf(_("%s Name"), $uiElements->nomenclature_inst) . "</th><th>" . sprintf(_("Other admins of this %s"), $uiElements->nomenclature_inst) . "</th><th>" . ( CONFIG['DB']['INST']['readonly'] === FALSE ? _("Administrator Management") : "") . "</th></tr>"; |
|
101 | + echo "<tr><th>" . sprintf(_("%s Name"), $uiElements->nomenclature_inst) . "</th><th>" . sprintf(_("Other admins of this %s"), $uiElements->nomenclature_inst) . "</th><th>" . (CONFIG['DB']['INST']['readonly'] === FALSE ? _("Administrator Management") : "") . "</th></tr>"; |
|
102 | 102 | foreach ($myFeds as $fed_id => $fed_name) { |
103 | 103 | echo "<tr><td colspan='3'><strong>" . sprintf(_("%s %s: %s list"), $uiElements->nomenclature_fed, $fed_name, $uiElements->nomenclature_inst) . "</strong></td></tr>"; |
104 | 104 |
@@ -28,7 +28,7 @@ |
||
28 | 28 | 'mailer', |
29 | 29 | ]; |
30 | 30 | |
31 | -if (CONFIG['FUNCTIONALITY_LOCATIONS']['CONFASSISTANT_SILVERBULLET'] == "LOCAL" || CONFIG['FUNCTIONALITY_LOCATIONS']['CONFASSISTANT_RADIUS'] == "LOCAL" ) { |
|
31 | +if (CONFIG['FUNCTIONALITY_LOCATIONS']['CONFASSISTANT_SILVERBULLET'] == "LOCAL" || CONFIG['FUNCTIONALITY_LOCATIONS']['CONFASSISTANT_RADIUS'] == "LOCAL") { |
|
32 | 32 | $Tests[] = 'makensis'; |
33 | 33 | $Tests[] = 'makensis=>NSISmodules'; |
34 | 34 | } |
@@ -239,7 +239,7 @@ |
||
239 | 239 | // leave his mail address, remove him/her from the list of recipients |
240 | 240 | foreach (Logopath::CATEGORYBINDING as $index => $functionName) { |
241 | 241 | if (in_array(Logopath::ENDUSER, $theMail[$index]) && $this->userEmail === FALSE) { |
242 | - $theMail[$index] = array_diff($theMail[$index], [Logopath::ENDUSER] ); |
|
242 | + $theMail[$index] = array_diff($theMail[$index], [Logopath::ENDUSER]); |
|
243 | 243 | } |
244 | 244 | } |
245 | 245 |
@@ -103,7 +103,7 @@ 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 | 108 | } |
109 | 109 | |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | } |
214 | 214 | if (isset($this->attributes['general:logo_file'])) { |
215 | 215 | $this->loggerInstance->debug(5, "saving IDP logo\n"); |
216 | - $this->attributes['internal:logo_file'] = $this->saveLogoFile($this->attributes['general:logo_file'],'idp'); |
|
216 | + $this->attributes['internal:logo_file'] = $this->saveLogoFile($this->attributes['general:logo_file'], 'idp'); |
|
217 | 217 | } |
218 | 218 | if (isset($this->attributes['fed:logo_file'])) { |
219 | 219 | $this->loggerInstance->debug(5, "saving FED logo\n"); |
@@ -585,7 +585,7 @@ discard block |
||
585 | 585 | * @return array list of filenames and the mime types |
586 | 586 | * @throws Exception |
587 | 587 | */ |
588 | - private function saveLogoFile($logos,$type) { |
|
588 | + private function saveLogoFile($logos, $type) { |
|
589 | 589 | $iterator = 0; |
590 | 590 | $returnarray = []; |
591 | 591 | foreach ($logos as $blob) { |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | 2 => ["AREA" => AbstractTest::INFRA_DEVICE, |
63 | 63 | "TXT" => _("Did the device previously work when roaming, i.e. at other hotspots away from your home institution?"), |
64 | 64 | "FACTOR" => 0.33, |
65 | - "VERDICTLECTURE" => sprintf(_("If roaming consistently does not work, then very likely your device configuration is wrong. Typical errors causing this symptom include: using a routing ('outer') username without the @realm.tld suffix - those potentially work at home, but can not be used when roaming. %s"),$confAssistantText)], |
|
65 | + "VERDICTLECTURE" => sprintf(_("If roaming consistently does not work, then very likely your device configuration is wrong. Typical errors causing this symptom include: using a routing ('outer') username without the @realm.tld suffix - those potentially work at home, but can not be used when roaming. %s"), $confAssistantText)], |
|
66 | 66 | 3 => ["AREA" => AbstractTest::INFRA_DEVICE, |
67 | 67 | "TXT" => _("Did you recently change the configuration on your device?"), |
68 | 68 | "FACTOR" => 3, |
@@ -100,12 +100,12 @@ discard block |
||
100 | 100 | $questionDetails = $this->qaArray[$questionNumber]; |
101 | 101 | if ($answer === TRUE) { |
102 | 102 | $this->possibleFailureReasons[$questionDetails['AREA']] = $this->possibleFailureReasons[$questionDetails['AREA']] * $questionDetails["FACTOR"]; |
103 | - $this->loggerInstance->debug(3,"Adjusting ".$questionDetails['AREA']." by ".$questionDetails["FACTOR"]."\n"); |
|
103 | + $this->loggerInstance->debug(3, "Adjusting " . $questionDetails['AREA'] . " by " . $questionDetails["FACTOR"] . "\n"); |
|
104 | 104 | $factor = $questionDetails["FACTOR"]; |
105 | 105 | } elseif ($answer === FALSE) { |
106 | 106 | $this->possibleFailureReasons[$questionDetails['AREA']] = $this->possibleFailureReasons[$questionDetails['AREA']] / $questionDetails["FACTOR"]; |
107 | - $this->loggerInstance->debug(3,"Adjusting ".$questionDetails['AREA']." by 1/".$questionDetails["FACTOR"]."\n"); |
|
108 | - $factor = 1/$questionDetails["FACTOR"]; |
|
107 | + $this->loggerInstance->debug(3, "Adjusting " . $questionDetails['AREA'] . " by 1/" . $questionDetails["FACTOR"] . "\n"); |
|
108 | + $factor = 1 / $questionDetails["FACTOR"]; |
|
109 | 109 | } else { |
110 | 110 | $factor = 1; |
111 | 111 | } |
@@ -114,8 +114,8 @@ discard block |
||
114 | 114 | $this->additionalFindings["QUESTIONSASKED"] = $this->previousQuestions; |
115 | 115 | $_SESSION["SUSPECTS"] = $this->possibleFailureReasons; |
116 | 116 | $_SESSION["EVIDENCE"] = $this->additionalFindings; |
117 | - $this->loggerInstance->debug(3,$_SESSION['SUSPECTS']); |
|
118 | - $this->loggerInstance->debug(3,$_SESSION['EVIDENCE']); |
|
117 | + $this->loggerInstance->debug(3, $_SESSION['SUSPECTS']); |
|
118 | + $this->loggerInstance->debug(3, $_SESSION['EVIDENCE']); |
|
119 | 119 | } |
120 | 120 | |
121 | 121 | /** |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | // if both are identical, take any of the questions in the pool of both |
135 | 135 | foreach ($this->qaArray as $questionNumber => $questionDetails) { |
136 | 136 | // if we find a question we didn't ask before AND it is related to our currently high-scoring problem area, ask it |
137 | - if (!array_key_exists($questionNumber, $this->previousQuestions) && ( $questionDetails["AREA"] == $highestCategory || $questionDetails["AREA"] == $nextCategory) ) { |
|
137 | + if (!array_key_exists($questionNumber, $this->previousQuestions) && ($questionDetails["AREA"] == $highestCategory || $questionDetails["AREA"] == $nextCategory)) { |
|
138 | 138 | return json_encode(["NEXTEXISTS" => TRUE, "NUMBER" => $questionNumber, "TEXT" => $questionDetails["TXT"]]); |
139 | 139 | } |
140 | 140 | } |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | * @return string JSON encoded array with all the info we have |
148 | 148 | */ |
149 | 149 | public function getCurrentGuessState() { |
150 | - return json_encode([ "SUSPECTS" => $this->possibleFailureReasons, "EVIDENCE" => $this->additionalFindings ]); |
|
150 | + return json_encode(["SUSPECTS" => $this->possibleFailureReasons, "EVIDENCE" => $this->additionalFindings]); |
|
151 | 151 | } |
152 | 152 | |
153 | 153 | /** |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | $text = $this->genericVerdictTexts[$area]; |
160 | 160 | foreach ($this->previousQuestions as $number => $factor) { |
161 | 161 | if ($this->qaArray[$number]["AREA"] == $area && $factor > 1) { |
162 | - $text .= "\n\n".$this->qaArray[$number]["VERDICTLECTURE"]; |
|
162 | + $text .= "\n\n" . $this->qaArray[$number]["VERDICTLECTURE"]; |
|
163 | 163 | } |
164 | 164 | } |
165 | 165 | return $text; |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | <select id='lang' name='lang' onchange='this.form.submit()'>"; |
66 | 66 | |
67 | 67 | foreach (CONFIG['LANGUAGES'] as $lang => $value) { |
68 | - $retval .= "<option value='$lang' " . (strtoupper($language) == strtoupper($lang) ? "selected" : "" ) . " >" . $value['display'] . "</option> "; |
|
68 | + $retval .= "<option value='$lang' " . (strtoupper($language) == strtoupper($lang) ? "selected" : "") . " >" . $value['display'] . "</option> "; |
|
69 | 69 | } |
70 | 70 | $retval .= "</select>"; |
71 | 71 | |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | $advancedControls = TRUE; |
124 | 124 | switch ($area) { |
125 | 125 | case "ADMIN-IDP": |
126 | - $cap2 = sprintf(_("Administrator Interface - Identity Provider"),$this->ui->nomenclature_inst); |
|
126 | + $cap2 = sprintf(_("Administrator Interface - Identity Provider"), $this->ui->nomenclature_inst); |
|
127 | 127 | break; |
128 | 128 | case "ADMIN-IDP-USERS": |
129 | 129 | $cap2 = sprintf(_("Administrator Interface - %s User Management"), \core\ProfileSilverbullet::PRODUCTNAME); |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | $cap2 = _("Management of User Details"); |
136 | 136 | break; |
137 | 137 | case "FEDERATION": |
138 | - $cap2 = sprintf(_("Administrator Interface - %s Management"),$this->ui->nomenclature_fed); |
|
138 | + $cap2 = sprintf(_("Administrator Interface - %s Management"), $this->ui->nomenclature_fed); |
|
139 | 139 | break; |
140 | 140 | case "USER": |
141 | 141 | $cap1 = sprintf(_("Welcome to %s"), CONFIG['APPEARANCE']['productname']); |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | // content from here on will SCROLL instead of being fixed at the top |
158 | 158 | $retval .= "<div class='pagecontent'>"; // closes in footer again |
159 | 159 | $retval .= "<div class='trick'>"; // closes in footer again |
160 | - $retval .= "<div id='secondrow' style='border-bottom:5px solid ".CONFIG['APPEARANCE']['colour1']."; min-height:100px;'> |
|
160 | + $retval .= "<div id='secondrow' style='border-bottom:5px solid " . CONFIG['APPEARANCE']['colour1'] . "; min-height:100px;'> |
|
161 | 161 | <div id='secondarycaptions' style='display:inline-block; float:left'> |
162 | 162 | <h2>$cap2</h2> |
163 | 163 | </div><!--secondarycaptions-->"; |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | $cutoffPosition = strrpos($_SERVER['PHP_SELF'], "/"); |
203 | 203 | } |
204 | 204 | |
205 | - $cssUrl = "//" . $this->validator->hostname($_SERVER['SERVER_NAME']) . substr($_SERVER['PHP_SELF'], 0, $cutoffPosition )."/resources/css/cat.css.php"; |
|
205 | + $cssUrl = "//" . $this->validator->hostname($_SERVER['SERVER_NAME']) . substr($_SERVER['PHP_SELF'], 0, $cutoffPosition) . "/resources/css/cat.css.php"; |
|
206 | 206 | |
207 | 207 | $retval .= "<link rel='stylesheet' type='text/css' href='$cssUrl' />"; |
208 | 208 | $retval .= "<title>" . htmlspecialchars($pagetitle) . "</title>"; |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | $cutoffPosition = strrpos($_SERVER['PHP_SELF'], "/"); |
231 | 231 | } |
232 | 232 | |
233 | - $logoBase = "//" . $this->validator->hostname($_SERVER['SERVER_NAME']) . substr($_SERVER['PHP_SELF'], 0, $cutoffPosition)."/resources/images"; |
|
233 | + $logoBase = "//" . $this->validator->hostname($_SERVER['SERVER_NAME']) . substr($_SERVER['PHP_SELF'], 0, $cutoffPosition) . "/resources/images"; |
|
234 | 234 | |
235 | 235 | return "<span id='logos' style='position:fixed; left:50%;'><img src='$logoBase/dante.png' alt='DANTE' style='height:23px;width:47px'/> |
236 | 236 | <img src='$logoBase/eu.png' alt='EU' style='height:23px;width:27px;border-width:0px;'/></span> |
@@ -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 | } |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | public function listIdPs() { |
142 | 142 | $instList = $this->orderIdentityProviders($this->country->tld); |
143 | 143 | $out = ''; |
144 | - $out .= sprintf(_("Select your %s"), $this->nomenclature_inst ); |
|
144 | + $out .= sprintf(_("Select your %s"), $this->nomenclature_inst); |
|
145 | 145 | $out .= '<select name="idp" onchange="submit_form(this)">'; |
146 | 146 | if (!empty($instList)) { |
147 | 147 | if (!isset($this->idp)) { |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | } |
236 | 236 | } |
237 | 237 | $out .= '>' . $disp . '</option>'; |
238 | - $deviceRedirects .= 'redirects[' . $iterator . '] = ' . ( $oneDevice['redirect'] ? 1 : 0 ) . ';'; |
|
238 | + $deviceRedirects .= 'redirects[' . $iterator . '] = ' . ($oneDevice['redirect'] ? 1 : 0) . ';'; |
|
239 | 239 | $iterator++; |
240 | 240 | } |
241 | 241 | $out .= '</select>'; |
@@ -429,7 +429,7 @@ discard block |
||
429 | 429 | </script> |
430 | 430 | </head> |
431 | 431 | <body style=""> |
432 | - <?php print '<div id="motd">' . ( isset(CONFIG['APPEARANCE']['MOTD']) ? CONFIG['APPEARANCE']['MOTD'] : ' ' ) . '</div>'; ?> |
|
432 | + <?php print '<div id="motd">' . (isset(CONFIG['APPEARANCE']['MOTD']) ? CONFIG['APPEARANCE']['MOTD'] : ' ') . '</div>'; ?> |
|
433 | 433 | <form name="my_form" method="POST" action="<?php echo $_SERVER['SCRIPT_NAME'] ?>" accept-charset='UTF-8'> |
434 | 434 | <img src="<?php echo $skinObject->findResourceUrl("IMAGES", "consortium_logo.png"); ?>" style="width: 20%; padding-right:20px; padding-top:0px; float:right" alt="logo" /> |
435 | 435 | <?php |