@@ -35,8 +35,8 @@ |
||
35 | 35 | * @author Tomasz Wolniewicz <[email protected]> |
36 | 36 | * @package ModuleWriting |
37 | 37 | */ |
38 | - class DeviceW8W10 extends WindowsCommon |
|
39 | - { |
|
38 | + class DeviceW8W10 extends WindowsCommon |
|
39 | + { |
|
40 | 40 | final public function __construct() { |
41 | 41 | parent::__construct(); |
42 | 42 | \core\common\Entity::intoThePotatoes(); |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | foreach ($this->attributes['internal:consortia'] as $oneCons) { |
98 | 98 | $knownOiName = array_search($oneCons, \config\ConfAssistant::CONSORTIUM['interworking-consortium-oi']); |
99 | 99 | if ($knownOiName === FALSE) { // a custom RCOI as set by the IdP admin; do not use the term "eduroam" in that one! |
100 | - $knownOiName = $this->attributes['general:instname'][0] . " "._("Roaming Partner") . " $roamingPartner"; |
|
100 | + $knownOiName = $this->attributes['general:instname'][0]." "._("Roaming Partner")." $roamingPartner"; |
|
101 | 101 | $roamingPartner++; |
102 | 102 | } |
103 | 103 | $ssid = 'cat-passpoint-profile'; |
@@ -149,12 +149,12 @@ discard block |
||
149 | 149 | if (empty($this->attributes['internal:realm'][0])) { |
150 | 150 | $retval .= \config\ConfAssistant::CONSORTIUM['interworking-domainname-fallback']; |
151 | 151 | } else { |
152 | - $retval .= $this->attributes['internal:realm'][0]; |
|
152 | + $retval .= $this->attributes['internal:realm'][0]; |
|
153 | 153 | } |
154 | 154 | $retval .= '</DomainName>'; |
155 | - $retval .= '<RoamingConsortium><OUI>' . $oi . |
|
155 | + $retval .= '<RoamingConsortium><OUI>'.$oi. |
|
156 | 156 | '</OUI></RoamingConsortium>'; |
157 | - $retval .= '</Hotspot2>'; |
|
157 | + $retval .= '</Hotspot2>'; |
|
158 | 158 | return($retval); |
159 | 159 | } |
160 | 160 | |
@@ -163,11 +163,11 @@ discard block |
||
163 | 163 | $profileFileCont = '<EAPConfig><EapHostConfig xmlns="http://www.microsoft.com/provisioning/EapHostConfig"> |
164 | 164 | <EapMethod> |
165 | 165 | '; |
166 | - $profileFileCont .= '<Type xmlns="http://www.microsoft.com/provisioning/EapCommon">' . |
|
167 | - $this->selectedEap["OUTER"] . '</Type> |
|
166 | + $profileFileCont .= '<Type xmlns="http://www.microsoft.com/provisioning/EapCommon">'. |
|
167 | + $this->selectedEap["OUTER"].'</Type> |
|
168 | 168 | <VendorId xmlns="http://www.microsoft.com/provisioning/EapCommon">0</VendorId> |
169 | 169 | <VendorType xmlns="http://www.microsoft.com/provisioning/EapCommon">0</VendorType> |
170 | -<AuthorId xmlns="http://www.microsoft.com/provisioning/EapCommon">' . $authorId . '</AuthorId> |
|
170 | +<AuthorId xmlns="http://www.microsoft.com/provisioning/EapCommon">' . $authorId.'</AuthorId> |
|
171 | 171 | </EapMethod> |
172 | 172 | '; |
173 | 173 | return($profileFileCont); |
@@ -178,10 +178,10 @@ discard block |
||
178 | 178 | <eapTls:ServerValidation> |
179 | 179 | <eapTls:DisableUserPromptForServerValidation>true</eapTls:DisableUserPromptForServerValidation> |
180 | 180 | '; |
181 | - $profileFileCont .= '<eapTls:ServerNames>' . $this->servers . '</eapTls:ServerNames>'; |
|
181 | + $profileFileCont .= '<eapTls:ServerNames>'.$this->servers.'</eapTls:ServerNames>'; |
|
182 | 182 | foreach ($this->caArray as $certAuthority) { |
183 | 183 | if ($certAuthority['root']) { |
184 | - $profileFileCont .= "<eapTls:TrustedRootCA>" . $certAuthority['sha1'] . "</eapTls:TrustedRootCA>\n"; |
|
184 | + $profileFileCont .= "<eapTls:TrustedRootCA>".$certAuthority['sha1']."</eapTls:TrustedRootCA>\n"; |
|
185 | 185 | } |
186 | 186 | } |
187 | 187 | $profileFileCont .= '</eapTls:ServerValidation> |
@@ -193,10 +193,10 @@ discard block |
||
193 | 193 | $profileFileCont = ' |
194 | 194 | <ServerValidation> |
195 | 195 | '; |
196 | - $profileFileCont .= '<ServerNames>' . $this->servers . '</ServerNames> '; |
|
196 | + $profileFileCont .= '<ServerNames>'.$this->servers.'</ServerNames> '; |
|
197 | 197 | foreach ($this->caArray as $certAuthority) { |
198 | 198 | if ($certAuthority['root']) { |
199 | - $profileFileCont .= "<TrustedRootCAHash>" . chunk_split($certAuthority['sha1'], 2, ' ') . "</TrustedRootCAHash>\n"; |
|
199 | + $profileFileCont .= "<TrustedRootCAHash>".chunk_split($certAuthority['sha1'], 2, ' ')."</TrustedRootCAHash>\n"; |
|
200 | 200 | } |
201 | 201 | } |
202 | 202 | $profileFileCont .= '<DisablePrompt>true</DisablePrompt> |
@@ -228,10 +228,10 @@ discard block |
||
228 | 228 | $profileFileCont = ' |
229 | 229 | <ServerValidation> |
230 | 230 | <DisableUserPromptForServerValidation>true</DisableUserPromptForServerValidation> |
231 | -<ServerNames>' . $this->servers . '</ServerNames>'; |
|
231 | +<ServerNames>' . $this->servers.'</ServerNames>'; |
|
232 | 232 | foreach ($this->caArray as $certAuthority) { |
233 | 233 | if ($certAuthority['root']) { |
234 | - $profileFileCont .= "<TrustedRootCA>" . $certAuthority['sha1'] . "</TrustedRootCA>\n"; |
|
234 | + $profileFileCont .= "<TrustedRootCA>".$certAuthority['sha1']."</TrustedRootCA>\n"; |
|
235 | 235 | } |
236 | 236 | } |
237 | 237 | $profileFileCont .= '</ServerValidation> |
@@ -287,7 +287,7 @@ discard block |
||
287 | 287 | if ($this->useAnon) { |
288 | 288 | $profileFileCont .= '<IdentityPrivacy>true</IdentityPrivacy> |
289 | 289 | '; |
290 | - $profileFileCont .= '<AnonymousIdentity>' . $this->outerId . '</AnonymousIdentity> |
|
290 | + $profileFileCont .= '<AnonymousIdentity>'.$this->outerId.'</AnonymousIdentity> |
|
291 | 291 | '; |
292 | 292 | } else { |
293 | 293 | $profileFileCont .= '<IdentityPrivacy>false</IdentityPrivacy> |
@@ -304,10 +304,10 @@ discard block |
||
304 | 304 | $profileFileCont = ' |
305 | 305 | <Config xmlns="http://www.microsoft.com/provisioning/EapHostConfig"> |
306 | 306 | <EAPIdentityProviderList xmlns="urn:ietf:params:xml:ns:yang:ietf-eap-metadata"> |
307 | -<EAPIdentityProvider ID="' . $this->deviceUUID . '" namespace="urn:UUID"> |
|
307 | +<EAPIdentityProvider ID="' . $this->deviceUUID.'" namespace="urn:UUID"> |
|
308 | 308 | |
309 | 309 | <ProviderInfo> |
310 | -<DisplayName>' . $this->translateString($this->attributes['general:instname'][0], $this->codePage) . '</DisplayName> |
|
310 | +<DisplayName>' . $this->translateString($this->attributes['general:instname'][0], $this->codePage).'</DisplayName> |
|
311 | 311 | </ProviderInfo> |
312 | 312 | <AuthenticationMethods> |
313 | 313 | <AuthenticationMethod> |
@@ -319,7 +319,7 @@ discard block |
||
319 | 319 | if ($this->outerUser == '') { |
320 | 320 | $profileFileCont .= '<AnonymousIdentity>@</AnonymousIdentity>'; |
321 | 321 | } else { |
322 | - $profileFileCont .= '<AnonymousIdentity>' . $this->outerId . '</AnonymousIdentity>'; |
|
322 | + $profileFileCont .= '<AnonymousIdentity>'.$this->outerId.'</AnonymousIdentity>'; |
|
323 | 323 | } |
324 | 324 | } |
325 | 325 | $profileFileCont .= '</ClientSideCredential> |
@@ -327,7 +327,7 @@ discard block |
||
327 | 327 | $profileFileCont .= $this->glTtlsServerValidation(); |
328 | 328 | $profileFileCont .= ' |
329 | 329 | <InnerAuthenticationMethod> |
330 | -<NonEAPAuthMethod>' . \core\common\EAP::eapDisplayName($this->selectedEap)['INNER'] . '</NonEAPAuthMethod> |
|
330 | +<NonEAPAuthMethod>' . \core\common\EAP::eapDisplayName($this->selectedEap)['INNER'].'</NonEAPAuthMethod> |
|
331 | 331 | </InnerAuthenticationMethod> |
332 | 332 | <VendorSpecific> |
333 | 333 | <SessionResumption>false</SessionResumption> |
@@ -358,7 +358,7 @@ discard block |
||
358 | 358 | <UseWinLogonCredentials>false</UseWinLogonCredentials> |
359 | 359 | </EapType> |
360 | 360 | </Eap> |
361 | -<EnableQuarantineChecks>' . $nea . '</EnableQuarantineChecks> |
|
361 | +<EnableQuarantineChecks>' . $nea.'</EnableQuarantineChecks> |
|
362 | 362 | <RequireCryptoBinding>false</RequireCryptoBinding> |
363 | 363 | '; |
364 | 364 | if ($this->useAnon) { |
@@ -370,7 +370,7 @@ discard block |
||
370 | 370 | $profileFileCont .= '<AnonymousUserName/> |
371 | 371 | '; |
372 | 372 | } else { |
373 | - $profileFileCont .= '<AnonymousUserName>' . $this->outerUser . '</AnonymousUserName> |
|
373 | + $profileFileCont .= '<AnonymousUserName>'.$this->outerUser.'</AnonymousUserName> |
|
374 | 374 | '; |
375 | 375 | } |
376 | 376 | $profileFileCont .= '</IdentityPrivacy> |
@@ -400,7 +400,7 @@ discard block |
||
400 | 400 | private function prepareEapConfig() { |
401 | 401 | if ($this->useAnon) { |
402 | 402 | $this->outerUser = $this->attributes['internal:anon_local_value'][0]; |
403 | - $this->outerId = $this->outerUser . '@' . $this->attributes['internal:realm'][0]; |
|
403 | + $this->outerId = $this->outerUser.'@'.$this->attributes['internal:realm'][0]; |
|
404 | 404 | } |
405 | 405 | |
406 | 406 | $profileFileCont = $this->eapConfigHeader(); |
@@ -425,7 +425,7 @@ discard block |
||
425 | 425 | default: |
426 | 426 | break; |
427 | 427 | } |
428 | - return(['win' => $profileFileCont . '</EapHostConfig></EAPConfig>']); |
|
428 | + return(['win' => $profileFileCont.'</EapHostConfig></EAPConfig>']); |
|
429 | 429 | } |
430 | 430 | |
431 | 431 | /** |
@@ -443,10 +443,10 @@ discard block |
||
443 | 443 | private function writeWLANprofile($wlanProfileName, $ssid, $auth, $encryption, $eapConfig, $profileNumber, $oi = '') { |
444 | 444 | $profileFileCont = '<?xml version="1.0"?> |
445 | 445 | <WLANProfile xmlns="http://www.microsoft.com/networking/WLAN/profile/v1"> |
446 | -<name>' . $wlanProfileName . '</name> |
|
446 | +<name>' . $wlanProfileName.'</name> |
|
447 | 447 | <SSIDConfig> |
448 | 448 | <SSID> |
449 | -<name>' . $ssid . '</name> |
|
449 | +<name>' . $ssid.'</name> |
|
450 | 450 | </SSID> |
451 | 451 | <nonBroadcast>true</nonBroadcast> |
452 | 452 | </SSIDConfig>'; |
@@ -458,8 +458,8 @@ discard block |
||
458 | 458 | <MSM> |
459 | 459 | <security> |
460 | 460 | <authEncryption> |
461 | -<authentication>' . $auth . '</authentication> |
|
462 | -<encryption>' . $encryption . '</encryption> |
|
461 | +<authentication>' . $auth.'</authentication> |
|
462 | +<encryption>' . $encryption.'</encryption> |
|
463 | 463 | <useOneX>true</useOneX> |
464 | 464 | </authEncryption> |
465 | 465 | '; |
@@ -486,7 +486,7 @@ discard block |
||
486 | 486 | mkdir('w8'); |
487 | 487 | } |
488 | 488 | $xmlFname = "w8/wlan_prof-$profileNumber.xml"; |
489 | - file_put_contents($xmlFname, $profileFileCont . $eapConfig['win'] . $closing); |
|
489 | + file_put_contents($xmlFname, $profileFileCont.$eapConfig['win'].$closing); |
|
490 | 490 | $this->loggerInstance->debug(2, "Installer has been written into directory $this->FPATH\n"); |
491 | 491 | $hs20 = $oi == '' ? 0 : 1; |
492 | 492 | return("\"$wlanProfileName\" \"$encryption\" $hs20"); |
@@ -514,7 +514,7 @@ discard block |
||
514 | 514 | mkdir('w8'); |
515 | 515 | } |
516 | 516 | $xmlFname = "w8/lan_prof.xml"; |
517 | - file_put_contents($xmlFname, $profileFileCont . $eapConfig['win'] . $closing); |
|
517 | + file_put_contents($xmlFname, $profileFileCont.$eapConfig['win'].$closing); |
|
518 | 518 | $this->loggerInstance->debug(2, "Installer has been written into directory $this->FPATH\n"); |
519 | 519 | } |
520 | 520 | |
@@ -535,7 +535,7 @@ discard block |
||
535 | 535 | } |
536 | 536 | foreach ($caArray as $certAuthority) { |
537 | 537 | $store = $certAuthority['root'] ? "root" : "ca"; |
538 | - $fcontentsCerts .= '!insertmacro install_ca_cert "' . $certAuthority['file'] . '" "' . $certAuthority['sha1'] . '" "' . $store . "\"\n"; |
|
538 | + $fcontentsCerts .= '!insertmacro install_ca_cert "'.$certAuthority['file'].'" "'.$certAuthority['sha1'].'" "'.$store."\"\n"; |
|
539 | 539 | } |
540 | 540 | fwrite($fileHandleCerts, $fcontentsCerts); |
541 | 541 | fclose($fileHandleCerts); |
@@ -544,7 +544,7 @@ discard block |
||
544 | 544 | private function writeMainNSH($eap, $attr) { |
545 | 545 | $this->loggerInstance->debug(4, "writeMainNSH"); |
546 | 546 | $this->loggerInstance->debug(4, $attr); |
547 | - $this->loggerInstance->debug(4, "Device_id = " . $this->device_id . "\n"); |
|
547 | + $this->loggerInstance->debug(4, "Device_id = ".$this->device_id."\n"); |
|
548 | 548 | $fcontents = "!define W8\n"; |
549 | 549 | if ($this->device_id == 'w10') { |
550 | 550 | $fcontents .= "!define W10\n"; |
@@ -574,8 +574,8 @@ discard block |
||
574 | 574 | if ($eap == \core\common\EAP::EAPTYPE_SILVERBULLET) { |
575 | 575 | $fcontents .= "!define SILVERBULLET\n"; |
576 | 576 | } |
577 | - $fcontents .= '!define ' . $eapStr; |
|
578 | - $fcontents .= "\n" . '!define EXECLEVEL "' . $execLevel . '"'; |
|
577 | + $fcontents .= '!define '.$eapStr; |
|
578 | + $fcontents .= "\n".'!define EXECLEVEL "'.$execLevel.'"'; |
|
579 | 579 | $fcontents .= $this->writeNsisDefines($attr); |
580 | 580 | file_put_contents('main.nsh', $fcontents); |
581 | 581 | } |
@@ -774,7 +774,7 @@ |
||
774 | 774 | \core\common\Entity::$nomenclature_inst, |
775 | 775 | count($this->CAsAccountedFor)+1, |
776 | 776 | ($ca['root'] ? _("Root") : _("Intermediate"))) . |
777 | - "</string> |
|
777 | + "</string> |
|
778 | 778 | <key>PayloadIdentifier</key> |
779 | 779 | <string>" . self::IPHONE_PAYLOAD_PREFIX . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.credential.$this->caSerial</string> |
780 | 780 | <key>PayloadOrganization</key> |
@@ -179,15 +179,15 @@ discard block |
||
179 | 179 | <key>PayloadDescription</key> |
180 | 180 | <string>$tagline</string> |
181 | 181 | <key>PayloadDisplayName</key> |
182 | - <string>" . \config\ConfAssistant::CONSORTIUM['display_name'] . "</string> |
|
182 | + <string>".\config\ConfAssistant::CONSORTIUM['display_name']."</string> |
|
183 | 183 | <key>PayloadIdentifier</key> |
184 | - <string>" . self::IPHONE_PAYLOAD_PREFIX . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang</string> |
|
184 | + <string>" . self::IPHONE_PAYLOAD_PREFIX.".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang</string> |
|
185 | 185 | <key>PayloadOrganization</key> |
186 | - <string>" . htmlspecialchars(iconv("UTF-8", "UTF-8//IGNORE", $this->attributes['general:instname'][0]), ENT_XML1, 'UTF-8') . ( $this->attributes['internal:profile_count'][0] > 1 ? " (" . htmlspecialchars(iconv("UTF-8", "UTF-8//IGNORE", $this->attributes['profile:name'][0]), ENT_XML1, 'UTF-8') . ")" : "") . "</string> |
|
186 | + <string>".htmlspecialchars(iconv("UTF-8", "UTF-8//IGNORE", $this->attributes['general:instname'][0]), ENT_XML1, 'UTF-8').($this->attributes['internal:profile_count'][0] > 1 ? " (".htmlspecialchars(iconv("UTF-8", "UTF-8//IGNORE", $this->attributes['profile:name'][0]), ENT_XML1, 'UTF-8').")" : "")."</string> |
|
187 | 187 | <key>PayloadType</key> |
188 | 188 | <string>Configuration</string> |
189 | 189 | <key>PayloadUUID</key> |
190 | - <string>" . \core\common\Entity::uuid('', self::IPHONE_PAYLOAD_PREFIX . $this->massagedConsortium . $this->massagedCountry . $this->massagedInst . $this->massagedProfile) . "</string> |
|
190 | + <string>" . \core\common\Entity::uuid('', self::IPHONE_PAYLOAD_PREFIX.$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile)."</string> |
|
191 | 191 | <key>PayloadVersion</key> |
192 | 192 | <integer>1</integer>"; |
193 | 193 | \core\common\Entity::outOfThePotatoes(); |
@@ -219,21 +219,21 @@ discard block |
||
219 | 219 | { |
220 | 220 | \core\common\Entity::intoThePotatoes(); |
221 | 221 | if (isset($this->attributes['support:info_file'])) { |
222 | - return MobileconfigSuperclass::BUFFER_CONSENT_PRE . htmlspecialchars(iconv("UTF-8", "UTF-8//TRANSLIT", $this->attributes['support:info_file'][0]), ENT_XML1, 'UTF-8') . MobileconfigSuperclass::BUFFER_CONSENT_POST; |
|
222 | + return MobileconfigSuperclass::BUFFER_CONSENT_PRE.htmlspecialchars(iconv("UTF-8", "UTF-8//TRANSLIT", $this->attributes['support:info_file'][0]), ENT_XML1, 'UTF-8').MobileconfigSuperclass::BUFFER_CONSENT_POST; |
|
223 | 223 | } |
224 | 224 | if ($this->attributes['internal:verify_userinput_suffix'][0] != 0) { |
225 | 225 | if ($this->attributes['internal:hint_userinput_suffix'][0] != 0) { |
226 | - $retval = MobileconfigSuperclass::BUFFER_CONSENT_PRE . sprintf(_("Important Notice: your username MUST end exactly with '...@%s' !"), $this->attributes['internal:realm'][0]) . MobileconfigSuperclass::BUFFER_CONSENT_POST; |
|
226 | + $retval = MobileconfigSuperclass::BUFFER_CONSENT_PRE.sprintf(_("Important Notice: your username MUST end exactly with '...@%s' !"), $this->attributes['internal:realm'][0]).MobileconfigSuperclass::BUFFER_CONSENT_POST; |
|
227 | 227 | \core\common\Entity::outOfThePotatoes(); |
228 | 228 | return $retval; |
229 | 229 | } else { |
230 | 230 | if (strlen($this->attributes['internal:realm'][0]) > 0) { |
231 | 231 | /// note space between variable and exclamation mark - makes sure users don't mistakenly think the exclamation mark is part of the required username! |
232 | - $retval = MobileconfigSuperclass::BUFFER_CONSENT_PRE . sprintf(_("Important Notice: your username MUST contain an '@' and end with ...%s !"), $this->attributes['internal:realm'][0]) . MobileconfigSuperclass::BUFFER_CONSENT_POST; |
|
232 | + $retval = MobileconfigSuperclass::BUFFER_CONSENT_PRE.sprintf(_("Important Notice: your username MUST contain an '@' and end with ...%s !"), $this->attributes['internal:realm'][0]).MobileconfigSuperclass::BUFFER_CONSENT_POST; |
|
233 | 233 | \core\common\Entity::outOfThePotatoes(); |
234 | 234 | return $retval; |
235 | 235 | } |
236 | - $retval = MobileconfigSuperclass::BUFFER_CONSENT_PRE . _("Important Notice: your username MUST be in the form of xxx@yyy where the yyy is a common suffix identifying your Identity Provider. Please find out what to use there and enter the username in the correct format.") . MobileconfigSuperclass::BUFFER_CONSENT_POST; |
|
236 | + $retval = MobileconfigSuperclass::BUFFER_CONSENT_PRE._("Important Notice: your username MUST be in the form of xxx@yyy where the yyy is a common suffix identifying your Identity Provider. Please find out what to use there and enter the username in the correct format.").MobileconfigSuperclass::BUFFER_CONSENT_POST; |
|
237 | 237 | \core\common\Entity::outOfThePotatoes(); |
238 | 238 | return $retval; |
239 | 239 | } |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | // also escape htmlspecialchars |
258 | 258 | // not all names and profiles have a name, so be prepared |
259 | 259 | |
260 | - $this->loggerInstance->debug(5, "List of available attributes: " . var_export($this->attributes, TRUE)); |
|
260 | + $this->loggerInstance->debug(5, "List of available attributes: ".var_export($this->attributes, TRUE)); |
|
261 | 261 | |
262 | 262 | $this->instName = $this->attributes['general:instname'][0] ?? _("Unnamed Organisation"); |
263 | 263 | $this->profileName = $this->attributes['profile:name'][0] ?? _("Unnamed Profile"); |
@@ -299,7 +299,7 @@ discard block |
||
299 | 299 | |
300 | 300 | file_put_contents('installer_profile', $outputXml); |
301 | 301 | |
302 | - $fileName = $this->installerBasename . '.mobileconfig'; |
|
302 | + $fileName = $this->installerBasename.'.mobileconfig'; |
|
303 | 303 | |
304 | 304 | if (!$this->sign) { |
305 | 305 | rename("installer_profile", $fileName); |
@@ -307,7 +307,7 @@ discard block |
||
307 | 307 | return $fileName; |
308 | 308 | } |
309 | 309 | // still here? Then we are signing. |
310 | - $signing = system($this->sign . " installer_profile '$fileName' > /dev/null"); |
|
310 | + $signing = system($this->sign." installer_profile '$fileName' > /dev/null"); |
|
311 | 311 | if ($signing === FALSE) { |
312 | 312 | $this->loggerInstance->debug(2, "Signing the mobileconfig installer $fileName FAILED!\n"); |
313 | 313 | } |
@@ -326,19 +326,19 @@ discard block |
||
326 | 326 | \core\common\Entity::intoThePotatoes(); |
327 | 327 | $ssidCount = count($this->attributes['internal:SSID']); |
328 | 328 | $certCount = count($this->attributes['internal:CAs'][0]); |
329 | - $out = "<p>" . _("For best results, please use the built-in browser (Safari) to open the configuration file.") . "</p>"; |
|
329 | + $out = "<p>"._("For best results, please use the built-in browser (Safari) to open the configuration file.")."</p>"; |
|
330 | 330 | $out .= "<p>"; |
331 | 331 | $out .= _("The profile will install itself after you click (or tap) the button. You will be asked for confirmation/input at several points:"); |
332 | 332 | $out .= "<ul>"; |
333 | - $out .= "<li>" . _("to install the profile") . "</li>"; |
|
334 | - $out .= "<li>" . ngettext("to accept the server certificate authority", "to accept the server certificate authorities", $certCount); |
|
333 | + $out .= "<li>"._("to install the profile")."</li>"; |
|
334 | + $out .= "<li>".ngettext("to accept the server certificate authority", "to accept the server certificate authorities", $certCount); |
|
335 | 335 | if ($certCount > 1) { |
336 | - $out .= " " . sprintf(_("(%d times)"), $certCount); |
|
336 | + $out .= " ".sprintf(_("(%d times)"), $certCount); |
|
337 | 337 | } |
338 | 338 | $out .= "</li>"; |
339 | - $out .= "<li>" . _("to enter the username and password you have been given by your organisation"); |
|
339 | + $out .= "<li>"._("to enter the username and password you have been given by your organisation"); |
|
340 | 340 | if ($ssidCount > 1) { |
341 | - $out .= " " . sprintf(_("(%d times each, because %s is installed for %d SSIDs)"), $ssidCount, \config\ConfAssistant::CONSORTIUM['display_name'], $ssidCount); |
|
341 | + $out .= " ".sprintf(_("(%d times each, because %s is installed for %d SSIDs)"), $ssidCount, \config\ConfAssistant::CONSORTIUM['display_name'], $ssidCount); |
|
342 | 342 | } |
343 | 343 | $out .= "</li>"; |
344 | 344 | $out .= "</ul>"; |
@@ -378,7 +378,7 @@ discard block |
||
378 | 378 | <key>ServiceProviderRoamingEnabled</key> |
379 | 379 | <true/> |
380 | 380 | <key>DisplayedOperatorName</key> |
381 | - <string>" . \config\ConfAssistant::CONSORTIUM['display_name'] . " via Passpoint</string>"; |
|
381 | + <string>" . \config\ConfAssistant::CONSORTIUM['display_name']." via Passpoint</string>"; |
|
382 | 382 | // if we don't know the realm, omit the entire DomainName key |
383 | 383 | if (isset($this->attributes['internal:realm'])) { |
384 | 384 | $retval .= "<key>DomainName</key> |
@@ -390,7 +390,7 @@ discard block |
||
390 | 390 | $retval .= " <key>RoamingConsortiumOIs</key> |
391 | 391 | <array>"; |
392 | 392 | |
393 | - $retval .= "<string>" . strtoupper($consortiumOi) . "</string>"; |
|
393 | + $retval .= "<string>".strtoupper($consortiumOi)."</string>"; |
|
394 | 394 | |
395 | 395 | $retval .= "</array>"; |
396 | 396 | // this is an undocumented value found on the net. Does it do something useful? |
@@ -427,7 +427,7 @@ discard block |
||
427 | 427 | <dict> |
428 | 428 | <key>AcceptEAPTypes</key> |
429 | 429 | <array> |
430 | - <integer>" . $eapType['OUTER'] . "</integer> |
|
430 | + <integer>" . $eapType['OUTER']."</integer> |
|
431 | 431 | </array> |
432 | 432 | <key>EAPFASTProvisionPAC</key> |
433 | 433 | <true /> |
@@ -440,7 +440,7 @@ discard block |
||
440 | 440 | "; |
441 | 441 | if ($realm !== NULL) { |
442 | 442 | $retval .= "<key>OuterIdentity</key> |
443 | - <string>" . htmlspecialchars($realm, ENT_XML1, 'UTF-8') . "</string> |
|
443 | + <string>" . htmlspecialchars($realm, ENT_XML1, 'UTF-8')."</string> |
|
444 | 444 | "; |
445 | 445 | } |
446 | 446 | $retval .= "<key>PayloadCertificateAnchorUUID</key> |
@@ -464,11 +464,11 @@ discard block |
||
464 | 464 | $retval .= " |
465 | 465 | </array>"; |
466 | 466 | if ($eapType['INNER'] == \core\common\EAP::NE_SILVERBULLET) { |
467 | - $retval .= "<key>UserName</key><string>" . $this->clientCert["certObject"]->username . "</string>"; |
|
467 | + $retval .= "<key>UserName</key><string>".$this->clientCert["certObject"]->username."</string>"; |
|
468 | 468 | } |
469 | 469 | $retval .= " |
470 | 470 | <key>TTLSInnerAuthentication</key> |
471 | - <string>" . ($eapType['INNER'] == \core\common\EAP::NE_PAP ? "PAP" : "MSCHAPv2") . "</string> |
|
471 | + <string>" . ($eapType['INNER'] == \core\common\EAP::NE_PAP ? "PAP" : "MSCHAPv2")."</string> |
|
472 | 472 | </dict>"; |
473 | 473 | return $retval; |
474 | 474 | } |
@@ -488,9 +488,9 @@ discard block |
||
488 | 488 | // characters are still reversed, invert on use! |
489 | 489 | $buffer .= "<string>Manual</string> |
490 | 490 | <key>ProxyServer</key> |
491 | - <string>" . strrev($serverAndPort[1]) . "</string> |
|
491 | + <string>" . strrev($serverAndPort[1])."</string> |
|
492 | 492 | <key>ProxyServerPort</key> |
493 | - <integer>" . strrev($serverAndPort[0]) . "</integer> |
|
493 | + <integer>" . strrev($serverAndPort[0])."</integer> |
|
494 | 494 | <key>ProxyPACFallbackAllowed</key> |
495 | 495 | <false/>"; |
496 | 496 | } else { |
@@ -519,7 +519,7 @@ discard block |
||
519 | 519 | throw new Exception("SSID must be a string!"); |
520 | 520 | } |
521 | 521 | $escapedSSID = htmlspecialchars($toBeConfigured, ENT_XML1, 'UTF-8'); |
522 | - $payloadIdentifier = "wifi." . $this->serial; |
|
522 | + $payloadIdentifier = "wifi.".$this->serial; |
|
523 | 523 | $payloadShortName = sprintf(_("SSID %s"), $escapedSSID); |
524 | 524 | $payloadName = sprintf(_("%s configuration for network name %s"), \config\ConfAssistant::CONSORTIUM['display_name'], $escapedSSID); |
525 | 525 | $encryptionTypeString = "WPA"; |
@@ -549,7 +549,7 @@ discard block |
||
549 | 549 | $payloadIdentifier = "hs20.$toBeConfigured"; |
550 | 550 | $knownOiName = array_search($toBeConfigured, \config\ConfAssistant::CONSORTIUM['interworking-consortium-oi']); |
551 | 551 | if ($knownOiName === FALSE) { // a custom RCOI as set by the IdP admin; do not use the term "eduroam" in that one! |
552 | - $knownOiName = $this->instName . " "._("Roaming Partner"); |
|
552 | + $knownOiName = $this->instName." "._("Roaming Partner"); |
|
553 | 553 | } |
554 | 554 | $payloadShortName = $knownOiName; |
555 | 555 | $payloadName = _("Passpoint roaming configuration ($knownOiName)"); |
@@ -571,11 +571,11 @@ discard block |
||
571 | 571 | <key>PayloadDisplayName</key> |
572 | 572 | <string>$payloadShortName</string> |
573 | 573 | <key>PayloadIdentifier</key> |
574 | - <string>" . self::IPHONE_PAYLOAD_PREFIX . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang.$payloadIdentifier</string> |
|
574 | + <string>".self::IPHONE_PAYLOAD_PREFIX.".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang.$payloadIdentifier</string> |
|
575 | 575 | <key>PayloadOrganization</key> |
576 | - <string>" . $this->massagedConsortium . ".1x-config.org</string> |
|
576 | + <string>".$this->massagedConsortium.".1x-config.org</string> |
|
577 | 577 | <key>PayloadType</key> |
578 | - <string>com.apple." . ($blocktype == MobileconfigSuperclass::NETWORK_BLOCK_TYPE_WIRED ? "firstactiveethernet" : "wifi") . ".managed</string>"; |
|
578 | + <string>com.apple." . ($blocktype == MobileconfigSuperclass::NETWORK_BLOCK_TYPE_WIRED ? "firstactiveethernet" : "wifi").".managed</string>"; |
|
579 | 579 | $retval .= $this->proxySettings(); |
580 | 580 | $retval .= $setupModesString; |
581 | 581 | if ($eapType['INNER'] == \core\common\EAP::NE_SILVERBULLET) { |
@@ -587,7 +587,7 @@ discard block |
||
587 | 587 | } |
588 | 588 | $retval .= " |
589 | 589 | <key>PayloadUUID</key> |
590 | - <string>" . \core\common\Entity::uuid() . "</string> |
|
590 | + <string>" . \core\common\Entity::uuid()."</string> |
|
591 | 591 | <key>PayloadVersion</key> |
592 | 592 | <integer>1</integer> |
593 | 593 | $wifiNetworkIdentification</dict>"; |
@@ -617,15 +617,15 @@ discard block |
||
617 | 617 | <key>IsHotspot</key> |
618 | 618 | <false/> |
619 | 619 | <key>PayloadDescription</key> |
620 | - <string>" . sprintf(_("This SSID should not be used after bootstrapping %s"), \config\ConfAssistant::CONSORTIUM['display_name']) . "</string> |
|
620 | + <string>" . sprintf(_("This SSID should not be used after bootstrapping %s"), \config\ConfAssistant::CONSORTIUM['display_name'])."</string> |
|
621 | 621 | <key>PayloadDisplayName</key> |
622 | - <string>" . _("Disabled WiFi network") . "</string> |
|
622 | + <string>" . _("Disabled WiFi network")."</string> |
|
623 | 623 | <key>PayloadIdentifier</key> |
624 | - <string>" . self::IPHONE_PAYLOAD_PREFIX . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang.wifi.disabled.$this->removeSerial</string> |
|
624 | + <string>" . self::IPHONE_PAYLOAD_PREFIX.".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang.wifi.disabled.$this->removeSerial</string> |
|
625 | 625 | <key>PayloadType</key> |
626 | 626 | <string>com.apple.wifi.managed</string> |
627 | 627 | <key>PayloadUUID</key> |
628 | - <string>" . \core\common\Entity::uuid() . "</string> |
|
628 | + <string>".\core\common\Entity::uuid()."</string> |
|
629 | 629 | <key>PayloadVersion</key> |
630 | 630 | <real>1</real>"; |
631 | 631 | $retval .= $this->proxySettings(); |
@@ -704,12 +704,12 @@ discard block |
||
704 | 704 | $mimeBlob = base64_encode($binaryBlob); |
705 | 705 | $mimeFormatted = chunk_split($mimeBlob, 52, "\r\n"); |
706 | 706 | $payloadUUID = \core\common\Entity::uuid('', $mimeBlob); |
707 | - $retArray = ["block" => "<dict>" . |
|
707 | + $retArray = ["block" => "<dict>". |
|
708 | 708 | // we don't include the import password. It's displayed on screen, and should be input by the user. |
709 | 709 | // <key>Password</key> |
710 | 710 | // <string>" . $this->clientCert['password'] . "</string> |
711 | 711 | "<key>PayloadCertificateFileName</key> |
712 | - <string>" . $this->massagedConsortium . ".pfx</string> |
|
712 | + <string>" . $this->massagedConsortium.".pfx</string> |
|
713 | 713 | <key>PayloadContent</key> |
714 | 714 | <data> |
715 | 715 | $mimeFormatted |
@@ -717,7 +717,7 @@ discard block |
||
717 | 717 | <key>PayloadDescription</key> |
718 | 718 | <string>MIME Base-64 encoded PKCS#12 Client Certificate</string> |
719 | 719 | <key>PayloadDisplayName</key> |
720 | - <string>" . _("User certificate") . "</string> |
|
720 | + <string>"._("User certificate")."</string> |
|
721 | 721 | <key>PayloadIdentifier</key> |
722 | 722 | <string>com.apple.security.pkcs12.$payloadUUID</string> |
723 | 723 | <key>PayloadType</key> |
@@ -727,7 +727,7 @@ discard block |
||
727 | 727 | <key>PayloadVersion</key> |
728 | 728 | <integer>1</integer> |
729 | 729 | </dict>", |
730 | - "UUID" => $payloadUUID,]; |
|
730 | + "UUID" => $payloadUUID, ]; |
|
731 | 731 | \core\common\Entity::outOfThePotatoes(); |
732 | 732 | return $retArray; |
733 | 733 | } |
@@ -745,7 +745,7 @@ discard block |
||
745 | 745 | } |
746 | 746 | $expiryTime = new \DateTime($this->clientCert['certObject']->expiry); |
747 | 747 | return "<key>RemovalDate</key> |
748 | - <date>" . $expiryTime->format("Y-m-d") . "T" . $expiryTime->format("H:i:s") . "Z</date>"; |
|
748 | + <date>" . $expiryTime->format("Y-m-d")."T".$expiryTime->format("H:i:s")."Z</date>"; |
|
749 | 749 | } |
750 | 750 | |
751 | 751 | /** |
@@ -767,27 +767,27 @@ discard block |
||
767 | 767 | $stream = " |
768 | 768 | <dict> |
769 | 769 | <key>PayloadCertificateFileName</key> |
770 | - <string>" . $ca['uuid'] . ".der</string> |
|
770 | + <string>" . $ca['uuid'].".der</string> |
|
771 | 771 | <key>PayloadContent</key> |
772 | 772 | <data> |
773 | -" . $trimmedPem . "</data> |
|
773 | +" . $trimmedPem."</data> |
|
774 | 774 | <key>PayloadDescription</key> |
775 | - <string>" . sprintf(_("The %s Certification Authority"), \core\common\Entity::$nomenclature_inst) . "</string> |
|
775 | + <string>" . sprintf(_("The %s Certification Authority"), \core\common\Entity::$nomenclature_inst)."</string> |
|
776 | 776 | <key>PayloadDisplayName</key> |
777 | 777 | <string>" . |
778 | 778 | /// example: "Identity Provider CA #1 (Root)" |
779 | - sprintf(_("%s CA #%d (%s)" ), |
|
779 | + sprintf(_("%s CA #%d (%s)"), |
|
780 | 780 | \core\common\Entity::$nomenclature_inst, |
781 | - count($this->CAsAccountedFor)+1, |
|
782 | - ($ca['root'] ? _("Root") : _("Intermediate"))) . |
|
781 | + count($this->CAsAccountedFor) + 1, |
|
782 | + ($ca['root'] ? _("Root") : _("Intermediate"))). |
|
783 | 783 | "</string> |
784 | 784 | <key>PayloadIdentifier</key> |
785 | - <string>" . self::IPHONE_PAYLOAD_PREFIX . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.credential.$this->caSerial</string> |
|
785 | + <string>" . self::IPHONE_PAYLOAD_PREFIX.".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.credential.$this->caSerial</string> |
|
786 | 786 | <key>PayloadOrganization</key> |
787 | - <string>" . $this->massagedConsortium . ".1x-config.org</string> |
|
787 | + <string>".$this->massagedConsortium.".1x-config.org</string> |
|
788 | 788 | <key>PayloadType</key> |
789 | 789 | <string>com.apple.security.root</string> |
790 | - <key>PayloadUUID</key><string>" . $ca['uuid'] . "</string> |
|
790 | + <key>PayloadUUID</key><string>" . $ca['uuid']."</string> |
|
791 | 791 | <key>PayloadVersion</key> |
792 | 792 | <integer>1</integer> |
793 | 793 | </dict>"; |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | |
97 | 97 | // realm is automatically calculated, then stored in DB |
98 | 98 | |
99 | - $this->realm = "opaquehash@$myInst->identifier-$this->identifier." . strtolower($myInst->federation) . \config\ConfAssistant::SILVERBULLET['realm_suffix']; |
|
99 | + $this->realm = "opaquehash@$myInst->identifier-$this->identifier.".strtolower($myInst->federation).\config\ConfAssistant::SILVERBULLET['realm_suffix']; |
|
100 | 100 | $localValueIfAny = ""; |
101 | 101 | |
102 | 102 | // but there's some common internal attributes populated directly |
@@ -113,11 +113,11 @@ discard block |
||
113 | 113 | |
114 | 114 | // and we need to populate eap:server_name and eap:ca_file with the NRO-specific EAP information |
115 | 115 | $silverbulletAttributes = [ |
116 | - "eap:server_name" => "auth." . strtolower($myFed->tld) . \config\ConfAssistant::SILVERBULLET['server_suffix'], |
|
116 | + "eap:server_name" => "auth.".strtolower($myFed->tld).\config\ConfAssistant::SILVERBULLET['server_suffix'], |
|
117 | 117 | ]; |
118 | 118 | $temp = array_merge($this->addInternalAttributes($internalAttributes), $this->addInternalAttributes($silverbulletAttributes)); |
119 | 119 | $x509 = new \core\common\X509(); |
120 | - $caHandle = fopen(dirname(__FILE__) . "/../config/SilverbulletServerCerts/" . strtoupper($myFed->tld) . "/root.pem", "r"); |
|
120 | + $caHandle = fopen(dirname(__FILE__)."/../config/SilverbulletServerCerts/".strtoupper($myFed->tld)."/root.pem", "r"); |
|
121 | 121 | if ($caHandle !== FALSE) { |
122 | 122 | $cAFile = fread($caHandle, 16000000); |
123 | 123 | foreach ($x509->splitCertificate($cAFile) as $oneCa) { |
@@ -273,7 +273,7 @@ discard block |
||
273 | 273 | if (empty($certNames)) { |
274 | 274 | return []; |
275 | 275 | } |
276 | - $namesCondensed = "'" . implode("' OR username = '", $certNames) . "'"; |
|
276 | + $namesCondensed = "'".implode("' OR username = '", $certNames)."'"; |
|
277 | 277 | $serverHandles = DBConnection::handle("RADIUS"); |
278 | 278 | $returnarray = []; |
279 | 279 | foreach ($serverHandles as $oneDbServer) { |
@@ -132,20 +132,20 @@ discard block |
||
132 | 132 | if ($device == "TOTAL") { |
133 | 133 | continue; |
134 | 134 | } |
135 | - $retstring .= "<tr><td>$device</td><td>" . $numbers['ADMIN'] . "</td><td>" . $numbers['SILVERBULLET'] . "</td><td>" . $numbers['USER'] . "</td></tr>"; |
|
135 | + $retstring .= "<tr><td>$device</td><td>".$numbers['ADMIN']."</td><td>".$numbers['SILVERBULLET']."</td><td>".$numbers['USER']."</td></tr>"; |
|
136 | 136 | } |
137 | - $retstring .= "<tr><td><strong>TOTAL</strong></td><td><strong>" . $data['TOTAL']['ADMIN'] . "</strong></td><td><strong>" . $data['TOTAL']['SILVERBULLET'] . "</strong></td><td><strong>" . $data['TOTAL']['USER'] . "</strong></td></tr>"; |
|
137 | + $retstring .= "<tr><td><strong>TOTAL</strong></td><td><strong>".$data['TOTAL']['ADMIN']."</strong></td><td><strong>".$data['TOTAL']['SILVERBULLET']."</strong></td><td><strong>".$data['TOTAL']['USER']."</strong></td></tr>"; |
|
138 | 138 | break; |
139 | 139 | case "XML": |
140 | 140 | // the calls to date() operate on current date, so there is no chance for a FALSE to be returned. Silencing scrutinizer. |
141 | - $retstring .= "<federation id='$this->tld' ts='" . /** @scrutinizer ignore-type */ date("Y-m-d") . "T" . /** @scrutinizer ignore-type */ date("H:i:s") . "'>\n"; |
|
141 | + $retstring .= "<federation id='$this->tld' ts='"./** @scrutinizer ignore-type */ date("Y-m-d")."T"./** @scrutinizer ignore-type */ date("H:i:s")."'>\n"; |
|
142 | 142 | foreach ($data as $device => $numbers) { |
143 | 143 | if ($device == "TOTAL") { |
144 | 144 | continue; |
145 | 145 | } |
146 | - $retstring .= " <device name='" . $device . "'>\n <downloads group='admin'>" . $numbers['ADMIN'] . "</downloads>\n <downloads group='managed_idp'>" . $numbers['SILVERBULLET'] . "</downloads>\n <downloads group='user'>" . $numbers['USER'] . "</downloads>\n </device>"; |
|
146 | + $retstring .= " <device name='".$device."'>\n <downloads group='admin'>".$numbers['ADMIN']."</downloads>\n <downloads group='managed_idp'>".$numbers['SILVERBULLET']."</downloads>\n <downloads group='user'>".$numbers['USER']."</downloads>\n </device>"; |
|
147 | 147 | } |
148 | - $retstring .= "<total>\n <downloads group='admin'>" . $data['TOTAL']['ADMIN'] . "</downloads>\n <downloads group='managed_idp'>" . $data['TOTAL']['SILVERBULLET'] . "</downloads>\n <downloads group='user'>" . $data['TOTAL']['USER'] . "</downloads>\n</total>\n"; |
|
148 | + $retstring .= "<total>\n <downloads group='admin'>".$data['TOTAL']['ADMIN']."</downloads>\n <downloads group='managed_idp'>".$data['TOTAL']['SILVERBULLET']."</downloads>\n <downloads group='user'>".$data['TOTAL']['USER']."</downloads>\n</total>\n"; |
|
149 | 149 | $retstring .= "</federation>"; |
150 | 150 | break; |
151 | 151 | case "array": |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | $identifier = $this->databaseHandle->lastID(); |
238 | 238 | |
239 | 239 | if ($identifier == 0 || !$this->loggerInstance->writeAudit($ownerId, "NEW", "Organisation $identifier")) { |
240 | - $text = "<p>Could not create a new " . \config\ConfAssistant::CONSORTIUM['nomenclature_inst'] . "!</p>"; |
|
240 | + $text = "<p>Could not create a new ".\config\ConfAssistant::CONSORTIUM['nomenclature_inst']."!</p>"; |
|
241 | 241 | echo $text; |
242 | 242 | throw new Exception($text); |
243 | 243 | } |
@@ -379,7 +379,7 @@ discard block |
||
379 | 379 | return; // no update to fetch |
380 | 380 | } |
381 | 381 | $certDetails = openssl_x509_parse($entryInQuestion['CERT']); |
382 | - $expiry = "20" . $certDetails['validTo'][0] . $certDetails['validTo'][1] . "-" . $certDetails['validTo'][2] . $certDetails['validTo'][3] . "-" . $certDetails['validTo'][4] . $certDetails['validTo'][5]; |
|
382 | + $expiry = "20".$certDetails['validTo'][0].$certDetails['validTo'][1]."-".$certDetails['validTo'][2].$certDetails['validTo'][3]."-".$certDetails['validTo'][4].$certDetails['validTo'][5]; |
|
383 | 383 | openssl_x509_export($entryInQuestion['CERT'], $pem); |
384 | 384 | $updateQuery = "UPDATE federation_servercerts SET status = 'ISSUED', certificate = ?, expiry = ? WHERE ca_name = 'eduPKI' AND request_serial = ?"; |
385 | 385 | $this->databaseHandle->exec($updateQuery, "ssi", $pem, $expiry, $reqSerial); |
@@ -75,9 +75,9 @@ discard block |
||
75 | 75 | $loggerInstance = new \core\common\Logging(); |
76 | 76 | $olddomain = textdomain(NULL); |
77 | 77 | $loggerInstance->debug(4, "set_locale($domain)\n"); |
78 | - $loggerInstance->debug(4, ROOT . "\n"); |
|
78 | + $loggerInstance->debug(4, ROOT."\n"); |
|
79 | 79 | textdomain($domain); |
80 | - bindtextdomain($domain, ROOT . "/translation/"); |
|
80 | + bindtextdomain($domain, ROOT."/translation/"); |
|
81 | 81 | return $olddomain; |
82 | 82 | } |
83 | 83 | |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | |
129 | 129 | // check if this language is supported by the CAT config |
130 | 130 | foreach (\config\Master::LANGUAGES as $language => $value) { |
131 | - if (preg_match("/^" . $language . ".*/", $tryLang)) { |
|
131 | + if (preg_match("/^".$language.".*/", $tryLang)) { |
|
132 | 132 | $localeTmp = $value['locale']; |
133 | 133 | $langIndex = $language; // ??? |
134 | 134 | break; |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | } |
144 | 144 | } |
145 | 145 | } |
146 | - putenv("LC_ALL=" . $theLocale); |
|
146 | + putenv("LC_ALL=".$theLocale); |
|
147 | 147 | $_SESSION['language'] = $langIndex; |
148 | 148 | $loggerInstance = new \core\common\Logging(); |
149 | 149 | $loggerInstance->debug(4, "selected lang:$langIndex:$theLocale\n"); |
@@ -88,7 +88,7 @@ |
||
88 | 88 | public function der2pem($derData) |
89 | 89 | { |
90 | 90 | $pem = chunk_split(base64_encode($derData), 64, "\n"); |
91 | - $pem = "-----BEGIN CERTIFICATE-----\n" . $pem . "-----END CERTIFICATE-----\n"; |
|
91 | + $pem = "-----BEGIN CERTIFICATE-----\n".$pem."-----END CERTIFICATE-----\n"; |
|
92 | 92 | return $pem; |
93 | 93 | } |
94 | 94 |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | */ |
50 | 50 | private function writeToFile($filename, $message) |
51 | 51 | { |
52 | - file_put_contents(\config\Master::PATHS['logdir'] . "/$filename", sprintf("%-015s", microtime(TRUE)) . $message, FILE_APPEND); |
|
52 | + file_put_contents(\config\Master::PATHS['logdir']."/$filename", sprintf("%-015s", microtime(TRUE)).$message, FILE_APPEND); |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | /** |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | } else { |
82 | 82 | $output .= var_export($stuff, TRUE); |
83 | 83 | } |
84 | - $output = $prefix . $output . $suffix; |
|
84 | + $output = $prefix.$output.$suffix; |
|
85 | 85 | $this->writeToFile("debug.log", $output); |
86 | 86 | |
87 | 87 | return; |
@@ -129,6 +129,6 @@ discard block |
||
129 | 129 | $logTextStep1 = preg_replace("/[\n\r]/", "", $query); |
130 | 130 | $logTextStep2 = preg_replace("/ +/", " ", $logTextStep1); |
131 | 131 | $logTextStep3 = iconv("UTF-8", "UTF-8//IGNORE", $logTextStep2); |
132 | - $this->writeToFile("audit-SQL.log", " " . $logTextStep3 . "\n"); |
|
132 | + $this->writeToFile("audit-SQL.log", " ".$logTextStep3."\n"); |
|
133 | 133 | } |
134 | 134 | } |
135 | 135 | \ No newline at end of file |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | $returnArray = []; |
70 | 70 | $returnArray['status'] = $status; |
71 | 71 | $returnArray['data'] = $data; |
72 | - $returnArray['tou'] = "Please consult Terms of Use at: //" . $host . \core\CAT::getRootUrlPath() . "/tou.php"; |
|
72 | + $returnArray['tou'] = "Please consult Terms of Use at: //".$host.\core\CAT::getRootUrlPath()."/tou.php"; |
|
73 | 73 | if (!empty($otherData)) { |
74 | 74 | $returnArray['otherdata'] = $otherData; |
75 | 75 | } |
@@ -311,8 +311,8 @@ discard block |
||
311 | 311 | public function sendLogo($identifier, $type, $width, $height) |
312 | 312 | { |
313 | 313 | $logo = $this->getLogo($identifier, $type, $width, $height); |
314 | - $blob = $logo === NULL ? file_get_contents(ROOT . '/web/resources/images/empty.png') : $logo['blob']; |
|
315 | - header("Content-type: " . $logo['filetype']); |
|
314 | + $blob = $logo === NULL ? file_get_contents(ROOT.'/web/resources/images/empty.png') : $logo['blob']; |
|
315 | + header("Content-type: ".$logo['filetype']); |
|
316 | 316 | header("Cache-Control:max-age=36000, must-revalidate"); |
317 | 317 | header($logo['expires']); |
318 | 318 | echo $blob; |
@@ -65,8 +65,8 @@ discard block |
||
65 | 65 | parent::__construct(); |
66 | 66 | $Dev = \devices\Devices::listDevices(); |
67 | 67 | if (isset($Dev[$blueprint])) { |
68 | - $this->loggerInstance->debug(4, "loaded: devices/" . $Dev[$blueprint]['directory'] . "/" . $Dev[$blueprint]['module'] . ".php\n"); |
|
69 | - $class_name = "\devices\\" . $Dev[$blueprint]['directory'] . "\Device" . $Dev[$blueprint]['module']; |
|
68 | + $this->loggerInstance->debug(4, "loaded: devices/".$Dev[$blueprint]['directory']."/".$Dev[$blueprint]['module'].".php\n"); |
|
69 | + $class_name = "\devices\\".$Dev[$blueprint]['directory']."\Device".$Dev[$blueprint]['module']; |
|
70 | 70 | $this->device = new $class_name(); |
71 | 71 | if (!$this->device) { |
72 | 72 | $this->loggerInstance->debug(2, "module loading failed"); |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | } else { |
76 | 76 | echo("unknown devicename:$blueprint\n"); |
77 | 77 | } |
78 | - $this->device->module_path = ROOT . '/devices/' . $Dev[$blueprint]['directory']; |
|
78 | + $this->device->module_path = ROOT.'/devices/'.$Dev[$blueprint]['directory']; |
|
79 | 79 | $this->device->signer = isset($Dev[$blueprint]['signer']) ? $Dev[$blueprint]['signer'] : 0; |
80 | 80 | $this->device->device_id = $blueprint; |
81 | 81 | $options = \devices\Devices::$Options; |