@@ -67,45 +67,45 @@ |
||
67 | 67 | // let's start the numbering at 1 |
68 | 68 | $this->qaArray = [ |
69 | 69 | 1 => ["AREA" => AbstractTest::INFRA_DEVICE, |
70 | - "TXT" => _("Have you ever used the network succesfully, e.g. at your home institution without roaming?"), |
|
71 | - "FACTOR_YES" => 0.8, // that's good, but it doesn't mean strikingly much |
|
72 | - "FACTOR_NO" => 2, // that's bad, and points strongly to a config on this end |
|
73 | - "VERDICTLECTURE" => sprintf(_("If your device has never worked before with this setup, then very likely your device configuation is wrong. %s"), $confAssistantText)], |
|
70 | + "TXT" => _("Have you ever used the network succesfully, e.g. at your home institution without roaming?"), |
|
71 | + "FACTOR_YES" => 0.8, // that's good, but it doesn't mean strikingly much |
|
72 | + "FACTOR_NO" => 2, // that's bad, and points strongly to a config on this end |
|
73 | + "VERDICTLECTURE" => sprintf(_("If your device has never worked before with this setup, then very likely your device configuation is wrong. %s"), $confAssistantText)], |
|
74 | 74 | 2 => ["AREA" => AbstractTest::INFRA_DEVICE, |
75 | - "TXT" => _("Did the device previously work when roaming, i.e. at other hotspots away from your home institution?"), |
|
76 | - "FACTOR_YES" => 0.6, // that's good, and somewhat encouraging |
|
77 | - "FACTOR_NO" => 3, // that is almost a smoking gun |
|
78 | - "VERDICTLECTURE" => sprintf(_("If roaming consistently does not work, then very likely your device configuration is wrong. Typical errors causing this symptom include: using a routing ('outer') username without the @realm.tld suffix - those potentially work at your home organisation, but can not be used when roaming. %s"),$confAssistantText)], |
|
75 | + "TXT" => _("Did the device previously work when roaming, i.e. at other hotspots away from your home institution?"), |
|
76 | + "FACTOR_YES" => 0.6, // that's good, and somewhat encouraging |
|
77 | + "FACTOR_NO" => 3, // that is almost a smoking gun |
|
78 | + "VERDICTLECTURE" => sprintf(_("If roaming consistently does not work, then very likely your device configuration is wrong. Typical errors causing this symptom include: using a routing ('outer') username without the @realm.tld suffix - those potentially work at your home organisation, but can not be used when roaming. %s"),$confAssistantText)], |
|
79 | 79 | 3 => ["AREA" => AbstractTest::INFRA_DEVICE, |
80 | - "TXT" => _("Did you recently change the configuration on your device?"), |
|
81 | - "FACTOR_YES" => 3, // that is almost a smoking gun |
|
82 | - "FACTOR_NO" => 0.6, // encouraging |
|
83 | - "VERDICTLECTURE" => _("Accounts only need to be configured once, and can then be used anywhere on the planet without any changes. If you recently changed the configuration, that change may very well be at fault. You should never change your network configuration unless explicitly instructed so by your Identity Provider; even in the case of temporary login issues.")], |
|
80 | + "TXT" => _("Did you recently change the configuration on your device?"), |
|
81 | + "FACTOR_YES" => 3, // that is almost a smoking gun |
|
82 | + "FACTOR_NO" => 0.6, // encouraging |
|
83 | + "VERDICTLECTURE" => _("Accounts only need to be configured once, and can then be used anywhere on the planet without any changes. If you recently changed the configuration, that change may very well be at fault. You should never change your network configuration unless explicitly instructed so by your Identity Provider; even in the case of temporary login issues.")], |
|
84 | 84 | 4 => ["AREA" => AbstractTest::INFRA_DEVICE, |
85 | - "TXT" => _("Did you recently change your password?"), |
|
86 | - "FACTOR_YES" => 1.5, // that doesn't mean it is the source of the problem, but it /might/ be that the user forgot to provide the new password |
|
87 | - "FACTOR_NO" => 0.6, // encouraging |
|
88 | - "VERDICTLECTURE" => _("When you change your password, you also need to supply the new password in the device configuration.")], |
|
85 | + "TXT" => _("Did you recently change your password?"), |
|
86 | + "FACTOR_YES" => 1.5, // that doesn't mean it is the source of the problem, but it /might/ be that the user forgot to provide the new password |
|
87 | + "FACTOR_NO" => 0.6, // encouraging |
|
88 | + "VERDICTLECTURE" => _("When you change your password, you also need to supply the new password in the device configuration.")], |
|
89 | 89 | 5 => ["AREA" => AbstractTest::INFRA_DEVICE, |
90 | - "TXT" => _("If you use more than one device: do your other devices still work?"), |
|
91 | - "FACTOR_YES" => 0.33, // seems that all is okay with the account as such |
|
92 | - "FACTOR_NO" => 3, // now that is suspicious indeed |
|
93 | - "VERDICTLECTURE" => _("If all devices stopped working simultaneously, there may be a problem with your account as such. Maybe your account expired, or you were forced to change the password? These questions are best answered by your Identity Provider [MGW: display contact info]"),], |
|
90 | + "TXT" => _("If you use more than one device: do your other devices still work?"), |
|
91 | + "FACTOR_YES" => 0.33, // seems that all is okay with the account as such |
|
92 | + "FACTOR_NO" => 3, // now that is suspicious indeed |
|
93 | + "VERDICTLECTURE" => _("If all devices stopped working simultaneously, there may be a problem with your account as such. Maybe your account expired, or you were forced to change the password? These questions are best answered by your Identity Provider [MGW: display contact info]"),], |
|
94 | 94 | 6 => ["AREA" => AbstractTest::INFRA_SP_80211, |
95 | - "TXT" => _("Is the place you are currently at heavily crowded, or is a network-intensive workload going on?"), |
|
96 | - "FACTOR_YES" => 3, |
|
97 | - "FACTOR_NO" => 0.33, |
|
98 | - "VERDICTLECTURE" => _("The network is likely overloaded at this location and point in time. You may have to wait until later before you get a better connectivity. If you think the network should be reinforced for more capacity at this place, you should inform the hotspot provider. [MGW: add contact info]")], |
|
95 | + "TXT" => _("Is the place you are currently at heavily crowded, or is a network-intensive workload going on?"), |
|
96 | + "FACTOR_YES" => 3, |
|
97 | + "FACTOR_NO" => 0.33, |
|
98 | + "VERDICTLECTURE" => _("The network is likely overloaded at this location and point in time. You may have to wait until later before you get a better connectivity. If you think the network should be reinforced for more capacity at this place, you should inform the hotspot provider. [MGW: add contact info]")], |
|
99 | 99 | 7 => ["AREA" => AbstractTest::INFRA_SP_80211, |
100 | - "TXT" => _("Does the connection get better when you move around?"), |
|
101 | - "FACTOR_YES" => 3, |
|
102 | - "FACTOR_NO" => 0.33, |
|
103 | - "VERDICTLECTURE" => _("You should move to a different location to achieve better network coverage and service. If you think the exact spot you are at deserves better coverage, you should inform the hotspot provider. [MGW: add contact info]")], |
|
100 | + "TXT" => _("Does the connection get better when you move around?"), |
|
101 | + "FACTOR_YES" => 3, |
|
102 | + "FACTOR_NO" => 0.33, |
|
103 | + "VERDICTLECTURE" => _("You should move to a different location to achieve better network coverage and service. If you think the exact spot you are at deserves better coverage, you should inform the hotspot provider. [MGW: add contact info]")], |
|
104 | 104 | 8 => ["AREA" => AbstractTest::INFRA_SP_LAN, |
105 | - "TXT" => _("Do you see errors stating something similar to 'Unable to get IP address'?"), |
|
106 | - "FACTOR_YES" => 5, // gotcha |
|
107 | - "FACTOR_YES" => 0.5, // the user saying no is not conclusive; maybe the device isn't that verbose or he's not looking at the right spot |
|
108 | - "VERDICTLECTURE" => _("The evidence at hand suggests that there may be an infrastructure problem at this particular hotspot provider. There is nothing you can do to solve this problem locally. Please be patient and try again at a later time.")], |
|
105 | + "TXT" => _("Do you see errors stating something similar to 'Unable to get IP address'?"), |
|
106 | + "FACTOR_YES" => 5, // gotcha |
|
107 | + "FACTOR_YES" => 0.5, // the user saying no is not conclusive; maybe the device isn't that verbose or he's not looking at the right spot |
|
108 | + "VERDICTLECTURE" => _("The evidence at hand suggests that there may be an infrastructure problem at this particular hotspot provider. There is nothing you can do to solve this problem locally. Please be patient and try again at a later time.")], |
|
109 | 109 | ]; |
110 | 110 | \core\common\Entity::outOfThePotatoes(); |
111 | 111 | } |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | "TXT" => _("Did the device previously work when roaming, i.e. at other hotspots away from your home institution?"), |
91 | 91 | "FACTOR_YES" => 0.6, // that's good, and somewhat encouraging |
92 | 92 | "FACTOR_NO" => 3, // that is almost a smoking gun |
93 | - "VERDICTLECTURE" => sprintf(_("If roaming consistently does not work, then very likely your device configuration is wrong. Typical errors causing this symptom include: using a routing ('outer') username without the @realm.tld suffix - those potentially work at your home organisation, but can not be used when roaming. %s"),$confAssistantText)], |
|
93 | + "VERDICTLECTURE" => sprintf(_("If roaming consistently does not work, then very likely your device configuration is wrong. Typical errors causing this symptom include: using a routing ('outer') username without the @realm.tld suffix - those potentially work at your home organisation, but can not be used when roaming. %s"), $confAssistantText)], |
|
94 | 94 | 3 => ["AREA" => AbstractTest::INFRA_DEVICE, |
95 | 95 | "TXT" => _("Did you recently change the configuration on your device?"), |
96 | 96 | "FACTOR_YES" => 3, // that is almost a smoking gun |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | "TXT" => _("If you use more than one device: do your other devices still work?"), |
106 | 106 | "FACTOR_YES" => 0.33, // seems that all is okay with the account as such |
107 | 107 | "FACTOR_NO" => 3, // now that is suspicious indeed |
108 | - "VERDICTLECTURE" => _("If all devices stopped working simultaneously, there may be a problem with your account as such. Maybe your account expired, or you were forced to change the password? These questions are best answered by your Identity Provider [MGW: display contact info]"),], |
|
108 | + "VERDICTLECTURE" => _("If all devices stopped working simultaneously, there may be a problem with your account as such. Maybe your account expired, or you were forced to change the password? These questions are best answered by your Identity Provider [MGW: display contact info]"), ], |
|
109 | 109 | 6 => ["AREA" => AbstractTest::INFRA_SP_80211, |
110 | 110 | "TXT" => _("Is the place you are currently at heavily crowded, or is a network-intensive workload going on?"), |
111 | 111 | "FACTOR_YES" => 3, |
@@ -140,11 +140,11 @@ discard block |
||
140 | 140 | $questionDetails = $this->qaArray[$questionNumber]; |
141 | 141 | if ($answer === TRUE) { |
142 | 142 | $this->possibleFailureReasons[$questionDetails['AREA']] = $this->possibleFailureReasons[$questionDetails['AREA']] * $questionDetails["FACTOR_YES"]; |
143 | - $this->loggerInstance->debug(3,"Adjusting ".$questionDetails['AREA']." by ".$questionDetails["FACTOR_YES"]."\n"); |
|
143 | + $this->loggerInstance->debug(3, "Adjusting ".$questionDetails['AREA']." by ".$questionDetails["FACTOR_YES"]."\n"); |
|
144 | 144 | $factor = $questionDetails["FACTOR_YES"]; |
145 | 145 | } elseif ($answer === FALSE) { |
146 | 146 | $this->possibleFailureReasons[$questionDetails['AREA']] = $this->possibleFailureReasons[$questionDetails['AREA']] * $questionDetails["FACTOR_NO"]; |
147 | - $this->loggerInstance->debug(3,"Adjusting ".$questionDetails['AREA']." by ".$questionDetails["FACTOR_NO"]."\n"); |
|
147 | + $this->loggerInstance->debug(3, "Adjusting ".$questionDetails['AREA']." by ".$questionDetails["FACTOR_NO"]."\n"); |
|
148 | 148 | $factor = $questionDetails["FACTOR_NO"]; |
149 | 149 | } else { |
150 | 150 | $factor = 1; |
@@ -158,8 +158,8 @@ discard block |
||
158 | 158 | $this->additionalFindings["QUESTIONSASKED"] = $this->previousQuestions; |
159 | 159 | $_SESSION["SUSPECTS"] = $this->possibleFailureReasons; |
160 | 160 | $_SESSION["EVIDENCE"] = $this->additionalFindings; |
161 | - $this->loggerInstance->debug(3,$_SESSION['SUSPECTS']); |
|
162 | - $this->loggerInstance->debug(3,$_SESSION['EVIDENCE']); |
|
161 | + $this->loggerInstance->debug(3, $_SESSION['SUSPECTS']); |
|
162 | + $this->loggerInstance->debug(3, $_SESSION['EVIDENCE']); |
|
163 | 163 | } |
164 | 164 | |
165 | 165 | /** |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | // if both are identical, take any of the questions in the pool of both |
179 | 179 | foreach ($this->qaArray as $questionNumber => $questionDetails) { |
180 | 180 | // if we find a question we didn't ask before AND it is related to our currently high-scoring problem area, ask it |
181 | - if (!array_key_exists($questionNumber, $this->previousQuestions) && ( $questionDetails["AREA"] == $highestCategory || $questionDetails["AREA"] == $nextCategory) ) { |
|
181 | + if (!array_key_exists($questionNumber, $this->previousQuestions) && ($questionDetails["AREA"] == $highestCategory || $questionDetails["AREA"] == $nextCategory)) { |
|
182 | 182 | return json_encode(["NEXTEXISTS" => TRUE, "NUMBER" => $questionNumber, "TEXT" => $questionDetails["TXT"]]); |
183 | 183 | } |
184 | 184 | } |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | * @return string JSON encoded array with all the info we have |
193 | 193 | */ |
194 | 194 | public function getCurrentGuessState() { |
195 | - return json_encode([ "SUSPECTS" => $this->possibleFailureReasons, "EVIDENCE" => $this->additionalFindings ]); |
|
195 | + return json_encode(["SUSPECTS" => $this->possibleFailureReasons, "EVIDENCE" => $this->additionalFindings]); |
|
196 | 196 | } |
197 | 197 | |
198 | 198 | /** |
@@ -156,7 +156,7 @@ |
||
156 | 156 | echo "0\">"; |
157 | 157 | echo _("This service is for authenticated admins only.") . '<br>'; |
158 | 158 | echo "<a href=\"diag.php?admin=1\">" . |
159 | - _("eduroam® admin access is needed") . "</a>"; |
|
159 | + _("eduroam® admin access is needed") . "</a>"; |
|
160 | 160 | } |
161 | 161 | ?> |
162 | 162 | </div> |
@@ -47,9 +47,9 @@ discard block |
||
47 | 47 | $Gui->loggerInstance->debug(4, $operatingSystem); |
48 | 48 | $uiElements = new web\lib\admin\UIElements(); |
49 | 49 | if ($operatingSystem) { |
50 | - print "recognisedOS = '" . $operatingSystem['device'] . "';\n"; |
|
50 | + print "recognisedOS = '".$operatingSystem['device']."';\n"; |
|
51 | 51 | } |
52 | -require dirname(__DIR__) . '/user/js/cat_js.php'; |
|
52 | +require dirname(__DIR__).'/user/js/cat_js.php'; |
|
53 | 53 | ?> |
54 | 54 | |
55 | 55 | </script> |
@@ -78,12 +78,12 @@ discard block |
||
78 | 78 | </div> |
79 | 79 | <div id="main_body"> |
80 | 80 | <div id="user_page"> |
81 | - <?php echo $divs->divPagetitle(_("Diagnostics site") . " (<span style='color:red'>beta</span>)", ""); ?> |
|
81 | + <?php echo $divs->divPagetitle(_("Diagnostics site")." (<span style='color:red'>beta</span>)", ""); ?> |
|
82 | 82 | <div id="user_info" style='padding-top: 10px;'> |
83 | 83 | <div id='diagnostic_choice'> |
84 | - <?php echo _("The diagnostics system will do its best to identify and resolve your problems!") . ' ' . _("Please help the system by answering the questions as precisely as possible.") . "<br/>" . _("Are you a") . ' '; ?> |
|
85 | - <input type='radio' name='diagnostic_usertype' value='0'><?php echo _("end-user") . ' ' . _("or"); ?> |
|
86 | - <input type='radio' name='diagnostic_usertype' value='1' <?php if ($admin == 1) { echo " checked"; } ?> > <?php echo _("eduroam administrator") .'?'; ?> |
|
84 | + <?php echo _("The diagnostics system will do its best to identify and resolve your problems!").' '._("Please help the system by answering the questions as precisely as possible.")."<br/>"._("Are you a").' '; ?> |
|
85 | + <input type='radio' name='diagnostic_usertype' value='0'><?php echo _("end-user").' '._("or"); ?> |
|
86 | + <input type='radio' name='diagnostic_usertype' value='1' <?php if ($admin == 1) { echo " checked"; } ?> > <?php echo _("eduroam administrator").'?'; ?> |
|
87 | 87 | </div> |
88 | 88 | <div id='diagnostic_enduser' style='display: none;'> |
89 | 89 | <h2><?php echo _("Tools for End Users"); ?></h2> |
@@ -93,24 +93,24 @@ discard block |
||
93 | 93 | ?> |
94 | 94 | </p> |
95 | 95 | <?php |
96 | - echo '<div id="before_stage_1"><h3>' . _("The system needs some information on your home institution - issuer of your account") . '</h3>'; |
|
96 | + echo '<div id="before_stage_1"><h3>'._("The system needs some information on your home institution - issuer of your account").'</h3>'; |
|
97 | 97 | echo _("What is the realm part of your user account (the part behind the @ of 'your.username@<b>realm.tld</b>):"); |
98 | 98 | ?> |
99 | 99 | <input type='text' name='user_realm' id='user_realm' value=''> |
100 | 100 | <?php |
101 | - echo '<div id="realm_by_select"><br/>' . _("alternatively") . '<br/>'; |
|
102 | - echo _("You can select your home institution from the following list") . '<br/>'; |
|
101 | + echo '<div id="realm_by_select"><br/>'._("alternatively").'<br/>'; |
|
102 | + echo _("You can select your home institution from the following list").'<br/>'; |
|
103 | 103 | echo '<div id="select_idp_country"><a href="" id="idp_countries_list">'; |
104 | - echo '<span id="realmselect">' . _("Click to select your country/region and organisation") . '</span></a></div>'; |
|
104 | + echo '<span id="realmselect">'._("Click to select your country/region and organisation").'</span></a></div>'; |
|
105 | 105 | ?> |
106 | 106 | <div id="select_idp_area" style="display:none;"> |
107 | 107 | </div> |
108 | 108 | </div> |
109 | 109 | <div id="position_info"> |
110 | 110 | <?php |
111 | - echo '<h3>' . _("Optionally, to improve tests, you can provide information on your current location") . '</h3>'; |
|
111 | + echo '<h3>'._("Optionally, to improve tests, you can provide information on your current location").'</h3>'; |
|
112 | 112 | echo '<div id="select_sp_country"><a href="" id="sp_countries_list">'; |
113 | - echo '<span id="spselect">' . _("Click to select a location in which you have an eduroam problem") . '</span></a></div>'; |
|
113 | + echo '<span id="spselect">'._("Click to select a location in which you have an eduroam problem").'</span></a></div>'; |
|
114 | 114 | ?> |
115 | 115 | <div id="select_sp_area" style="display:none;"> |
116 | 116 | </div> |
@@ -143,9 +143,9 @@ discard block |
||
143 | 143 | echo 'none'; |
144 | 144 | } |
145 | 145 | echo ";'>"; |
146 | - echo '<h3>' . _("Which problem are you reporting?") . '</h3>'; |
|
146 | + echo '<h3>'._("Which problem are you reporting?").'</h3>'; |
|
147 | 147 | echo '<input type="radio" name="problem_type" value="1">'; |
148 | - echo _("SP contacting IdP due to technical problems or abuse") . '<br>'; |
|
148 | + echo _("SP contacting IdP due to technical problems or abuse").'<br>'; |
|
149 | 149 | echo '<input type="radio" name="problem_type" value="2">'; |
150 | 150 | echo _("IdP contacting SP due to technical problems"); |
151 | 151 | echo "<div id='idp_contact_area'></div>"; |
@@ -154,9 +154,9 @@ discard block |
||
154 | 154 | echo "</div>"; |
155 | 155 | } else { |
156 | 156 | echo "0\">"; |
157 | - echo _("This service is for authenticated admins only.") . '<br>'; |
|
158 | - echo "<a href=\"diag.php?admin=1\">" . |
|
159 | - _("eduroam® admin access is needed") . "</a>"; |
|
157 | + echo _("This service is for authenticated admins only.").'<br>'; |
|
158 | + echo "<a href=\"diag.php?admin=1\">". |
|
159 | + _("eduroam® admin access is needed")."</a>"; |
|
160 | 160 | } |
161 | 161 | ?> |
162 | 162 | </div> |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | if (type === 'idp' || type === 'sp') { |
181 | 181 | shtml = '<table><tbody><tr id="row_'+type+'_country"></tr>'; |
182 | 182 | shtml = shtml + '<tr id="row_'+type+'_institution" style="visibility: collapse;">'; |
183 | - shtml = shtml + '<td>' + <?php echo '"' . _("Select institiution:") . '"'; ?> + '</td><td></td></tr>'; |
|
183 | + shtml = shtml + '<td>' + <?php echo '"'._("Select institiution:").'"'; ?> + '</td><td></td></tr>'; |
|
184 | 184 | if (type === 'idp') { |
185 | 185 | shtml = shtml + '<tr id="row_idp_realm"></tr>'; |
186 | 186 | } |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | var options = ''; |
207 | 207 | var selecthead = ''; |
208 | 208 | if (type1 === 'sp' || type1 === 'idp') { |
209 | - selecthead = <?php echo '"<td>' . _("Select country or region:") . ' </td>"'; ?>; |
|
209 | + selecthead = <?php echo '"<td>'._("Select country or region:").' </td>"'; ?>; |
|
210 | 210 | selecthead = selecthead + '<td>\n'; |
211 | 211 | } |
212 | 212 | var select = '<select id="' + type1 + '_country" name="' + type1 + '_country" style="margin-left:0px; width:400px;">'; |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | options = ($('#'+type2+'_country').html()); |
215 | 215 | countryAddSelect(selecthead, select + options + '</select>', type1); |
216 | 216 | } else { |
217 | - var comment = <?php echo '"<br><br>' . _("Fetching country/region list") . '..."'; ?>; |
|
217 | + var comment = <?php echo '"<br><br>'._("Fetching country/region list").'..."'; ?>; |
|
218 | 218 | inProgress(1, comment); |
219 | 219 | $.ajax({ |
220 | 220 | url: "findRealm.php", |
@@ -251,7 +251,7 @@ discard block |
||
251 | 251 | return false; |
252 | 252 | } |
253 | 253 | function testSociopath(realm, answer) { |
254 | - var comment = <?php echo '"' . _("Testing realm") . '..."'; ?>; |
|
254 | + var comment = <?php echo '"'._("Testing realm").'..."'; ?>; |
|
255 | 255 | inProgress(1, comment); |
256 | 256 | if ($('#tested_realm').length == 0) { |
257 | 257 | $('<input>').attr({ |
@@ -275,9 +275,9 @@ discard block |
||
275 | 275 | query = '<input type="hidden" id="tested_realm" value="' + realm + '">'; |
276 | 276 | } |
277 | 277 | query = query + '<div id="current_query">'+data['TEXT']+'</div>'; |
278 | - query = query + '<div><button id="answer_yes">' + <?php echo '"' . _("Yes") . '"'; ?> + '</button>'; |
|
279 | - query = query + '<button style="margin-left:20px;" id="answer_no">' + <?php echo '"' . _("No") . '"'; ?> + '</button>'; |
|
280 | - query = query + '<button style="margin-left:20px;" id="answer_noidea">' + <?php echo '"' . _("I don't know") . '"'; ?> + '</button></div>'; |
|
278 | + query = query + '<div><button id="answer_yes">' + <?php echo '"'._("Yes").'"'; ?> + '</button>'; |
|
279 | + query = query + '<button style="margin-left:20px;" id="answer_no">' + <?php echo '"'._("No").'"'; ?> + '</button>'; |
|
280 | + query = query + '<button style="margin-left:20px;" id="answer_noidea">' + <?php echo '"'._("I don't know").'"'; ?> + '</button></div>'; |
|
281 | 281 | $('#sociopath_queries').html(query); |
282 | 282 | $('#sociopath_query_area').show(); |
283 | 283 | } |
@@ -308,55 +308,55 @@ discard block |
||
308 | 308 | }); |
309 | 309 | } |
310 | 310 | function finalVerdict(realm, verdict) { |
311 | - var title = <?php echo '"' . _("Diagnostic tests results for selected realm") . '"'; ?>; |
|
311 | + var title = <?php echo '"'._("Diagnostic tests results for selected realm").'"'; ?>; |
|
312 | 312 | result = '<div class="padding">'; |
313 | 313 | result = result + '<div><h3>'; |
314 | - result = result + <?php echo '"' . _("The result for tested realm:") . ' "'; ?> + realm; |
|
314 | + result = result + <?php echo '"'._("The result for tested realm:").' "'; ?> + realm; |
|
315 | 315 | result = result + '</h3></p><div style="padding: 5px;"><div style="padding: 0px;">'; |
316 | - result = result + <?php echo '"' . _("The system identified") . '" '; ?> + ' '; |
|
316 | + result = result + <?php echo '"'._("The system identified").'" '; ?> + ' '; |
|
317 | 317 | result = result + Object.keys(verdict).length + ' '; |
318 | - result = result + <?php echo '"' . _("suspected areas which potentially can cause a problem.") . '"'; ?> + '<br>'; |
|
319 | - result = result + <?php echo '"' . _("Next to the problem description we show a speculated probability of this event.") . '"'; ?>; |
|
318 | + result = result + <?php echo '"'._("suspected areas which potentially can cause a problem.").'"'; ?> + '<br>'; |
|
319 | + result = result + <?php echo '"'._("Next to the problem description we show a speculated probability of this event.").'"'; ?>; |
|
320 | 320 | result = result + '</div><div style="padding: 5px;"><table>'; |
321 | 321 | k = 1; |
322 | 322 | for (key in verdict) { |
323 | 323 | result = result + '<tr><td>' + k + '.</td>'; |
324 | 324 | k = k + 1; |
325 | 325 | if (key === 'INFRA_DEVICE') { |
326 | - result = result + '<td>' + <?php echo '"' . _("Your device configuration is broken") . '"'; ?> + '</td>'; |
|
326 | + result = result + '<td>' + <?php echo '"'._("Your device configuration is broken").'"'; ?> + '</td>'; |
|
327 | 327 | } |
328 | 328 | if (key === 'INFRA_SP_80211') { |
329 | - result = result + '<td>' + <?php echo '"' . _("The Wi-Fi network in your vicinity has quality issues") . '"'; ?> + '</td>'; |
|
329 | + result = result + '<td>' + <?php echo '"'._("The Wi-Fi network in your vicinity has quality issues").'"'; ?> + '</td>'; |
|
330 | 330 | } |
331 | 331 | if (key === 'INFRA_SP_LAN') { |
332 | - result = result + '<td>' + <?php echo '"' . _("The network environment around you is broken") . '"'; ?> + '</td>'; |
|
332 | + result = result + '<td>' + <?php echo '"'._("The network environment around you is broken").'"'; ?> + '</td>'; |
|
333 | 333 | } |
334 | 334 | if (key === 'INFRA_SP_RADIUS') { |
335 | - result = result + '<td>' + <?php echo '"' . _("The RADIUS server of your service provider is the source of the problem") . '"'; ?> + '</td>'; |
|
335 | + result = result + '<td>' + <?php echo '"'._("The RADIUS server of your service provider is the source of the problem").'"'; ?> + '</td>'; |
|
336 | 336 | } |
337 | 337 | if (key === 'INFRA_IDP_AUTHBACKEND') { |
338 | - result = result + '<td>' + <?php echo '"' . _("The RADIUS server in your home institution is currently unable to authenticate you") . '"'; ?> + '</td>'; |
|
338 | + result = result + '<td>' + <?php echo '"'._("The RADIUS server in your home institution is currently unable to authenticate you").'"'; ?> + '</td>'; |
|
339 | 339 | } |
340 | 340 | if (key === 'INFRA_NRO_SP') { |
341 | - result = result + '<td>' + <?php echo '"' . _("The national server in the country/region you are visiting is not functioning correctly") . '"'; ?> + '</td>'; |
|
341 | + result = result + '<td>' + <?php echo '"'._("The national server in the country/region you are visiting is not functioning correctly").'"'; ?> + '</td>'; |
|
342 | 342 | } |
343 | 343 | if (key === 'INFRA_LINK_ETLR_NRO_SP') { |
344 | - result = result + '<td>' + <?php echo '"' . _("The link between the national server of the country/region you are visiting and the top-level server is broken") . '"'; ?> + '</td>'; |
|
344 | + result = result + '<td>' + <?php echo '"'._("The link between the national server of the country/region you are visiting and the top-level server is broken").'"'; ?> + '</td>'; |
|
345 | 345 | } |
346 | 346 | if (key === 'INFRA_LINK_ETLR_NRO_IdP') { |
347 | - result = result + '<td>' + <?php echo '"' . _("The link between the national server of your home country/region and the top-level server is broken") . '"'; ?> + '</td>'; |
|
347 | + result = result + '<td>' + <?php echo '"'._("The link between the national server of your home country/region and the top-level server is broken").'"'; ?> + '</td>'; |
|
348 | 348 | } |
349 | 349 | if (key === 'INFRA_ETLR') { |
350 | - result = result + '<td>' + <?php echo '"' . _("The communication to the top-level server is down") . '"'; ?> + '</td>'; |
|
350 | + result = result + '<td>' + <?php echo '"'._("The communication to the top-level server is down").'"'; ?> + '</td>'; |
|
351 | 351 | } |
352 | 352 | if (key === 'INFRA_NRO_IdP') { |
353 | - result = result + '<td>' + <?php echo '"' . _("The national server in your home country/region is not functioning properly.") . '"'; ?> + '</td>'; |
|
353 | + result = result + '<td>' + <?php echo '"'._("The national server in your home country/region is not functioning properly.").'"'; ?> + '</td>'; |
|
354 | 354 | } |
355 | 355 | if (key === 'INFRA_IdP_RADIUS') { |
356 | - result = result + '<td>' + <?php echo '"' . _("The RADIUS server of your home institution is the source of the problem") . '"'; ?> + '</td>'; |
|
356 | + result = result + '<td>' + <?php echo '"'._("The RADIUS server of your home institution is the source of the problem").'"'; ?> + '</td>'; |
|
357 | 357 | } |
358 | 358 | if (key === 'INFRA_NONEXISTENTREALM') { |
359 | - result = result + '<td>' + <?php echo '"' . _("This realm does not exist") . '"'; ?> + '</td>'; |
|
359 | + result = result + '<td>' + <?php echo '"'._("This realm does not exist").'"'; ?> + '</td>'; |
|
360 | 360 | } |
361 | 361 | result = result + '<td style="padding-left: 5px;">' + (verdict[key] * 100).toFixed(2) + "%</td></tr>"; |
362 | 362 | } |
@@ -468,7 +468,7 @@ discard block |
||
468 | 468 | return false; |
469 | 469 | }); |
470 | 470 | $(document).on('change', '#idp_country' , function() { |
471 | - var comment = <?php echo '"' . _("Fetching institutions list") . '..."'; ?>; |
|
471 | + var comment = <?php echo '"'._("Fetching institutions list").'..."'; ?>; |
|
472 | 472 | var id = $(this).attr('id'); |
473 | 473 | var k = id.indexOf('_'); |
474 | 474 | var type = id.substr(0,k); |
@@ -486,7 +486,7 @@ discard block |
||
486 | 486 | var shtml = ''; |
487 | 487 | var select = ''; |
488 | 488 | if (type !== 'asp') { |
489 | - shtml = <?php echo '"<td>' . _("Select institution:") . '</td><td>"'; ?>; |
|
489 | + shtml = <?php echo '"<td>'._("Select institution:").'</td><td>"'; ?>; |
|
490 | 490 | } |
491 | 491 | select = '<select id="' + type + '_inst" name="' + type + '_inst" style="margin-left:0px; width:400px;"><option value=""></option>'; |
492 | 492 | for (var i in institutions) { |
@@ -507,7 +507,7 @@ discard block |
||
507 | 507 | } else { |
508 | 508 | if (data.status === 0) { |
509 | 509 | inProgress(0); |
510 | - var msg = <?php echo '"' . _("The database does not contain the information needed to help you in realm selection for this country. You have to provide realm you are interested in.") . '"'; ?>; |
|
510 | + var msg = <?php echo '"'._("The database does not contain the information needed to help you in realm selection for this country. You have to provide realm you are interested in.").'"'; ?>; |
|
511 | 511 | alert(msg); |
512 | 512 | $('#select_idp_country').show(); |
513 | 513 | $('#select_idp_area').hide(); |
@@ -516,7 +516,7 @@ discard block |
||
516 | 516 | }, |
517 | 517 | error:function() { |
518 | 518 | inProgress(0); |
519 | - var msg = <?php echo '"' . _("Can not search database. You have to provide realm you are interested in.") . '"'; ?>; |
|
519 | + var msg = <?php echo '"'._("Can not search database. You have to provide realm you are interested in.").'"'; ?>; |
|
520 | 520 | alert(msg); |
521 | 521 | $('#select_idp_country').show(); |
522 | 522 | $('#select_idp_area').hide(); |
@@ -531,7 +531,7 @@ discard block |
||
531 | 531 | return false; |
532 | 532 | }); |
533 | 533 | $(document).on('change', '#sp_country, #asp_country' , function() { |
534 | - var comment = <?php echo '"' . _("Fetching institutions list") . '..."'; ?>; |
|
534 | + var comment = <?php echo '"'._("Fetching institutions list").'..."'; ?>; |
|
535 | 535 | var id = $(this).attr('id'); |
536 | 536 | var k = id.indexOf('_'); |
537 | 537 | var type = id.substr(0,k); |
@@ -549,7 +549,7 @@ discard block |
||
549 | 549 | var shtml = ''; |
550 | 550 | var select = ''; |
551 | 551 | if (type !== 'asp') { |
552 | - shtml = <?php echo '"<td>' . _("Select institution:") . '</td><td>"'; ?>; |
|
552 | + shtml = <?php echo '"<td>'._("Select institution:").'</td><td>"'; ?>; |
|
553 | 553 | } |
554 | 554 | select = '<select id="' + type + '_inst" name="' + type + '_inst" style="margin-left:0px; width:400px;"><option value=""></option>'; |
555 | 555 | for (var i in hotspots) { |
@@ -572,7 +572,7 @@ discard block |
||
572 | 572 | inProgress(0); |
573 | 573 | var select = '<select id="' + type + '_inst" name="' + type + '_inst" style="margin-left:0px; width:400px;"><option value="">'; |
574 | 574 | var shtml = '<td></td><td>'; |
575 | - select = select + <?php echo '"' . _("Other location") . '"'; ?> + '</option></select></td>'; |
|
575 | + select = select + <?php echo '"'._("Other location").'"'; ?> + '</option></select></td>'; |
|
576 | 576 | if (type !== 'asp') { |
577 | 577 | $('#row_' + type + '_institution').html(''); |
578 | 578 | $('#row_' + type + '_institution').append(shtml + select); |
@@ -606,7 +606,7 @@ discard block |
||
606 | 606 | $('#start_test_area').hide(); |
607 | 607 | return false; |
608 | 608 | } |
609 | - var comment = <?php echo '"' . _("Fetching realms list") . '..."'; ?>; |
|
609 | + var comment = <?php echo '"'._("Fetching realms list").'..."'; ?>; |
|
610 | 610 | inProgress(1, comment); |
611 | 611 | $.ajax({ |
612 | 612 | url: "findRealm.php", |
@@ -618,7 +618,7 @@ discard block |
||
618 | 618 | var realms = data.realms; |
619 | 619 | var realmselect = ''; |
620 | 620 | if (realms.length > 1) { |
621 | - realmselect = <?php echo '"<td>' . _("Check realm(s):") . '</td>"'; ?>; |
|
621 | + realmselect = <?php echo '"<td>'._("Check realm(s):").'</td>"'; ?>; |
|
622 | 622 | realmselect = realmselect + '<td>' + "<span style='margin-left: 10px'>"; |
623 | 623 | for (var i in realms) { |
624 | 624 | realmselect = realmselect + '<input type="radio" name="realm" '; |
@@ -630,7 +630,7 @@ discard block |
||
630 | 630 | } |
631 | 631 | realmselect = realmselect + '</span></td>'; |
632 | 632 | } else { |
633 | - realmselect = <?php echo '"<td>' . _("Realm:") . '</td>"'; ?>; |
|
633 | + realmselect = <?php echo '"<td>'._("Realm:").'</td>"'; ?>; |
|
634 | 634 | realmselect = realmselect + '<td>' + "<span style='margin-left: 10px'>"; |
635 | 635 | realmselect = realmselect + realms[0] + '</span>'; |
636 | 636 | realmselect = realmselect + '<input type="hidden" name="realm" value="' + realms[0] + '">'; |
@@ -685,7 +685,7 @@ discard block |
||
685 | 685 | }); |
686 | 686 | t = 1; |
687 | 687 | } |
688 | - var comment = <?php echo '"' . _("Running realm tests") . '..."'; ?>; |
|
688 | + var comment = <?php echo '"'._("Running realm tests").'..."'; ?>; |
|
689 | 689 | inProgress(1, comment); |
690 | 690 | /*waiting(comment);*/ |
691 | 691 | $.ajax({ |
@@ -729,7 +729,7 @@ discard block |
||
729 | 729 | } |
730 | 730 | }); |
731 | 731 | $('#sp_questions > tbody').append('<tr class="error_row"><td>' + |
732 | - <?php echo '"' . _("Realm is not registered with the eduroam database:") . '"'; ?> + |
|
732 | + <?php echo '"'._("Realm is not registered with the eduroam database:").'"'; ?> + |
|
733 | 733 | '</td><td>' + realm + '</td></tr>'); |
734 | 734 | $('#admin_realm').val(''); |
735 | 735 | } |
@@ -753,7 +753,7 @@ discard block |
||
753 | 753 | testSociopath('', answer); |
754 | 754 | }); |
755 | 755 | $('#realmtest').click(function(event){ |
756 | - var comment = <?php echo '"<br><br>' . _("Running realm tests") . '..."'; ?>; |
|
756 | + var comment = <?php echo '"<br><br>'._("Running realm tests").'..."'; ?>; |
|
757 | 757 | inProgress(1, comment); |
758 | 758 | $('#start_test_area').hide(); |
759 | 759 | if ($('#select_sp_area').is(':hidden')) { |
@@ -801,13 +801,13 @@ discard block |
||
801 | 801 | reset_footer(); |
802 | 802 | testSociopath(realm, 0); |
803 | 803 | } else { |
804 | - var title = <?php echo '"' . _("Diagnostics results for selected realms") . '"'; ?>; |
|
805 | - result = '<div class="padding"><h3>' + <?php echo '"' . _("An unknown problem occured") . '"'; ?>; |
|
804 | + var title = <?php echo '"'._("Diagnostics results for selected realms").'"'; ?>; |
|
805 | + result = '<div class="padding"><h3>' + <?php echo '"'._("An unknown problem occured").'"'; ?>; |
|
806 | 806 | result = result + '</h3>' |
807 | 807 | if (r.length == 1) { |
808 | - result = result + <?php echo '"' . _("This test includes checking of the following realm") . '"'; ?>; |
|
808 | + result = result + <?php echo '"'._("This test includes checking of the following realm").'"'; ?>; |
|
809 | 809 | } else { |
810 | - result = result + <?php echo '"' . _("This test includes checking of the following realms") . '"'; ?>; |
|
810 | + result = result + <?php echo '"'._("This test includes checking of the following realms").'"'; ?>; |
|
811 | 811 | } |
812 | 812 | result = result + ': ' |
813 | 813 | for (var i=0; i < r.length; i++) { |
@@ -817,7 +817,7 @@ discard block |
||
817 | 817 | result = result + r[i]; |
818 | 818 | } |
819 | 819 | result = result + '.<br>'; |
820 | - result = result + <?php echo '"' . _("You should report this to") . '"'; ?> + ' <a href="mailto:[email protected]">[email protected]</a>'; |
|
820 | + result = result + <?php echo '"'._("You should report this to").'"'; ?> + ' <a href="mailto:[email protected]">[email protected]</a>'; |
|
821 | 821 | result = result + '</div>'; |
822 | 822 | $('#after_stage_1').hide(); |
823 | 823 | $('#before_stage_1').show(); |
@@ -877,7 +877,7 @@ discard block |
||
877 | 877 | }); |
878 | 878 | }); |
879 | 879 | }); |
880 | - var comment = <?php echo '"' . _("Running realm tests") . '..."'; ?>; |
|
880 | + var comment = <?php echo '"'._("Running realm tests").'..."'; ?>; |
|
881 | 881 | inProgress(1, comment); |
882 | 882 | $.ajax({ |
883 | 883 | url: "findRealm.php", |
@@ -948,29 +948,29 @@ discard block |
||
948 | 948 | success:function(data) { |
949 | 949 | if (data.status === 1) { |
950 | 950 | var result = ''; |
951 | - var title = <?php echo '"' . _("eduroam admin report submission") . '"'; ?>; |
|
951 | + var title = <?php echo '"'._("eduroam admin report submission").'"'; ?>; |
|
952 | 952 | result = '<div class="padding">'; |
953 | 953 | if (type == 'idp_send') { |
954 | - result = result + '<h3>'+ <?php echo '"' . _("SP contacting IdP due to technical problems or abuse") . '"'; ?> + '</h3>'; |
|
954 | + result = result + '<h3>'+ <?php echo '"'._("SP contacting IdP due to technical problems or abuse").'"'; ?> + '</h3>'; |
|
955 | 955 | result = result + '<table>'; |
956 | - result = result + '<tr><td>' + <?php echo '"' . _("Reason") . '"'; ?> + '</td><td>' + data.reason + '</td></tr>'; |
|
957 | - result = result + '<tr><td>' + <?php echo '"' . _("SP email") . '"'; ?> + '</td><td>' + data.email + '</td></tr>'; |
|
958 | - result = result + '<tr><td>' + <?php echo '"' . _("IdP email(s)") . '"'; ?> + '</td><td>' + data.idpcontact + '</td></tr>'; |
|
959 | - result = result + '<tr><td>' + <?php echo '"' . _("Event's timestamp") . '"'; ?> + '</td><td>' + data.timestamp + '</td></tr>'; |
|
960 | - result = result + '<tr><td>' + <?php echo '"' . _("Calling-Station-Id") . '"'; ?> + '</td><td>' + data.mac + '</td></tr>'; |
|
961 | - result = result + '<tr><td>' + <?php echo '"' . _("Additional description") . '"'; ?> +'</td><td>' + data.freetext + '</td></tr>'; |
|
956 | + result = result + '<tr><td>' + <?php echo '"'._("Reason").'"'; ?> + '</td><td>' + data.reason + '</td></tr>'; |
|
957 | + result = result + '<tr><td>' + <?php echo '"'._("SP email").'"'; ?> + '</td><td>' + data.email + '</td></tr>'; |
|
958 | + result = result + '<tr><td>' + <?php echo '"'._("IdP email(s)").'"'; ?> + '</td><td>' + data.idpcontact + '</td></tr>'; |
|
959 | + result = result + '<tr><td>' + <?php echo '"'._("Event's timestamp").'"'; ?> + '</td><td>' + data.timestamp + '</td></tr>'; |
|
960 | + result = result + '<tr><td>' + <?php echo '"'._("Calling-Station-Id").'"'; ?> + '</td><td>' + data.mac + '</td></tr>'; |
|
961 | + result = result + '<tr><td>' + <?php echo '"'._("Additional description").'"'; ?> +'</td><td>' + data.freetext + '</td></tr>'; |
|
962 | 962 | } |
963 | 963 | if (type == 'sp_send') { |
964 | - result = result + '<h3>'+ <?php echo '"' . _("IdP contacting SP due to technical problems or abuse") . '"'; ?> + '</h3>'; |
|
964 | + result = result + '<h3>'+ <?php echo '"'._("IdP contacting SP due to technical problems or abuse").'"'; ?> + '</h3>'; |
|
965 | 965 | result = result + '<table>'; |
966 | - result = result + '<tr><td>' + <?php echo '"' . _("Reason") . '"'; ?> + '</td><td>' + data.reason + '</td></tr>'; |
|
967 | - result = result + '<tr><td>' + <?php echo '"' . _("SP's Operator-Name") . '"'; ?> + '</td><td>' + data.opname + '</td></tr>'; |
|
968 | - result = result + '<tr><td>' + <?php echo '"' . _("User's outer ID") . '"'; ?> + '</td><td>' + data.outerid + '</td></tr>'; |
|
969 | - result = result + '<tr><td>' + <?php echo '"' . _("IdP email") . '"'; ?> + '</td><td>' + data.email + '</td></tr>'; |
|
970 | - result = result + '<tr><td>' + <?php echo '"' . _("Event's timestamp") . '"'; ?> + '</td><td>' + data.timestamp + '</td></tr>'; |
|
971 | - result = result + '<tr><td>' + <?php echo '"' . _("Calling-Station-Id") . '"'; ?> + '</td><td>' + data.mac + '</td></tr>'; |
|
972 | - result = result + '<tr><td>' + <?php echo '"' . _("Additional description") . '"'; ?> +'</td><td>' + data.freetext + '</td></tr>'; |
|
973 | - result = result + '<tr><td>' + <?php echo '"' . _("How to contact the user") . '"'; ?> +'</td><td>' + data.cdetails + '</td></tr>'; |
|
966 | + result = result + '<tr><td>' + <?php echo '"'._("Reason").'"'; ?> + '</td><td>' + data.reason + '</td></tr>'; |
|
967 | + result = result + '<tr><td>' + <?php echo '"'._("SP's Operator-Name").'"'; ?> + '</td><td>' + data.opname + '</td></tr>'; |
|
968 | + result = result + '<tr><td>' + <?php echo '"'._("User's outer ID").'"'; ?> + '</td><td>' + data.outerid + '</td></tr>'; |
|
969 | + result = result + '<tr><td>' + <?php echo '"'._("IdP email").'"'; ?> + '</td><td>' + data.email + '</td></tr>'; |
|
970 | + result = result + '<tr><td>' + <?php echo '"'._("Event's timestamp").'"'; ?> + '</td><td>' + data.timestamp + '</td></tr>'; |
|
971 | + result = result + '<tr><td>' + <?php echo '"'._("Calling-Station-Id").'"'; ?> + '</td><td>' + data.mac + '</td></tr>'; |
|
972 | + result = result + '<tr><td>' + <?php echo '"'._("Additional description").'"'; ?> +'</td><td>' + data.freetext + '</td></tr>'; |
|
973 | + result = result + '<tr><td>' + <?php echo '"'._("How to contact the user").'"'; ?> +'</td><td>' + data.cdetails + '</td></tr>'; |
|
974 | 974 | } |
975 | 975 | result = result + '</div>'; |
976 | 976 | showInfo(result, title); |
@@ -987,7 +987,7 @@ discard block |
||
987 | 987 | if ($('#mac').val().length > 0) { |
988 | 988 | if ($('#mac').val().length != 17) { |
989 | 989 | $('#mac').addClass('error_input'); |
990 | - $('#mac').attr('title', <?php echo '"' . _("MAC address is incomplete") . '"'; ?>); |
|
990 | + $('#mac').attr('title', <?php echo '"'._("MAC address is incomplete").'"'; ?>); |
|
991 | 991 | } else { |
992 | 992 | $('#mac').removeClass('error_input'); |
993 | 993 | $('#mac').attr('title', ''); |
@@ -996,7 +996,7 @@ discard block |
||
996 | 996 | if ($(this).attr('id') == 'email' && $(this).val().length > 0) { |
997 | 997 | if (!isEmail($(this).val())) { |
998 | 998 | $('#email').addClass('error_input'); |
999 | - $('#email').attr('title', <?php echo '"' . _("Wrong format of email") . '"'; ?>); |
|
999 | + $('#email').attr('title', <?php echo '"'._("Wrong format of email").'"'; ?>); |
|
1000 | 1000 | } else { |
1001 | 1001 | $('#email').removeClass('error_input'); |
1002 | 1002 | $('#email').attr('title', ''); |
@@ -1005,7 +1005,7 @@ discard block |
||
1005 | 1005 | if ($(this).attr('id') == 'outer_id' && $(this).val().length > 0) { |
1006 | 1006 | if (!isEmail($(this).val(), true)) { |
1007 | 1007 | $('#outer_id').addClass('error_input'); |
1008 | - $('#outer_id').attr('title', <?php echo '"' . _("Wrong format of outer ID") . '"'; ?>); |
|
1008 | + $('#outer_id').attr('title', <?php echo '"'._("Wrong format of outer ID").'"'; ?>); |
|
1009 | 1009 | } else { |
1010 | 1010 | $('#outer_id').removeClass('error_input'); |
1011 | 1011 | $('#outer_id').attr('title', ''); |
@@ -1014,7 +1014,7 @@ discard block |
||
1014 | 1014 | if ($(this).attr('id') == 'opname' && $('#opname').val().length > 0) { |
1015 | 1015 | if (!isOperatorName($(this).val())) { |
1016 | 1016 | $('#opname').addClass('error_input'); |
1017 | - $('#opname').attr('title', <?php echo '"' . _("Wrong string given as OperatorName") . '"'; ?>); |
|
1017 | + $('#opname').attr('title', <?php echo '"'._("Wrong string given as OperatorName").'"'; ?>); |
|
1018 | 1018 | $('#spmanually').show(); |
1019 | 1019 | } else { |
1020 | 1020 | $('#opname').removeClass('error_input'); |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | $cryptoJson = openssl_encrypt($clearJson, 'AES-256-CBC', $encryptionKey, OPENSSL_RAW_DATA, $initVector); |
118 | 118 | $hmac = hash_hmac("sha1", $cryptoJson, $encryptionKey, TRUE); |
119 | 119 | |
120 | - $this->loggerInstance->debug(4, "Clear = $clearJson\nSalt = $salt\nPW = " . $password . "\nb(IV) = " . base64_encode($initVector) . "\nb(Cipher) = " . base64_encode($cryptoJson) . "\nb(HMAC) = " . base64_encode($hmac)); |
|
120 | + $this->loggerInstance->debug(4, "Clear = $clearJson\nSalt = $salt\nPW = ".$password."\nb(IV) = ".base64_encode($initVector)."\nb(Cipher) = ".base64_encode($cryptoJson)."\nb(HMAC) = ".base64_encode($hmac)); |
|
121 | 121 | |
122 | 122 | // now, generate the container that holds all the crypto data |
123 | 123 | $finalArray = [ |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | */ |
189 | 189 | private function wiredBlock($eapdetails) { |
190 | 190 | return [ |
191 | - "GUID" => \core\common\Entity::uuid('', "wired-dot1x-ethernet") . "}", |
|
191 | + "GUID" => \core\common\Entity::uuid('', "wired-dot1x-ethernet")."}", |
|
192 | 192 | "Name" => "eduroam configuration (wired network)", |
193 | 193 | "Remove" => false, |
194 | 194 | "Type" => "Ethernet", |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | // if silverbullet, we deliver the client cert inline |
229 | 229 | |
230 | 230 | if ($selectedEap == \core\common\EAP::EAPTYPE_SILVERBULLET) { |
231 | - $eaparray['ClientCertRef'] = "[" . $this->clientCert['GUID'] . "]"; |
|
231 | + $eaparray['ClientCertRef'] = "[".$this->clientCert['GUID']."]"; |
|
232 | 232 | $eaparray['ClientCertType'] = "Ref"; |
233 | 233 | } |
234 | 234 | |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | $jsonArray = ["Type" => "UnencryptedConfiguration"]; |
262 | 262 | |
263 | 263 | foreach ($this->attributes['internal:CAs'][0] as $ca) { |
264 | - $caRefs[] = "{" . $ca['uuid'] . "}"; |
|
264 | + $caRefs[] = "{".$ca['uuid']."}"; |
|
265 | 265 | } |
266 | 266 | // define CA certificates |
267 | 267 | foreach ($this->attributes['internal:CAs'][0] as $ca) { |
@@ -271,15 +271,15 @@ discard block |
||
271 | 271 | if ($caSanitized1 === FALSE) { |
272 | 272 | throw new Exception("Error cropping PEM data at its BEGIN marker."); |
273 | 273 | } |
274 | - $this->loggerInstance->debug(4, $caSanitized1 . "\n"); |
|
274 | + $this->loggerInstance->debug(4, $caSanitized1."\n"); |
|
275 | 275 | // remove \n |
276 | 276 | $caSanitized = str_replace("\n", "", $caSanitized1); |
277 | - $jsonArray["Certificates"][] = ["GUID" => "{" . $ca['uuid'] . "}", "Remove" => false, "Type" => "Authority", "X509" => $caSanitized]; |
|
278 | - $this->loggerInstance->debug(3, $caSanitized . "\n"); |
|
277 | + $jsonArray["Certificates"][] = ["GUID" => "{".$ca['uuid']."}", "Remove" => false, "Type" => "Authority", "X509" => $caSanitized]; |
|
278 | + $this->loggerInstance->debug(3, $caSanitized."\n"); |
|
279 | 279 | } |
280 | 280 | // if we are doing silverbullet, include the unencrypted(!) P12 as a client certificate |
281 | 281 | if ($this->selectedEap == \core\common\EAP::EAPTYPE_SILVERBULLET) { |
282 | - $jsonArray["Certificates"][] = ["GUID" => "[" . $this->clientCert['GUID'] . "]", "PKCS12" => base64_encode($this->clientCert['certdataclear']), "Remove" => false, "Type" => "Client"]; |
|
282 | + $jsonArray["Certificates"][] = ["GUID" => "[".$this->clientCert['GUID']."]", "PKCS12" => base64_encode($this->clientCert['certdataclear']), "Remove" => false, "Type" => "Client"]; |
|
283 | 283 | } |
284 | 284 | $eaparray = $this->eapBlock($caRefs); |
285 | 285 | // define Wi-Fi networks |
@@ -300,7 +300,7 @@ discard block |
||
300 | 300 | |
301 | 301 | file_put_contents('installer_profile', $finalJson); |
302 | 302 | |
303 | - $fileName = $this->installerBasename . '.onc'; |
|
303 | + $fileName = $this->installerBasename.'.onc'; |
|
304 | 304 | |
305 | 305 | if (!$this->sign) { |
306 | 306 | rename("installer_profile", $fileName); |
@@ -311,7 +311,7 @@ discard block |
||
311 | 311 | // have the notion of signing |
312 | 312 | // but if they ever change their mind, we are prepared |
313 | 313 | |
314 | - $outputFromSigning = system($this->sign . " installer_profile '$fileName' > /dev/null"); |
|
314 | + $outputFromSigning = system($this->sign." installer_profile '$fileName' > /dev/null"); |
|
315 | 315 | if ($outputFromSigning === FALSE) { |
316 | 316 | $this->loggerInstance->debug(2, "Signing the ONC installer $fileName FAILED!\n"); |
317 | 317 | } |
@@ -211,7 +211,7 @@ |
||
211 | 211 | } |
212 | 212 | |
213 | 213 | if (!empty($this->attributes['internal:realm'][0])) { |
214 | - $config['user_realm'] = $this->attributes['internal:realm'][0]; |
|
214 | + $config['user_realm'] = $this->attributes['internal:realm'][0]; |
|
215 | 215 | } |
216 | 216 | |
217 | 217 | if(!empty($this->attributes['internal:hint_userinput_suffix'][0]) && $this->attributes['internal:hint_userinput_suffix'][0] == 1) { |
@@ -201,8 +201,7 @@ |
||
201 | 201 | |
202 | 202 | if ($this->selectedEap == \core\common\EAP::EAPTYPE_TLS && isset($this->attributes['eap-specific:tls_use_other_id']) && $this->attributes['eap-specific:tls_use_other_id'][0] == 'on') { |
203 | 203 | $configRaw['use_other_tls_id'] = "True"; |
204 | - } |
|
205 | - else { |
|
204 | + } else { |
|
206 | 205 | $configRaw['use_other_tls_id'] = "False"; |
207 | 206 | } |
208 | 207 |
@@ -55,9 +55,9 @@ discard block |
||
55 | 55 | * |
56 | 56 | */ |
57 | 57 | public function writeInstaller() { |
58 | - $installerPath = $this->installerBasename . ".py"; |
|
58 | + $installerPath = $this->installerBasename.".py"; |
|
59 | 59 | $this->copyFile("main.py", $installerPath); |
60 | - $installer = fopen($installerPath,"a"); |
|
60 | + $installer = fopen($installerPath, "a"); |
|
61 | 61 | if ($installer === FALSE) { |
62 | 62 | throw new Exception("Unable to open installer file for writing!"); |
63 | 63 | } |
@@ -84,9 +84,9 @@ discard block |
||
84 | 84 | $out .= "<p>"; |
85 | 85 | if ($ssidCount > 1) { |
86 | 86 | if ($ssidCount > 2) { |
87 | - $out .= sprintf(_("In addition to <strong>%s</strong> the installer will also configure access to the following networks:"), implode(', ', \config\ConfAssistant::CONSORTIUM['ssid'])) . " "; |
|
87 | + $out .= sprintf(_("In addition to <strong>%s</strong> the installer will also configure access to the following networks:"), implode(', ', \config\ConfAssistant::CONSORTIUM['ssid']))." "; |
|
88 | 88 | } else { |
89 | - $out .= sprintf(_("In addition to <strong>%s</strong> the installer will also configure access to:"), implode(', ', \config\ConfAssistant::CONSORTIUM['ssid'])) . " "; |
|
89 | + $out .= sprintf(_("In addition to <strong>%s</strong> the installer will also configure access to:"), implode(', ', \config\ConfAssistant::CONSORTIUM['ssid']))." "; |
|
90 | 90 | } |
91 | 91 | $iterator = 0; |
92 | 92 | foreach ($this->attributes['internal:SSID'] as $ssid => $v) { |
@@ -124,8 +124,8 @@ discard block |
||
124 | 124 | * @return void |
125 | 125 | */ |
126 | 126 | private function writeConfigLine($file, $prefix, $name, $text) { |
127 | - $out = $prefix . $name . ' = "' . $text; |
|
128 | - fwrite($file, wordwrap($out, 70, " \" \\\n \"") . "\n"); |
|
127 | + $out = $prefix.$name.' = "'.$text; |
|
128 | + fwrite($file, wordwrap($out, 70, " \" \\\n \"")."\n"); |
|
129 | 129 | } |
130 | 130 | |
131 | 131 | /** |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | 'user_cert_missing' => _("personal certificate file not found"), |
165 | 165 | ]; |
166 | 166 | foreach ($messages as $name => $value) { |
167 | - $this->writeConfigLine($file, 'Messages.', $name, $value . '"'); |
|
167 | + $this->writeConfigLine($file, 'Messages.', $name, $value.'"'); |
|
168 | 168 | } |
169 | 169 | \core\common\Entity::outOfThePotatoes(); |
170 | 170 | } |
@@ -208,39 +208,39 @@ discard block |
||
208 | 208 | } |
209 | 209 | |
210 | 210 | if ($outerId !== NULL) { |
211 | - $configRaw['anonymous_identity'] = '"' . $outerId . '"'; |
|
211 | + $configRaw['anonymous_identity'] = '"'.$outerId.'"'; |
|
212 | 212 | } |
213 | 213 | |
214 | 214 | if (!empty($this->attributes['internal:realm'][0])) { |
215 | 215 | $config['user_realm'] = $this->attributes['internal:realm'][0]; |
216 | 216 | } |
217 | 217 | |
218 | - if(!empty($this->attributes['internal:hint_userinput_suffix'][0]) && $this->attributes['internal:hint_userinput_suffix'][0] == 1) { |
|
218 | + if (!empty($this->attributes['internal:hint_userinput_suffix'][0]) && $this->attributes['internal:hint_userinput_suffix'][0] == 1) { |
|
219 | 219 | $configRaw['hint_user_input'] = "True"; |
220 | 220 | } |
221 | 221 | |
222 | - if(!empty($this->attributes['internal:verify_userinput_suffix'][0]) && $this->attributes['internal:verify_userinput_suffix'][0] == 1) { |
|
222 | + if (!empty($this->attributes['internal:verify_userinput_suffix'][0]) && $this->attributes['internal:verify_userinput_suffix'][0] == 1) { |
|
223 | 223 | $configRaw['verify_user_realm_input'] = "True"; |
224 | 224 | } |
225 | 225 | |
226 | 226 | foreach ($config as $name => $value) { |
227 | - $this->writeConfigLine($file, 'Config.', $name, $value . '"'); |
|
227 | + $this->writeConfigLine($file, 'Config.', $name, $value.'"'); |
|
228 | 228 | } |
229 | 229 | |
230 | 230 | foreach ($configRaw as $name => $value) { |
231 | - fwrite($file, 'Config.' . $name . ' = ' . $value . "\n"); |
|
231 | + fwrite($file, 'Config.'.$name.' = '.$value."\n"); |
|
232 | 232 | } |
233 | 233 | |
234 | 234 | if ($tou === '') { |
235 | - fwrite($file, 'Config.tou = ""' . "\n"); |
|
235 | + fwrite($file, 'Config.tou = ""'."\n"); |
|
236 | 236 | } else { |
237 | - fwrite($file, 'Config.tou = """' . $tou . '"""' . "\n"); |
|
237 | + fwrite($file, 'Config.tou = """'.$tou.'"""'."\n"); |
|
238 | 238 | } |
239 | 239 | |
240 | - fwrite($file, 'Config.CA = """' . $this->mkCAfile() . '"""' . "\n"); |
|
240 | + fwrite($file, 'Config.CA = """'.$this->mkCAfile().'"""'."\n"); |
|
241 | 241 | $sbUserFile = $this->mkSbUserFile(); |
242 | 242 | if ($sbUserFile !== '') { |
243 | - fwrite($file, 'Config.sb_user_file = """' . $sbUserFile . '"""' . "\n"); |
|
243 | + fwrite($file, 'Config.sb_user_file = """'.$sbUserFile.'"""'."\n"); |
|
244 | 244 | } |
245 | 245 | } |
246 | 246 | |
@@ -292,7 +292,7 @@ discard block |
||
292 | 292 | } |
293 | 293 | $out .= "'DNS:$oneServer'"; |
294 | 294 | } |
295 | - return "[" . $out. "]"; |
|
295 | + return "[".$out."]"; |
|
296 | 296 | } |
297 | 297 | |
298 | 298 | /** |
@@ -306,7 +306,7 @@ discard block |
||
306 | 306 | foreach ($ssids as $ssid => $cipher) { |
307 | 307 | $outArray[] = "'$ssid'"; |
308 | 308 | } |
309 | - return '[' . implode(', ', $outArray) . ']'; |
|
309 | + return '['.implode(', ', $outArray).']'; |
|
310 | 310 | } |
311 | 311 | |
312 | 312 | /** |
@@ -322,7 +322,7 @@ discard block |
||
322 | 322 | $outArray[] = "'$ssid'"; |
323 | 323 | } |
324 | 324 | } |
325 | - return '[' . implode(', ', $outArray) . ']'; |
|
325 | + return '['.implode(', ', $outArray).']'; |
|
326 | 326 | } |
327 | 327 | |
328 | 328 | /** |
@@ -330,7 +330,7 @@ discard block |
||
330 | 330 | * |
331 | 331 | * @return string |
332 | 332 | */ |
333 | - private function mkCAfile(){ |
|
333 | + private function mkCAfile() { |
|
334 | 334 | $out = ''; |
335 | 335 | $cAlist = $this->attributes['internal:CAs'][0]; |
336 | 336 | foreach ($cAlist as $oneCa) { |
@@ -346,7 +346,7 @@ discard block |
||
346 | 346 | */ |
347 | 347 | private function mkIntro() { |
348 | 348 | \core\common\Entity::intoThePotatoes(); |
349 | - $out = _("This installer has been prepared for {0}") . '\n\n' . _("More information and comments:") . '\n\nEMAIL: {1}\nWWW: {2}\n\n' . |
|
349 | + $out = _("This installer has been prepared for {0}").'\n\n'._("More information and comments:").'\n\nEMAIL: {1}\nWWW: {2}\n\n'. |
|
350 | 350 | _("Installer created with software from the GEANT project."); |
351 | 351 | \core\common\Entity::outOfThePotatoes(); |
352 | 352 | return $out; |
@@ -138,8 +138,8 @@ |
||
138 | 138 | */ |
139 | 139 | private function zipInstaller() { |
140 | 140 | // one can always access $this->attributes to check things |
141 | - $fileName = $this->installerBasename . '.zip'; |
|
142 | - $output = system('zip -q ' . $fileName . ' *'); |
|
141 | + $fileName = $this->installerBasename.'.zip'; |
|
142 | + $output = system('zip -q '.$fileName.' *'); |
|
143 | 143 | if ($output === FALSE) { |
144 | 144 | $this->loggerInstance->debug(2, "unable to zip the installer\n"); |
145 | 145 | } |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | $delProfiles[] = $ssid; |
72 | 72 | } |
73 | 73 | if ($cipher == 'TKIP') { |
74 | - $delProfiles[] = $ssid . ' (TKIP)'; |
|
74 | + $delProfiles[] = $ssid.' (TKIP)'; |
|
75 | 75 | } |
76 | 76 | } |
77 | 77 | |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | $iterator = 0; |
82 | 82 | foreach ($allSSID as $ssid => $cipher) { |
83 | 83 | if ($cipher == 'TKIP') { |
84 | - $windowsProfile[$iterator] = $this->writeWLANprofile($ssid . ' (TKIP)', $ssid, 'WPA', 'TKIP', $eapConfig, $iterator); |
|
84 | + $windowsProfile[$iterator] = $this->writeWLANprofile($ssid.' (TKIP)', $ssid, 'WPA', 'TKIP', $eapConfig, $iterator); |
|
85 | 85 | $iterator++; |
86 | 86 | } |
87 | 87 | $windowsProfile[$iterator] = $this->writeWLANprofile($ssid, $ssid, 'WPA2', 'AES', $eapConfig, $iterator); |
@@ -142,10 +142,10 @@ discard block |
||
142 | 142 | $profileFileCont = '<EAPConfig><EapHostConfig xmlns="http://www.microsoft.com/provisioning/EapHostConfig"> |
143 | 143 | <EapMethod> |
144 | 144 | <Type xmlns="http://www.microsoft.com/provisioning/EapCommon">' . |
145 | - $this->selectedEap["OUTER"] . '</Type> |
|
145 | + $this->selectedEap["OUTER"].'</Type> |
|
146 | 146 | <VendorId xmlns="http://www.microsoft.com/provisioning/EapCommon">0</VendorId> |
147 | 147 | <VendorType xmlns="http://www.microsoft.com/provisioning/EapCommon">0</VendorType> |
148 | -<AuthorId xmlns="http://www.microsoft.com/provisioning/EapCommon">' . $authorId . '</AuthorId> |
|
148 | +<AuthorId xmlns="http://www.microsoft.com/provisioning/EapCommon">' . $authorId.'</AuthorId> |
|
149 | 149 | </EapMethod> |
150 | 150 | '; |
151 | 151 | |
@@ -158,9 +158,9 @@ discard block |
||
158 | 158 | $profileFileCont .= ' |
159 | 159 | <Config xmlns="http://www.microsoft.com/provisioning/EapHostConfig"> |
160 | 160 | <EAPIdentityProviderList xmlns="urn:ietf:params:xml:ns:yang:ietf-eap-metadata"> |
161 | -<EAPIdentityProvider ID="' . $this->deviceUUID . '" namespace="urn:UUID"> |
|
161 | +<EAPIdentityProvider ID="' . $this->deviceUUID.'" namespace="urn:UUID"> |
|
162 | 162 | <ProviderInfo> |
163 | -<DisplayName>' . $this->translateString($attr['general:instname'][0], $this->codePage) . '</DisplayName> |
|
163 | +<DisplayName>' . $this->translateString($attr['general:instname'][0], $this->codePage).'</DisplayName> |
|
164 | 164 | </ProviderInfo> |
165 | 165 | <AuthenticationMethods> |
166 | 166 | <AuthenticationMethod> |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | if ($outerUser == '') { |
173 | 173 | $profileFileCont .= '<AnonymousIdentity>@</AnonymousIdentity>'; |
174 | 174 | } else { |
175 | - $profileFileCont .= '<AnonymousIdentity>' . $outerUser . '@' . $realm . '</AnonymousIdentity>'; |
|
175 | + $profileFileCont .= '<AnonymousIdentity>'.$outerUser.'@'.$realm.'</AnonymousIdentity>'; |
|
176 | 176 | } |
177 | 177 | } |
178 | 178 | $profileFileCont .= '</ClientSideCredential> |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | $profileFileCont .= ' |
191 | 191 | </ServerSideCredential> |
192 | 192 | <InnerAuthenticationMethod> |
193 | -<NonEAPAuthMethod>' .$innerMethod. '</NonEAPAuthMethod> |
|
193 | +<NonEAPAuthMethod>' .$innerMethod.'</NonEAPAuthMethod> |
|
194 | 194 | </InnerAuthenticationMethod> |
195 | 195 | <VendorSpecific> |
196 | 196 | <SessionResumption>false</SessionResumption> |
@@ -215,11 +215,11 @@ discard block |
||
215 | 215 | </eapTls:CredentialsSource> |
216 | 216 | <eapTls:ServerValidation> |
217 | 217 | <eapTls:DisableUserPromptForServerValidation>true</eapTls:DisableUserPromptForServerValidation> |
218 | -<eapTls:ServerNames>' . $servers . '</eapTls:ServerNames>'; |
|
218 | +<eapTls:ServerNames>' . $servers.'</eapTls:ServerNames>'; |
|
219 | 219 | if ($caArray) { |
220 | 220 | foreach ($caArray as $certAuthority) { |
221 | 221 | if ($certAuthority['root']) { |
222 | - $profileFileCont .= "<eapTls:TrustedRootCA>" . $certAuthority['sha1'] . "</eapTls:TrustedRootCA>\n"; |
|
222 | + $profileFileCont .= "<eapTls:TrustedRootCA>".$certAuthority['sha1']."</eapTls:TrustedRootCA>\n"; |
|
223 | 223 | } |
224 | 224 | } |
225 | 225 | } |
@@ -251,11 +251,11 @@ discard block |
||
251 | 251 | <msPeap:EapType> |
252 | 252 | <msPeap:ServerValidation> |
253 | 253 | <msPeap:DisableUserPromptForServerValidation>true</msPeap:DisableUserPromptForServerValidation> |
254 | -<msPeap:ServerNames>' . $servers . '</msPeap:ServerNames>'; |
|
254 | +<msPeap:ServerNames>' . $servers.'</msPeap:ServerNames>'; |
|
255 | 255 | if ($caArray) { |
256 | 256 | foreach ($caArray as $certAuthority) { |
257 | 257 | if ($certAuthority['root']) { |
258 | - $vistaExt .= "<msPeap:TrustedRootCA>" . $certAuthority['sha1'] . "</msPeap:TrustedRootCA>\n"; |
|
258 | + $vistaExt .= "<msPeap:TrustedRootCA>".$certAuthority['sha1']."</msPeap:TrustedRootCA>\n"; |
|
259 | 259 | } |
260 | 260 | } |
261 | 261 | } |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | <msChapV2:UseWinLogonCredentials>false</msChapV2:UseWinLogonCredentials> |
269 | 269 | </msChapV2:EapType> |
270 | 270 | </baseEap:Eap> |
271 | -<msPeap:EnableQuarantineChecks>' . $nea . '</msPeap:EnableQuarantineChecks> |
|
271 | +<msPeap:EnableQuarantineChecks>' . $nea.'</msPeap:EnableQuarantineChecks> |
|
272 | 272 | <msPeap:RequireCryptoBinding>false</msPeap:RequireCryptoBinding> |
273 | 273 | </msPeap:EapType> |
274 | 274 | </baseEap:Eap> |
@@ -280,11 +280,11 @@ discard block |
||
280 | 280 | <EapType xmlns="http://www.microsoft.com/provisioning/MsPeapConnectionPropertiesV1"> |
281 | 281 | <ServerValidation> |
282 | 282 | <DisableUserPromptForServerValidation>true</DisableUserPromptForServerValidation> |
283 | -<ServerNames>' . $servers . '</ServerNames>'; |
|
283 | +<ServerNames>' . $servers.'</ServerNames>'; |
|
284 | 284 | if ($caArray) { |
285 | 285 | foreach ($caArray as $certAuthority) { |
286 | 286 | if ($certAuthority['root']) { |
287 | - $w7Ext .= "<TrustedRootCA>" . $certAuthority['sha1'] . "</TrustedRootCA>\n"; |
|
287 | + $w7Ext .= "<TrustedRootCA>".$certAuthority['sha1']."</TrustedRootCA>\n"; |
|
288 | 288 | } |
289 | 289 | } |
290 | 290 | } |
@@ -297,14 +297,14 @@ discard block |
||
297 | 297 | <UseWinLogonCredentials>false</UseWinLogonCredentials> |
298 | 298 | </EapType> |
299 | 299 | </Eap> |
300 | -<EnableQuarantineChecks>' . $nea . '</EnableQuarantineChecks> |
|
300 | +<EnableQuarantineChecks>' . $nea.'</EnableQuarantineChecks> |
|
301 | 301 | <RequireCryptoBinding>false</RequireCryptoBinding> |
302 | 302 | '; |
303 | 303 | if ($useAnon) { |
304 | 304 | $w7Ext .= '<PeapExtensions> |
305 | 305 | <IdentityPrivacy xmlns="http://www.microsoft.com/provisioning/MsPeapConnectionPropertiesV2"> |
306 | 306 | <EnableIdentityPrivacy>true</EnableIdentityPrivacy> |
307 | -<AnonymousUserName>' . $outerUser . '</AnonymousUserName> |
|
307 | +<AnonymousUserName>' . $outerUser.'</AnonymousUserName> |
|
308 | 308 | </IdentityPrivacy> |
309 | 309 | </PeapExtensions> |
310 | 310 | '; |
@@ -322,8 +322,8 @@ discard block |
||
322 | 322 | $profileFileContEnd = '</EapHostConfig></EAPConfig> |
323 | 323 | '; |
324 | 324 | $returnArray = []; |
325 | - $returnArray['vista'] = $profileFileCont . $vistaExt . $profileFileContEnd; |
|
326 | - $returnArray['w7'] = $profileFileCont . $w7Ext . $profileFileContEnd; |
|
325 | + $returnArray['vista'] = $profileFileCont.$vistaExt.$profileFileContEnd; |
|
326 | + $returnArray['w7'] = $profileFileCont.$w7Ext.$profileFileContEnd; |
|
327 | 327 | return $returnArray; |
328 | 328 | } |
329 | 329 | |
@@ -342,10 +342,10 @@ discard block |
||
342 | 342 | private function writeWLANprofile($wlanProfileName, $ssid, $auth, $encryption, $eapConfig, $profileNumber) { |
343 | 343 | $profileFileCont = '<?xml version="1.0"?> |
344 | 344 | <WLANProfile xmlns="http://www.microsoft.com/networking/WLAN/profile/v1"> |
345 | -<name>' . $wlanProfileName . '</name> |
|
345 | +<name>' . $wlanProfileName.'</name> |
|
346 | 346 | <SSIDConfig> |
347 | 347 | <SSID> |
348 | -<name>' . $ssid . '</name> |
|
348 | +<name>' . $ssid.'</name> |
|
349 | 349 | </SSID> |
350 | 350 | <nonBroadcast>true</nonBroadcast> |
351 | 351 | </SSIDConfig> |
@@ -355,8 +355,8 @@ discard block |
||
355 | 355 | <MSM> |
356 | 356 | <security> |
357 | 357 | <authEncryption> |
358 | -<authentication>' . $auth . '</authentication> |
|
359 | -<encryption>' . $encryption . '</encryption> |
|
358 | +<authentication>' . $auth.'</authentication> |
|
359 | +<encryption>' . $encryption.'</encryption> |
|
360 | 360 | <useOneX>true</useOneX> |
361 | 361 | </authEncryption> |
362 | 362 | '; |
@@ -386,9 +386,9 @@ discard block |
||
386 | 386 | mkdir('vista'); |
387 | 387 | } |
388 | 388 | $vistaFileName = "vista/wlan_prof-$profileNumber.xml"; |
389 | - file_put_contents($vistaFileName, $profileFileCont . $eapConfig['vista'] . $closing); |
|
389 | + file_put_contents($vistaFileName, $profileFileCont.$eapConfig['vista'].$closing); |
|
390 | 390 | $sevenFileName = "w7/wlan_prof-$profileNumber.xml"; |
391 | - file_put_contents($sevenFileName, $profileFileCont . $eapConfig['w7'] . $closing); |
|
391 | + file_put_contents($sevenFileName, $profileFileCont.$eapConfig['w7'].$closing); |
|
392 | 392 | $this->loggerInstance->debug(2, "Installer has been written into directory $this->FPATH\n"); |
393 | 393 | $this->loggerInstance->debug(4, "WLAN_Profile:$wlanProfileName:$encryption\n"); |
394 | 394 | return("\"$wlanProfileName\" \"$encryption\""); |
@@ -424,8 +424,8 @@ discard block |
||
424 | 424 | mkdir('vista'); |
425 | 425 | } |
426 | 426 | |
427 | - file_put_contents("vista/lan_prof.xml", $profileFileCont . $eapConfig['vista'] . $closing); |
|
428 | - file_put_contents("w7/lan_prof.xml", $profileFileCont . $eapConfig['w7'] . $closing); |
|
427 | + file_put_contents("vista/lan_prof.xml", $profileFileCont.$eapConfig['vista'].$closing); |
|
428 | + file_put_contents("w7/lan_prof.xml", $profileFileCont.$eapConfig['w7'].$closing); |
|
429 | 429 | |
430 | 430 | } |
431 | 431 | |
@@ -439,7 +439,7 @@ discard block |
||
439 | 439 | private function writeMainNSH($eap, $attr) { |
440 | 440 | $this->loggerInstance->debug(4, "writeMainNSH"); |
441 | 441 | $this->loggerInstance->debug(4, $attr); |
442 | - $this->loggerInstance->debug(4, "MYLANG=" . $this->lang . "\n"); |
|
442 | + $this->loggerInstance->debug(4, "MYLANG=".$this->lang."\n"); |
|
443 | 443 | |
444 | 444 | $eapOptions = [ |
445 | 445 | \core\common\EAP::PEAP => ['str' => 'PEAP', 'exec' => 'user'], |
@@ -470,8 +470,8 @@ discard block |
||
470 | 470 | $this->loggerInstance->debug(4, "EAP_STR=$eapStr\n"); |
471 | 471 | $this->loggerInstance->debug(4, $eap); |
472 | 472 | |
473 | - $fcontents .= '!define ' . $eapStr; |
|
474 | - $fcontents .= "\n" . '!define EXECLEVEL "' . $execLevel . '"'; |
|
473 | + $fcontents .= '!define '.$eapStr; |
|
474 | + $fcontents .= "\n".'!define EXECLEVEL "'.$execLevel.'"'; |
|
475 | 475 | $fcontents .= $this->writeNsisDefines($attr); |
476 | 476 | file_put_contents('main.nsh', $fcontents); |
477 | 477 | } |
@@ -500,7 +500,7 @@ discard block |
||
500 | 500 | } |
501 | 501 | foreach ($caArray as $certAuthority) { |
502 | 502 | $store = $certAuthority['root'] ? "root" : "ca"; |
503 | - $contentCerts .= '!insertmacro install_ca_cert "' . $certAuthority['file'] . '" "' . $certAuthority['sha1'] . '" "' . $store . "\"\n"; |
|
503 | + $contentCerts .= '!insertmacro install_ca_cert "'.$certAuthority['file'].'" "'.$certAuthority['sha1'].'" "'.$store."\"\n"; |
|
504 | 504 | } |
505 | 505 | fwrite($fileHandleCerts, $contentCerts); |
506 | 506 | fclose($fileHandleCerts); |
@@ -515,7 +515,7 @@ discard block |
||
515 | 515 | */ |
516 | 516 | private function copyFiles($eap) { |
517 | 517 | $this->loggerInstance->debug(4, "copyFiles start\n"); |
518 | - $this->loggerInstance->debug(4, "code_page=" . $this->codePage . "\n"); |
|
518 | + $this->loggerInstance->debug(4, "code_page=".$this->codePage."\n"); |
|
519 | 519 | $this->copyBasicFiles(); |
520 | 520 | |
521 | 521 | switch ($eap["OUTER"]) { |
@@ -22,15 +22,15 @@ |
||
22 | 22 | namespace devices\redirect_dev; |
23 | 23 | |
24 | 24 | class DeviceRedirectDev extends \core\DeviceConfig { |
25 | - /** |
|
26 | - * Constructs a Device object. |
|
27 | - * |
|
28 | - * @final not to be redefined |
|
29 | - */ |
|
25 | + /** |
|
26 | + * Constructs a Device object. |
|
27 | + * |
|
28 | + * @final not to be redefined |
|
29 | + */ |
|
30 | 30 | final public function __construct() { |
31 | 31 | parent::__construct(); |
32 | - $this->setSupportedEapMethods([\core\common\EAP::EAPTYPE_NONE]); |
|
33 | - $this->loggerInstance->debug(4,"RedirectEx called"); |
|
32 | + $this->setSupportedEapMethods([\core\common\EAP::EAPTYPE_NONE]); |
|
33 | + $this->loggerInstance->debug(4,"RedirectEx called"); |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | /** |
@@ -30,7 +30,7 @@ |
||
30 | 30 | final public function __construct() { |
31 | 31 | parent::__construct(); |
32 | 32 | $this->setSupportedEapMethods([\core\common\EAP::EAPTYPE_NONE]); |
33 | - $this->loggerInstance->debug(4,"RedirectEx called"); |
|
33 | + $this->loggerInstance->debug(4, "RedirectEx called"); |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | /** |
@@ -58,8 +58,8 @@ discard block |
||
58 | 58 | parent::__construct(); |
59 | 59 | $Dev = \devices\Devices::listDevices(); |
60 | 60 | if (isset($Dev[$blueprint])) { |
61 | - $this->loggerInstance->debug(4, "loaded: devices/" . $Dev[$blueprint]['directory'] . "/" . $Dev[$blueprint]['module'] . ".php\n"); |
|
62 | - $class_name = "\devices\\".$Dev[$blueprint]['directory']."\Device" . $Dev[$blueprint]['module']; |
|
61 | + $this->loggerInstance->debug(4, "loaded: devices/".$Dev[$blueprint]['directory']."/".$Dev[$blueprint]['module'].".php\n"); |
|
62 | + $class_name = "\devices\\".$Dev[$blueprint]['directory']."\Device".$Dev[$blueprint]['module']; |
|
63 | 63 | $this->device = new $class_name(); |
64 | 64 | if (!$this->device) { |
65 | 65 | $this->loggerInstance->debug(2, "module loading failed"); |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | } else { |
69 | 69 | print("unknown devicename:$blueprint\n"); |
70 | 70 | } |
71 | - $this->device->module_path = ROOT . '/devices/' . $Dev[$blueprint]['directory']; |
|
71 | + $this->device->module_path = ROOT.'/devices/'.$Dev[$blueprint]['directory']; |
|
72 | 72 | $this->device->signer = isset($Dev[$blueprint]['signer']) ? $Dev[$blueprint]['signer'] : 0; |
73 | 73 | $this->device->device_id = $blueprint; |
74 | 74 | $options = \devices\Devices::$Options; |
@@ -101,8 +101,8 @@ discard block |
||
101 | 101 | <NodeName>CATPasspointSetting</NodeName> |
102 | 102 | <Node> |
103 | 103 | <NodeName>AAAServerTrustRoot</NodeName>'; |
104 | - foreach ($this->attributes['internal:CAs'][0] as $oneCert) { |
|
105 | - $content .= '<Node> |
|
104 | + foreach ($this->attributes['internal:CAs'][0] as $oneCert) { |
|
105 | + $content .= '<Node> |
|
106 | 106 | <NodeName>'.$oneCert['uuid'].'</NodeName> |
107 | 107 | <Node> |
108 | 108 | <NodeName>CertSHA256Fingerprint</NodeName> |
@@ -110,8 +110,8 @@ discard block |
||
110 | 110 | </Node> |
111 | 111 | </Node> |
112 | 112 | '; |
113 | - } |
|
114 | - $content .= '</Node> |
|
113 | + } |
|
114 | + $content .= '</Node> |
|
115 | 115 | <Node> |
116 | 116 | <NodeName>Credential</NodeName> |
117 | 117 | <Node> |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | <NodeName>Credential</NodeName> |
117 | 117 | <Node> |
118 | 118 | <NodeName>CreationDate</NodeName> |
119 | - <Value>'.$now->format("Y-m-d") . "T" . $now->format("H:i:s") . "Z".'</Value> |
|
119 | + <Value>'.$now->format("Y-m-d")."T".$now->format("H:i:s")."Z".'</Value> |
|
120 | 120 | </Node> |
121 | 121 | <Node> |
122 | 122 | <NodeName>DigitalCertificate</NodeName> |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | <NodeName>HomeSP</NodeName> |
139 | 139 | <Node> |
140 | 140 | <NodeName>FriendlyName</NodeName> |
141 | - <Value>'.sprintf(_("%s via Passpoint"),\config\ConfAssistant::CONSORTIUM['display_name']).'</Value> |
|
141 | + <Value>'.sprintf(_("%s via Passpoint"), \config\ConfAssistant::CONSORTIUM['display_name']).'</Value> |
|
142 | 142 | </Node> |
143 | 143 | <Node> |
144 | 144 | <NodeName>FQDN</NodeName> |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | $numberOfOi = count(\config\ConfAssistant::CONSORTIUM['interworking-consortium-oi']); |
152 | 152 | foreach (\config\ConfAssistant::CONSORTIUM['interworking-consortium-oi'] as $index => $oneOi) { |
153 | 153 | // according to spec, must be lowercase ASCII without dashes |
154 | - $oiList .= str_replace("-","",trim(strtolower($oneOi))); |
|
154 | + $oiList .= str_replace("-", "", trim(strtolower($oneOi))); |
|
155 | 155 | if ($index < $numberOfOi - 1) { |
156 | 156 | // according to spec, comma-separated |
157 | 157 | $oiList .= ","; |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | Content-Type: application/x-pkcs12 |
190 | 190 | Content-Transfer-Encoding: base64 |
191 | 191 | |
192 | -'.chunk_split(base64_encode($this->clientCert['certdataclear']), 76, "\n"). // is PKCS#12, with encrypted key |
|
192 | +'.chunk_split(base64_encode($this->clientCert['certdataclear']), 76, "\n").// is PKCS#12, with encrypted key |
|
193 | 193 | '--{boundary}'; |
194 | 194 | |
195 | 195 | // trail this with a double slash and a newline |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | // have the notion of signing |
210 | 210 | // but if they ever change their mind, we are prepared |
211 | 211 | |
212 | - $outputFromSigning = system($this->sign . " installer_profile '$fileName' > /dev/null"); |
|
212 | + $outputFromSigning = system($this->sign." installer_profile '$fileName' > /dev/null"); |
|
213 | 213 | if ($outputFromSigning === FALSE) { |
214 | 214 | $this->loggerInstance->debug(2, "Signing the ONC installer $fileName FAILED!\n"); |
215 | 215 | } |