@@ -206,8 +206,7 @@ |
||
| 206 | 206 | $cutoffPosition = strrpos($_SERVER['PHP_SELF'], "accountstatus/"); |
| 207 | 207 | } elseif (strrpos($_SERVER['PHP_SELF'], "diag/")) { |
| 208 | 208 | $cutoffPosition = strrpos($_SERVER['PHP_SELF'], "diag/"); |
| 209 | - } |
|
| 210 | - else { |
|
| 209 | + } else { |
|
| 211 | 210 | $cutoffPosition = strrpos($_SERVER['PHP_SELF'], "/"); |
| 212 | 211 | } |
| 213 | 212 | |
@@ -124,8 +124,7 @@ |
||
| 124 | 124 | $out .= "Config.eap_inner = '" . $eapMethod['INNER'] . "'\n"; |
| 125 | 125 | if ($this->selectedEap == \core\common\EAP::EAPTYPE_TLS && isset($this->attributes['eap-specific:tls_use_other_id']) && $this->attributes['eap-specific:tls_use_other_id'][0] == 'on') { |
| 126 | 126 | $out .= "Config.use_other_tls_id = True\n"; |
| 127 | - } |
|
| 128 | - else { |
|
| 127 | + } else { |
|
| 129 | 128 | $out .= "Config.use_other_tls_id = False\n"; |
| 130 | 129 | } |
| 131 | 130 | $tou = $this->mkUserConsent(); |
@@ -96,6 +96,12 @@ |
||
| 96 | 96 | */ |
| 97 | 97 | protected $frontendHandle; |
| 98 | 98 | |
| 99 | + /** |
|
| 100 | + * @param integer $idpIdentifier |
|
| 101 | + * @param string $deviceId |
|
| 102 | + * @param string $area |
|
| 103 | + * @param string $lang |
|
| 104 | + */ |
|
| 99 | 105 | protected function saveDownloadDetails($idpIdentifier, $profileId, $deviceId, $area, $lang, $eapType) { |
| 100 | 106 | if (CONFIG['PATHS']['logdir']) { |
| 101 | 107 | $file = fopen(CONFIG['PATHS']['logdir'] . "/download_details.log", "a"); |
@@ -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. |
@@ -254,7 +254,7 @@ |
||
| 254 | 254 | * create a CSR |
| 255 | 255 | * |
| 256 | 256 | * @param resource $privateKey the private key to create the CSR with |
| 257 | - * @return array with the CSR and some meta info |
|
| 257 | + * @return integer with the CSR and some meta info |
|
| 258 | 258 | */ |
| 259 | 259 | private function generateCsr($privateKey) { |
| 260 | 260 | // token leads us to the NRO, to set the OU property of the cert |
@@ -138,6 +138,7 @@ discard block |
||
| 138 | 138 | * |
| 139 | 139 | * @param string $device |
| 140 | 140 | * @param AbstractProfile $profile |
| 141 | + * @param string $generatedFor |
|
| 141 | 142 | * @return array info about the new installer (mime and link) |
| 142 | 143 | */ |
| 143 | 144 | private function generateNewInstaller($device, $profile, $generatedFor, $token, $password) { |
@@ -327,6 +328,7 @@ discard block |
||
| 327 | 328 | * @param string either 'idp' or 'federation' is allowed |
| 328 | 329 | * @param int $width maximum width of the generated image - if 0 then it is treated as no upper bound |
| 329 | 330 | * @param int $height maximum height of the generated image - if 0 then it is treated as no upper bound |
| 331 | + * @param string $type |
|
| 330 | 332 | * @return array|null array with image information or NULL if there is no logo |
| 331 | 333 | */ |
| 332 | 334 | protected function getLogo($identifier, $type, $width = 0, $height = 0) { |
@@ -371,6 +373,10 @@ discard block |
||
| 371 | 373 | return ["filetype" => $filetype, "expires" => $expiresString, "blob" => $blob]; |
| 372 | 374 | } |
| 373 | 375 | |
| 376 | + /** |
|
| 377 | + * @param integer $width |
|
| 378 | + * @param integer $height |
|
| 379 | + */ |
|
| 374 | 380 | private function testForResize($width, $height) { |
| 375 | 381 | if (is_numeric($width) && is_numeric($height) && ($width > 0 || $height > 0)) { |
| 376 | 382 | if ($height == 0) { |
@@ -474,6 +480,7 @@ discard block |
||
| 474 | 480 | /** |
| 475 | 481 | * Order active identity providers according to their distance and name |
| 476 | 482 | * @param array $currentLocation - current location |
| 483 | + * @param string $country |
|
| 477 | 484 | * @return array $IdPs - list of arrays ('id', 'name'); |
| 478 | 485 | */ |
| 479 | 486 | public function orderIdentityProviders($country, $currentLocation = NULL) { |
@@ -142,6 +142,9 @@ discard block |
||
| 142 | 142 | return $retval; |
| 143 | 143 | } |
| 144 | 144 | |
| 145 | + /** |
|
| 146 | + * @param integer $rowid |
|
| 147 | + */ |
|
| 145 | 148 | private function selectElement($rowid, $list) { |
| 146 | 149 | $jsmagic = "onchange=' |
| 147 | 150 | if (/#ML#/.test(document.getElementById(\"option-S" . $rowid . "-select\").value)) { |
@@ -183,6 +186,10 @@ discard block |
||
| 183 | 186 | return ["TEXT" => $retval, "ACTIVE" => $activelisttype]; |
| 184 | 187 | } |
| 185 | 188 | |
| 189 | + /** |
|
| 190 | + * @param integer $rowid |
|
| 191 | + * @param boolean $makeVisible |
|
| 192 | + */ |
|
| 186 | 193 | private function selectLanguage($rowid, $makeVisible) { |
| 187 | 194 | $retval = "<select style='display:" . ($makeVisible ? "block" : "none") . "' name='value[S$rowid-lang]' id='S" . $rowid . "-input-langselect'> |
| 188 | 195 | <option value='' name='select_language' selected>" . _("select language") . "</option> |
@@ -203,6 +210,9 @@ discard block |
||
| 203 | 210 | \core\Options::TYPECODE_TEXT => ["html" => "textarea cols='30' rows='3'", "tail" => '></textarea'], |
| 204 | 211 | ]; |
| 205 | 212 | |
| 213 | + /** |
|
| 214 | + * @param integer $rowid |
|
| 215 | + */ |
|
| 206 | 216 | private function inputFields($rowid, $activetype) { |
| 207 | 217 | $retval = ""; |
| 208 | 218 | foreach (OptionDisplay::HTML_DATATYPE_TEXTS as $key => $type) { |
@@ -235,7 +245,7 @@ discard block |
||
| 235 | 245 | * @param int $rowid the HTML field base name of the option to be displayed |
| 236 | 246 | * @param string $optionName the name of the option to display |
| 237 | 247 | * @param string $optionValue the value of the option to display |
| 238 | - * @param mixed $optionLang the language of the option to display |
|
| 248 | + * @param null|string $optionLang the language of the option to display |
|
| 239 | 249 | * @return string HTML code |
| 240 | 250 | * @throws Exception |
| 241 | 251 | */ |
@@ -287,6 +287,9 @@ discard block |
||
| 287 | 287 | } |
| 288 | 288 | } |
| 289 | 289 | |
| 290 | + /** |
|
| 291 | + * @param Type $eaptype |
|
| 292 | + */ |
|
| 290 | 293 | private function setServerSideCredentials($eaptype) { |
| 291 | 294 | $attr = $this->attributes; |
| 292 | 295 | $serversidecredential = new ServerSideCredential(); |
@@ -331,6 +334,9 @@ discard block |
||
| 331 | 334 | return($clientsidecredential); |
| 332 | 335 | } |
| 333 | 336 | |
| 337 | + /** |
|
| 338 | + * @param Type $eaptype |
|
| 339 | + */ |
|
| 334 | 340 | private function setEapMethod($eaptype) { |
| 335 | 341 | $attr = $this->attributes; |
| 336 | 342 | $eapmethod = new EAPMethod(); |
@@ -239,7 +239,6 @@ |
||
| 239 | 239 | /** |
| 240 | 240 | * revokes an invitation |
| 241 | 241 | * |
| 242 | - * @param int $invitationId |
|
| 243 | 242 | */ |
| 244 | 243 | public function revokeInvitation() { |
| 245 | 244 | $query = "UPDATE silverbullet_invitation SET expiry = NOW() WHERE id = ? AND profile_id = ?"; |