@@ -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 | } |
@@ -85,7 +85,7 @@ |
||
85 | 85 | } |
86 | 86 | if ($passedTheWindmill) { |
87 | 87 | if (substr($schemaLine, 0, 1) == '(') { // a relevant line in schema |
88 | - $this->profile_option_ct = $this->profile_option_ct+1; |
|
88 | + $this->profile_option_ct = $this->profile_option_ct + 1; |
|
89 | 89 | } else { // anything else, quit parsing |
90 | 90 | break; |
91 | 91 | } |
@@ -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) { |
@@ -216,7 +216,7 @@ |
||
216 | 216 | * realm (and indirectly that of the links and statuses of involved proxies |
217 | 217 | * and returns a judgment whether external Monitoring API tests are warranted |
218 | 218 | * or not |
219 | - * @return boolean TRUE if external tests have to be run |
|
219 | + * @return boolean|null TRUE if external tests have to be run |
|
220 | 220 | */ |
221 | 221 | private function CATInternalTests() { |
222 | 222 | // we are expecting to get a REJECT from all runs, because that means the packet got through to the IdP. |
@@ -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; |
@@ -131,6 +131,7 @@ discard block |
||
131 | 131 | * |
132 | 132 | * @param string $device |
133 | 133 | * @param AbstractProfile $profile |
134 | + * @param string $generatedFor |
|
134 | 135 | * @return array info about the new installer (mime and link) |
135 | 136 | */ |
136 | 137 | private function generateNewInstaller($device, $profile, $generatedFor, $token, $password) { |
@@ -719,6 +720,7 @@ discard block |
||
719 | 720 | /** |
720 | 721 | * Order active identity providers according to their distance and name |
721 | 722 | * @param array $currentLocation - current location |
723 | + * @param string $country |
|
722 | 724 | * @return array $IdPs - list of arrays ('id', 'name'); |
723 | 725 | */ |
724 | 726 | public function orderIdentityProviders($country, $currentLocation = NULL) { |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | 'getUserCerts', |
40 | 40 | ]; |
41 | 41 | |
42 | -function getRequest($varName,$filter) { |
|
42 | +function getRequest($varName, $filter) { |
|
43 | 43 | $safeText = ["options"=>["regexp"=>"/^[\w\d-]+$/"]]; |
44 | 44 | switch ($filter) { |
45 | 45 | case 'safe_text': |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | |
58 | 58 | // make sure this is a known action |
59 | 59 | $actionR = getRequest('action', 'safe_text'); |
60 | -$action = array_search($actionR,LISTOFACTIONS) ? $actionR : FALSE; |
|
60 | +$action = array_search($actionR, LISTOFACTIONS) ? $actionR : FALSE; |
|
61 | 61 | if ($action === FALSE) { |
62 | 62 | exit; |
63 | 63 | } |
@@ -65,18 +65,18 @@ discard block |
||
65 | 65 | $lang = $langR ? $validator->supportedLanguage($langR) : FALSE; |
66 | 66 | $deviceR = getRequest('device', 'safe_text'); |
67 | 67 | $device = $deviceR ? $validator->Device($deviceR) : FALSE; |
68 | -$idpR = getRequest('idp','int'); |
|
68 | +$idpR = getRequest('idp', 'int'); |
|
69 | 69 | $idp = $idpR ? $validator->IdP($idpR)->identifier : FALSE; |
70 | -$profileR = getRequest('profile','int'); |
|
70 | +$profileR = getRequest('profile', 'int'); |
|
71 | 71 | $profile = $profileR ? $validator->Profile($profileR)->identifier : FALSE; |
72 | -$federationR = getRequest('federation','safe_text'); |
|
72 | +$federationR = getRequest('federation', 'safe_text'); |
|
73 | 73 | $federation = $federationR ? $validator->Federation($deviceR)->tld : FALSE; |
74 | -$disco = getRequest('disco','int'); |
|
75 | -$width = getRequest('width','int') ?? 0; |
|
76 | -$height = getRequest('height','int') ?? 0; |
|
77 | -$sort = getRequest('sort','int') ?? 0; |
|
78 | -$generatedforR = getRequest('generatedfor','safe_text') ?? 'user'; |
|
79 | -$token = getRequest('token','safe_text'); |
|
74 | +$disco = getRequest('disco', 'int'); |
|
75 | +$width = getRequest('width', 'int') ?? 0; |
|
76 | +$height = getRequest('height', 'int') ?? 0; |
|
77 | +$sort = getRequest('sort', 'int') ?? 0; |
|
78 | +$generatedforR = getRequest('generatedfor', 'safe_text') ?? 'user'; |
|
79 | +$token = getRequest('token', 'safe_text'); |
|
80 | 80 | |
81 | 81 | |
82 | 82 | switch ($action) { |
@@ -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 |