@@ -35,7 +35,7 @@ |
||
35 | 35 | <div id="user_page" style="display:block"> |
36 | 36 | <?php echo $divs->divPagetitle("eduroam CAT Copyright and Licensing", ""); ?> |
37 | 37 | <div style="padding:20px"> |
38 | - <?php require dirname(dirname(__DIR__)) . "/copyright.inc.php"; ?> |
|
38 | + <?php require dirname(dirname(__DIR__))."/copyright.inc.php"; ?> |
|
39 | 39 | </div> |
40 | 40 | </div> |
41 | 41 | </div> |
@@ -43,10 +43,10 @@ discard block |
||
43 | 43 | $operatingSystem = $Gui->detectOS(); |
44 | 44 | $Gui->loggerInstance->debug(4, $operatingSystem); |
45 | 45 | if ($operatingSystem) { |
46 | - print "recognisedOS = '" . $operatingSystem['device'] . "';\n"; |
|
46 | + print "recognisedOS = '".$operatingSystem['device']."';\n"; |
|
47 | 47 | } |
48 | 48 | |
49 | -print 'downloadMessage = "' . $Gui->textTemplates->templates[\web\lib\user\DOWNLOAD_MESSAGE] . '";'; |
|
49 | +print 'downloadMessage = "'.$Gui->textTemplates->templates[\web\lib\user\DOWNLOAD_MESSAGE].'";'; |
|
50 | 50 | //TODO modify this based on OS detection |
51 | 51 | $userAgent = $_SERVER['HTTP_USER_AGENT'] ?? ""; |
52 | 52 | if (preg_match('/Android/', $userAgent)) { |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | <?php echo $divs->divHeading($visibility); ?> |
76 | 76 | <div id="main_page"> |
77 | 77 | <div id="loading_ico"> |
78 | - <?php echo _("Authenticating") . "..." ?><br><img src="<?php echo $Gui->skinObject->findResourceUrl("IMAGES", "icons/loading51.gif"); ?>" alt="Authenticating ..."/> |
|
78 | + <?php echo _("Authenticating")."..." ?><br><img src="<?php echo $Gui->skinObject->findResourceUrl("IMAGES", "icons/loading51.gif"); ?>" alt="Authenticating ..."/> |
|
79 | 79 | </div> |
80 | 80 | <div id="info_overlay"> <!-- device info --> |
81 | 81 | <div id="info_window"></div> |
@@ -91,7 +91,7 @@ |
||
91 | 91 | <?php if (empty($_REQUEST['idp'])) { ?> |
92 | 92 | <div id="front_page"> |
93 | 93 | <?php |
94 | - echo $divs->divTopWelcome(); |
|
94 | + echo $divs->divTopWelcome(); |
|
95 | 95 | // echo $divs->div_roller(); |
96 | 96 | // echo $divs->div_main_button(); ?> |
97 | 97 | </div> <!-- id="front_page" --> |
@@ -28,9 +28,9 @@ discard block |
||
28 | 28 | ?> |
29 | 29 | |
30 | 30 | <!-- JQuery --> |
31 | -<script type="text/javascript" src="<?php echo $Gui->skinObject->findResourceUrl("EXTERNAL","jquery/jquery.js") ?>"></script> |
|
32 | -<script type="text/javascript" src="<?php echo $Gui->skinObject->findResourceUrl("EXTERNAL","jquery/jquery-migrate-1.2.1.js") ?>"></script> |
|
33 | -<script type="text/javascript" src="<?php echo $Gui->skinObject->findResourceUrl("EXTERNAL","jquery/jquery-ui.js") ?>"></script> |
|
31 | +<script type="text/javascript" src="<?php echo $Gui->skinObject->findResourceUrl("EXTERNAL", "jquery/jquery.js") ?>"></script> |
|
32 | +<script type="text/javascript" src="<?php echo $Gui->skinObject->findResourceUrl("EXTERNAL", "jquery/jquery-migrate-1.2.1.js") ?>"></script> |
|
33 | +<script type="text/javascript" src="<?php echo $Gui->skinObject->findResourceUrl("EXTERNAL", "jquery/jquery-ui.js") ?>"></script> |
|
34 | 34 | <!-- JQuery --> |
35 | 35 | |
36 | 36 | <script type="text/javascript"> |
@@ -44,10 +44,10 @@ discard block |
||
44 | 44 | $operatingSystem = $Gui->detectOS(); |
45 | 45 | $Gui->loggerInstance->debug(4, $operatingSystem); |
46 | 46 | if ($operatingSystem) { |
47 | - print "recognisedOS = '" . $operatingSystem['device'] . "';\n"; |
|
47 | + print "recognisedOS = '".$operatingSystem['device']."';\n"; |
|
48 | 48 | } |
49 | 49 | |
50 | -print 'downloadMessage = "' . $Gui->textTemplates->templates[\web\lib\user\DOWNLOAD_MESSAGE] . '";'; |
|
50 | +print 'downloadMessage = "'.$Gui->textTemplates->templates[\web\lib\user\DOWNLOAD_MESSAGE].'";'; |
|
51 | 51 | //TODO modify this based on OS detection |
52 | 52 | if (preg_match('/Android/', $_SERVER['HTTP_USER_AGENT'])) { |
53 | 53 | $profile_list_size = 1; |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | include("user/js/cat_js.php"); |
59 | 59 | ?> |
60 | 60 | var loading_ico = new Image(); |
61 | - loading_ico.src = "<?php echo $Gui->skinObject->findResourceUrl("IMAGES","icons/loading51.gif")?>"; |
|
61 | + loading_ico.src = "<?php echo $Gui->skinObject->findResourceUrl("IMAGES", "icons/loading51.gif")?>"; |
|
62 | 62 | </script> |
63 | 63 | <?php $Gui->langObject->setTextDomain("web_user"); ?> |
64 | 64 | <!-- DiscoJuice --> |
@@ -67,9 +67,9 @@ discard block |
||
67 | 67 | front_page = 0; |
68 | 68 | var lang = "<?php echo($Gui->langObject->getLang()) ?>"; |
69 | 69 | </script> |
70 | -<link rel="stylesheet" type="text/css" href="<?php echo $Gui->skinObject->findResourceUrl("EXTERNAL","discojuice/css/discojuice.css")?>" /> |
|
70 | +<link rel="stylesheet" type="text/css" href="<?php echo $Gui->skinObject->findResourceUrl("EXTERNAL", "discojuice/css/discojuice.css")?>" /> |
|
71 | 71 | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no"> |
72 | -<link rel="stylesheet" media="screen" type="text/css" href="<?php echo $Gui->skinObject->findResourceUrl("CSS","cat-user.css");?>" /> |
|
72 | +<link rel="stylesheet" media="screen" type="text/css" href="<?php echo $Gui->skinObject->findResourceUrl("CSS", "cat-user.css"); ?>" /> |
|
73 | 73 | </head> |
74 | 74 | <body> |
75 | 75 | <div id="wrap"> |
@@ -77,14 +77,14 @@ discard block |
||
77 | 77 | <?php echo $divs->divHeading($visibility); ?> |
78 | 78 | <div id="main_page"> |
79 | 79 | <div id="loading_ico"> |
80 | - <?php echo _("Authenticating") . "..." ?><br><img src="<?php echo $Gui->skinObject->findResourceUrl("IMAGES","icons/loading51.gif")?>" alt="Authenticating ..."/> |
|
80 | + <?php echo _("Authenticating")."..." ?><br><img src="<?php echo $Gui->skinObject->findResourceUrl("IMAGES", "icons/loading51.gif")?>" alt="Authenticating ..."/> |
|
81 | 81 | </div> |
82 | 82 | <div id="info_overlay"> <!-- device info --> |
83 | 83 | <div id="info_window"></div> |
84 | - <img id="info_menu_close" class="close_button" src="<?php echo $Gui->skinObject->findResourceUrl("IMAGES","icons/button_cancel.png")?>" ALT="Close"/> |
|
84 | + <img id="info_menu_close" class="close_button" src="<?php echo $Gui->skinObject->findResourceUrl("IMAGES", "icons/button_cancel.png")?>" ALT="Close"/> |
|
85 | 85 | </div> |
86 | 86 | <div id="main_menu_info" style="display:none"> <!-- stuff triggered form main menu --> |
87 | - <img id="main_menu_close" class="close_button" src="<?php echo $Gui->skinObject->findResourceUrl("IMAGES","icons/button_cancel.png")?>" ALT="Close"/> |
|
87 | + <img id="main_menu_close" class="close_button" src="<?php echo $Gui->skinObject->findResourceUrl("IMAGES", "icons/button_cancel.png")?>" ALT="Close"/> |
|
88 | 88 | <div id="main_menu_content"></div> |
89 | 89 | </div> |
90 | 90 | <div id="main_body"> |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | */ |
21 | 21 | ?> |
22 | 22 | <?php |
23 | -require_once dirname(dirname(dirname(dirname(__FILE__)))) . "/config/_config.php"; |
|
23 | +require_once dirname(dirname(dirname(dirname(__FILE__))))."/config/_config.php"; |
|
24 | 24 | |
25 | 25 | $auth = new \web\lib\admin\Authentication(); |
26 | 26 | $uiElements = new \web\lib\admin\UIElements(); |
@@ -57,8 +57,8 @@ discard block |
||
57 | 57 | <?php |
58 | 58 | echo sprintf(_("On this page, you can add a new %s to your %s. Please fill out the form below to send out an email invitation to the new %s administrator."), $uiElements->nomenclatureInst, $uiElements->nomenclatureFed, $uiElements->nomenclatureInst); |
59 | 59 | if (CONFIG['DB']['enforce-external-sync']) { |
60 | - echo "<p>" . sprintf(_("You can either register a known %s (as defined in the %s database) or create a totally new %s."), $uiElements->nomenclatureInst, CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $uiElements->nomenclatureInst) . "</p>"; |
|
61 | - echo "<p>" . sprintf(_("The latter one is typically for an %s which is yet in a testing phase and therefore doesn't appear in the %s database yet."), $uiElements->nomenclatureInst, CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) . "</p>"; |
|
60 | + echo "<p>".sprintf(_("You can either register a known %s (as defined in the %s database) or create a totally new %s."), $uiElements->nomenclatureInst, CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $uiElements->nomenclatureInst)."</p>"; |
|
61 | + echo "<p>".sprintf(_("The latter one is typically for an %s which is yet in a testing phase and therefore doesn't appear in the %s database yet."), $uiElements->nomenclatureInst, CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'])."</p>"; |
|
62 | 62 | } |
63 | 63 | ?> |
64 | 64 | <hr/> |
@@ -68,12 +68,12 @@ discard block |
||
68 | 68 | <?php |
69 | 69 | if (CONFIG['DB']['enforce-external-sync']) { |
70 | 70 | echo "<tr><td> |
71 | - <input type='radio' name='creation' value='existing'>" . _("Existing IdP:") . "</input> |
|
71 | + <input type='radio' name='creation' value='existing'>" . _("Existing IdP:")."</input> |
|
72 | 72 | </td>"; |
73 | 73 | |
74 | 74 | echo "<td colspan='2'> |
75 | 75 | <select id='externals' name='externals' onchange='document.sendinvite.creation[0].checked=true; document.sendinvite.mailaddr.value=this.options[this.selectedIndex].id;'> |
76 | - <option value='FREETEXT'>" . _("--- select IdP here ---") . "</option>"; |
|
76 | + <option value='FREETEXT'>" . _("--- select IdP here ---")."</option>"; |
|
77 | 77 | |
78 | 78 | foreach ($feds as $fed_value) { |
79 | 79 | $thefed = new \core\Federation(strtoupper($fed_value['value'])); |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | $entities = $thefed->listExternalEntities(TRUE, \core\Federation::EDUROAM_DB_TYPE_IDP); |
83 | 83 | |
84 | 84 | foreach ($entities as $v) { |
85 | - echo "<option id='" . $v['contactlist'] . "' value='" . $v['ID'] . "'>[" . $fed_value['value'] . "] " . $v['name'] . "</option>"; |
|
85 | + echo "<option id='".$v['contactlist']."' value='".$v['ID']."'>[".$fed_value['value']."] ".$v['name']."</option>"; |
|
86 | 86 | } |
87 | 87 | } |
88 | 88 |
@@ -377,7 +377,7 @@ discard block |
||
377 | 377 | "eduroamCAT", |
378 | 378 | "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>", |
379 | 379 | "<a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>", |
380 | - "<a target='_blank' href='eduroamCAT-stable.apk'>" . _("as local download") . "</a>"), |
|
380 | + "<a target='_blank' href='eduroamCAT-stable.apk'>"._("as local download")."</a>"), |
|
381 | 381 | ], |
382 | 382 | ], |
383 | 383 | 'android_pie' => [ |
@@ -392,7 +392,7 @@ discard block |
||
392 | 392 | "eduroamCAT", |
393 | 393 | "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>", |
394 | 394 | "<a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>", |
395 | - "<a target='_blank' href='eduroamCAT-stable.apk'>" . _("as local download") . "</a>"), |
|
395 | + "<a target='_blank' href='eduroamCAT-stable.apk'>"._("as local download")."</a>"), |
|
396 | 396 | ], |
397 | 397 | ], |
398 | 398 | 'android_oreo' => [ |
@@ -407,7 +407,7 @@ discard block |
||
407 | 407 | "eduroamCAT", |
408 | 408 | "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>", |
409 | 409 | "<a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>", |
410 | - "<a target='_blank' href='eduroamCAT-stable.apk'>" . _("as local download") . "</a>"), |
|
410 | + "<a target='_blank' href='eduroamCAT-stable.apk'>"._("as local download")."</a>"), |
|
411 | 411 | ], |
412 | 412 | ], |
413 | 413 | 'android_nougat' => [ |
@@ -422,7 +422,7 @@ discard block |
||
422 | 422 | "eduroamCAT", |
423 | 423 | "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>", |
424 | 424 | "<a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>", |
425 | - "<a target='_blank' href='eduroamCAT-stable.apk'>" . _("as local download") . "</a>"), |
|
425 | + "<a target='_blank' href='eduroamCAT-stable.apk'>"._("as local download")."</a>"), |
|
426 | 426 | ], |
427 | 427 | ], |
428 | 428 | 'android_marshmallow' => [ |
@@ -437,7 +437,7 @@ discard block |
||
437 | 437 | "eduroamCAT", |
438 | 438 | "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>", |
439 | 439 | "<a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>", |
440 | - "<a target='_blank' href='eduroamCAT-stable.apk'>" . _("as local download") . "</a>"), |
|
440 | + "<a target='_blank' href='eduroamCAT-stable.apk'>"._("as local download")."</a>"), |
|
441 | 441 | ], |
442 | 442 | ], |
443 | 443 | 'android_lollipop' => [ |
@@ -452,7 +452,7 @@ discard block |
||
452 | 452 | "eduroamCAT", |
453 | 453 | "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>", |
454 | 454 | "<a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>", |
455 | - "<a target='_blank' href='eduroamCAT-stable.apk'>" . _("as local download") . "</a>"), |
|
455 | + "<a target='_blank' href='eduroamCAT-stable.apk'>"._("as local download")."</a>"), |
|
456 | 456 | ], |
457 | 457 | ], |
458 | 458 | 'android_kitkat' => [ |
@@ -467,7 +467,7 @@ discard block |
||
467 | 467 | "eduroamCAT", |
468 | 468 | "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>", |
469 | 469 | "<a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>", |
470 | - "<a target='_blank' href='eduroamCAT-stable.apk'>" . _("as local download") . "</a>"), |
|
470 | + "<a target='_blank' href='eduroamCAT-stable.apk'>"._("as local download")."</a>"), |
|
471 | 471 | ], |
472 | 472 | ], |
473 | 473 | 'android_43' => [ |
@@ -482,7 +482,7 @@ discard block |
||
482 | 482 | "eduroamCAT", |
483 | 483 | "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>", |
484 | 484 | "<a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>", |
485 | - "<a target='_blank' href='eduroamCAT-stable.apk'>" . _("as local download") . "</a>"), |
|
485 | + "<a target='_blank' href='eduroamCAT-stable.apk'>"._("as local download")."</a>"), |
|
486 | 486 | ], |
487 | 487 | ], |
488 | 488 | 'android_legacy' => [ |
@@ -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['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,9 +302,9 @@ 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); |
|
306 | - header('Content-Disposition: inline; filename="' . basename($file) . '"'); |
|
307 | - header('Content-Length: ' . filesize($file)); |
|
305 | + header("Content-type: ".$filetype); |
|
306 | + header('Content-Disposition: inline; filename="'.basename($file).'"'); |
|
307 | + header('Content-Length: '.filesize($file)); |
|
308 | 308 | ob_clean(); |
309 | 309 | flush(); |
310 | 310 | readfile($file); |
@@ -325,7 +325,7 @@ discard block |
||
325 | 325 | $filetype = $info->buffer($inputImage, FILEINFO_MIME_TYPE); |
326 | 326 | $offset = 60 * 60 * 24 * 30; |
327 | 327 | // gmdate cannot fail here - time() is its default argument (and integer), and we are adding an integer to it |
328 | - $expiresString = "Expires: " . /** @scrutinizer ignore-type */ gmdate("D, d M Y H:i:s", time() + $offset) . " GMT"; |
|
328 | + $expiresString = "Expires: "./** @scrutinizer ignore-type */ gmdate("D, d M Y H:i:s", time() + $offset)." GMT"; |
|
329 | 329 | $blob = $inputImage; |
330 | 330 | |
331 | 331 | if ($resize === TRUE) { |
@@ -380,7 +380,7 @@ discard block |
||
380 | 380 | $filetype = 'image/png'; // default, only one code path where it can become different |
381 | 381 | list($width, $height, $resize) = $this->testForResize($widthIn, $heightIn); |
382 | 382 | if ($resize) { |
383 | - $logoFile = ROOT . '/web/downloads/logos/' . $identifier . '_' . $width . '_' . $height . '.png'; |
|
383 | + $logoFile = ROOT.'/web/downloads/logos/'.$identifier.'_'.$width.'_'.$height.'.png'; |
|
384 | 384 | } |
385 | 385 | if (is_file($logoFile)) { // $logoFile could be an empty string but then we will get a FALSE |
386 | 386 | $this->loggerInstance->debug(4, "Using cached logo $logoFile for: $identifier\n"); |
@@ -473,7 +473,7 @@ discard block |
||
473 | 473 | if (!isset($device['match'])) { |
474 | 474 | continue; |
475 | 475 | } |
476 | - if (preg_match('/' . $device['match'] . '/', $browser)) { |
|
476 | + if (preg_match('/'.$device['match'].'/', $browser)) { |
|
477 | 477 | return $this->returnDevice($devId, $device); |
478 | 478 | } |
479 | 479 | } |
@@ -36,7 +36,7 @@ |
||
36 | 36 | * @return boolean |
37 | 37 | */ |
38 | 38 | |
39 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
39 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
40 | 40 | |
41 | 41 | // we are referring to $_SESSION later in the file |
42 | 42 | CAT_session_start(); |
@@ -23,54 +23,54 @@ |
||
23 | 23 | this is just an include file for Gui class definition |
24 | 24 | */ |
25 | 25 | $Faq = [ |
26 | - [ |
|
26 | + [ |
|
27 | 27 | 'id'=>'idp_not_listed', |
28 | 28 | 'title'=>_("My organisation is not listed. Can't I just use any of the other ones?"), |
29 | 29 | 'text'=>_("No! The installers contain security settings which are specific to the organisation. If you are not from that organisation, your device will detect that you are about to send your username and credential to an unauthorised server and will abort the login. Using an installer from a different organisation is <i>guaranteed to not work</i>!") |
30 | - ], |
|
31 | - [ |
|
30 | + ], |
|
31 | + [ |
|
32 | 32 | 'id'=>'idp_not_listed', |
33 | 33 | 'title'=>_("What can I do to get my organisation listed?"), |
34 | 34 | 'text'=>sprintf(_("Contact %s administrators within your organisation and request that they add their organisation to the system. It will take at most one hour of their time to get things done."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) |
35 | 35 | ], |
36 | - [ |
|
36 | + [ |
|
37 | 37 | 'id'=>'device_not_listed', |
38 | 38 | 'title'=>sprintf(_("My device is not listed! Does that mean I can't do %s?"),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']), |
39 | 39 | 'text'=>sprintf(_("No. The CAT tool can only support Operating Systems which can be automatically configured in some way. Many other devices can still be used with %s, but must be configured manually. Please contact your organisation to get help in setting up such a device."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) |
40 | - ], |
|
40 | + ], |
|
41 | 41 | |
42 | - [ |
|
42 | + [ |
|
43 | 43 | 'title'=>sprintf(_("I can connect to %s simply by providing username and password, what is the point of using an installer?"),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']), |
44 | 44 | 'text'=>sprintf(_("When you are connecting from an unconfigured device your security is at risk. The very point of preconfiguration is to set up security, when this is done, your device will first confirm that it talks to the correct authentication server and will never send your password to an untrusted one.")) |
45 | 45 | ], |
46 | - [ |
|
46 | + [ |
|
47 | 47 | 'title'=>sprintf(_("Is it safe to use %s installers?"),CONFIG['APPEARANCE']['productname']), |
48 | 48 | 'text'=>sprintf(_("%s installers configure security settings on your device, therefore you should be sure that you are using genuine ones."),CONFIG['APPEARANCE']['productname']).' '.( isset(CONFIG_CONFASSISTANT['CONSORTIUM']['signer_name']) && CONFIG_CONFASSISTANT['CONSORTIUM']['signer_name'] != "" ? sprintf(_("This is why %s installers are digitally signed by %s. Watch out for a system message confirming this."),CONFIG['APPEARANCE']['productname'],CONFIG_CONFASSISTANT['CONSORTIUM']['signer_name']):""), |
49 | 49 | |
50 | 50 | ], |
51 | - [ |
|
51 | + [ |
|
52 | 52 | 'title'=>_("Windows 'SmartScreen' or 'Internet Explorer' tell me that the file is not commonly downloaded and possibly harmful. Should I be concerned?"), |
53 | 53 | 'text'=>_("Contrary to what the name suggests, 'SmartScreen' isn't actually very smart. The warning merely means that the file has not yet been downloaded by enough users to make Microsoft consider it popular (which would strangely enough make it be considered 'safe'). This message alone is not a security problem.")." ".(isset(CONFIG_CONFASSISTANT['CONSORTIUM']['signer_name']) && CONFIG_CONFASSISTANT['CONSORTIUM']['signer_name'] != "" ? sprintf(_("So long as the file is carrying a valid signature from %s, the download is safe."),CONFIG_CONFASSISTANT['CONSORTIUM']['signer_name'])." ":"").sprintf(_("Please see also Microsoft's FAQ regarding SmartScreen at %s."),"<a href='http://windows.microsoft.com/en-US/windows7/SmartScreen-Filter-frequently-asked-questions-IE9?SignedIn=1'>Microsoft FAQ</a>") |
54 | 54 | |
55 | 55 | ], |
56 | - [ |
|
56 | + [ |
|
57 | 57 | 'title'=>sprintf(_("I can see %s network and my device is configured but it does not connect, what can be the cause?"),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']), |
58 | - 'text'=>sprintf(_("There can be a number of different reasons. The network you see may not be a genuine %s one and your device silently drops the connection attempt; there may be something wrong with the configuration of the network; your account may have expired; there may be a connection problem with your home authentication server; you may have broken the regulations of the network you are using and have been refused access as a consequence. You should contact your organisation and report the problem, the administrators should be able to trace your connections."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) |
|
58 | + 'text'=>sprintf(_("There can be a number of different reasons. The network you see may not be a genuine %s one and your device silently drops the connection attempt; there may be something wrong with the configuration of the network; your account may have expired; there may be a connection problem with your home authentication server; you may have broken the regulations of the network you are using and have been refused access as a consequence. You should contact your organisation and report the problem, the administrators should be able to trace your connections."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) |
|
59 | 59 | ], |
60 | - [ |
|
60 | + [ |
|
61 | 61 | 'id'=>'contact', |
62 | 62 | 'title'=>sprintf(_("I have a question about this web site. Whom should I contact?")), |
63 | 63 | 'text'=>sprintf(_("You should send a mail to %s."),CONFIG['APPEARANCE']['support-contact']['display']) |
64 | - ], |
|
64 | + ], |
|
65 | 65 | ]; |
66 | 66 | |
67 | 67 | if (CONFIG_CONFASSISTANT['CONSORTIUM']['name'] == "eduroam") { |
68 | 68 | $eduroamDb = new core\ExternalEduroamDBData(); |
69 | 69 | $SPs = $eduroamDb->allServiceProviders(); |
70 | - array_push($Faq, |
|
71 | - [ |
|
72 | - 'id'=>'what_is_'.CONFIG_CONFASSISTANT['CONSORTIUM']['name'], |
|
73 | - 'title'=>sprintf(_("What is this %s thing anyway?"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']), |
|
74 | - 'text'=>sprintf(_("%s is a global WiFi roaming consortium which gives members of education and research access to the internet <i>for free</i> on all %s hotspots on the planet. There are several million %s users already, enjoying free internet access on more than %d hotspots! Visit <a href='http://www.eduroam.org'>the %s homepage</a> or <a href='http://monitor.eduroam.org/map_service_loc.php'>the %s location map</a> for more details."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'],CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'],CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $SPs, CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) |
|
75 | - ]); |
|
70 | + array_push($Faq, |
|
71 | + [ |
|
72 | + 'id'=>'what_is_'.CONFIG_CONFASSISTANT['CONSORTIUM']['name'], |
|
73 | + 'title'=>sprintf(_("What is this %s thing anyway?"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']), |
|
74 | + 'text'=>sprintf(_("%s is a global WiFi roaming consortium which gives members of education and research access to the internet <i>for free</i> on all %s hotspots on the planet. There are several million %s users already, enjoying free internet access on more than %d hotspots! Visit <a href='http://www.eduroam.org'>the %s homepage</a> or <a href='http://monitor.eduroam.org/map_service_loc.php'>the %s location map</a> for more details."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'],CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'],CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $SPs, CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) |
|
75 | + ]); |
|
76 | 76 | } |
@@ -31,36 +31,36 @@ discard block |
||
31 | 31 | [ |
32 | 32 | 'id'=>'idp_not_listed', |
33 | 33 | 'title'=>_("What can I do to get my organisation listed?"), |
34 | - 'text'=>sprintf(_("Contact %s administrators within your organisation and request that they add their organisation to the system. It will take at most one hour of their time to get things done."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) |
|
34 | + 'text'=>sprintf(_("Contact %s administrators within your organisation and request that they add their organisation to the system. It will take at most one hour of their time to get things done."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) |
|
35 | 35 | ], |
36 | 36 | [ |
37 | 37 | 'id'=>'device_not_listed', |
38 | - 'title'=>sprintf(_("My device is not listed! Does that mean I can't do %s?"),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']), |
|
39 | - 'text'=>sprintf(_("No. The CAT tool can only support Operating Systems which can be automatically configured in some way. Many other devices can still be used with %s, but must be configured manually. Please contact your organisation to get help in setting up such a device."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) |
|
38 | + 'title'=>sprintf(_("My device is not listed! Does that mean I can't do %s?"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']), |
|
39 | + 'text'=>sprintf(_("No. The CAT tool can only support Operating Systems which can be automatically configured in some way. Many other devices can still be used with %s, but must be configured manually. Please contact your organisation to get help in setting up such a device."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) |
|
40 | 40 | ], |
41 | 41 | |
42 | 42 | [ |
43 | - 'title'=>sprintf(_("I can connect to %s simply by providing username and password, what is the point of using an installer?"),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']), |
|
43 | + 'title'=>sprintf(_("I can connect to %s simply by providing username and password, what is the point of using an installer?"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']), |
|
44 | 44 | 'text'=>sprintf(_("When you are connecting from an unconfigured device your security is at risk. The very point of preconfiguration is to set up security, when this is done, your device will first confirm that it talks to the correct authentication server and will never send your password to an untrusted one.")) |
45 | 45 | ], |
46 | 46 | [ |
47 | - 'title'=>sprintf(_("Is it safe to use %s installers?"),CONFIG['APPEARANCE']['productname']), |
|
48 | - 'text'=>sprintf(_("%s installers configure security settings on your device, therefore you should be sure that you are using genuine ones."),CONFIG['APPEARANCE']['productname']).' '.( isset(CONFIG_CONFASSISTANT['CONSORTIUM']['signer_name']) && CONFIG_CONFASSISTANT['CONSORTIUM']['signer_name'] != "" ? sprintf(_("This is why %s installers are digitally signed by %s. Watch out for a system message confirming this."),CONFIG['APPEARANCE']['productname'],CONFIG_CONFASSISTANT['CONSORTIUM']['signer_name']):""), |
|
47 | + 'title'=>sprintf(_("Is it safe to use %s installers?"), CONFIG['APPEARANCE']['productname']), |
|
48 | + 'text'=>sprintf(_("%s installers configure security settings on your device, therefore you should be sure that you are using genuine ones."), CONFIG['APPEARANCE']['productname']).' '.(isset(CONFIG_CONFASSISTANT['CONSORTIUM']['signer_name']) && CONFIG_CONFASSISTANT['CONSORTIUM']['signer_name'] != "" ? sprintf(_("This is why %s installers are digitally signed by %s. Watch out for a system message confirming this."), CONFIG['APPEARANCE']['productname'], CONFIG_CONFASSISTANT['CONSORTIUM']['signer_name']) : ""), |
|
49 | 49 | |
50 | 50 | ], |
51 | 51 | [ |
52 | 52 | 'title'=>_("Windows 'SmartScreen' or 'Internet Explorer' tell me that the file is not commonly downloaded and possibly harmful. Should I be concerned?"), |
53 | - 'text'=>_("Contrary to what the name suggests, 'SmartScreen' isn't actually very smart. The warning merely means that the file has not yet been downloaded by enough users to make Microsoft consider it popular (which would strangely enough make it be considered 'safe'). This message alone is not a security problem.")." ".(isset(CONFIG_CONFASSISTANT['CONSORTIUM']['signer_name']) && CONFIG_CONFASSISTANT['CONSORTIUM']['signer_name'] != "" ? sprintf(_("So long as the file is carrying a valid signature from %s, the download is safe."),CONFIG_CONFASSISTANT['CONSORTIUM']['signer_name'])." ":"").sprintf(_("Please see also Microsoft's FAQ regarding SmartScreen at %s."),"<a href='http://windows.microsoft.com/en-US/windows7/SmartScreen-Filter-frequently-asked-questions-IE9?SignedIn=1'>Microsoft FAQ</a>") |
|
53 | + 'text'=>_("Contrary to what the name suggests, 'SmartScreen' isn't actually very smart. The warning merely means that the file has not yet been downloaded by enough users to make Microsoft consider it popular (which would strangely enough make it be considered 'safe'). This message alone is not a security problem.")." ".(isset(CONFIG_CONFASSISTANT['CONSORTIUM']['signer_name']) && CONFIG_CONFASSISTANT['CONSORTIUM']['signer_name'] != "" ? sprintf(_("So long as the file is carrying a valid signature from %s, the download is safe."), CONFIG_CONFASSISTANT['CONSORTIUM']['signer_name'])." " : "").sprintf(_("Please see also Microsoft's FAQ regarding SmartScreen at %s."), "<a href='http://windows.microsoft.com/en-US/windows7/SmartScreen-Filter-frequently-asked-questions-IE9?SignedIn=1'>Microsoft FAQ</a>") |
|
54 | 54 | |
55 | 55 | ], |
56 | 56 | [ |
57 | - 'title'=>sprintf(_("I can see %s network and my device is configured but it does not connect, what can be the cause?"),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']), |
|
58 | - 'text'=>sprintf(_("There can be a number of different reasons. The network you see may not be a genuine %s one and your device silently drops the connection attempt; there may be something wrong with the configuration of the network; your account may have expired; there may be a connection problem with your home authentication server; you may have broken the regulations of the network you are using and have been refused access as a consequence. You should contact your organisation and report the problem, the administrators should be able to trace your connections."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) |
|
57 | + 'title'=>sprintf(_("I can see %s network and my device is configured but it does not connect, what can be the cause?"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']), |
|
58 | + 'text'=>sprintf(_("There can be a number of different reasons. The network you see may not be a genuine %s one and your device silently drops the connection attempt; there may be something wrong with the configuration of the network; your account may have expired; there may be a connection problem with your home authentication server; you may have broken the regulations of the network you are using and have been refused access as a consequence. You should contact your organisation and report the problem, the administrators should be able to trace your connections."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) |
|
59 | 59 | ], |
60 | 60 | [ |
61 | 61 | 'id'=>'contact', |
62 | 62 | 'title'=>sprintf(_("I have a question about this web site. Whom should I contact?")), |
63 | - 'text'=>sprintf(_("You should send a mail to %s."),CONFIG['APPEARANCE']['support-contact']['display']) |
|
63 | + 'text'=>sprintf(_("You should send a mail to %s."), CONFIG['APPEARANCE']['support-contact']['display']) |
|
64 | 64 | ], |
65 | 65 | ]; |
66 | 66 | |
@@ -71,6 +71,6 @@ discard block |
||
71 | 71 | [ |
72 | 72 | 'id'=>'what_is_'.CONFIG_CONFASSISTANT['CONSORTIUM']['name'], |
73 | 73 | 'title'=>sprintf(_("What is this %s thing anyway?"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']), |
74 | - 'text'=>sprintf(_("%s is a global WiFi roaming consortium which gives members of education and research access to the internet <i>for free</i> on all %s hotspots on the planet. There are several million %s users already, enjoying free internet access on more than %d hotspots! Visit <a href='http://www.eduroam.org'>the %s homepage</a> or <a href='http://monitor.eduroam.org/map_service_loc.php'>the %s location map</a> for more details."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'],CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'],CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $SPs, CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) |
|
74 | + 'text'=>sprintf(_("%s is a global WiFi roaming consortium which gives members of education and research access to the internet <i>for free</i> on all %s hotspots on the planet. There are several million %s users already, enjoying free internet access on more than %d hotspots! Visit <a href='http://www.eduroam.org'>the %s homepage</a> or <a href='http://monitor.eduroam.org/map_service_loc.php'>the %s location map</a> for more details."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $SPs, CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) |
|
75 | 75 | ]); |
76 | 76 | } |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | return $this->counter; |
105 | 105 | } |
106 | 106 | |
107 | - $cachedNumber = @file_get_contents(ROOT . "/var/tmp/cachedSPNumber.serialised"); |
|
107 | + $cachedNumber = @file_get_contents(ROOT."/var/tmp/cachedSPNumber.serialised"); |
|
108 | 108 | if ($cachedNumber !== FALSE) { |
109 | 109 | $numberData = unserialize($cachedNumber); |
110 | 110 | $now = new \DateTime(); |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | while ($iterator = mysqli_fetch_object(/** @scrutinizer ignore-type */ $query)) { |
120 | 120 | $this->counter = $iterator->total; |
121 | 121 | } |
122 | - file_put_contents(ROOT . "/var/tmp/cachedSPNumber.serialised", serialize(["number" => $this->counter, "timestamp" => new \DateTime()])); |
|
122 | + file_put_contents(ROOT."/var/tmp/cachedSPNumber.serialised", serialize(["number" => $this->counter, "timestamp" => new \DateTime()])); |
|
123 | 123 | } |
124 | 124 | } |
125 | 125 |