@@ -103,9 +103,9 @@ discard block |
||
103 | 103 | $dummy_inst2 = _("organisation"); |
104 | 104 | // and do something useless with the strings so that there's no "unused" complaint |
105 | 105 | // by Scrutinizer |
106 | - if( $dummy_NRO . $dummy_inst1 . $dummy_inst2 == "") { |
|
106 | + if ($dummy_NRO . $dummy_inst1 . $dummy_inst2 == "") { |
|
107 | 107 | // oh well. |
108 | - explode(' ',$dummy_NRO); |
|
108 | + explode(' ', $dummy_NRO); |
|
109 | 109 | } |
110 | 110 | |
111 | 111 | $this->nomenclature_fed = _(CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_federation']); |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | } |
215 | 215 | if (isset($this->attributes['general:logo_file'])) { |
216 | 216 | $this->loggerInstance->debug(5, "saving IDP logo\n"); |
217 | - $this->attributes['internal:logo_file'] = $this->saveLogoFile($this->attributes['general:logo_file'],'idp'); |
|
217 | + $this->attributes['internal:logo_file'] = $this->saveLogoFile($this->attributes['general:logo_file'], 'idp'); |
|
218 | 218 | } |
219 | 219 | if (isset($this->attributes['fed:logo_file'])) { |
220 | 220 | $this->loggerInstance->debug(5, "saving FED logo\n"); |
@@ -586,7 +586,7 @@ discard block |
||
586 | 586 | * @return array list of filenames and the mime types |
587 | 587 | * @throws Exception |
588 | 588 | */ |
589 | - private function saveLogoFile($logos,$type) { |
|
589 | + private function saveLogoFile($logos, $type) { |
|
590 | 590 | $iterator = 0; |
591 | 591 | $returnarray = []; |
592 | 592 | foreach ($logos as $blob) { |
@@ -47,9 +47,9 @@ discard block |
||
47 | 47 | $dummy_inst1 = _("identity provider"); |
48 | 48 | $dummy_inst2 = _("organisation"); |
49 | 49 | // and do something useless with the strings so that there's no "unused" complaint |
50 | - if ( $dummy_NRO . $dummy_inst1 . $dummy_inst2 == "") { |
|
50 | + if ($dummy_NRO . $dummy_inst1 . $dummy_inst2 == "") { |
|
51 | 51 | // Oh well. |
52 | - explode(' ',$dummy_NRO); |
|
52 | + explode(' ', $dummy_NRO); |
|
53 | 53 | } |
54 | 54 | $this->nomenclature_fed = _(CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_federation']); |
55 | 55 | $this->nomenclature_inst = _(CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_institution']); |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | } |
188 | 188 | break; |
189 | 189 | case "boolean": |
190 | - $retval .= "<tr><td>" . $this->displayName($option['name']) . "</td><td>$language</td><td><strong>" . ($content == "on" ? _("on") : _("off") ) . "</strong></td></tr>"; |
|
190 | + $retval .= "<tr><td>" . $this->displayName($option['name']) . "</td><td>$language</td><td><strong>" . ($content == "on" ? _("on") : _("off")) . "</strong></td></tr>"; |
|
191 | 191 | break; |
192 | 192 | default: |
193 | 193 | $retval .= "<tr><td>" . $this->displayName($option['name']) . "</td><td>$language</td><td><strong>$content</strong></td></tr>"; |
@@ -314,7 +314,7 @@ discard block |
||
314 | 314 | |
315 | 315 | private function checkROWIDpresence($reference) { |
316 | 316 | $found = preg_match("/^ROWID-.*/", $reference); |
317 | - if ($found != 1) { // get excited on not-found AND on execution error |
|
317 | + if ($found != 1) { // get excited on not-found AND on execution error |
|
318 | 318 | throw new Exception("Error, ROWID expected."); |
319 | 319 | } |
320 | 320 | } |
@@ -337,7 +337,7 @@ discard block |
||
337 | 337 | |
338 | 338 | $details['name'] = preg_replace('/(.)\/(.)/', "$1<br/>$2", $details['name']); |
339 | 339 | $details['name'] = preg_replace('/\//', "", $details['name']); |
340 | - $certstatus = ( $details['root'] == 1 ? "R" : "I"); |
|
340 | + $certstatus = ($details['root'] == 1 ? "R" : "I"); |
|
341 | 341 | if ($details['ca'] == 0 && $details['root'] != 1) { |
342 | 342 | return "<div class='ca-summary' style='background-color:red'><div style='position:absolute; right: 0px; width:20px; height:20px; background-color:maroon; border-radius:10px; text-align: center;'><div style='padding-top:3px; font-weight:bold; color:#ffffff;'>S</div></div>" . _("This is a <strong>SERVER</strong> certificate!") . "<br/>" . $details['name'] . "</div>"; |
343 | 343 | } |
@@ -14,6 +14,6 @@ |
||
14 | 14 | $validator = new \web\lib\common\InputValidation(); |
15 | 15 | |
16 | 16 | echo "<pre>"; |
17 | -echo "Testing ".$validator->realm(filter_input(INPUT_GET,'realm', FILTER_SANITIZE_STRING))." in ".$validator->string(filter_input(INPUT_GET, 'visited', FILTER_SANITIZE_STRING)); |
|
17 | +echo "Testing " . $validator->realm(filter_input(INPUT_GET, 'realm', FILTER_SANITIZE_STRING)) . " in " . $validator->string(filter_input(INPUT_GET, 'visited', FILTER_SANITIZE_STRING)); |
|
18 | 18 | print_r($telepath->magic()); |
19 | 19 | echo "</pre>"; |
@@ -29,6 +29,6 @@ |
||
29 | 29 | $link = \core\ProfileSilverbullet::generateTokenLink($cleanToken); |
30 | 30 | header("Content-Type:text/html;charset=utf-8"); |
31 | 31 | ?> |
32 | -<h1 style='text-align:center;'><?php echo _("Invitation Token QR Code");?></h1> |
|
33 | -<img style='float:none' src='data:image/png;base64,<?php echo base64_encode($uiElements->pngInjectConsortiumLogo(\QRcode::png($link, FALSE, QR_ECLEVEL_Q, 11), 11));?>'/> |
|
34 | -<p>(<a href='<?php echo $link;?>'><?php echo $link;?>)</a></p> |
|
32 | +<h1 style='text-align:center;'><?php echo _("Invitation Token QR Code"); ?></h1> |
|
33 | +<img style='float:none' src='data:image/png;base64,<?php echo base64_encode($uiElements->pngInjectConsortiumLogo(\QRcode::png($link, FALSE, QR_ECLEVEL_Q, 11), 11)); ?>'/> |
|
34 | +<p>(<a href='<?php echo $link; ?>'><?php echo $link; ?>)</a></p> |
@@ -8,12 +8,12 @@ |
||
8 | 8 | ******************************************************************************* |
9 | 9 | */ |
10 | 10 | ?> |
11 | -<h1>Example Skin (Pick-Up and Status page for <?php echo \core\ProfileSilverbullet::PRODUCTNAME;?>)</h1> |
|
12 | -<img src="<?php echo $Gui->skinObject->findresourceUrl("IMAGES","consortium_logo.png");?>"/> |
|
11 | +<h1>Example Skin (Pick-Up and Status page for <?php echo \core\ProfileSilverbullet::PRODUCTNAME; ?>)</h1> |
|
12 | +<img src="<?php echo $Gui->skinObject->findresourceUrl("IMAGES", "consortium_logo.png"); ?>"/> |
|
13 | 13 | <p>This skin is much more sober and less bloated than the default one. As it happens, it also doesn't do anything.</p> |
14 | 14 | <p>But at least it goes to show that it's possible to include custom images/CSS/external software using findResourceUrl(..., $filename): |
15 | -<img src="<?php echo $Gui->skinObject->findresourceUrl("IMAGES","custom.png");?>"/> |
|
16 | -<p>For <?php echo \core\ProfileSilverbullet::PRODUCTNAME;?>, this page can make use of the request status info we have collected prior to invocation of the skinned page:</p> |
|
15 | +<img src="<?php echo $Gui->skinObject->findresourceUrl("IMAGES", "custom.png"); ?>"/> |
|
16 | +<p>For <?php echo \core\ProfileSilverbullet::PRODUCTNAME; ?>, this page can make use of the request status info we have collected prior to invocation of the skinned page:</p> |
|
17 | 17 | <pre> |
18 | - <?php print_r($statusInfo);?> |
|
18 | + <?php print_r($statusInfo); ?> |
|
19 | 19 | </pre> |
@@ -12,52 +12,52 @@ |
||
12 | 12 | this is just an include file for Gui class definition |
13 | 13 | */ |
14 | 14 | $Faq = [ |
15 | - [ |
|
15 | + [ |
|
16 | 16 | 'id'=>'idp_not_listed', |
17 | 17 | 'title'=>sprintf(_("My %s is not listed. Can't I just use any of the other ones?"),$Gui->nomenclature_inst), |
18 | 18 | 'text'=>sprintf(_("No! The installers contain security settings which are specific to the %s. If you are not from that %s, your computer will detect that you are about to send your username and credential to an unauthorised server and will abort the login. Using a different %s installer is <i>guaranteed to not work</i>!"), $Gui->nomenclature_inst, $Gui->nomenclature_inst, $Gui->nomenclature_inst) |
19 | - ], |
|
20 | - [ |
|
19 | + ], |
|
20 | + [ |
|
21 | 21 | 'id'=>'idp_not_listed', |
22 | 22 | 'title'=>sprintf(_("What can I do to get my %s listed?"), $Gui->nomenclature_inst), |
23 | 23 | 'text'=>sprintf(_("Contact %s administrators at your %s and complain. It will take at most one hour of their time to get things done."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $Gui->nomenclature_inst) |
24 | 24 | ], |
25 | - [ |
|
25 | + [ |
|
26 | 26 | 'id'=>'device_not_listed', |
27 | 27 | 'title'=>sprintf(_("My device is not listed! Does that mean I can't do %s?"),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']), |
28 | 28 | '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 %s Identity Provider to get help in setting up such a device."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'],CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) |
29 | - ], |
|
29 | + ], |
|
30 | 30 | |
31 | - [ |
|
31 | + [ |
|
32 | 32 | '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']), |
33 | 33 | '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.")) |
34 | 34 | ], |
35 | - [ |
|
35 | + [ |
|
36 | 36 | 'title'=>sprintf(_("Is it safe to use %s installers?"),CONFIG['APPEARANCE']['productname']), |
37 | 37 | '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']):""), |
38 | 38 | |
39 | 39 | ], |
40 | - [ |
|
40 | + [ |
|
41 | 41 | 'title'=>_("Windows 'SmartScreen' or 'Internet Explorer' tell me that the file is not commonly downloaded and possibly harmful. Should I be concerned?"), |
42 | 42 | '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>") |
43 | 43 | |
44 | 44 | ], |
45 | - [ |
|
45 | + [ |
|
46 | 46 | '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']), |
47 | - '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 %s and report the problem, the administrators should be able to trace your connections."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $Gui->nomenclature_inst) |
|
47 | + '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 %s and report the problem, the administrators should be able to trace your connections."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $Gui->nomenclature_inst) |
|
48 | 48 | ], |
49 | - [ |
|
49 | + [ |
|
50 | 50 | 'id'=>'contact', |
51 | 51 | 'title'=>sprintf(_("I have a question about this web site. Whom should I contact?")), |
52 | 52 | 'text'=>sprintf(_("You should send a mail to %s."),CONFIG['APPEARANCE']['support-contact']['display']) |
53 | - ], |
|
53 | + ], |
|
54 | 54 | ]; |
55 | 55 | |
56 | 56 | if (CONFIG_CONFASSISTANT['CONSORTIUM']['name'] == "eduroam") { |
57 | - array_push($Faq, |
|
58 | - [ |
|
59 | - 'id'=>'what_is_'.CONFIG_CONFASSISTANT['CONSORTIUM']['name'], |
|
60 | - 'title'=>sprintf(_("What is this %s thing anyway?"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']), |
|
61 | - '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 6.000 hotspots! Visit <a href='http://www.eduroam.org'>the %s homepage</a> for more details."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'],CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'],CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'],CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) |
|
62 | - ]); |
|
57 | + array_push($Faq, |
|
58 | + [ |
|
59 | + 'id'=>'what_is_'.CONFIG_CONFASSISTANT['CONSORTIUM']['name'], |
|
60 | + 'title'=>sprintf(_("What is this %s thing anyway?"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']), |
|
61 | + '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 6.000 hotspots! Visit <a href='http://www.eduroam.org'>the %s homepage</a> for more details."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'],CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'],CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'],CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) |
|
62 | + ]); |
|
63 | 63 | } |
@@ -14,50 +14,50 @@ |
||
14 | 14 | $Faq = [ |
15 | 15 | [ |
16 | 16 | 'id'=>'idp_not_listed', |
17 | - 'title'=>sprintf(_("My %s is not listed. Can't I just use any of the other ones?"),$Gui->nomenclature_inst), |
|
17 | + 'title'=>sprintf(_("My %s is not listed. Can't I just use any of the other ones?"), $Gui->nomenclature_inst), |
|
18 | 18 | 'text'=>sprintf(_("No! The installers contain security settings which are specific to the %s. If you are not from that %s, your computer will detect that you are about to send your username and credential to an unauthorised server and will abort the login. Using a different %s installer is <i>guaranteed to not work</i>!"), $Gui->nomenclature_inst, $Gui->nomenclature_inst, $Gui->nomenclature_inst) |
19 | 19 | ], |
20 | 20 | [ |
21 | 21 | 'id'=>'idp_not_listed', |
22 | 22 | 'title'=>sprintf(_("What can I do to get my %s listed?"), $Gui->nomenclature_inst), |
23 | - 'text'=>sprintf(_("Contact %s administrators at your %s and complain. It will take at most one hour of their time to get things done."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $Gui->nomenclature_inst) |
|
23 | + 'text'=>sprintf(_("Contact %s administrators at your %s and complain. It will take at most one hour of their time to get things done."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $Gui->nomenclature_inst) |
|
24 | 24 | ], |
25 | 25 | [ |
26 | 26 | 'id'=>'device_not_listed', |
27 | - 'title'=>sprintf(_("My device is not listed! Does that mean I can't do %s?"),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']), |
|
28 | - '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 %s Identity Provider to get help in setting up such a device."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'],CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) |
|
27 | + 'title'=>sprintf(_("My device is not listed! Does that mean I can't do %s?"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']), |
|
28 | + '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 %s Identity Provider to get help in setting up such a device."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) |
|
29 | 29 | ], |
30 | 30 | |
31 | 31 | [ |
32 | - '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']), |
|
32 | + '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']), |
|
33 | 33 | '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.")) |
34 | 34 | ], |
35 | 35 | [ |
36 | - 'title'=>sprintf(_("Is it safe to use %s installers?"),CONFIG['APPEARANCE']['productname']), |
|
37 | - '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']):""), |
|
36 | + 'title'=>sprintf(_("Is it safe to use %s installers?"), CONFIG['APPEARANCE']['productname']), |
|
37 | + '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']) : ""), |
|
38 | 38 | |
39 | 39 | ], |
40 | 40 | [ |
41 | 41 | 'title'=>_("Windows 'SmartScreen' or 'Internet Explorer' tell me that the file is not commonly downloaded and possibly harmful. Should I be concerned?"), |
42 | - '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>") |
|
42 | + '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>") |
|
43 | 43 | |
44 | 44 | ], |
45 | 45 | [ |
46 | - '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']), |
|
47 | - '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 %s and report the problem, the administrators should be able to trace your connections."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $Gui->nomenclature_inst) |
|
46 | + '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']), |
|
47 | + '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 %s and report the problem, the administrators should be able to trace your connections."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $Gui->nomenclature_inst) |
|
48 | 48 | ], |
49 | 49 | [ |
50 | 50 | 'id'=>'contact', |
51 | 51 | 'title'=>sprintf(_("I have a question about this web site. Whom should I contact?")), |
52 | - 'text'=>sprintf(_("You should send a mail to %s."),CONFIG['APPEARANCE']['support-contact']['display']) |
|
52 | + 'text'=>sprintf(_("You should send a mail to %s."), CONFIG['APPEARANCE']['support-contact']['display']) |
|
53 | 53 | ], |
54 | 54 | ]; |
55 | 55 | |
56 | 56 | if (CONFIG_CONFASSISTANT['CONSORTIUM']['name'] == "eduroam") { |
57 | 57 | array_push($Faq, |
58 | 58 | [ |
59 | - 'id'=>'what_is_'.CONFIG_CONFASSISTANT['CONSORTIUM']['name'], |
|
59 | + 'id'=>'what_is_' . CONFIG_CONFASSISTANT['CONSORTIUM']['name'], |
|
60 | 60 | 'title'=>sprintf(_("What is this %s thing anyway?"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']), |
61 | - '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 6.000 hotspots! Visit <a href='http://www.eduroam.org'>the %s homepage</a> for more details."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'],CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'],CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'],CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) |
|
61 | + '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 6.000 hotspots! Visit <a href='http://www.eduroam.org'>the %s homepage</a> for more details."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) |
|
62 | 62 | ]); |
63 | 63 | } |
@@ -142,6 +142,9 @@ discard block |
||
142 | 142 | return $retval; |
143 | 143 | } |
144 | 144 | |
145 | + /** |
|
146 | + * @param integer $rowid |
|
147 | + */ |
|
145 | 148 | private function selectElement($rowid, $list) { |
146 | 149 | $jsmagic = "onchange=' |
147 | 150 | if (/#ML#/.test(document.getElementById(\"option-S" . $rowid . "-select\").value)) { |
@@ -183,6 +186,10 @@ discard block |
||
183 | 186 | return ["TEXT" => $retval, "ACTIVE" => $activelisttype]; |
184 | 187 | } |
185 | 188 | |
189 | + /** |
|
190 | + * @param integer $rowid |
|
191 | + * @param boolean $makeVisible |
|
192 | + */ |
|
186 | 193 | private function selectLanguage($rowid, $makeVisible) { |
187 | 194 | $retval = "<select style='display:" . ($makeVisible ? "block" : "none") . "' name='value[S$rowid-lang]' id='S" . $rowid . "-input-langselect'> |
188 | 195 | <option value='' name='select_language' selected>" . _("select language") . "</option> |
@@ -203,6 +210,9 @@ discard block |
||
203 | 210 | \core\Options::TYPECODE_TEXT => ["html" => "textarea cols='30' rows='3'", "tail" => '></textarea'], |
204 | 211 | ]; |
205 | 212 | |
213 | + /** |
|
214 | + * @param integer $rowid |
|
215 | + */ |
|
206 | 216 | private function inputFields($rowid, $activetype) { |
207 | 217 | $retval = ""; |
208 | 218 | foreach (OptionDisplay::HTML_DATATYPE_TEXTS as $key => $type) { |
@@ -235,7 +245,7 @@ discard block |
||
235 | 245 | * @param int $rowid the HTML field base name of the option to be displayed |
236 | 246 | * @param string $optionName the name of the option to display |
237 | 247 | * @param string $optionValue the value of the option to display |
238 | - * @param mixed $optionLang the language of the option to display |
|
248 | + * @param null|string $optionLang the language of the option to display |
|
239 | 249 | * @return string HTML code |
240 | 250 | * @throws Exception |
241 | 251 | */ |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | |
105 | 105 | $optioninfo = \core\Options::instance(); |
106 | 106 | |
107 | - if (is_array($prepopulate) && ( count($prepopulate) > 1 || $class == "device-specific" || $class == "eap-specific")) { // editing... fill with values |
|
107 | + if (is_array($prepopulate) && (count($prepopulate) > 1 || $class == "device-specific" || $class == "eap-specific")) { // editing... fill with values |
|
108 | 108 | foreach ($prepopulate as $option) { |
109 | 109 | if (preg_match("/$class:/", $option['name']) && !preg_match("/(user:fedadmin)/", $option['name'])) { |
110 | 110 | $optiontypearray = $optioninfo->optionType($option['name']); |
@@ -272,7 +272,7 @@ discard block |
||
272 | 272 | $retval .= "<input readonly style='display:none' type='text' name='value[S$rowid-" . \core\Options::TYPECODE_TEXT . "]' id='S$rowid-input-text' value='$optionValue'>$link"; |
273 | 273 | break; |
274 | 274 | case \core\Options::TYPECODE_FILE: |
275 | - $retval .= "<input readonly type='text' name='value[S$rowid-".\core\Options::TYPECODE_STRING."]' id='S" . $rowid . "-input-string' style='display:none' value='" . urlencode($optionValue) . "'>"; |
|
275 | + $retval .= "<input readonly type='text' name='value[S$rowid-" . \core\Options::TYPECODE_STRING . "]' id='S" . $rowid . "-input-string' style='display:none' value='" . urlencode($optionValue) . "'>"; |
|
276 | 276 | $uiElements = new UIElements(); |
277 | 277 | switch ($optionName) { |
278 | 278 | case "eap:ca_file": |
@@ -340,7 +340,7 @@ discard block |
||
340 | 340 | $retval .= " |
341 | 341 | |
342 | 342 | <td> |
343 | - <button type='button' class='delete' onclick='deleteOption(" . ( $prefillValue !== NULL && $item == "general:geo_coordinates" ? $this->allLocationCount : 0 ) . ",\"option-S" . $rowid . "\")'>-</button> |
|
343 | + <button type='button' class='delete' onclick='deleteOption(" . ($prefillValue !== NULL && $item == "general:geo_coordinates" ? $this->allLocationCount : 0) . ",\"option-S" . $rowid . "\")'>-</button> |
|
344 | 344 | </td> |
345 | 345 | </tr>"; |
346 | 346 | return $retval; |
@@ -287,6 +287,9 @@ discard block |
||
287 | 287 | } |
288 | 288 | } |
289 | 289 | |
290 | + /** |
|
291 | + * @param Type $eaptype |
|
292 | + */ |
|
290 | 293 | private function setServerSideCredentials($eaptype) { |
291 | 294 | $attr = $this->attributes; |
292 | 295 | $serversidecredential = new ServerSideCredential(); |
@@ -331,6 +334,9 @@ discard block |
||
331 | 334 | return($clientsidecredential); |
332 | 335 | } |
333 | 336 | |
337 | + /** |
|
338 | + * @param Type $eaptype |
|
339 | + */ |
|
334 | 340 | private function setEapMethod($eaptype) { |
335 | 341 | $attr = $this->attributes; |
336 | 342 | $eapmethod = new EAPMethod(); |
@@ -350,7 +350,7 @@ |
||
350 | 350 | } |
351 | 351 | |
352 | 352 | private function getAuthMethod($eap) { |
353 | - // $attr = $this->attributes; |
|
353 | + // $attr = $this->attributes; |
|
354 | 354 | $authmethod = new AuthenticationMethod(); |
355 | 355 | $eapParams = $this->getAuthenticationMethodParams($eap); |
356 | 356 | $eaptype = new Type(); |
@@ -188,11 +188,11 @@ discard block |
||
188 | 188 | $logoCount = count($logosToPlace); |
189 | 189 | if ($logoCount > 0) { |
190 | 190 | $voffset = $freeTop; |
191 | - $freeSpace = (int)round($this->background['freeHeight'] / ($logoCount + 1)); |
|
191 | + $freeSpace = (int) round($this->background['freeHeight'] / ($logoCount + 1)); |
|
192 | 192 | foreach ($logosToPlace as $logo) { |
193 | 193 | $voffset += $freeSpace; |
194 | 194 | $logoSize = $logo->getImageGeometry(); |
195 | - $hoffset = (int)round(($bgImageSize['width'] - $logoSize['width']) / 2); |
|
195 | + $hoffset = (int) round(($bgImageSize['width'] - $logoSize['width']) / 2); |
|
196 | 196 | $bgImage->compositeImage($logo, $logo->getImageCompose(), $hoffset, $voffset); |
197 | 197 | $voffset += $logoSize['height']; |
198 | 198 | } |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | ]; |
234 | 234 | $s = "support_" . $type . "_substitute"; |
235 | 235 | $substitute = $this->translateString($this->$s, $this->codePage); |
236 | - $returnValue = !empty($attr['support:' . $type][0]) ? $attr['support:' . $type][0] : $substitute; |
|
236 | + $returnValue = !empty($attr['support:' . $type][0]) ? $attr['support:' . $type][0] : $substitute; |
|
237 | 237 | return('!define ' . $supportString[$type] . ' "' . $returnValue . '"' . "\n"); |
238 | 238 | } |
239 | 239 | |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | $fcontents .= "\n" . '!define USER_GROUP "' . $this->translateString(str_replace('"', '$\\"', $attr['profile:name'][0]), $this->codePage) . '" |
245 | 245 | '; |
246 | 246 | } |
247 | - $fcontents .= ' |
|
247 | + $fcontents .= ' |
|
248 | 248 | Caption "' . $this->translateString(sprintf(WindowsCommon::sprint_nsi(_("%s installer for %s")), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $attr['general:instname'][0]), $this->codePage) . '" |
249 | 249 | !define APPLICATION "' . $this->translateString(sprintf(WindowsCommon::sprint_nsi(_("%s installer for %s")), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $attr['general:instname'][0]), $this->codePage) . '" |
250 | 250 | !define VERSION "' . \core\CAT::VERSION_MAJOR . '.' . \core\CAT::VERSION_MINOR . '" |
@@ -266,11 +266,11 @@ discard block |
||
266 | 266 | $fcontents .= '!define REALM "' . $attr['internal:realm'][0] . '" |
267 | 267 | '; |
268 | 268 | } |
269 | - if(!empty($attr['internal:hint_userinput_suffix'][0]) && $attr['internal:hint_userinput_suffix'][0] == 1) { |
|
269 | + if (!empty($attr['internal:hint_userinput_suffix'][0]) && $attr['internal:hint_userinput_suffix'][0] == 1) { |
|
270 | 270 | $fcontents .= '!define HINT_USER_INPUT "' . $attr['internal:hint_userinput_suffix'][0] . '" |
271 | 271 | '; |
272 | 272 | } |
273 | - if(!empty($attr['internal:verify_userinput_suffix'][0]) && $attr['internal:verify_userinput_suffix'][0] == 1) { |
|
273 | + if (!empty($attr['internal:verify_userinput_suffix'][0]) && $attr['internal:verify_userinput_suffix'][0] == 1) { |
|
274 | 274 | $fcontents .= '!define VERIFY_USER_REALM_INPUT "' . $attr['internal:verify_userinput_suffix'][0] . '" |
275 | 275 | '; |
276 | 276 | } |