@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | <NodeName>Credential</NodeName> |
| 117 | 117 | <Node> |
| 118 | 118 | <NodeName>CreationDate</NodeName> |
| 119 | - <Value>'.$now->format("Y-m-d") . "T" . $now->format("H:i:s") . "Z".'</Value> |
|
| 119 | + <Value>'.$now->format("Y-m-d")."T".$now->format("H:i:s")."Z".'</Value> |
|
| 120 | 120 | </Node> |
| 121 | 121 | <Node> |
| 122 | 122 | <NodeName>DigitalCertificate</NodeName> |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | <NodeName>HomeSP</NodeName> |
| 139 | 139 | <Node> |
| 140 | 140 | <NodeName>FriendlyName</NodeName> |
| 141 | - <Value>'.sprintf(_("%s via Passpoint"),\config\ConfAssistant::CONSORTIUM['display_name']).'</Value> |
|
| 141 | + <Value>'.sprintf(_("%s via Passpoint"), \config\ConfAssistant::CONSORTIUM['display_name']).'</Value> |
|
| 142 | 142 | </Node> |
| 143 | 143 | <Node> |
| 144 | 144 | <NodeName>FQDN</NodeName> |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | $numberOfOi = count(\config\ConfAssistant::CONSORTIUM['interworking-consortium-oi']); |
| 152 | 152 | foreach (\config\ConfAssistant::CONSORTIUM['interworking-consortium-oi'] as $index => $oneOi) { |
| 153 | 153 | // according to spec, must be lowercase ASCII without dashes |
| 154 | - $oiList .= str_replace("-","",trim(strtolower($oneOi))); |
|
| 154 | + $oiList .= str_replace("-", "", trim(strtolower($oneOi))); |
|
| 155 | 155 | if ($index < $numberOfOi - 1) { |
| 156 | 156 | // according to spec, comma-separated |
| 157 | 157 | $oiList .= ","; |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | Content-Type: application/x-pkcs12 |
| 190 | 190 | Content-Transfer-Encoding: base64 |
| 191 | 191 | |
| 192 | -'.chunk_split(base64_encode($this->clientCert['certdataclear']), 76, "\n"). // is PKCS#12, with cleartext key |
|
| 192 | +'.chunk_split(base64_encode($this->clientCert['certdataclear']), 76, "\n").// is PKCS#12, with cleartext key |
|
| 193 | 193 | '--{boundary}'; |
| 194 | 194 | |
| 195 | 195 | // trail this with a double slash and a newline |
@@ -209,7 +209,7 @@ discard block |
||
| 209 | 209 | // have the notion of signing |
| 210 | 210 | // but if they ever change their mind, we are prepared |
| 211 | 211 | |
| 212 | - $outputFromSigning = system($this->sign . " installer_profile '$fileName' > /dev/null"); |
|
| 212 | + $outputFromSigning = system($this->sign." installer_profile '$fileName' > /dev/null"); |
|
| 213 | 213 | if ($outputFromSigning === FALSE) { |
| 214 | 214 | $this->loggerInstance->debug(2, "Signing the ONC installer $fileName FAILED!\n"); |
| 215 | 215 | } |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | $this->installerPath = $cache['path']; |
| 84 | 84 | if ($this->installerPath !== NULL && $token === NULL && $password === NULL) { |
| 85 | 85 | $this->loggerInstance->debug(4, "Using cached installer for: $device\n"); |
| 86 | - $installerProperties['link'] = "API.php?action=downloadInstaller&lang=" . $this->languageInstance->getLang() . "&profile=$profileId&device=$device&generatedfor=$generatedFor"; |
|
| 86 | + $installerProperties['link'] = "API.php?action=downloadInstaller&lang=".$this->languageInstance->getLang()."&profile=$profileId&device=$device&generatedfor=$generatedFor"; |
|
| 87 | 87 | $installerProperties['mime'] = $cache['mime']; |
| 88 | 88 | } else { |
| 89 | 89 | $myInstaller = $this->generateNewInstaller($device, $profile, $generatedFor, $token, $password); |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | $this->loggerInstance->debug(5, "generateNewInstaller() - Device setup done"); |
| 172 | 172 | $installer = $dev->writeInstaller(); |
| 173 | 173 | $this->loggerInstance->debug(5, "generateNewInstaller() - writeInstaller complete"); |
| 174 | - $iPath = $dev->FPATH . '/tmp/' . $installer; |
|
| 174 | + $iPath = $dev->FPATH.'/tmp/'.$installer; |
|
| 175 | 175 | if ($iPath && is_file($iPath)) { |
| 176 | 176 | if (isset($dev->options['mime'])) { |
| 177 | 177 | $out['mime'] = $dev->options['mime']; |
@@ -179,17 +179,17 @@ discard block |
||
| 179 | 179 | $info = new \finfo(); |
| 180 | 180 | $out['mime'] = $info->file($iPath, FILEINFO_MIME_TYPE); |
| 181 | 181 | } |
| 182 | - $this->installerPath = $dev->FPATH . '/' . $installer; |
|
| 182 | + $this->installerPath = $dev->FPATH.'/'.$installer; |
|
| 183 | 183 | rename($iPath, $this->installerPath); |
| 184 | 184 | $integerEap = (new \core\common\EAP($dev->selectedEap))->getIntegerRep(); |
| 185 | 185 | $profile->updateCache($device, $this->installerPath, $out['mime'], $integerEap); |
| 186 | 186 | if (\config\Master::DEBUG_LEVEL < 4) { |
| 187 | - \core\common\Entity::rrmdir($dev->FPATH . '/tmp'); |
|
| 187 | + \core\common\Entity::rrmdir($dev->FPATH.'/tmp'); |
|
| 188 | 188 | } |
| 189 | - $this->loggerInstance->debug(4, "Generated installer: " . $this->installerPath . ": for: $device, EAP:" . $integerEap . "\n"); |
|
| 190 | - $out['link'] = "API.php?action=downloadInstaller&lang=" . $this->languageInstance->getLang() . "&profile=" . $profile->identifier . "&device=$device&generatedfor=$generatedFor"; |
|
| 189 | + $this->loggerInstance->debug(4, "Generated installer: ".$this->installerPath.": for: $device, EAP:".$integerEap."\n"); |
|
| 190 | + $out['link'] = "API.php?action=downloadInstaller&lang=".$this->languageInstance->getLang()."&profile=".$profile->identifier."&device=$device&generatedfor=$generatedFor"; |
|
| 191 | 191 | } else { |
| 192 | - $this->loggerInstance->debug(2, "Installer generation failed for: " . $profile->identifier . ":$device:" . $this->languageInstance->getLang() . "\n"); |
|
| 192 | + $this->loggerInstance->debug(2, "Installer generation failed for: ".$profile->identifier.":$device:".$this->languageInstance->getLang()."\n"); |
|
| 193 | 193 | $out['link'] = 0; |
| 194 | 194 | } |
| 195 | 195 | } |
@@ -302,13 +302,13 @@ discard block |
||
| 302 | 302 | $file = $this->installerPath; |
| 303 | 303 | $filetype = $output['mime']; |
| 304 | 304 | $this->loggerInstance->debug(4, "installer MIME type:$filetype\n"); |
| 305 | - header("Content-type: " . $filetype); |
|
| 305 | + header("Content-type: ".$filetype); |
|
| 306 | 306 | if ($filetype !== "application/x-wifi-config") { // for those installers to work on Android, Content-Disposition MUST NOT be set |
| 307 | - header('Content-Disposition: inline; filename="' . basename($file) . '"'); |
|
| 307 | + header('Content-Disposition: inline; filename="'.basename($file).'"'); |
|
| 308 | 308 | } else { |
| 309 | 309 | header('Content-Transfer-Encoding: base64'); |
| 310 | 310 | } |
| 311 | - header('Content-Length: ' . filesize($file)); |
|
| 311 | + header('Content-Length: '.filesize($file)); |
|
| 312 | 312 | ob_clean(); |
| 313 | 313 | flush(); |
| 314 | 314 | readfile($file); |
@@ -329,7 +329,7 @@ discard block |
||
| 329 | 329 | $filetype = $info->buffer($inputImage, FILEINFO_MIME_TYPE); |
| 330 | 330 | $offset = 60 * 60 * 24 * 30; |
| 331 | 331 | // gmdate cannot fail here - time() is its default argument (and integer), and we are adding an integer to it |
| 332 | - $expiresString = "Expires: " . /** @scrutinizer ignore-type */ gmdate("D, d M Y H:i:s", time() + $offset) . " GMT"; |
|
| 332 | + $expiresString = "Expires: "./** @scrutinizer ignore-type */ gmdate("D, d M Y H:i:s", time() + $offset)." GMT"; |
|
| 333 | 333 | $blob = $inputImage; |
| 334 | 334 | |
| 335 | 335 | if ($resize === TRUE) { |
@@ -384,7 +384,7 @@ discard block |
||
| 384 | 384 | $filetype = 'image/png'; // default, only one code path where it can become different |
| 385 | 385 | list($width, $height, $resize) = $this->testForResize($widthIn, $heightIn); |
| 386 | 386 | if ($resize) { |
| 387 | - $logoFile = ROOT . '/web/downloads/logos/' . $identifier . '_' . $width . '_' . $height . '.png'; |
|
| 387 | + $logoFile = ROOT.'/web/downloads/logos/'.$identifier.'_'.$width.'_'.$height.'.png'; |
|
| 388 | 388 | } |
| 389 | 389 | if (is_file($logoFile)) { // $logoFile could be an empty string but then we will get a FALSE |
| 390 | 390 | $this->loggerInstance->debug(4, "Using cached logo $logoFile for: $identifier\n"); |
@@ -477,7 +477,7 @@ discard block |
||
| 477 | 477 | if (!isset($device['match'])) { |
| 478 | 478 | continue; |
| 479 | 479 | } |
| 480 | - if (preg_match('/' . $device['match'] . '/', $browser)) { |
|
| 480 | + if (preg_match('/'.$device['match'].'/', $browser)) { |
|
| 481 | 481 | return $this->returnDevice($devId, $device); |
| 482 | 482 | } |
| 483 | 483 | } |