@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | $returnArray = []; |
66 | 66 | $returnArray['status'] = $status; |
67 | 67 | $returnArray['data'] = $data; |
68 | - $returnArray['tou'] = "Please consult Terms of Use at: //" . $host . \core\CAT::getRootUrlPath() . "/tou.php"; |
|
68 | + $returnArray['tou'] = "Please consult Terms of Use at: //".$host.\core\CAT::getRootUrlPath()."/tou.php"; |
|
69 | 69 | if (!empty($otherData)) { |
70 | 70 | $returnArray['otherdata'] = $otherData; |
71 | 71 | } |
@@ -294,8 +294,8 @@ discard block |
||
294 | 294 | */ |
295 | 295 | public function sendLogo($identifier, $type, $width, $height) { |
296 | 296 | $logo = $this->getLogo($identifier, $type, $width, $height); |
297 | - $blob = $logo === NULL ? file_get_contents(ROOT . '/web/resources/images/empty.png') : $logo['blob']; |
|
298 | - header("Content-type: " . $logo['filetype']); |
|
297 | + $blob = $logo === NULL ? file_get_contents(ROOT.'/web/resources/images/empty.png') : $logo['blob']; |
|
298 | + header("Content-type: ".$logo['filetype']); |
|
299 | 299 | header("Cache-Control:max-age=36000, must-revalidate"); |
300 | 300 | header($logo['expires']); |
301 | 301 | echo $blob; |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | $delProfiles[] = $ssid; |
85 | 85 | } |
86 | 86 | if ($cipher == 'TKIP') { |
87 | - $delProfiles[] = $ssid . ' (TKIP)'; |
|
87 | + $delProfiles[] = $ssid.' (TKIP)'; |
|
88 | 88 | } |
89 | 89 | } |
90 | 90 | $windowsProfile = []; |
@@ -92,13 +92,13 @@ discard block |
||
92 | 92 | $iterator = 0; |
93 | 93 | foreach ($allSSID as $ssid => $cipher) { |
94 | 94 | if ($cipher == 'TKIP') { |
95 | - $windowsProfile[$iterator] = $this->writeWLANprofile($ssid . ' (TKIP)', $ssid, 'WPA', 'TKIP', $eapConfig, $iterator); |
|
95 | + $windowsProfile[$iterator] = $this->writeWLANprofile($ssid.' (TKIP)', $ssid, 'WPA', 'TKIP', $eapConfig, $iterator); |
|
96 | 96 | $iterator++; |
97 | 97 | } |
98 | 98 | $windowsProfile[$iterator] = $this->writeWLANprofile($ssid, $ssid, 'WPA2', 'AES', $eapConfig, $iterator); |
99 | 99 | $iterator++; |
100 | 100 | } |
101 | - if (($this->device_id !== 'w8') && (count($this->attributes['internal:consortia']) > 0 )) { |
|
101 | + if (($this->device_id !== 'w8') && (count($this->attributes['internal:consortia']) > 0)) { |
|
102 | 102 | // this SSID name is later used in common.inc so if you decide to chage it here change it there as well |
103 | 103 | $ssid = 'cat-passpoint-profile'; |
104 | 104 | $windowsProfile[$iterator] = $this->writeWLANprofile($ssid, $ssid, 'WPA2', 'AES', $eapConfig, $iterator, TRUE); |
@@ -157,8 +157,8 @@ discard block |
||
157 | 157 | $retval .= $this->attributes['internal:realm'][0]; |
158 | 158 | } |
159 | 159 | $retval .= '</DomainName>'; |
160 | - $retval .= '<RoamingConsortium><OUI>' . |
|
161 | - implode('</OUI><OUI>', $this->attributes['internal:consortia']) . |
|
160 | + $retval .= '<RoamingConsortium><OUI>'. |
|
161 | + implode('</OUI><OUI>', $this->attributes['internal:consortia']). |
|
162 | 162 | '</OUI></RoamingConsortium>'; |
163 | 163 | $retval .= '</Hotspot2>'; |
164 | 164 | return $retval; |
@@ -174,11 +174,11 @@ discard block |
||
174 | 174 | $profileFileCont = '<EAPConfig><EapHostConfig xmlns="http://www.microsoft.com/provisioning/EapHostConfig"> |
175 | 175 | <EapMethod> |
176 | 176 | '; |
177 | - $profileFileCont .= '<Type xmlns="http://www.microsoft.com/provisioning/EapCommon">' . |
|
178 | - $this->selectedEap["OUTER"] . '</Type> |
|
177 | + $profileFileCont .= '<Type xmlns="http://www.microsoft.com/provisioning/EapCommon">'. |
|
178 | + $this->selectedEap["OUTER"].'</Type> |
|
179 | 179 | <VendorId xmlns="http://www.microsoft.com/provisioning/EapCommon">0</VendorId> |
180 | 180 | <VendorType xmlns="http://www.microsoft.com/provisioning/EapCommon">0</VendorType> |
181 | -<AuthorId xmlns="http://www.microsoft.com/provisioning/EapCommon">' . $authorId . '</AuthorId> |
|
181 | +<AuthorId xmlns="http://www.microsoft.com/provisioning/EapCommon">' . $authorId.'</AuthorId> |
|
182 | 182 | </EapMethod> |
183 | 183 | '; |
184 | 184 | return $profileFileCont; |
@@ -194,10 +194,10 @@ discard block |
||
194 | 194 | <eapTls:ServerValidation> |
195 | 195 | <eapTls:DisableUserPromptForServerValidation>true</eapTls:DisableUserPromptForServerValidation> |
196 | 196 | '; |
197 | - $profileFileCont .= '<eapTls:ServerNames>' . $this->servers . '</eapTls:ServerNames>'; |
|
197 | + $profileFileCont .= '<eapTls:ServerNames>'.$this->servers.'</eapTls:ServerNames>'; |
|
198 | 198 | foreach ($this->caArray as $certAuthority) { |
199 | 199 | if ($certAuthority['root']) { |
200 | - $profileFileCont .= "<eapTls:TrustedRootCA>" . $certAuthority['sha1'] . "</eapTls:TrustedRootCA>\n"; |
|
200 | + $profileFileCont .= "<eapTls:TrustedRootCA>".$certAuthority['sha1']."</eapTls:TrustedRootCA>\n"; |
|
201 | 201 | } |
202 | 202 | } |
203 | 203 | $profileFileCont .= '</eapTls:ServerValidation> |
@@ -215,10 +215,10 @@ discard block |
||
215 | 215 | $profileFileCont = ' |
216 | 216 | <ServerValidation> |
217 | 217 | '; |
218 | - $profileFileCont .= '<ServerNames>' . $this->servers . '</ServerNames> '; |
|
218 | + $profileFileCont .= '<ServerNames>'.$this->servers.'</ServerNames> '; |
|
219 | 219 | foreach ($this->caArray as $certAuthority) { |
220 | 220 | if ($certAuthority['root']) { |
221 | - $profileFileCont .= "<TrustedRootCAHash>" . chunk_split($certAuthority['sha1'], 2, ' ') . "</TrustedRootCAHash>\n"; |
|
221 | + $profileFileCont .= "<TrustedRootCAHash>".chunk_split($certAuthority['sha1'], 2, ' ')."</TrustedRootCAHash>\n"; |
|
222 | 222 | } |
223 | 223 | } |
224 | 224 | $profileFileCont .= '<DisablePrompt>true</DisablePrompt> |
@@ -261,10 +261,10 @@ discard block |
||
261 | 261 | $profileFileCont = ' |
262 | 262 | <ServerValidation> |
263 | 263 | <DisableUserPromptForServerValidation>true</DisableUserPromptForServerValidation> |
264 | -<ServerNames>' . $this->servers . '</ServerNames>'; |
|
264 | +<ServerNames>' . $this->servers.'</ServerNames>'; |
|
265 | 265 | foreach ($this->caArray as $certAuthority) { |
266 | 266 | if ($certAuthority['root']) { |
267 | - $profileFileCont .= "<TrustedRootCA>" . $certAuthority['sha1'] . "</TrustedRootCA>\n"; |
|
267 | + $profileFileCont .= "<TrustedRootCA>".$certAuthority['sha1']."</TrustedRootCA>\n"; |
|
268 | 268 | } |
269 | 269 | } |
270 | 270 | $profileFileCont .= '</ServerValidation> |
@@ -330,7 +330,7 @@ discard block |
||
330 | 330 | if ($this->useAnon) { |
331 | 331 | $profileFileCont .= '<IdentityPrivacy>true</IdentityPrivacy> |
332 | 332 | '; |
333 | - $profileFileCont .= '<AnonymousIdentity>' . $this->outerId . '</AnonymousIdentity> |
|
333 | + $profileFileCont .= '<AnonymousIdentity>'.$this->outerId.'</AnonymousIdentity> |
|
334 | 334 | '; |
335 | 335 | } else { |
336 | 336 | $profileFileCont .= '<IdentityPrivacy>false</IdentityPrivacy> |
@@ -352,10 +352,10 @@ discard block |
||
352 | 352 | $profileFileCont = ' |
353 | 353 | <Config xmlns="http://www.microsoft.com/provisioning/EapHostConfig"> |
354 | 354 | <EAPIdentityProviderList xmlns="urn:ietf:params:xml:ns:yang:ietf-eap-metadata"> |
355 | -<EAPIdentityProvider ID="' . $this->deviceUUID . '" namespace="urn:UUID"> |
|
355 | +<EAPIdentityProvider ID="' . $this->deviceUUID.'" namespace="urn:UUID"> |
|
356 | 356 | |
357 | 357 | <ProviderInfo> |
358 | -<DisplayName>' . $this->translateString($this->attributes['general:instname'][0], $this->codePage) . '</DisplayName> |
|
358 | +<DisplayName>' . $this->translateString($this->attributes['general:instname'][0], $this->codePage).'</DisplayName> |
|
359 | 359 | </ProviderInfo> |
360 | 360 | <AuthenticationMethods> |
361 | 361 | <AuthenticationMethod> |
@@ -367,7 +367,7 @@ discard block |
||
367 | 367 | if ($this->outerUser == '') { |
368 | 368 | $profileFileCont .= '<AnonymousIdentity>@</AnonymousIdentity>'; |
369 | 369 | } else { |
370 | - $profileFileCont .= '<AnonymousIdentity>' . $this->outerId . '</AnonymousIdentity>'; |
|
370 | + $profileFileCont .= '<AnonymousIdentity>'.$this->outerId.'</AnonymousIdentity>'; |
|
371 | 371 | } |
372 | 372 | } |
373 | 373 | $profileFileCont .= '</ClientSideCredential> |
@@ -375,7 +375,7 @@ discard block |
||
375 | 375 | $profileFileCont .= $this->glTtlsServerValidation(); |
376 | 376 | $profileFileCont .= ' |
377 | 377 | <InnerAuthenticationMethod> |
378 | -<NonEAPAuthMethod>' . \core\common\EAP::eapDisplayName($this->selectedEap)['INNER'] . '</NonEAPAuthMethod> |
|
378 | +<NonEAPAuthMethod>' . \core\common\EAP::eapDisplayName($this->selectedEap)['INNER'].'</NonEAPAuthMethod> |
|
379 | 379 | </InnerAuthenticationMethod> |
380 | 380 | <VendorSpecific> |
381 | 381 | <SessionResumption>false</SessionResumption> |
@@ -411,7 +411,7 @@ discard block |
||
411 | 411 | <UseWinLogonCredentials>false</UseWinLogonCredentials> |
412 | 412 | </EapType> |
413 | 413 | </Eap> |
414 | -<EnableQuarantineChecks>' . $nea . '</EnableQuarantineChecks> |
|
414 | +<EnableQuarantineChecks>' . $nea.'</EnableQuarantineChecks> |
|
415 | 415 | <RequireCryptoBinding>false</RequireCryptoBinding> |
416 | 416 | '; |
417 | 417 | if ($this->useAnon) { |
@@ -423,7 +423,7 @@ discard block |
||
423 | 423 | $profileFileCont .= '<AnonymousUserName/> |
424 | 424 | '; |
425 | 425 | } else { |
426 | - $profileFileCont .= '<AnonymousUserName>' . $this->outerUser . '</AnonymousUserName> |
|
426 | + $profileFileCont .= '<AnonymousUserName>'.$this->outerUser.'</AnonymousUserName> |
|
427 | 427 | '; |
428 | 428 | } |
429 | 429 | $profileFileCont .= '</IdentityPrivacy> |
@@ -472,7 +472,7 @@ discard block |
||
472 | 472 | private function prepareEapConfig() { |
473 | 473 | if ($this->useAnon) { |
474 | 474 | $this->outerUser = $this->attributes['internal:anon_local_value'][0]; |
475 | - $this->outerId = $this->outerUser . '@' . $this->attributes['internal:realm'][0]; |
|
475 | + $this->outerId = $this->outerUser.'@'.$this->attributes['internal:realm'][0]; |
|
476 | 476 | } |
477 | 477 | |
478 | 478 | $profileFileCont = $this->eapConfigHeader(); |
@@ -497,7 +497,7 @@ discard block |
||
497 | 497 | default: |
498 | 498 | break; |
499 | 499 | } |
500 | - return ['win' => $profileFileCont . '</EapHostConfig></EAPConfig>']; |
|
500 | + return ['win' => $profileFileCont.'</EapHostConfig></EAPConfig>']; |
|
501 | 501 | } |
502 | 502 | |
503 | 503 | /** |
@@ -514,10 +514,10 @@ discard block |
||
514 | 514 | private function writeWLANprofile($wlanProfileName, $ssid, $auth, $encryption, $eapConfig, $profileNumber, $hs20 = FALSE) { |
515 | 515 | $profileFileCont = '<?xml version="1.0"?> |
516 | 516 | <WLANProfile xmlns="http://www.microsoft.com/networking/WLAN/profile/v1"> |
517 | -<name>' . $wlanProfileName . '</name> |
|
517 | +<name>' . $wlanProfileName.'</name> |
|
518 | 518 | <SSIDConfig> |
519 | 519 | <SSID> |
520 | -<name>' . $ssid . '</name> |
|
520 | +<name>' . $ssid.'</name> |
|
521 | 521 | </SSID> |
522 | 522 | <nonBroadcast>true</nonBroadcast> |
523 | 523 | </SSIDConfig>'; |
@@ -531,8 +531,8 @@ discard block |
||
531 | 531 | <MSM> |
532 | 532 | <security> |
533 | 533 | <authEncryption> |
534 | -<authentication>' . $auth . '</authentication> |
|
535 | -<encryption>' . $encryption . '</encryption> |
|
534 | +<authentication>' . $auth.'</authentication> |
|
535 | +<encryption>' . $encryption.'</encryption> |
|
536 | 536 | <useOneX>true</useOneX> |
537 | 537 | </authEncryption> |
538 | 538 | '; |
@@ -559,7 +559,7 @@ discard block |
||
559 | 559 | mkdir('w8'); |
560 | 560 | } |
561 | 561 | $xmlFname = "w8/wlan_prof-$profileNumber.xml"; |
562 | - file_put_contents($xmlFname, $profileFileCont . $eapConfig['win'] . $closing); |
|
562 | + file_put_contents($xmlFname, $profileFileCont.$eapConfig['win'].$closing); |
|
563 | 563 | $this->loggerInstance->debug(2, "Installer has been written into directory $this->FPATH\n"); |
564 | 564 | return("\"$wlanProfileName\" \"$encryption\""); |
565 | 565 | } |
@@ -592,7 +592,7 @@ discard block |
||
592 | 592 | mkdir('w8'); |
593 | 593 | } |
594 | 594 | $xmlFname = "w8/lan_prof.xml"; |
595 | - file_put_contents($xmlFname, $profileFileCont . $eapConfig['win'] . $closing); |
|
595 | + file_put_contents($xmlFname, $profileFileCont.$eapConfig['win'].$closing); |
|
596 | 596 | $this->loggerInstance->debug(2, "Installer has been written into directory $this->FPATH\n"); |
597 | 597 | } |
598 | 598 | |
@@ -621,7 +621,7 @@ discard block |
||
621 | 621 | } |
622 | 622 | foreach ($caArray as $certAuthority) { |
623 | 623 | $store = $certAuthority['root'] ? "root" : "ca"; |
624 | - $fcontentsCerts .= '!insertmacro install_ca_cert "' . $certAuthority['file'] . '" "' . $certAuthority['sha1'] . '" "' . $store . "\"\n"; |
|
624 | + $fcontentsCerts .= '!insertmacro install_ca_cert "'.$certAuthority['file'].'" "'.$certAuthority['sha1'].'" "'.$store."\"\n"; |
|
625 | 625 | } |
626 | 626 | fwrite($fileHandleCerts, $fcontentsCerts); |
627 | 627 | fclose($fileHandleCerts); |
@@ -638,7 +638,7 @@ discard block |
||
638 | 638 | private function writeMainNSH($eap, $attr) { |
639 | 639 | $this->loggerInstance->debug(4, "writeMainNSH"); |
640 | 640 | $this->loggerInstance->debug(4, $attr); |
641 | - $this->loggerInstance->debug(4, "Device_id = " . $this->device_id . "\n"); |
|
641 | + $this->loggerInstance->debug(4, "Device_id = ".$this->device_id."\n"); |
|
642 | 642 | $fcontents = "!define W8\n"; |
643 | 643 | if ($this->device_id == 'w10') { |
644 | 644 | $fcontents .= "!define W10\n"; |
@@ -668,8 +668,8 @@ discard block |
||
668 | 668 | if ($eap == \core\common\EAP::EAPTYPE_SILVERBULLET) { |
669 | 669 | $fcontents .= "!define SILVERBULLET\n"; |
670 | 670 | } |
671 | - $fcontents .= '!define ' . $eapStr; |
|
672 | - $fcontents .= "\n" . '!define EXECLEVEL "' . $execLevel . '"'; |
|
671 | + $fcontents .= '!define '.$eapStr; |
|
672 | + $fcontents .= "\n".'!define EXECLEVEL "'.$execLevel.'"'; |
|
673 | 673 | $fcontents .= $this->writeNsisDefines($attr); |
674 | 674 | file_put_contents('main.nsh', $fcontents); |
675 | 675 | } |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | * <base_url>/copyright.php after deploying the software |
20 | 20 | */ |
21 | 21 | |
22 | -require_once dirname(dirname(__DIR__)) . "/config/_config.php"; |
|
22 | +require_once dirname(dirname(__DIR__))."/config/_config.php"; |
|
23 | 23 | \core\CAT::sessionStart(); |
24 | 24 | $loggerInstance = new \core\common\Logging(); |
25 | 25 | $loggerInstance->debug(4, "Sociopath test\n"); |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | return NULL; |
34 | 34 | } |
35 | 35 | $loggerInstance->debug(4, $_SESSION['EVIDENCE']['QUESTIONSASKED']); |
36 | - $loggerInstance->debug(4, "\nAnswer question " . $QNUM . "\n"); |
|
36 | + $loggerInstance->debug(4, "\nAnswer question ".$QNUM."\n"); |
|
37 | 37 | switch ($answer) { |
38 | 38 | case 1: |
39 | 39 | $loggerInstance->debug(4, "Revaluate with FALSE"); |
@@ -19,10 +19,10 @@ |
||
19 | 19 | * <base_url>/copyright.php after deploying the software |
20 | 20 | */ |
21 | 21 | |
22 | -require_once dirname(dirname(__DIR__)) . "/config/_config.php"; |
|
22 | +require_once dirname(dirname(__DIR__))."/config/_config.php"; |
|
23 | 23 | $realm = filter_input(INPUT_GET, 'realm', FILTER_SANITIZE_STRING); |
24 | -$visited = filter_input(INPUT_GET,'visited', FILTER_SANITIZE_STRING); |
|
25 | -$nro = filter_input(INPUT_GET,'nro', FILTER_SANITIZE_STRING); |
|
24 | +$visited = filter_input(INPUT_GET, 'visited', FILTER_SANITIZE_STRING); |
|
25 | +$nro = filter_input(INPUT_GET, 'nro', FILTER_SANITIZE_STRING); |
|
26 | 26 | \core\CAT::sessionStart(); |
27 | 27 | $languageObject = new core\common\Language(); |
28 | 28 | $languageObject->setTextDomain("diagonstics"); |
@@ -19,7 +19,7 @@ |
||
19 | 19 | * <base_url>/copyright.php after deploying the software |
20 | 20 | */ |
21 | 21 | |
22 | -require_once dirname(dirname(dirname(dirname(__FILE__)))) . "/config/_config.php"; |
|
22 | +require_once dirname(dirname(dirname(dirname(__FILE__))))."/config/_config.php"; |
|
23 | 23 | |
24 | 24 | \core\CAT::sessionStart(); |
25 | 25 |
@@ -19,7 +19,7 @@ |
||
19 | 19 | * <base_url>/copyright.php after deploying the software |
20 | 20 | */ |
21 | 21 | |
22 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
22 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
23 | 23 | |
24 | 24 | \core\CAT::sessionStart(); |
25 | 25 |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | |
84 | 84 | // use HTML5 geolocation |
85 | 85 | function locateMe() { |
86 | - $('#address').val(\"" . _("locating") . "\"); |
|
86 | + $('#address').val(\"" . _("locating")."\"); |
|
87 | 87 | navigator.geolocation.getCurrentPosition(locate_succes,locate_fail,{maximumAge:3600000, timeout:5000}); |
88 | 88 | } |
89 | 89 | |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | view.fit(extent, {padding: [10, 0, 10, 0]}); |
206 | 206 | } else { |
207 | 207 | view.setCenter([0,0]); |
208 | - locate_country('" . $cat->knownFederations[strtoupper($this->fedName)] . "'); // use the federation code to locate the country |
|
208 | + locate_country('" . $cat->knownFederations[strtoupper($this->fedName)]."'); // use the federation code to locate the country |
|
209 | 209 | map.setView(view); |
210 | 210 | } |
211 | 211 | view.setMaxZoom(20); |
@@ -227,14 +227,14 @@ discard block |
||
227 | 227 | function getAddressLocation() { |
228 | 228 | var city = $('#address').val(); |
229 | 229 | if(city == '') { |
230 | - alert(\"" . _("nothing entered in the address field") . "\"); |
|
230 | + alert(\"" . _("nothing entered in the address field")."\"); |
|
231 | 231 | return false; |
232 | 232 | } |
233 | 233 | city = city.replace(/\s*,\s*/g,',+'); |
234 | 234 | city = city.replace(/ +/,'+'); |
235 | 235 | $.get(addressService+'?format=json&addressdetails=0&q='+city, '', function(data) { |
236 | 236 | if (data[0] === undefined) { |
237 | - alert('" . _("Address not found, perhaps try another form, like putting the street number to the front.") . "'); |
|
237 | + alert('" . _("Address not found, perhaps try another form, like putting the street number to the front.")."'); |
|
238 | 238 | return; |
239 | 239 | } |
240 | 240 | showTmpPointer(data[0].lon, data[0].lat); |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | if ($this->readOnly) { |
286 | 286 | return "<div id='map' class='locationmap'></div><script>generateMap('map')</script>"; |
287 | 287 | } else { |
288 | - return $this->htmlPreEdit($wizard, $additional) . $this->findLocationHtml() . "<span id='location-prompt'>You can drag the pointer to the final location before you save the results.</span><div id='map' class='locationmap'></div><script>generateMap('map')</script>" . $this->htmlPostEdit(FALSE); |
|
288 | + return $this->htmlPreEdit($wizard, $additional).$this->findLocationHtml()."<span id='location-prompt'>You can drag the pointer to the final location before you save the results.</span><div id='map' class='locationmap'></div><script>generateMap('map')</script>".$this->htmlPostEdit(FALSE); |
|
289 | 289 | } |
290 | 290 | } |
291 | 291 | |
@@ -310,7 +310,7 @@ discard block |
||
310 | 310 | // we don't need this parameter in this subclass |
311 | 311 | unset($coords); |
312 | 312 | \core\common\Entity::intoThePotatoes(); |
313 | - $retval = "<button id='location_b_" . $number . "' class='location_button'>" . _("Click to see location") . " $number</button>"; |
|
313 | + $retval = "<button id='location_b_".$number."' class='location_button'>"._("Click to see location")." $number</button>"; |
|
314 | 314 | \core\common\Entity::outOfThePotatoes(); |
315 | 315 | return $retval; |
316 | 316 | } |
@@ -322,7 +322,7 @@ discard block |
||
322 | 322 | */ |
323 | 323 | private function findLocationHtml() { |
324 | 324 | \core\common\Entity::intoThePotatoes(); |
325 | - $retval = "<p>" . _("Address:") . " <input name='address' id='address' /><button type='button' onclick='getAddressLocation()'>" . _("Find address") . "</button> <button type='button' onclick='locateMe()'>" . _("Locate Me!") . "</button></p>"; |
|
325 | + $retval = "<p>"._("Address:")." <input name='address' id='address' /><button type='button' onclick='getAddressLocation()'>"._("Find address")."</button> <button type='button' onclick='locateMe()'>"._("Locate Me!")."</button></p>"; |
|
326 | 326 | \core\common\Entity::outOfThePotatoes(); |
327 | 327 | return $retval; |
328 | 328 | } |
@@ -338,14 +338,14 @@ discard block |
||
338 | 338 | case \core\Options::TYPECODE_TEXT: |
339 | 339 | case \core\Options::TYPECODE_COORDINATES: |
340 | 340 | case \core\Options::TYPECODE_INTEGER: |
341 | - $varName = $listOfEntries["$objId-" . self::VALIDATOR_FUNCTIONS[$optioninfo['type']]['field']]; |
|
341 | + $varName = $listOfEntries["$objId-".self::VALIDATOR_FUNCTIONS[$optioninfo['type']]['field']]; |
|
342 | 342 | if (!empty($varName)) { |
343 | 343 | $content = call_user_func_array([$this->validator, self::VALIDATOR_FUNCTIONS[$optioninfo['type']]['function']], array_merge([$varName], self::VALIDATOR_FUNCTIONS[$optioninfo['type']]['extraarg'])); |
344 | 344 | break; |
345 | 345 | } |
346 | 346 | continue 2; |
347 | 347 | case \core\Options::TYPECODE_BOOLEAN: |
348 | - $varName = $listOfEntries["$objId-" . \core\Options::TYPECODE_BOOLEAN]; |
|
348 | + $varName = $listOfEntries["$objId-".\core\Options::TYPECODE_BOOLEAN]; |
|
349 | 349 | if (!empty($varName)) { |
350 | 350 | $contentValid = $this->validator->boolean($varName); |
351 | 351 | if ($contentValid) { |
@@ -358,7 +358,7 @@ discard block |
||
358 | 358 | } |
359 | 359 | continue 2; |
360 | 360 | case \core\Options::TYPECODE_STRING: |
361 | - $previsionalContent = $listOfEntries["$objId-" . \core\Options::TYPECODE_STRING]; |
|
361 | + $previsionalContent = $listOfEntries["$objId-".\core\Options::TYPECODE_STRING]; |
|
362 | 362 | if (!empty($previsionalContent)) { |
363 | 363 | $content = $this->furtherStringChecks($objValue, $previsionalContent, $bad); |
364 | 364 | if ($content === FALSE) { |
@@ -369,15 +369,15 @@ discard block |
||
369 | 369 | continue 2; |
370 | 370 | case \core\Options::TYPECODE_FILE: |
371 | 371 | // this is either actually an uploaded file, or a reference to a DB entry of a previously uploaded file |
372 | - $reference = $listOfEntries["$objId-" . \core\Options::TYPECODE_STRING]; |
|
372 | + $reference = $listOfEntries["$objId-".\core\Options::TYPECODE_STRING]; |
|
373 | 373 | if (!empty($reference)) { // was already in, by ROWID reference, extract |
374 | 374 | // ROWID means it's a multi-line string (simple strings are inline in the form; so allow whitespace) |
375 | 375 | $content = $this->validator->string(urldecode($reference), TRUE); |
376 | 376 | break; |
377 | 377 | } |
378 | - $fileName = $listOfEntries["$objId-" . \core\Options::TYPECODE_FILE] ?? ""; |
|
378 | + $fileName = $listOfEntries["$objId-".\core\Options::TYPECODE_FILE] ?? ""; |
|
379 | 379 | if ($fileName != "") { // let's do the download |
380 | - $rawContent = \core\common\OutsideComm::downloadFile("file:///" . $fileName); |
|
380 | + $rawContent = \core\common\OutsideComm::downloadFile("file:///".$fileName); |
|
381 | 381 | |
382 | 382 | if ($rawContent === FALSE || !$this->checkUploadSanity($objValue, $rawContent)) { |
383 | 383 | $bad[] = $objValue; |
@@ -388,7 +388,7 @@ discard block |
||
388 | 388 | } |
389 | 389 | continue 2; |
390 | 390 | default: |
391 | - throw new Exception("Internal Error: Unknown option type " . $objValue . "!"); |
|
391 | + throw new Exception("Internal Error: Unknown option type ".$objValue."!"); |
|
392 | 392 | } |
393 | 393 | // lang can be NULL here, if it's not a multilang attribute, or a ROWID reference. Never mind that. |
394 | 394 | $retval[] = ["$objValue" => ["lang" => $languageFlag, "content" => $content]]; |
@@ -121,7 +121,7 @@ |
||
121 | 121 | if ($trailerPosition !== FALSE) { |
122 | 122 | $base = substr($scriptself, 0, $trailerPosition); |
123 | 123 | if ($base !== FALSE) { |
124 | - $url = "//$servername" . $base . "/logout_check.php"; |
|
124 | + $url = "//$servername".$base."/logout_check.php"; |
|
125 | 125 | } |
126 | 126 | } |
127 | 127 |