@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | case "core\User": |
115 | 115 | return $this->userName; |
116 | 116 | default: |
117 | - throw new Exception("Operating on a class where we don't know the relevant identifier in the DB - ".get_class($this)."!"); |
|
117 | + throw new Exception("Operating on a class where we don't know the relevant identifier in the DB - " . get_class($this) . "!"); |
|
118 | 118 | } |
119 | 119 | } |
120 | 120 | |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | $handle = DBConnection::handle("INST"); |
246 | 246 | $blobQuery = $handle->exec("SELECT option_value from $table WHERE row = $row"); |
247 | 247 | // SELECT -> returns resource, not boolean |
248 | - while ($returnedData = /** @scrutinizer ignore-type */ mysqli_fetch_object($blobQuery)) { |
|
248 | + while ($returnedData = /** @scrutinizer ignore-type */ mysqli_fetch_object($blobQuery)) { |
|
249 | 249 | $blob = $returnedData->option_value; |
250 | 250 | } |
251 | 251 | if (!isset($blob)) { |
@@ -549,7 +549,7 @@ |
||
549 | 549 | if (count($logoAttribute) == 0) { |
550 | 550 | return(NULL); |
551 | 551 | } |
552 | - $this->loggerInstance->debug(4,"RESIZE:$width:$height\n"); |
|
552 | + $this->loggerInstance->debug(4, "RESIZE:$width:$height\n"); |
|
553 | 553 | $meta = $this->processImage($logoAttribute[0]['value'], $logoFile, $width, $height, $resize); |
554 | 554 | $filetype = $meta['filetype']; |
555 | 555 | $expiresString = $meta['expires']; |
@@ -124,7 +124,7 @@ |
||
124 | 124 | * @return string |
125 | 125 | */ |
126 | 126 | private function zipInstaller($attr) { |
127 | - if (count($attr)==0) { |
|
127 | + if (count($attr) == 0) { |
|
128 | 128 | // never mind, just checking. You CAN use the $attr array to extract |
129 | 129 | // information about the IdP/Profile if there's a need |
130 | 130 | } |
@@ -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) { |
@@ -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 | } |
@@ -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; |
@@ -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 | } |