@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | <head lang='" . $ourlocale . "'> |
25 | 25 | <meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>"; |
26 | 26 | // diag area needs its own CSS at some point, but use the user area one for now |
27 | - $cssUrl = $gui->skinObject->findResourceUrl("CSS","cat.css.php"); |
|
27 | + $cssUrl = $gui->skinObject->findResourceUrl("CSS", "cat.css.php"); |
|
28 | 28 | echo "<link rel='stylesheet' type='text/css' href='$cssUrl' />"; |
29 | 29 | echo "<title>" . htmlspecialchars(_("Sanity check for dynamic discovery of realms")) . "</title>"; |
30 | 30 | |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | // checking our own stuff. Enable thorough checks |
48 | 48 | $check_thorough = TRUE; |
49 | 49 | $check_realm = $checkrealm[0]['value']; |
50 | - $testsuite = new \core\diag\RADIUSTests($check_realm, $my_profile->getRealmCheckOuterUsername(), $my_profile->getEapMethodsinOrderOfPreference(1), $my_profile->getCollapsedAttributes()['eap:server_name'] , $my_profile->getCollapsedAttributes()["eap:ca_file"]); |
|
50 | + $testsuite = new \core\diag\RADIUSTests($check_realm, $my_profile->getRealmCheckOuterUsername(), $my_profile->getEapMethodsinOrderOfPreference(1), $my_profile->getCollapsedAttributes()['eap:server_name'], $my_profile->getCollapsedAttributes()["eap:ca_file"]); |
|
51 | 51 | $rfc7585suite = new \core\diag\RFC7585Tests($check_realm); |
52 | 52 | } else { |
53 | 53 | $error_message = _("You asked for a realm check, but we don't know the realm for this profile!") . "</p>"; |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | } |
66 | 66 | } |
67 | 67 | if ($check_realm) { |
68 | - $testsuite = new \core\diag\RADIUSTests($check_realm, "@".$check_realm); |
|
68 | + $testsuite = new \core\diag\RADIUSTests($check_realm, "@" . $check_realm); |
|
69 | 69 | $rfc7585suite = new \core\diag\RFC7585Tests($check_realm); |
70 | 70 | } else { |
71 | 71 | $error_message = _("No valid realm name given, cannot execute any checks!"); |
@@ -751,13 +751,13 @@ discard block |
||
751 | 751 | } |
752 | 752 | |
753 | 753 | if (CONFIG['FUNCTIONALITY_LOCATIONS']['CONFASSISTANT_RADIUS'] == "LOCAL") { |
754 | - $returnUrl = "../admin/overview_idp.php?inst_id=".$my_inst->identifier; |
|
754 | + $returnUrl = "../admin/overview_idp.php?inst_id=" . $my_inst->identifier; |
|
755 | 755 | } else { |
756 | - $returnUrl = CONFIG['FUNCTIONALITY_LOCATIONS']['CONFASSISTANT_RADIUS']."/admin/overview_idp.php?inst_id=".$my_inst->identifier; |
|
756 | + $returnUrl = CONFIG['FUNCTIONALITY_LOCATIONS']['CONFASSISTANT_RADIUS'] . "/admin/overview_idp.php?inst_id=" . $my_inst->identifier; |
|
757 | 757 | } |
758 | 758 | ?> |
759 | - <form method='post' action='<?php echo $returnUrl;?>' accept-charset='UTF-8'> |
|
760 | - <button type='submit' name='submitbutton' value='<?php echo web\lib\common\FormElements::BUTTON_CLOSE; ?>'><?php echo sprintf(_("Return to %s administrator area"),$gui->nomenclature_inst); ?></button> |
|
759 | + <form method='post' action='<?php echo $returnUrl; ?>' accept-charset='UTF-8'> |
|
760 | + <button type='submit' name='submitbutton' value='<?php echo web\lib\common\FormElements::BUTTON_CLOSE; ?>'><?php echo sprintf(_("Return to %s administrator area"), $gui->nomenclature_inst); ?></button> |
|
761 | 761 | </form> |
762 | 762 | <script> |
763 | 763 |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | ini_set('display_errors', '0'); |
30 | 30 | require_once(dirname(dirname(__DIR__)) . '/config/_config.php'); |
31 | 31 | |
32 | -if (CONFIG['FUNCTIONALITY_LOCATIONS']['CONFASSISTANT_SILVERBULLET'] == "LOCAL" || CONFIG['FUNCTIONALITY_LOCATIONS']['CONFASSISTANT_RADIUS'] == "LOCAL" ) { |
|
32 | +if (CONFIG['FUNCTIONALITY_LOCATIONS']['CONFASSISTANT_SILVERBULLET'] == "LOCAL" || CONFIG['FUNCTIONALITY_LOCATIONS']['CONFASSISTANT_RADIUS'] == "LOCAL") { |
|
33 | 33 | $Tests[] = 'makensis'; |
34 | 34 | $Tests[] = 'makensis=>NSISmodules'; |
35 | 35 | $Tests[] = 'makensis=>NSIS_GetVersion'; |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | <th>Device</th> |
179 | 179 | <th>Admin Downloads</th> |
180 | 180 | <th>User Downloads (classic)</th> |
181 | - <th>User Downloads (<?php echo \core\ProfileSilverbullet::PRODUCTNAME;?>)</th> |
|
181 | + <th>User Downloads (<?php echo \core\ProfileSilverbullet::PRODUCTNAME; ?>)</th> |
|
182 | 182 | <th>User Downloads (total)</th> |
183 | 183 | </tr> |
184 | 184 | <?php |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | echo "<tr>"; |
190 | 190 | $admin_query = $dbHandle->exec("SELECT SUM(downloads_admin) AS admin, SUM(downloads_user) AS user, SUM(downloads_silverbullet) as silverbullet FROM downloads WHERE device_id = '$index'"); |
191 | 191 | while ($a = mysqli_fetch_object($admin_query)) { |
192 | - echo "<td>" . $device_array['display'] . "</td><td>" . $a->admin . "</td><td>" . $a->user . "</td><td>" . $a->silverbullet . "</td><td>" . sprintf("%s",$a->user + $a->silverbullet) . "</td>"; |
|
192 | + echo "<td>" . $device_array['display'] . "</td><td>" . $a->admin . "</td><td>" . $a->user . "</td><td>" . $a->silverbullet . "</td><td>" . sprintf("%s", $a->user + $a->silverbullet) . "</td>"; |
|
193 | 193 | $gross_admin = $gross_admin + $a->admin; |
194 | 194 | $gross_user = $gross_user + $a->user; |
195 | 195 | $gross_silverbullet = $gross_silverbullet + $a->silverbullet; |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | sprintf(_("In this section, you define on which media %s should be configured on user devices."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) . "</p> |
138 | 138 | <ul>"; |
139 | 139 | echo "<li>"; |
140 | - echo "<strong>" . ( count(CONFIG_CONFASSISTANT['CONSORTIUM']['ssid']) > 0 ? _("Additional SSIDs:") : _("SSIDs:")) . " </strong>"; |
|
140 | + echo "<strong>" . (count(CONFIG_CONFASSISTANT['CONSORTIUM']['ssid']) > 0 ? _("Additional SSIDs:") : _("SSIDs:")) . " </strong>"; |
|
141 | 141 | if (count(CONFIG_CONFASSISTANT['CONSORTIUM']['ssid']) > 0) { |
142 | 142 | $ssidlist = ""; |
143 | 143 | foreach (CONFIG_CONFASSISTANT['CONSORTIUM']['ssid'] as $ssid) { |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | echo "</li>"; |
157 | 157 | |
158 | 158 | echo "<li>"; |
159 | - echo "<strong>" . ( count(CONFIG_CONFASSISTANT['CONSORTIUM']['ssid']) > 0 ? _("Additional Hotspot 2.0 / Passpoint Consortia:") : _("Hotspot 2.0 / Passpoint Consortia:")) . " </strong>"; |
|
159 | + echo "<strong>" . (count(CONFIG_CONFASSISTANT['CONSORTIUM']['ssid']) > 0 ? _("Additional Hotspot 2.0 / Passpoint Consortia:") : _("Hotspot 2.0 / Passpoint Consortia:")) . " </strong>"; |
|
160 | 160 | if (count(CONFIG_CONFASSISTANT['CONSORTIUM']['interworking-consortium-oi']) > 0) { |
161 | 161 | $consortiumlist = ""; |
162 | 162 | foreach (CONFIG_CONFASSISTANT['CONSORTIUM']['interworking-consortium-oi'] as $oi) { |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | <legend><strong><?php echo _("Helpdesk Details for all users"); ?></strong></legend> |
187 | 187 | <?php |
188 | 188 | if ($wizardStyle) { |
189 | - echo "<p>"._("This section can be used to upload specific Terms of Use for your users and to display details of how your users can reach your local helpdesk.")."</p>"; |
|
189 | + echo "<p>" . _("This section can be used to upload specific Terms of Use for your users and to display details of how your users can reach your local helpdesk.") . "</p>"; |
|
190 | 190 | |
191 | 191 | if (CONFIG['FUNCTIONALITY_LOCATIONS']['CONFASSISTANT_RADIUS'] == "LOCAL") { |
192 | 192 | echo "<p>" . |
@@ -194,10 +194,10 @@ discard block |
||
194 | 194 | "<p>" . |
195 | 195 | _("If you enter a value here, it will be added to the installers for all your users, and will be displayed on the download page. If you operate separate helpdesks for different user groups (we call this 'profiles'), or operate no help desk at all, you can also leave any of these fields empty and optionally specify per-profile helpdesk information later in this wizard.") . "</p>"; |
196 | 196 | if (CONFIG['FUNCTIONALITY_LOCATIONS']['CONFASSISTANT_SILVERBULLET'] == "LOCAL") { |
197 | - echo "<p>" . sprintf(_("For %s deployments, providing at least a local e-mail contact is required."), core\ProfileSilverbullet::PRODUCTNAME) ." " . _("This is the contact point for your end users' level 1 support.") . "</p>"; |
|
197 | + echo "<p>" . sprintf(_("For %s deployments, providing at least a local e-mail contact is required."), core\ProfileSilverbullet::PRODUCTNAME) . " " . _("This is the contact point for your end users' level 1 support.") . "</p>"; |
|
198 | 198 | } |
199 | 199 | } elseif (CONFIG['FUNCTIONALITY_LOCATIONS']['CONFASSISTANT_SILVERBULLET'] == "LOCAL") { |
200 | - echo "<p>". _("Providing at least a local support e-mail contact is required.")." "._("This is the contact point for your end users' level 1 support.")."</p>"; |
|
200 | + echo "<p>" . _("Providing at least a local support e-mail contact is required.") . " " . _("This is the contact point for your end users' level 1 support.") . "</p>"; |
|
201 | 201 | } |
202 | 202 | |
203 | 203 | } |
@@ -94,7 +94,7 @@ |
||
94 | 94 | |
95 | 95 | /* load sub-configs if we are dealing with those in this installation */ |
96 | 96 | |
97 | -if (CONFIG['FUNCTIONALITY_LOCATIONS']['CONFASSISTANT_SILVERBULLET'] == 'LOCAL' || CONFIG['FUNCTIONALITY_LOCATIONS']['CONFASSISTANT_RADIUS'] == 'LOCAL' ) { |
|
97 | +if (CONFIG['FUNCTIONALITY_LOCATIONS']['CONFASSISTANT_SILVERBULLET'] == 'LOCAL' || CONFIG['FUNCTIONALITY_LOCATIONS']['CONFASSISTANT_RADIUS'] == 'LOCAL') { |
|
98 | 98 | include(ROOT . "/config/config-confassistant.php"); |
99 | 99 | } |
100 | 100 |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | <div class='infobox' style='text-align:center;'> |
57 | 57 | <h2><?php echo sprintf(_("QR Code for %s download area"), $uiElements->nomenclature_inst); ?></h2> |
58 | 58 | <?php |
59 | - $displayurl = ( isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on" ? 'https://' : 'http://') . $_SERVER['SERVER_NAME'] . dirname(dirname($_SERVER['SCRIPT_NAME'])) . "?idp=" . $my_inst->identifier; |
|
59 | + $displayurl = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on" ? 'https://' : 'http://') . $_SERVER['SERVER_NAME'] . dirname(dirname($_SERVER['SCRIPT_NAME'])) . "?idp=" . $my_inst->identifier; |
|
60 | 60 | $uri = "data:image/png;base64," . base64_encode($uiElements->pngInjectConsortiumLogo(QRcode::png($displayurl, FALSE, QR_ECLEVEL_Q, QRCODE_PIXELS_PER_SYMBOL), QRCODE_PIXELS_PER_SYMBOL)); |
61 | 61 | $size = getimagesize($uri); |
62 | 62 | echo "<img width='" . ($size[0] / 4) . "' height='" . ($size[1] / 4) . "' src='$uri' alt='QR-code'/>"; |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | </td> |
90 | 90 | <td> |
91 | 91 | <form action='edit_idp_result.php?inst_id=<?php echo $my_inst->identifier; ?>' method='post' accept-charset='UTF-8'> |
92 | - <button class='delete' type='submit' name='submitbutton' value='<?php echo web\lib\common\FormElements::BUTTON_DELETE; ?>' onclick="return confirm('<?php echo ( CONFIG_CONFASSISTANT['CONSORTIUM']['selfservice_registration'] === NULL ? sprintf(_("After deleting the IdP, you can not recreate it yourself - you need a new invitation token from the %s administrator!"), $uiElements->nomenclature_fed) . " " : "" ) . sprintf(_("Do you really want to delete your %s %s?"), $uiElements->nomenclature_inst, $my_inst->name); ?>')"><?php echo sprintf(_("Delete %s"), $uiElements->nomenclature_inst); ?></button> |
|
92 | + <button class='delete' type='submit' name='submitbutton' value='<?php echo web\lib\common\FormElements::BUTTON_DELETE; ?>' onclick="return confirm('<?php echo (CONFIG_CONFASSISTANT['CONSORTIUM']['selfservice_registration'] === NULL ? sprintf(_("After deleting the IdP, you can not recreate it yourself - you need a new invitation token from the %s administrator!"), $uiElements->nomenclature_fed) . " " : "") . sprintf(_("Do you really want to delete your %s %s?"), $uiElements->nomenclature_inst, $my_inst->name); ?>')"><?php echo sprintf(_("Delete %s"), $uiElements->nomenclature_inst); ?></button> |
|
93 | 93 | </form> |
94 | 94 | |
95 | 95 | </td> |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | <br/> |
168 | 168 | <br/> |
169 | 169 | <form action='edit_silverbullet.php?inst_id=<?php echo $my_inst->identifier; ?>&profile_id=<?php echo $profile_list->identifier; ?>' method='POST'> |
170 | - <button <?php echo ( is_array($completeness) ? "disabled" : "" ); ?> type='submit' name='sb_action' value='sb_edit'><?php echo _("Manage User Base"); ?></button> |
|
170 | + <button <?php echo (is_array($completeness) ? "disabled" : ""); ?> type='submit' name='sb_action' value='sb_edit'><?php echo _("Manage User Base"); ?></button> |
|
171 | 171 | </form> |
172 | 172 | </div> |
173 | 173 | |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | if (isset($URL['device-specific:redirect'])) { |
303 | 303 | $displayurl = $URL['device-specific:redirect'][0]; |
304 | 304 | } else { |
305 | - $displayurl = ( isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on" ? 'https://' : 'http://') . $_SERVER['SERVER_NAME'] . dirname(dirname($_SERVER['SCRIPT_NAME'])) . "?idp=" . $my_inst->identifier . "&profile=" . $profile_list->identifier; |
|
305 | + $displayurl = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on" ? 'https://' : 'http://') . $_SERVER['SERVER_NAME'] . dirname(dirname($_SERVER['SCRIPT_NAME'])) . "?idp=" . $my_inst->identifier . "&profile=" . $profile_list->identifier; |
|
306 | 306 | } |
307 | 307 | echo "<a href='$displayurl' style='white-space: nowrap; text-align: center;'>"; |
308 | 308 | $uri = "data:image/png;base64," . base64_encode($uiElements->pngInjectConsortiumLogo(QRcode::png($displayurl, FALSE, QR_ECLEVEL_Q, QRCODE_PIXELS_PER_SYMBOL), QRCODE_PIXELS_PER_SYMBOL)); |
@@ -185,7 +185,6 @@ |
||
185 | 185 | * - RETVAL_NOTCONFIGURED; needs CONFIG_DIAGNOSTICS['RADIUSTESTS']['TLS-discoverytag'] |
186 | 186 | * - RETVAL_INVALID (at least one format error) |
187 | 187 | * - RETVAL_OK (all fine) |
188 | - |
|
189 | 188 | * @return int one of two RETVALs above |
190 | 189 | */ |
191 | 190 | public function relevantNAPTRcompliance() { |
@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | </td> |
280 | 280 | <td> |
281 | 281 | <input type='checkbox' <?php |
282 | - echo ($verify != FALSE ? "checked" : "" ); |
|
282 | + echo ($verify != FALSE ? "checked" : ""); |
|
283 | 283 | ?> name='verify_support' onclick=' |
284 | 284 | if (this.form.elements["verify_support"].checked !== true || this.form.elements["realm"].value.length == 0) { |
285 | 285 | this.form.elements["hint_support"].setAttribute("disabled", "disabled"); |
@@ -287,48 +287,48 @@ discard block |
||
287 | 287 | this.form.elements["hint_support"].removeAttribute("disabled"); |
288 | 288 | } |
289 | 289 | ;'/> |
290 | - <span id='hint_label' style='<?php echo ($realm == "" ? "color:#999999" : "" ); ?>'> |
|
290 | + <span id='hint_label' style='<?php echo ($realm == "" ? "color:#999999" : ""); ?>'> |
|
291 | 291 | <?php echo _("Prefill user input with realm suffix:"); ?> |
292 | 292 | </span> |
293 | - <input type='checkbox' <?php echo ($verify == FALSE ? "disabled" : "" ); ?> name='hint_support' <?php echo ( $hint != FALSE ? "checked" : "" ); ?> /> |
|
293 | + <input type='checkbox' <?php echo ($verify == FALSE ? "disabled" : ""); ?> name='hint_support' <?php echo ($hint != FALSE ? "checked" : ""); ?> /> |
|
294 | 294 | </td> |
295 | 295 | </tr> |
296 | 296 | <tr> |
297 | 297 | |
298 | 298 | <!-- checkbox and input field for anonymity support, available only when realm is known--> |
299 | 299 | <td> |
300 | - <span id='anon_support_label' style='<?php echo ($realm == "" ? "color:#999999" : "" ); ?>'> |
|
300 | + <span id='anon_support_label' style='<?php echo ($realm == "" ? "color:#999999" : ""); ?>'> |
|
301 | 301 | <?php echo _("Enable Anonymous Outer Identity:"); ?> |
302 | 302 | </span> |
303 | 303 | </td> |
304 | 304 | <td> |
305 | - <input type='checkbox' <?php echo ($useAnon != FALSE ? "checked" : "" ) . ($realm == "" ? " disabled" : "" ); ?> name='anon_support' onclick=' |
|
305 | + <input type='checkbox' <?php echo ($useAnon != FALSE ? "checked" : "") . ($realm == "" ? " disabled" : ""); ?> name='anon_support' onclick=' |
|
306 | 306 | if (this.form.elements["anon_support"].checked !== true) { |
307 | 307 | this.form.elements["anon_local"].setAttribute("disabled", "disabled"); |
308 | 308 | } else { |
309 | 309 | this.form.elements["anon_local"].removeAttribute("disabled"); |
310 | 310 | } |
311 | 311 | ;'/> |
312 | - <input type='text' <?php echo ($checkuserOuter == FALSE ? "disabled" : "" ); ?> name='anon_local' value='<?php echo $anonLocal; ?>'/> |
|
312 | + <input type='text' <?php echo ($checkuserOuter == FALSE ? "disabled" : ""); ?> name='anon_local' value='<?php echo $anonLocal; ?>'/> |
|
313 | 313 | </td> |
314 | 314 | </tr> |
315 | 315 | <tr> |
316 | 316 | |
317 | 317 | <!-- checkbox and input field for check realm outer id, available only when realm is known--> |
318 | 318 | <td> |
319 | - <span id='checkuser_label' style='<?php echo ($realm == "" ? "color:#999999" : "" ); ?>'> |
|
319 | + <span id='checkuser_label' style='<?php echo ($realm == "" ? "color:#999999" : ""); ?>'> |
|
320 | 320 | <?php echo _("Use special Outer Identity for realm checks:"); ?> |
321 | 321 | </span> |
322 | 322 | </td> |
323 | 323 | <td> |
324 | - <input type='checkbox' <?php echo ($checkuserOuter != FALSE ? "checked" : "" ) . ($realm == "" ? " disabled" : "" ); ?> name='checkuser_support' onclick=' |
|
324 | + <input type='checkbox' <?php echo ($checkuserOuter != FALSE ? "checked" : "") . ($realm == "" ? " disabled" : ""); ?> name='checkuser_support' onclick=' |
|
325 | 325 | if (this.form.elements["checkuser_support"].checked !== true) { |
326 | 326 | this.form.elements["checkuser_local"].setAttribute("disabled", "disabled"); |
327 | 327 | } else { |
328 | 328 | this.form.elements["checkuser_local"].removeAttribute("disabled"); |
329 | 329 | } |
330 | 330 | ;'/> |
331 | - <input type='text' <?php echo ($checkuserOuter == FALSE ? "disabled" : "" ); ?> name='checkuser_local' value='<?php echo $checkuserValue; ?>'/> |
|
331 | + <input type='text' <?php echo ($checkuserOuter == FALSE ? "disabled" : ""); ?> name='checkuser_local' value='<?php echo $checkuserValue; ?>'/> |
|
332 | 332 | </td> |
333 | 333 | </tr> |
334 | 334 | </table> |
@@ -344,14 +344,14 @@ discard block |
||
344 | 344 | <p> |
345 | 345 | |
346 | 346 | <?php |
347 | - echo "<span id='redirect_label' style='" . ($realm == "" ? "color:#999999" : "" ) . "'><label for='redirect'>" . _("Redirect end users to own web page:") . "</label></span> |
|
348 | - <input type='checkbox' name='redirect' id='redirect' " . ($blacklisted === FALSE ? "" : "checked " ) . "onclick=' |
|
347 | + echo "<span id='redirect_label' style='" . ($realm == "" ? "color:#999999" : "") . "'><label for='redirect'>" . _("Redirect end users to own web page:") . "</label></span> |
|
348 | + <input type='checkbox' name='redirect' id='redirect' " . ($blacklisted === FALSE ? "" : "checked ") . "onclick=' |
|
349 | 349 | if (this.form.elements[\"redirect\"].checked != true) { |
350 | 350 | this.form.elements[\"redirect_target\"].setAttribute(\"disabled\", \"disabled\"); |
351 | 351 | } else { |
352 | 352 | this.form.elements[\"redirect_target\"].removeAttribute(\"disabled\"); |
353 | 353 | };'/> |
354 | - <input type='text' name='redirect_target' " . ($blacklisted !== FALSE ? "value='$blacklisted'" : "disabled" ) . "/>"; |
|
354 | + <input type='text' name='redirect_target' " . ($blacklisted !== FALSE ? "value='$blacklisted'" : "disabled") . "/>"; |
|
355 | 355 | ?> |
356 | 356 | </p> |
357 | 357 | |
@@ -375,7 +375,7 @@ discard block |
||
375 | 375 | function priority(string $eapType, bool $isenabled, int $priority) { |
376 | 376 | echo "<td><select id='$eapType-priority' name='$eapType-priority' " . (!$isenabled ? "disabled='disabled'" : "") . ">"; |
377 | 377 | for ($a = 1; $a < 7; $a = $a + 1) { |
378 | - echo "<option id='$eapType-$a' value='$a' " . ( $isenabled && $a == $priority ? "selected" : "" ) . ">$a</option>"; |
|
378 | + echo "<option id='$eapType-$a' value='$a' " . ($isenabled && $a == $priority ? "selected" : "") . ">$a</option>"; |
|
379 | 379 | } |
380 | 380 | echo "</select></td>"; |
381 | 381 | } |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | 'getUserCerts', |
40 | 40 | ]; |
41 | 41 | |
42 | -function getRequest($varName,$filter) { |
|
42 | +function getRequest($varName, $filter) { |
|
43 | 43 | $safeText = ["options"=>["regexp"=>"/^[\w\d-]+$/"]]; |
44 | 44 | switch ($filter) { |
45 | 45 | case 'safe_text': |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | |
58 | 58 | // make sure this is a known action |
59 | 59 | $actionR = getRequest('action', 'safe_text'); |
60 | -$action = array_search($actionR,LISTOFACTIONS) ? $actionR : FALSE; |
|
60 | +$action = array_search($actionR, LISTOFACTIONS) ? $actionR : FALSE; |
|
61 | 61 | if ($action === FALSE) { |
62 | 62 | exit; |
63 | 63 | } |
@@ -65,18 +65,18 @@ discard block |
||
65 | 65 | $lang = $langR ? $validator->supportedLanguage($langR) : FALSE; |
66 | 66 | $deviceR = getRequest('device', 'safe_text'); |
67 | 67 | $device = $deviceR ? $validator->Device($deviceR) : FALSE; |
68 | -$idpR = getRequest('idp','int'); |
|
68 | +$idpR = getRequest('idp', 'int'); |
|
69 | 69 | $idp = $idpR ? $validator->IdP($idpR)->identifier : FALSE; |
70 | -$profileR = getRequest('profile','int'); |
|
70 | +$profileR = getRequest('profile', 'int'); |
|
71 | 71 | $profile = $profileR ? $validator->Profile($profileR)->identifier : FALSE; |
72 | -$federationR = getRequest('federation','safe_text'); |
|
72 | +$federationR = getRequest('federation', 'safe_text'); |
|
73 | 73 | $federation = $federationR ? $validator->Federation($deviceR)->identifier : FALSE; |
74 | -$disco = getRequest('disco','int'); |
|
75 | -$width = getRequest('width','int') ?? 0; |
|
76 | -$height = getRequest('height','int') ?? 0; |
|
77 | -$sort = getRequest('sort','int') ?? 0; |
|
78 | -$generatedforR = getRequest('generatedfor','safe_text') ?? 'user'; |
|
79 | -$token = getRequest('token','safe_text'); |
|
74 | +$disco = getRequest('disco', 'int'); |
|
75 | +$width = getRequest('width', 'int') ?? 0; |
|
76 | +$height = getRequest('height', 'int') ?? 0; |
|
77 | +$sort = getRequest('sort', 'int') ?? 0; |
|
78 | +$generatedforR = getRequest('generatedfor', 'safe_text') ?? 'user'; |
|
79 | +$token = getRequest('token', 'safe_text'); |
|
80 | 80 | |
81 | 81 | |
82 | 82 | switch ($action) { |
@@ -137,7 +137,7 @@ |
||
137 | 137 | |
138 | 138 | $out .= 'Config.sb_user_file = """' . $this->mkSbUserFile() . '"""' . "\n"; |
139 | 139 | if (!empty($this->attributes['internal:realm'][0])) { |
140 | - $out .= 'Config.user_realm = "' . $this->attributes['internal:realm'][0] . "\"\n"; |
|
140 | + $out .= 'Config.user_realm = "' . $this->attributes['internal:realm'][0] . "\"\n"; |
|
141 | 141 | } |
142 | 142 | if(!empty($this->attributes['internal:hint_userinput_suffix'][0]) && $this->attributes['internal:hint_userinput_suffix'][0] == 1) { |
143 | 143 | $out .= "Config.hint_user_input = True\n"; |
@@ -124,8 +124,7 @@ |
||
124 | 124 | $out .= "Config.eap_inner = '" . $eapMethod['INNER'] . "'\n"; |
125 | 125 | 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') { |
126 | 126 | $out .= "Config.use_other_tls_id = True\n"; |
127 | - } |
|
128 | - else { |
|
127 | + } else { |
|
129 | 128 | $out .= "Config.use_other_tls_id = False\n"; |
130 | 129 | } |
131 | 130 | $tou = $this->mkUserConsent(); |
@@ -33,12 +33,12 @@ discard block |
||
33 | 33 | public function writeInstaller() { |
34 | 34 | $installerPath = $this->installerBasename . ".py"; |
35 | 35 | $this->copyFile("main.py", $installerPath); |
36 | - $installer = fopen($installerPath,"a"); |
|
36 | + $installer = fopen($installerPath, "a"); |
|
37 | 37 | if ($installer === FALSE) { |
38 | 38 | throw new Exception("Unable to open installer file for writing!"); |
39 | 39 | } |
40 | - fwrite($installer,$this->writeMessages()); |
|
41 | - fwrite($installer,$this->writeConfigVars()); |
|
40 | + fwrite($installer, $this->writeMessages()); |
|
41 | + fwrite($installer, $this->writeConfigVars()); |
|
42 | 42 | fwrite($installer, "run_installer()\n"); |
43 | 43 | fclose($installer); |
44 | 44 | return($installerPath); |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | $out .= 'Messages.p12_title = "' . _("personal certificate file (p12 or pfx)") . "\"\n"; |
105 | 105 | $out .= 'Messages.save_wpa_conf = "' . _("Network Manager configuration failed, but we may generate a wpa_supplicant configuration file if you wish. Be warned that your connection password will be saved in this file as clear text.") . "\"\n"; |
106 | 106 | $out .= 'Messages.save_wpa_confirm = "' . _("Write the file") . "\"\n"; |
107 | - $out .= 'Messages.wrongUsernameFormat = "' ._("Error: Your username must be of the form 'xxx@institutionID' e.g. '[email protected]'!") . "\"\n"; |
|
107 | + $out .= 'Messages.wrongUsernameFormat = "' . _("Error: Your username must be of the form 'xxx@institutionID' e.g. '[email protected]'!") . "\"\n"; |
|
108 | 108 | $out .= 'Messages.wrong_realm = "' . _("Error: your username must be in the form of 'xxx@{}'. Please enter the username in the correct format.") . "\"\n"; |
109 | 109 | $out .= 'Messages.wrong_realm_suffix = "' . _("Error: your username must be in the form of 'xxx@institutionID' and end with '{}'. Please enter the username in the correct format.") . "\"\n"; |
110 | 110 | |
@@ -133,8 +133,8 @@ discard block |
||
133 | 133 | $out .= "Config.use_other_tls_id = False\n"; |
134 | 134 | } |
135 | 135 | $tou = $this->mkUserConsent(); |
136 | - $out .= 'Config.tou = ' . ( $tou ? '"""' . $tou . '"""' : 'None' ) . "\n"; |
|
137 | - $out .= 'Config.CA = """' . $this->mkCAfile() . '"""' . "\n"; |
|
136 | + $out .= 'Config.tou = ' . ($tou ? '"""' . $tou . '"""' : 'None') . "\n"; |
|
137 | + $out .= 'Config.CA = """' . $this->mkCAfile() . '"""' . "\n"; |
|
138 | 138 | $out .= "Config.anonymous_identity = '" . $this->determineOuterIdString() . "'\n"; |
139 | 139 | $out .= 'Config.init_info = """' . $this->mkIntro() . '"""' . "\n"; |
140 | 140 | $out .= 'Config.init_confirmation = "' . $this->mkProfileConfirmation() . "\"\n"; |
@@ -143,10 +143,10 @@ discard block |
||
143 | 143 | if (!empty($this->attributes['internal:realm'][0])) { |
144 | 144 | $out .= 'Config.user_realm = "' . $this->attributes['internal:realm'][0] . "\"\n"; |
145 | 145 | } |
146 | - if(!empty($this->attributes['internal:hint_userinput_suffix'][0]) && $this->attributes['internal:hint_userinput_suffix'][0] == 1) { |
|
146 | + if (!empty($this->attributes['internal:hint_userinput_suffix'][0]) && $this->attributes['internal:hint_userinput_suffix'][0] == 1) { |
|
147 | 147 | $out .= "Config.hint_user_input = True\n"; |
148 | 148 | } |
149 | - if(!empty($this->attributes['internal:verify_userinput_suffix'][0]) && $this->attributes['internal:verify_userinput_suffix'][0] == 1) { |
|
149 | + if (!empty($this->attributes['internal:verify_userinput_suffix'][0]) && $this->attributes['internal:verify_userinput_suffix'][0] == 1) { |
|
150 | 150 | $out .= "Config.verify_user_realm_input = True\n"; |
151 | 151 | } |
152 | 152 | return $out; |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | } |
187 | 187 | $out .= "'DNS:$oneServer'"; |
188 | 188 | } |
189 | - return "[" . $out. "]"; |
|
189 | + return "[" . $out . "]"; |
|
190 | 190 | } |
191 | 191 | |
192 | 192 | |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | return '[' . implode(', ', $outArray) . ']'; |
211 | 211 | } |
212 | 212 | |
213 | - private function mkCAfile(){ |
|
213 | + private function mkCAfile() { |
|
214 | 214 | $out = ''; |
215 | 215 | $cAlist = $this->attributes['internal:CAs'][0]; |
216 | 216 | foreach ($cAlist as $oneCa) { |