@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | $this->installerPath = $cache['path']; |
87 | 87 | if ($this->installerPath !== NULL && $token === NULL && $password === NULL) { |
88 | 88 | $this->loggerInstance->debug(4, "Using cached installer for: $device\n"); |
89 | - $installerProperties['link'] = "user/API.php?action=downloadInstaller&lang=" . $this->languageInstance->getLang() . "&profile=$profileId&device=$device&generatedfor=$generatedFor&openroaming=$openRoaming"; |
|
89 | + $installerProperties['link'] = "user/API.php?action=downloadInstaller&lang=".$this->languageInstance->getLang()."&profile=$profileId&device=$device&generatedfor=$generatedFor&openroaming=$openRoaming"; |
|
90 | 90 | $installerProperties['mime'] = $cache['mime']; |
91 | 91 | } else { |
92 | 92 | $myInstaller = $this->generateNewInstaller($device, $profile, $generatedFor, $openRoaming, $token, $password); |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | $this->loggerInstance->debug(5, "generateNewInstaller() - Device setup done"); |
180 | 180 | $installer = $dev->writeInstaller(); |
181 | 181 | $this->loggerInstance->debug(5, "generateNewInstaller() - writeInstaller complete"); |
182 | - $iPath = $dev->FPATH . '/tmp/' . $installer; |
|
182 | + $iPath = $dev->FPATH.'/tmp/'.$installer; |
|
183 | 183 | if ($iPath && is_file($iPath)) { |
184 | 184 | if (isset($dev->options['mime'])) { |
185 | 185 | $out['mime'] = $dev->options['mime']; |
@@ -187,17 +187,17 @@ discard block |
||
187 | 187 | $info = new \finfo(); |
188 | 188 | $out['mime'] = $info->file($iPath, FILEINFO_MIME_TYPE); |
189 | 189 | } |
190 | - $this->installerPath = $dev->FPATH . '/' . $installer; |
|
190 | + $this->installerPath = $dev->FPATH.'/'.$installer; |
|
191 | 191 | rename($iPath, $this->installerPath); |
192 | 192 | $integerEap = (new \core\common\EAP($dev->selectedEap))->getIntegerRep(); |
193 | 193 | $profile->updateCache($device, $this->installerPath, $out['mime'], $integerEap); |
194 | 194 | if (\config\Master::DEBUG_LEVEL < 4) { |
195 | - \core\common\Entity::rrmdir($dev->FPATH . '/tmp'); |
|
195 | + \core\common\Entity::rrmdir($dev->FPATH.'/tmp'); |
|
196 | 196 | } |
197 | - $this->loggerInstance->debug(4, "Generated installer: " . $this->installerPath . ": for: $device, EAP:" . $integerEap . ", openRoaming: $openRoaming\n"); |
|
198 | - $out['link'] = "user/API.php?action=downloadInstaller&lang=" . $this->languageInstance->getLang() . "&profile=" . $profile->identifier . "&device=$device&generatedfor=$generatedFor&openroaming=$openRoaming"; |
|
197 | + $this->loggerInstance->debug(4, "Generated installer: ".$this->installerPath.": for: $device, EAP:".$integerEap.", openRoaming: $openRoaming\n"); |
|
198 | + $out['link'] = "user/API.php?action=downloadInstaller&lang=".$this->languageInstance->getLang()."&profile=".$profile->identifier."&device=$device&generatedfor=$generatedFor&openroaming=$openRoaming"; |
|
199 | 199 | } else { |
200 | - $this->loggerInstance->debug(2, "Installer generation failed for: " . $profile->identifier . ":$device:" . $this->languageInstance->getLang() . "openRoaming: $openRoaming\n"); |
|
200 | + $this->loggerInstance->debug(2, "Installer generation failed for: ".$profile->identifier.":$device:".$this->languageInstance->getLang()."openRoaming: $openRoaming\n"); |
|
201 | 201 | $out['link'] = 0; |
202 | 202 | } |
203 | 203 | } |
@@ -321,13 +321,13 @@ discard block |
||
321 | 321 | $file = $this->installerPath; |
322 | 322 | $filetype = $output['mime']; |
323 | 323 | $this->loggerInstance->debug(4, "installer MIME type:$filetype\n"); |
324 | - header("Content-type: " . $filetype); |
|
324 | + header("Content-type: ".$filetype); |
|
325 | 325 | if ($filetype !== "application/x-wifi-config") { // for those installers to work on Android, Content-Disposition MUST NOT be set |
326 | - header('Content-Disposition: inline; filename="' . basename($file) . '"'); |
|
326 | + header('Content-Disposition: inline; filename="'.basename($file).'"'); |
|
327 | 327 | } else { |
328 | 328 | header('Content-Transfer-Encoding: base64'); |
329 | 329 | } |
330 | - header('Content-Length: ' . filesize($file)); |
|
330 | + header('Content-Length: '.filesize($file)); |
|
331 | 331 | ob_clean(); |
332 | 332 | flush(); |
333 | 333 | readfile($file); |
@@ -349,7 +349,7 @@ discard block |
||
349 | 349 | $filetype = $info->buffer($inputImage, FILEINFO_MIME_TYPE); |
350 | 350 | $offset = 60 * 60 * 24 * 30; |
351 | 351 | // gmdate cannot fail here - time() is its default argument (and integer), and we are adding an integer to it |
352 | - $expiresString = "Expires: " . /** @scrutinizer ignore-type */ gmdate("D, d M Y H:i:s", time() + $offset) . " GMT"; |
|
352 | + $expiresString = "Expires: "./** @scrutinizer ignore-type */ gmdate("D, d M Y H:i:s", time() + $offset)." GMT"; |
|
353 | 353 | $blob = $inputImage; |
354 | 354 | |
355 | 355 | if ($resize === TRUE) { |
@@ -405,7 +405,7 @@ discard block |
||
405 | 405 | $filetype = 'image/png'; // default, only one code path where it can become different |
406 | 406 | list($width, $height, $resize) = $this->testForResize($widthIn, $heightIn); |
407 | 407 | if ($resize) { |
408 | - $logoFile = ROOT . '/web/downloads/logos/' . $identifier . '_' . $width . '_' . $height . '.png'; |
|
408 | + $logoFile = ROOT.'/web/downloads/logos/'.$identifier.'_'.$width.'_'.$height.'.png'; |
|
409 | 409 | } |
410 | 410 | if (is_file($logoFile)) { // $logoFile could be an empty string but then we will get a FALSE |
411 | 411 | $this->loggerInstance->debug(4, "Using cached logo $logoFile for: $identifier\n"); |
@@ -517,7 +517,7 @@ discard block |
||
517 | 517 | if (!isset($device['match'])) { |
518 | 518 | continue; |
519 | 519 | } |
520 | - if (preg_match('/' . $device['match'] . '/', $browser)) { |
|
520 | + if (preg_match('/'.$device['match'].'/', $browser)) { |
|
521 | 521 | return $this->returnDevice($devId, $device); |
522 | 522 | } |
523 | 523 | } |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | const DOWNLOAD_REDIRECT_CONTINUE = 1054; |
52 | 52 | const SB_GO_AWAY = 1060; |
53 | 53 | const SB_FRONTPAGE_BIGDOWNLOADBUTTON = 1061; |
54 | -const SB_FRONTPAGE_ROLLER_CUSTOMBUILT= 1062; |
|
54 | +const SB_FRONTPAGE_ROLLER_CUSTOMBUILT = 1062; |
|
55 | 55 | |
56 | 56 | |
57 | 57 | /** |
@@ -103,13 +103,13 @@ discard block |
||
103 | 103 | ]; |
104 | 104 | $this->templates[WELCOME_ABOARD_TERMS] = ""; |
105 | 105 | foreach ($this->templates[NETWORK_TERMS_AND_PRIV] as $consortium => $terms) { |
106 | - $this->templates[WELCOME_ABOARD_TERMS] .= sprintf("<p>" . _("Please remember that when connecting to %s hotspots, the following <a href='%s'>Terms and Conditions</a> and <a href='%s'>Privacy Notice</a> apply.") . "</p>", $consortium, $terms['TOU_LINK'], $terms['PRIV_LINK']); |
|
106 | + $this->templates[WELCOME_ABOARD_TERMS] .= sprintf("<p>"._("Please remember that when connecting to %s hotspots, the following <a href='%s'>Terms and Conditions</a> and <a href='%s'>Privacy Notice</a> apply.")."</p>", $consortium, $terms['TOU_LINK'], $terms['PRIV_LINK']); |
|
107 | 107 | } |
108 | 108 | // $this->templates[WELCOME_ABOARD_TERMS] .= "<p>"._("I agree to be bound by these Terms and Conditions.")."</p>"; |
109 | 109 | $this->templates[WELCOME_ABOARD_BACKTODOWNLOADS] = _("Back to downloads"); |
110 | 110 | $this->templates[EDUROAM_WELCOME_ADVERTISING] = sprintf(_("we would like to warmly welcome you among the several million users of %s! From now on, you will be able to use internet access resources on thousands of universities, research centres and other places all over the globe. All of this completely free of charge!"), \config\ConfAssistant::CONSORTIUM['display_name']); |
111 | 111 | $this->templates[HEADING_TOPLEVEL_GREET] = sprintf(_("Welcome to %s"), \config\Master::APPEARANCE['productname']); |
112 | - $this->templates[HEADING_TOPLEVEL_PURPOSE] = sprintf(_("Connect your device to %s"),\config\ConfAssistant::CONSORTIUM['display_name']); |
|
112 | + $this->templates[HEADING_TOPLEVEL_PURPOSE] = sprintf(_("Connect your device to %s"), \config\ConfAssistant::CONSORTIUM['display_name']); |
|
113 | 113 | $this->templates[FRONTPAGE_ROLLER_EASY] = sprintf(_("%s installation made easy:"), \config\ConfAssistant::CONSORTIUM['display_name']); |
114 | 114 | $this->templates[FRONTPAGE_ROLLER_CUSTOMBUILT] = _("Custom built for your organisation"); |
115 | 115 | $this->templates[FRONTPAGE_BIGDOWNLOADBUTTON] = sprintf(_("Click here to download your %s installer"), \config\ConfAssistant::CONSORTIUM['display_name'], \config\ConfAssistant::CONSORTIUM['display_name']); |
@@ -44,8 +44,8 @@ discard block |
||
44 | 44 | $operatingSystem = $Gui->detectOS(); |
45 | 45 | $Gui->loggerInstance->debug(4, $operatingSystem); |
46 | 46 | if ($operatingSystem) { |
47 | - print "recognisedOS = '".$operatingSystem['device'] . "';\n"; |
|
48 | - print "recognisedOShs20 = '".$operatingSystem['hs20'] . "';\n"; |
|
47 | + print "recognisedOS = '".$operatingSystem['device']."';\n"; |
|
48 | + print "recognisedOShs20 = '".$operatingSystem['hs20']."';\n"; |
|
49 | 49 | $vendorlogo = $Gui->skinObject->findResourceUrl("IMAGES", "vendorlogo/"); |
50 | 50 | if ($vendorlogo !== FALSE) { |
51 | 51 | print "vendorlogo = '$vendorlogo';\n"; |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | } |
55 | 55 | } |
56 | 56 | |
57 | -print 'downloadMessage = "'.$Gui->textTemplates->templates[\web\lib\user\DOWNLOAD_MESSAGE] . '";'; |
|
57 | +print 'downloadMessage = "'.$Gui->textTemplates->templates[\web\lib\user\DOWNLOAD_MESSAGE].'";'; |
|
58 | 58 | //TODO modify this based on OS detection |
59 | 59 | $userAgent = $_SERVER['HTTP_USER_AGENT'] ?? ""; |
60 | 60 | if (preg_match('/Android/', $userAgent)) { |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | <?php echo $divs->divHeading($visibility); ?> |
84 | 84 | <div id="main_page"> |
85 | 85 | <div id="loading_ico"> |
86 | - <?php echo _("Authenticating") . "..." ?><br><img src="<?php echo $Gui->skinObject->findResourceUrl("IMAGES", "icons/loading51.gif"); ?>" alt="Authenticating ..."/> |
|
86 | + <?php echo _("Authenticating")."..." ?><br><img src="<?php echo $Gui->skinObject->findResourceUrl("IMAGES", "icons/loading51.gif"); ?>" alt="Authenticating ..."/> |
|
87 | 87 | </div> |
88 | 88 | <div id="info_overlay"> <!-- device info --> |
89 | 89 | <div id="info_window"></div> |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | public function divSilverbullet() { |
125 | 125 | $retval = " |
126 | 126 | <div id='silverbullet'>" |
127 | - .$this->Gui->textTemplates->templates[user\SB_GO_AWAY] . |
|
127 | + .$this->Gui->textTemplates->templates[user\SB_GO_AWAY] . |
|
128 | 128 | "</div> |
129 | 129 | "; |
130 | 130 | return $retval; |
@@ -293,8 +293,8 @@ discard block |
||
293 | 293 | } |
294 | 294 | |
295 | 295 | $retval .= "<td><button name='$d' class='other_os' id='$d'>".$D['display']."</button>" |
296 | - ."</td>" |
|
297 | - ."<td><button name='$d' class='more_info_b' id='info_b_$d'>i</button></td></tr>\n"; |
|
296 | + ."</td>" |
|
297 | + ."<td><button name='$d' class='more_info_b' id='info_b_$d'>i</button></td></tr>\n"; |
|
298 | 298 | $deviceIndex++; |
299 | 299 | } |
300 | 300 | $retval .= "</tbody>"; |
@@ -341,7 +341,7 @@ discard block |
||
341 | 341 | <tr> |
342 | 342 | <td>" . |
343 | 343 | $this->Gui->catCopyright |
344 | - ." |
|
344 | + ." |
|
345 | 345 | </td>"; |
346 | 346 | |
347 | 347 | if (!empty(\config\Master::APPEARANCE['privacy_notice_url'])) { |