@@ -5,11 +5,11 @@ |
||
5 | 5 | |
6 | 6 | class Device_XML_TTLS_MSCHAP2 extends Device_XML { |
7 | 7 | final public function __construct() { |
8 | - $this->supportedEapMethods = |
|
8 | + $this->supportedEapMethods = |
|
9 | 9 | [ |
10 | - EAP::$TTLS_MSCHAP2, |
|
11 | - ]; |
|
12 | - $this->lang_scope = 'single'; |
|
10 | + EAP::$TTLS_MSCHAP2, |
|
11 | + ]; |
|
12 | + $this->lang_scope = 'single'; |
|
13 | 13 | } |
14 | 14 | } |
15 | 15 |
@@ -5,7 +5,7 @@ |
||
5 | 5 | |
6 | 6 | class Device_XML_PWD extends Device_XML { |
7 | 7 | final public function __construct() { |
8 | - $this->supportedEapMethods = |
|
8 | + $this->supportedEapMethods = |
|
9 | 9 | [ |
10 | 10 | EAP::$PWD, |
11 | 11 | ]; |
@@ -5,11 +5,11 @@ |
||
5 | 5 | |
6 | 6 | class Device_XML_PWD extends Device_XML { |
7 | 7 | final public function __construct() { |
8 | - $this->supportedEapMethods = |
|
8 | + $this->supportedEapMethods = |
|
9 | 9 | [ |
10 | - EAP::$PWD, |
|
11 | - ]; |
|
12 | - $this->lang_scope = 'single'; |
|
10 | + EAP::$PWD, |
|
11 | + ]; |
|
12 | + $this->lang_scope = 'single'; |
|
13 | 13 | } |
14 | 14 | } |
15 | 15 |
@@ -5,7 +5,7 @@ |
||
5 | 5 | |
6 | 6 | class Device_XML_PWD extends Device_XML { |
7 | 7 | final public function __construct() { |
8 | - $this->supportedEapMethods = |
|
8 | + $this->supportedEapMethods = |
|
9 | 9 | [ |
10 | 10 | EAP::$PWD, |
11 | 11 | ]; |
@@ -5,15 +5,15 @@ |
||
5 | 5 | |
6 | 6 | class Device_Lollipop extends Device_XML{ |
7 | 7 | final public function __construct() { |
8 | - $this->supportedEapMethods = |
|
8 | + $this->supportedEapMethods = |
|
9 | 9 | [ |
10 | - EAP::$PEAP_MSCHAP2, |
|
11 | - EAP::$TTLS_PAP, |
|
12 | - EAP::$TTLS_MSCHAP2, |
|
13 | - EAP::$TLS, |
|
14 | - ]; |
|
15 | - $this->lang_scope = 'single'; |
|
16 | - $this->all_eaps = TRUE; |
|
10 | + EAP::$PEAP_MSCHAP2, |
|
11 | + EAP::$TTLS_PAP, |
|
12 | + EAP::$TTLS_MSCHAP2, |
|
13 | + EAP::$TLS, |
|
14 | + ]; |
|
15 | + $this->lang_scope = 'single'; |
|
16 | + $this->all_eaps = TRUE; |
|
17 | 17 | } |
18 | 18 | } |
19 | 19 |
@@ -3,9 +3,9 @@ |
||
3 | 3 | require_once('DeviceConfig.php'); |
4 | 4 | require_once('XML.php'); |
5 | 5 | |
6 | -class Device_Lollipop extends Device_XML{ |
|
6 | +class Device_Lollipop extends Device_XML { |
|
7 | 7 | final public function __construct() { |
8 | - $this->supportedEapMethods = |
|
8 | + $this->supportedEapMethods = |
|
9 | 9 | [ |
10 | 10 | EAP::$PEAP_MSCHAP2, |
11 | 11 | EAP::$TTLS_PAP, |
@@ -224,7 +224,7 @@ |
||
224 | 224 | * Adds a new profile to this IdP. |
225 | 225 | * Only creates the DB entry for the Profile. If you want to add attributes later, see Profile::addAttribute(). |
226 | 226 | * |
227 | - * @return object new Profile object if successful, or FALSE if an error occured |
|
227 | + * @return Profile|null new Profile object if successful, or FALSE if an error occured |
|
228 | 228 | */ |
229 | 229 | public function newProfile() { |
230 | 230 | DBConnection::exec($this->databaseType, "INSERT INTO profile (inst_id) VALUES($this->identifier)"); |
@@ -8,6 +8,6 @@ |
||
8 | 8 | /** |
9 | 9 | * |
10 | 10 | */ |
11 | - $root = dirname(dirname(__FILE__)); |
|
12 | - include($root."/config/config.php"); |
|
13 | - set_include_path(get_include_path() . PATH_SEPARATOR . "$root/core" . PATH_SEPARATOR . "$root"); |
|
14 | 11 | \ No newline at end of file |
12 | + $root = dirname(dirname(__FILE__)); |
|
13 | + include($root."/config/config.php"); |
|
14 | + set_include_path(get_include_path() . PATH_SEPARATOR . "$root/core" . PATH_SEPARATOR . "$root"); |
|
15 | 15 | \ No newline at end of file |
@@ -9,5 +9,5 @@ |
||
9 | 9 | * |
10 | 10 | */ |
11 | 11 | $root = dirname(dirname(__FILE__)); |
12 | - include($root."/config/config.php"); |
|
12 | + include($root . "/config/config.php"); |
|
13 | 13 | set_include_path(get_include_path() . PATH_SEPARATOR . "$root/core" . PATH_SEPARATOR . "$root"); |
14 | 14 | \ No newline at end of file |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | <div class='infobox' style='text-align:center;'> |
86 | 86 | <h2><?php echo _("Institution Download Area QR Code"); ?></h2> |
87 | 87 | <?php |
88 | - $displayurl = ( isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on" ? 'https://' : 'http://') . $_SERVER['SERVER_NAME'] . dirname(dirname($_SERVER['SCRIPT_NAME'])) . "?idp=" . $my_inst->identifier; |
|
88 | + $displayurl = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on" ? 'https://' : 'http://') . $_SERVER['SERVER_NAME'] . dirname(dirname($_SERVER['SCRIPT_NAME'])) . "?idp=" . $my_inst->identifier; |
|
89 | 89 | $uri = "data:image/png;base64," . base64_encode(png_inject_consortium_logo(QRcode::png($displayurl, FALSE, QR_ECLEVEL_Q, 12))); |
90 | 90 | $size = getimagesize($uri); |
91 | 91 | echo "<img width='" . ($size[0] / 4) . "' height='" . ($size[1] / 4) . "' src='$uri' alt='QR-code'/>"; |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | </td> |
116 | 116 | <td> |
117 | 117 | <form action='edit_idp_result.php?inst_id=<?php echo $my_inst->identifier; ?>' method='post' accept-charset='UTF-8'> |
118 | - <button class='delete' type='submit' name='submitbutton' value='<?php echo BUTTON_DELETE; ?>' onclick="return confirm('<?php echo ( Config::$CONSORTIUM['selfservice_registration'] === NULL ? _("After deleting the IdP, you can not recreate it yourself - you need a new invitation token from the federation administrator!") . " " : "" ) . sprintf(_("Do you really want to delete your IdP %s?"), $my_inst->name); ?>')"><?php echo _("Delete IdP"); ?></button> |
|
118 | + <button class='delete' type='submit' name='submitbutton' value='<?php echo BUTTON_DELETE; ?>' onclick="return confirm('<?php echo (Config::$CONSORTIUM['selfservice_registration'] === NULL ? _("After deleting the IdP, you can not recreate it yourself - you need a new invitation token from the federation administrator!") . " " : "") . sprintf(_("Do you really want to delete your IdP %s?"), $my_inst->name); ?>')"><?php echo _("Delete IdP"); ?></button> |
|
119 | 119 | </form> |
120 | 120 | |
121 | 121 | </td> |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | <?php |
156 | 156 | $profiles_for_this_idp = $my_inst->listProfiles(); |
157 | 157 | if (count($profiles_for_this_idp) == 0) { // no profiles yet. |
158 | - echo "<h2>"._("There are not yet any profiles for your institution.")."</h2>"; |
|
158 | + echo "<h2>" . _("There are not yet any profiles for your institution.") . "</h2>"; |
|
159 | 159 | } |
160 | 160 | |
161 | 161 | // if there is one profile and it is of type Silver Bullet, display a very |
@@ -168,12 +168,12 @@ discard block |
||
168 | 168 | ?> |
169 | 169 | <div style='display: table-row; margin-bottom: 20px;'> |
170 | 170 | <div class='profilebox' style='display: table-cell;'> |
171 | - <h2><?php echo _("eduroam-as-a-Service");?></h2> |
|
172 | - <?php printf(_("You can create up to %d users. Their credentials will carry the name <strong>%s</strong>."),200,"opaquehash@$my_inst->identifier-$profile->identifier.".strtolower($my_inst->federation).Config::$CONSORTIUM['silverbullet_realm_suffix']);?> |
|
171 | + <h2><?php echo _("eduroam-as-a-Service"); ?></h2> |
|
172 | + <?php printf(_("You can create up to %d users. Their credentials will carry the name <strong>%s</strong>."), 200, "opaquehash@$my_inst->identifier-$profile->identifier." . strtolower($my_inst->federation) . Config::$CONSORTIUM['silverbullet_realm_suffix']); ?> |
|
173 | 173 | <br/> |
174 | 174 | <br/> |
175 | 175 | <form action='edit_silverbullet.php' method='POST'> |
176 | - <button type='submit' name='sb_action' value='sb_edit'><?php echo _("Manage User Base");?></button> |
|
176 | + <button type='submit' name='sb_action' value='sb_edit'><?php echo _("Manage User Base"); ?></button> |
|
177 | 177 | </form> |
178 | 178 | </div> |
179 | 179 | </div> |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | } |
186 | 186 | } |
187 | 187 | if (count($profiles_for_this_idp) > 0) { // no profiles yet. |
188 | - echo "<h2>"._("Profiles for this institution")."</h2>"; |
|
188 | + echo "<h2>" . _("Profiles for this institution") . "</h2>"; |
|
189 | 189 | } |
190 | 190 | foreach ($profiles_for_this_idp as $profile_list) { |
191 | 191 | echo "<div style='display: table-row; margin-bottom: 20px;'>"; |
@@ -259,7 +259,7 @@ discard block |
||
259 | 259 | $has_realm = $profile_list->getAttributes("internal:realm"); |
260 | 260 | $has_realm = $has_realm[0]['value']; |
261 | 261 | echo "<div class='profilemodulebuttons' style='float:right;'>"; |
262 | - if (count(Config::$RADIUSTESTS['UDP-hosts']) > 0 || ( count(Config::$RADIUSTESTS['TLS-clientcerts']) > 0 && Config::$RADIUSTESTS['TLS-discoverytag'] != "")) |
|
262 | + if (count(Config::$RADIUSTESTS['UDP-hosts']) > 0 || (count(Config::$RADIUSTESTS['TLS-clientcerts']) > 0 && Config::$RADIUSTESTS['TLS-discoverytag'] != "")) |
|
263 | 263 | echo "<form action='action_realmcheck.php?inst_id=$my_inst->identifier&profile_id=$profile_list->identifier' method='post' accept-charset='UTF-8'> |
264 | 264 | <button type='submit' name='profile_action' value='check' " . ($has_realm ? "" : "disabled='disabled' title='" . _("The realm can only be checked if you configure the realm!") . "'") . "> |
265 | 265 | " . _("Check realm reachability") . " |
@@ -293,7 +293,7 @@ discard block |
||
293 | 293 | if (isset($URL['device-specific:redirect'])) |
294 | 294 | $displayurl = $URL['device-specific:redirect'][0]; |
295 | 295 | else |
296 | - $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; |
|
296 | + $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; |
|
297 | 297 | echo "<a href='$displayurl' style='white-space: nowrap; text-align: center;'>"; |
298 | 298 | $uri = "data:image/png;base64," . base64_encode(png_inject_consortium_logo(QRcode::png($displayurl, FALSE, QR_ECLEVEL_Q, 12))); |
299 | 299 | $size = getimagesize($uri); |
@@ -28,8 +28,9 @@ discard block |
||
28 | 28 | |
29 | 29 | // delete stored realm |
30 | 30 | |
31 | -if (isset($_SESSION['check_realm'])) |
|
31 | +if (isset($_SESSION['check_realm'])) { |
|
32 | 32 | unset($_SESSION['check_realm']); |
33 | +} |
|
33 | 34 | |
34 | 35 | |
35 | 36 | geo_widget_head($my_inst->federation, $my_inst->name); |
@@ -95,15 +96,17 @@ discard block |
||
95 | 96 | </div> |
96 | 97 | <?php |
97 | 98 | $loadmap = FALSE; |
98 | - foreach ($idpoptions as $optionname => $optionvalue) |
|
99 | - if ($optionvalue['name'] == "general:geo_coordinates") |
|
99 | + foreach ($idpoptions as $optionname => $optionvalue) { |
|
100 | + if ($optionvalue['name'] == "general:geo_coordinates") |
|
100 | 101 | $loadmap = TRUE; |
101 | - if ($loadmap) |
|
102 | - echo ' |
|
102 | + } |
|
103 | + if ($loadmap) { |
|
104 | + echo ' |
|
103 | 105 | <div class="infobox" style="width:270px;"> |
104 | 106 | <div id="map" style="width:100%; height:150px"></div> |
105 | 107 | </div> |
106 | 108 | '; |
109 | + } |
|
107 | 110 | ?> |
108 | 111 | </div> |
109 | 112 | <table> |
@@ -131,8 +134,8 @@ discard block |
||
131 | 134 | <h2><?php _("Available Support actions"); ?></h2> |
132 | 135 | <table> |
133 | 136 | <?php |
134 | - if (count(Config::$RADIUSTESTS['UDP-hosts']) > 0 || Config::$RADIUSTESTS['TLS-discoverytag'] != "") |
|
135 | - echo "<tr> |
|
137 | + if (count(Config::$RADIUSTESTS['UDP-hosts']) > 0 || Config::$RADIUSTESTS['TLS-discoverytag'] != "") { |
|
138 | + echo "<tr> |
|
136 | 139 | <td>" . _("Check another realm's reachability") . "</td> |
137 | 140 | <td><form method='post' action='action_realmcheck.php?inst_id=$my_inst->identifier' accept-charset='UTF-8'> |
138 | 141 | <input type='text' name='realm' id='realm'> |
@@ -140,7 +143,9 @@ discard block |
||
140 | 143 | </form> |
141 | 144 | </td> |
142 | 145 | </tr>"; |
143 | - if (Config::$CONSORTIUM['name'] == "eduroam") // SW: APPROVED |
|
146 | + } |
|
147 | + if (Config::$CONSORTIUM['name'] == "eduroam") { |
|
148 | + // SW: APPROVED |
|
144 | 149 | echo "<tr> |
145 | 150 | <td>" . _("Check server status of European federations") . "</td> |
146 | 151 | <td> |
@@ -149,6 +154,7 @@ discard block |
||
149 | 154 | </form> |
150 | 155 | </td> |
151 | 156 | </tr>"; |
157 | + } |
|
152 | 158 | ?> |
153 | 159 | </table> |
154 | 160 | <hr/> |
@@ -226,9 +232,10 @@ discard block |
||
226 | 232 | $allcomplete = FALSE; |
227 | 233 | }; |
228 | 234 | $attribs = $profile_list->getAttributes(); |
229 | - foreach ($attribs as $attrib) |
|
230 | - if ($attrib['level'] == "Method" && !preg_match("/^internal:/", $attrib['name'])) |
|
235 | + foreach ($attribs as $attrib) { |
|
236 | + if ($attrib['level'] == "Method" && !preg_match("/^internal:/", $attrib['name'])) |
|
231 | 237 | $buffer_eaptypediv .= "<img src='../resources/images/icons/Letter-E-blue-icon.png' alt='" . _("Options on EAP Method level are in effect.") . "'>"; |
238 | + } |
|
232 | 239 | $buffer_eaptypediv .= "<br/>"; |
233 | 240 | } |
234 | 241 | $buffer_headline = "<h2 style='overflow:auto;'>"; |
@@ -236,23 +243,27 @@ discard block |
||
236 | 243 | $buffer_headline .= "<div style='float:right;'>"; |
237 | 244 | $sufficient_config = $profile_list->getSufficientConfig(); |
238 | 245 | $showtime = $profile_list->isShowtime(); |
239 | - if ($has_overrides) |
|
240 | - $buffer_headline .= UI_remark("", _("Option override on profile level is in effect."), TRUE); |
|
241 | - if (!$allcomplete) |
|
242 | - $buffer_headline .= UI_error("", _("The information in this profile is incomplete."), TRUE); |
|
243 | - if ($showtime) |
|
244 | - $buffer_headline .= UI_okay("", _("This profile is shown on the user download interface."), TRUE); |
|
245 | - else if ($sufficient_config) |
|
246 | - $buffer_headline .= UI_warning("", sprintf(_("This profile is NOT shown on the user download interface, even though we have enough information to show. To enable the profile, add the attribute \"%s\" and tick the corresponding box."), display_name("profile:production")), TRUE); |
|
246 | + if ($has_overrides) { |
|
247 | + $buffer_headline .= UI_remark("", _("Option override on profile level is in effect."), TRUE); |
|
248 | + } |
|
249 | + if (!$allcomplete) { |
|
250 | + $buffer_headline .= UI_error("", _("The information in this profile is incomplete."), TRUE); |
|
251 | + } |
|
252 | + if ($showtime) { |
|
253 | + $buffer_headline .= UI_okay("", _("This profile is shown on the user download interface."), TRUE); |
|
254 | + } else if ($sufficient_config) { |
|
255 | + $buffer_headline .= UI_warning("", sprintf(_("This profile is NOT shown on the user download interface, even though we have enough information to show. To enable the profile, add the attribute \"%s\" and tick the corresponding box."), display_name("profile:production")), TRUE); |
|
256 | + } |
|
247 | 257 | $buffer_headline .= "</div>"; |
248 | 258 | |
249 | 259 | $buffer_headline .= sprintf(_("Profile: %s"), $profile_name) . "</h2>"; |
250 | 260 | |
251 | 261 | echo $buffer_headline; |
252 | 262 | |
253 | - if (array_search(EAP::$TTLS_PAP, $typelist) !== FALSE && array_search(EAP::$TTLS_GTC, $typelist) === FALSE && array_search(EAP::$PEAP_MSCHAP2, $typelist) === FALSE && array_search(EAP::$TTLS_MSCHAP2, $typelist) === FALSE) |
|
254 | - /// Hmmm... IdP Supports TTLS-PAP, but not TTLS-GTC nor anything based on MSCHAPv2. That locks out Symbian users; and is easy to circumvent. Tell the admin... |
|
263 | + if (array_search(EAP::$TTLS_PAP, $typelist) !== FALSE && array_search(EAP::$TTLS_GTC, $typelist) === FALSE && array_search(EAP::$PEAP_MSCHAP2, $typelist) === FALSE && array_search(EAP::$TTLS_MSCHAP2, $typelist) === FALSE) { |
|
264 | + /// Hmmm... IdP Supports TTLS-PAP, but not TTLS-GTC nor anything based on MSCHAPv2. That locks out Symbian users; and is easy to circumvent. Tell the admin... |
|
255 | 265 | $buffer_eaptypediv .= "<p>" . sprintf(_("Read this <a href='%s'>tip</a>."), "https://confluence.terena.org/display/H2eduroam/eap-types#eap-types-choices") . "</p>"; |
266 | + } |
|
256 | 267 | |
257 | 268 | $buffer_eaptypediv .= "</div>"; |
258 | 269 | echo $buffer_eaptypediv; |
@@ -260,12 +271,13 @@ discard block |
||
260 | 271 | $has_realm = $profile_list->getAttributes("internal:realm"); |
261 | 272 | $has_realm = $has_realm[0]['value']; |
262 | 273 | echo "<div class='profilemodulebuttons' style='float:right;'>"; |
263 | - if (count(Config::$RADIUSTESTS['UDP-hosts']) > 0 || ( count(Config::$RADIUSTESTS['TLS-clientcerts']) > 0 && Config::$RADIUSTESTS['TLS-discoverytag'] != "")) |
|
264 | - echo "<form action='action_realmcheck.php?inst_id=$my_inst->identifier&profile_id=$profile_list->identifier' method='post' accept-charset='UTF-8'> |
|
274 | + if (count(Config::$RADIUSTESTS['UDP-hosts']) > 0 || ( count(Config::$RADIUSTESTS['TLS-clientcerts']) > 0 && Config::$RADIUSTESTS['TLS-discoverytag'] != "")) { |
|
275 | + echo "<form action='action_realmcheck.php?inst_id=$my_inst->identifier&profile_id=$profile_list->identifier' method='post' accept-charset='UTF-8'> |
|
265 | 276 | <button type='submit' name='profile_action' value='check' " . ($has_realm ? "" : "disabled='disabled' title='" . _("The realm can only be checked if you configure the realm!") . "'") . "> |
266 | 277 | " . _("Check realm reachability") . " |
267 | 278 | </button> |
268 | 279 | </form>"; |
280 | + } |
|
269 | 281 | echo "<form action='overview_installers.php?inst_id=$my_inst->identifier&profile_id=$profile_list->identifier' method='post' accept-charset='UTF-8'> |
270 | 282 | <button type='submit' name='profile_action' value='check' " . ($has_eaptypes ? "" : "disabled='disabled' title='" . _("You have not fully configured any supported EAP types!") . "'") . "> |
271 | 283 | " . _("Installer Fine-Tuning and Download") . " |
@@ -291,10 +303,11 @@ discard block |
||
291 | 303 | if ($profile_list->isShowtime()) { |
292 | 304 | echo "<div style='display: table-cell; text-align:center;'><p><strong>" . _("User Download Link") . "</strong></p>"; |
293 | 305 | $URL = $profile_list->getCollapsedAttributes(); |
294 | - if (isset($URL['device-specific:redirect'])) |
|
295 | - $displayurl = $URL['device-specific:redirect'][0]; |
|
296 | - else |
|
297 | - $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 | + if (isset($URL['device-specific:redirect'])) { |
|
307 | + $displayurl = $URL['device-specific:redirect'][0]; |
|
308 | + } else { |
|
309 | + $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; |
|
310 | + } |
|
298 | 311 | echo "<a href='$displayurl' style='white-space: nowrap; text-align: center;'>"; |
299 | 312 | $uri = "data:image/png;base64," . base64_encode(png_inject_consortium_logo(QRcode::png($displayurl, FALSE, QR_ECLEVEL_Q, 12))); |
300 | 313 | $size = getimagesize($uri); |
@@ -307,8 +320,9 @@ discard block |
||
307 | 320 | echo "<div style='width:20px;'></div>"; |
308 | 321 | echo "<div style='display: table-cell; min-width:200px;'><p><strong>" . _("User Downloads") . "</strong></p><table>"; |
309 | 322 | $stats = $profile_list->getUserDownloadStats(); |
310 | - foreach ($stats as $dev => $count) |
|
311 | - echo "<tr><td><strong>$dev</strong></td><td>$count</td></tr>"; |
|
323 | + foreach ($stats as $dev => $count) { |
|
324 | + echo "<tr><td><strong>$dev</strong></td><td>$count</td></tr>"; |
|
325 | + } |
|
312 | 326 | echo "</table></div>"; |
313 | 327 | } |
314 | 328 | echo "</div>"; |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | * This function retrieves the IdP-wide attributes. If called with the optional parameter, only attribute values for the attribute |
104 | 104 | * name in $optionName are retrieved; otherwise, all attributes are retrieved. |
105 | 105 | * |
106 | - * @param string $optionName optionally, the name of the attribute that is to be retrieved |
|
106 | + * @param integer $optionName optionally, the name of the attribute that is to be retrieved |
|
107 | 107 | * @return array of arrays of attributes which were set for this IdP |
108 | 108 | */ |
109 | 109 | public function getAttributes($optionName = 0) { |
@@ -187,6 +187,9 @@ discard block |
||
187 | 187 | } |
188 | 188 | } |
189 | 189 | |
190 | + /** |
|
191 | + * @param string $level |
|
192 | + */ |
|
190 | 193 | protected function retrieveOptionsFromDatabase($query, $level) { |
191 | 194 | $optioninstance = Options::instance(); |
192 | 195 | $this->attributes = []; |
@@ -148,13 +148,13 @@ discard block |
||
148 | 148 | ]; |
149 | 149 | |
150 | 150 | /** |
151 | - * Configuration for GeoIP2 |
|
152 | - * Beware, the legacy version does not really work with IPv6 addresses |
|
153 | - * version: set to 2 if you wish to use GeoIP2, to 1 for the legacy version or set to 0 to turn off geolocation service |
|
154 | - * geoip2-path-to-autoloader: points to the GeoIP2 autoloader |
|
155 | - * geoip2-path-to-db: points to the GeoIP2 city database |
|
156 | - * @var array |
|
157 | - */ |
|
151 | + * Configuration for GeoIP2 |
|
152 | + * Beware, the legacy version does not really work with IPv6 addresses |
|
153 | + * version: set to 2 if you wish to use GeoIP2, to 1 for the legacy version or set to 0 to turn off geolocation service |
|
154 | + * geoip2-path-to-autoloader: points to the GeoIP2 autoloader |
|
155 | + * geoip2-path-to-db: points to the GeoIP2 city database |
|
156 | + * @var array |
|
157 | + */ |
|
158 | 158 | |
159 | 159 | public static $GEOIP = [ |
160 | 160 | 'version' => 0, |
@@ -181,21 +181,21 @@ discard block |
||
181 | 181 | * @var array |
182 | 182 | */ |
183 | 183 | public static $LANGUAGES = [ |
184 | - 'ca' => ['display' => 'Català', 'locale' => 'ca_ES.utf8', 'latin_based' => TRUE], |
|
185 | - 'de' => ['display' => 'Deutsch', 'locale' => 'de_DE.utf8', 'latin_based' => TRUE], |
|
186 | - 'en' => ['display' => 'English(GB)', 'locale' => 'en_GB.utf8', 'latin_based' => TRUE], |
|
187 | - 'es' => ['display' => 'Español', 'locale' => 'es_ES.utf8', 'latin_based' => TRUE], |
|
188 | - 'gl' => ['display' => 'Galego', 'locale' => 'gl_ES.utf8', 'latin_based' => TRUE], |
|
189 | - 'hr' => ['display' => 'Hrvatski', 'locale' => 'hr_HR.utf8', 'latin_based' => TRUE], |
|
190 | - 'it' => ['display' => 'Italiano', 'locale' => 'it_IT.utf8', 'latin_based' => TRUE], |
|
191 | - 'nb' => ['display' => 'Norsk', 'locale' => 'nb_NO.utf8', 'latin_based' => TRUE], |
|
192 | - 'pl' => ['display' => 'Polski', 'locale' => 'pl_PL.utf8', 'latin_based' => TRUE], |
|
193 | - 'sl' => ['display' => 'Slovenščina', 'locale' => 'sl_SI.utf8', 'latin_based' => TRUE], |
|
194 | - 'sr' => ['display' => 'Srpski', 'locale' => 'sr_RS@latin', 'latin_based' => TRUE], |
|
195 | - 'fi' => ['display' => 'Suomi', 'locale' => 'fi_FI.utf8', 'latin_based' => TRUE], |
|
196 | - 'el' => ['display' => 'Ελληνικά', 'locale' => 'el_GR.utf8', 'latin_based' => FALSE], |
|
197 | - 'hu' => ['display' => 'Magyar', 'locale' => 'hu_HU.utf8', 'latin_based' => TRUE], |
|
198 | - 'pt' => ['display' => 'Português', 'locale' => 'pt_PT.utf8', 'latin_based' => TRUE], |
|
184 | + 'ca' => ['display' => 'Català', 'locale' => 'ca_ES.utf8', 'latin_based' => TRUE], |
|
185 | + 'de' => ['display' => 'Deutsch', 'locale' => 'de_DE.utf8', 'latin_based' => TRUE], |
|
186 | + 'en' => ['display' => 'English(GB)', 'locale' => 'en_GB.utf8', 'latin_based' => TRUE], |
|
187 | + 'es' => ['display' => 'Español', 'locale' => 'es_ES.utf8', 'latin_based' => TRUE], |
|
188 | + 'gl' => ['display' => 'Galego', 'locale' => 'gl_ES.utf8', 'latin_based' => TRUE], |
|
189 | + 'hr' => ['display' => 'Hrvatski', 'locale' => 'hr_HR.utf8', 'latin_based' => TRUE], |
|
190 | + 'it' => ['display' => 'Italiano', 'locale' => 'it_IT.utf8', 'latin_based' => TRUE], |
|
191 | + 'nb' => ['display' => 'Norsk', 'locale' => 'nb_NO.utf8', 'latin_based' => TRUE], |
|
192 | + 'pl' => ['display' => 'Polski', 'locale' => 'pl_PL.utf8', 'latin_based' => TRUE], |
|
193 | + 'sl' => ['display' => 'Slovenščina', 'locale' => 'sl_SI.utf8', 'latin_based' => TRUE], |
|
194 | + 'sr' => ['display' => 'Srpski', 'locale' => 'sr_RS@latin', 'latin_based' => TRUE], |
|
195 | + 'fi' => ['display' => 'Suomi', 'locale' => 'fi_FI.utf8', 'latin_based' => TRUE], |
|
196 | + 'el' => ['display' => 'Ελληνικά', 'locale' => 'el_GR.utf8', 'latin_based' => FALSE], |
|
197 | + 'hu' => ['display' => 'Magyar', 'locale' => 'hu_HU.utf8', 'latin_based' => TRUE], |
|
198 | + 'pt' => ['display' => 'Português', 'locale' => 'pt_PT.utf8', 'latin_based' => TRUE], |
|
199 | 199 | |
200 | 200 | // For the following languages, partial translations exist in Transifex, but |
201 | 201 | // they are not complete enough for display. Their Transifex content is not |
@@ -244,45 +244,45 @@ discard block |
||
244 | 244 | ], |
245 | 245 | |
246 | 246 | 'TLS-clientcerts' => [ |
247 | - 'CA1' => [ |
|
247 | + 'CA1' => [ |
|
248 | 248 | 'status' => 'ACCREDITED', |
249 | 249 | 'issuerCA' => '/DC=org/DC=pki1/CN=PKI 1', |
250 | 250 | 'certificates' => [ |
251 | - [ |
|
251 | + [ |
|
252 | 252 | 'status' => 'CORRECT', |
253 | 253 | 'public' => 'ca1-client-cert.pem', |
254 | 254 | 'private' => 'ca1-client-key.pem', |
255 | 255 | 'expected' => 'PASS'], |
256 | - [ |
|
256 | + [ |
|
257 | 257 | 'status' => 'WRONGPOLICY', |
258 | 258 | 'public' => 'ca1-nopolicy-cert.pem', |
259 | 259 | 'private' => 'ca1-nopolicy-key.key', |
260 | 260 | 'expected' => 'FAIL'], |
261 | - [ |
|
261 | + [ |
|
262 | 262 | 'status' => 'EXPIRED', |
263 | 263 | 'public' => 'ca1-exp.pem', |
264 | 264 | 'private' => 'ca1-exp.key', |
265 | 265 | 'expected' => 'FAIL'], |
266 | - [ |
|
266 | + [ |
|
267 | 267 | 'status' => 'REVOKED', |
268 | 268 | 'public' => 'ca1-revoked.pem', |
269 | 269 | 'private' => 'ca1-revoked.key', |
270 | 270 | 'expected' => 'FAIL'], |
271 | 271 | ] |
272 | - ], |
|
273 | - 'CA-N' => [ |
|
272 | + ], |
|
273 | + 'CA-N' => [ |
|
274 | 274 | 'status' => 'NONACCREDITED', |
275 | 275 | 'issuerCA' => '/DC=org/DC=pkiN/CN=PKI N', |
276 | 276 | 'certificates' => [ |
277 | - [ |
|
277 | + [ |
|
278 | 278 | 'status' => 'CORRECT', |
279 | 279 | 'public' => 'caN-client-cert.pem', |
280 | 280 | 'private' => 'caN-client-cert.key', |
281 | 281 | 'expected' => 'FAIL'], |
282 | - ] |
|
283 | - ] |
|
284 | - ], |
|
285 | - 'accreditedCAsURL' => '', |
|
282 | + ] |
|
283 | + ] |
|
284 | + ], |
|
285 | + 'accreditedCAsURL' => '', |
|
286 | 286 | ]; |
287 | 287 | |
288 | 288 | /** |
@@ -320,11 +320,11 @@ discard block |
||
320 | 320 | 'db' => 'customer_db', |
321 | 321 | 'user' => 'customerservice', |
322 | 322 | 'pass' => '2lame4u'], |
323 | - 'enforce-external-sync' => TRUE, |
|
324 | - /* if you feed your user database from a third-party source and do not want CAT to update it on its own, you can |
|
323 | + 'enforce-external-sync' => TRUE, |
|
324 | + /* if you feed your user database from a third-party source and do not want CAT to update it on its own, you can |
|
325 | 325 | * make it read-only |
326 | 326 | */ |
327 | - 'userdb-readonly' => FALSE, |
|
327 | + 'userdb-readonly' => FALSE, |
|
328 | 328 | ]; |
329 | 329 | |
330 | 330 | /** |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | * pass: password for the username |
171 | 171 | * @var array |
172 | 172 | */ |
173 | - public static $MAILSETTINGS = [ // we always use Submission |
|
173 | + public static $MAILSETTINGS = [// we always use Submission |
|
174 | 174 | 'host' => 'submission.capable.mta', |
175 | 175 | 'user'=> 'mailuser', |
176 | 176 | 'pass' => 'mailpass', |
@@ -181,21 +181,21 @@ discard block |
||
181 | 181 | * @var array |
182 | 182 | */ |
183 | 183 | public static $LANGUAGES = [ |
184 | - 'ca' => ['display' => 'Català', 'locale' => 'ca_ES.utf8', 'latin_based' => TRUE], |
|
185 | - 'de' => ['display' => 'Deutsch', 'locale' => 'de_DE.utf8', 'latin_based' => TRUE], |
|
186 | - 'en' => ['display' => 'English(GB)', 'locale' => 'en_GB.utf8', 'latin_based' => TRUE], |
|
187 | - 'es' => ['display' => 'Español', 'locale' => 'es_ES.utf8', 'latin_based' => TRUE], |
|
188 | - 'gl' => ['display' => 'Galego', 'locale' => 'gl_ES.utf8', 'latin_based' => TRUE], |
|
189 | - 'hr' => ['display' => 'Hrvatski', 'locale' => 'hr_HR.utf8', 'latin_based' => TRUE], |
|
190 | - 'it' => ['display' => 'Italiano', 'locale' => 'it_IT.utf8', 'latin_based' => TRUE], |
|
191 | - 'nb' => ['display' => 'Norsk', 'locale' => 'nb_NO.utf8', 'latin_based' => TRUE], |
|
192 | - 'pl' => ['display' => 'Polski', 'locale' => 'pl_PL.utf8', 'latin_based' => TRUE], |
|
193 | - 'sl' => ['display' => 'Slovenščina', 'locale' => 'sl_SI.utf8', 'latin_based' => TRUE], |
|
194 | - 'sr' => ['display' => 'Srpski', 'locale' => 'sr_RS@latin', 'latin_based' => TRUE], |
|
195 | - 'fi' => ['display' => 'Suomi', 'locale' => 'fi_FI.utf8', 'latin_based' => TRUE], |
|
196 | - 'el' => ['display' => 'Ελληνικά', 'locale' => 'el_GR.utf8', 'latin_based' => FALSE], |
|
197 | - 'hu' => ['display' => 'Magyar', 'locale' => 'hu_HU.utf8', 'latin_based' => TRUE], |
|
198 | - 'pt' => ['display' => 'Português', 'locale' => 'pt_PT.utf8', 'latin_based' => TRUE], |
|
184 | + 'ca' => ['display' => 'Català', 'locale' => 'ca_ES.utf8', 'latin_based' => TRUE], |
|
185 | + 'de' => ['display' => 'Deutsch', 'locale' => 'de_DE.utf8', 'latin_based' => TRUE], |
|
186 | + 'en' => ['display' => 'English(GB)', 'locale' => 'en_GB.utf8', 'latin_based' => TRUE], |
|
187 | + 'es' => ['display' => 'Español', 'locale' => 'es_ES.utf8', 'latin_based' => TRUE], |
|
188 | + 'gl' => ['display' => 'Galego', 'locale' => 'gl_ES.utf8', 'latin_based' => TRUE], |
|
189 | + 'hr' => ['display' => 'Hrvatski', 'locale' => 'hr_HR.utf8', 'latin_based' => TRUE], |
|
190 | + 'it' => ['display' => 'Italiano', 'locale' => 'it_IT.utf8', 'latin_based' => TRUE], |
|
191 | + 'nb' => ['display' => 'Norsk', 'locale' => 'nb_NO.utf8', 'latin_based' => TRUE], |
|
192 | + 'pl' => ['display' => 'Polski', 'locale' => 'pl_PL.utf8', 'latin_based' => TRUE], |
|
193 | + 'sl' => ['display' => 'Slovenščina', 'locale' => 'sl_SI.utf8', 'latin_based' => TRUE], |
|
194 | + 'sr' => ['display' => 'Srpski', 'locale' => 'sr_RS@latin', 'latin_based' => TRUE], |
|
195 | + 'fi' => ['display' => 'Suomi', 'locale' => 'fi_FI.utf8', 'latin_based' => TRUE], |
|
196 | + 'el' => ['display' => 'Ελληνικά', 'locale' => 'el_GR.utf8', 'latin_based' => FALSE], |
|
197 | + 'hu' => ['display' => 'Magyar', 'locale' => 'hu_HU.utf8', 'latin_based' => TRUE], |
|
198 | + 'pt' => ['display' => 'Português', 'locale' => 'pt_PT.utf8', 'latin_based' => TRUE], |
|
199 | 199 | |
200 | 200 | // For the following languages, partial translations exist in Transifex, but |
201 | 201 | // they are not complete enough for display. Their Transifex content is not |
@@ -350,9 +350,9 @@ discard block |
||
350 | 350 | * NSIS version - with version 3 UTF installers will be created |
351 | 351 | * see also $PATHS['makensis'] |
352 | 352 | */ |
353 | - public static $NSIS_VERSION = 2 ; |
|
353 | + public static $NSIS_VERSION = 2; |
|
354 | 354 | |
355 | - public static $SUPERADMINS = [ |
|
355 | + public static $SUPERADMINS = [ |
|
356 | 356 | 'eptid:someuser', |
357 | 357 | 'http://sommeopenid.example/anotheruser', |
358 | 358 | 'I do not care about security!', |
@@ -317,14 +317,14 @@ discard block |
||
317 | 317 | <tr> |
318 | 318 | <!-- checkbox for "verify--> |
319 | 319 | <td> |
320 | - <span id='verify_label' style='<?php echo ($realm == "" ? "color:#999999" : "" ); ?>'> |
|
320 | + <span id='verify_label' style='<?php echo ($realm == "" ? "color:#999999" : ""); ?>'> |
|
321 | 321 | <?php echo _("Verify user input to contain realm suffix:"); ?> |
322 | 322 | </span> |
323 | 323 | </td> |
324 | 324 | <td> |
325 | 325 | <input type='checkbox' <?php |
326 | - echo ($verify != FALSE ? "checked" : "" ); |
|
327 | - echo ($realm == "" ? "disabled" : "" ); |
|
326 | + echo ($verify != FALSE ? "checked" : ""); |
|
327 | + echo ($realm == "" ? "disabled" : ""); |
|
328 | 328 | ?> name='verify_support' onclick=' |
329 | 329 | if (this.form.elements["verify_support"].checked != true) { |
330 | 330 | this.form.elements["hint_support"].setAttribute("disabled", "disabled"); |
@@ -332,48 +332,48 @@ discard block |
||
332 | 332 | this.form.elements["hint_support"].removeAttribute("disabled"); |
333 | 333 | } |
334 | 334 | ;'/> |
335 | - <span id='hint_label' style='<?php echo ($realm == "" ? "color:#999999" : "" ); ?>'> |
|
335 | + <span id='hint_label' style='<?php echo ($realm == "" ? "color:#999999" : ""); ?>'> |
|
336 | 336 | <?php echo _("Prefill user input with realm suffix:"); ?> |
337 | 337 | </span> |
338 | - <input type='checkbox' <?php echo ($verify == FALSE ? "disabled" : "" ); ?> name='hint_support' <?php echo ( $hint != FALSE ? "checked" : "" ); ?> /> |
|
338 | + <input type='checkbox' <?php echo ($verify == FALSE ? "disabled" : ""); ?> name='hint_support' <?php echo ($hint != FALSE ? "checked" : ""); ?> /> |
|
339 | 339 | </td> |
340 | 340 | </tr> |
341 | 341 | <tr> |
342 | 342 | |
343 | 343 | <!-- checkbox and input field for anonymity support, available only when realm is known--> |
344 | 344 | <td> |
345 | - <span id='anon_support_label' style='<?php echo ($realm == "" ? "color:#999999" : "" ); ?>'> |
|
345 | + <span id='anon_support_label' style='<?php echo ($realm == "" ? "color:#999999" : ""); ?>'> |
|
346 | 346 | <?php echo _("Enable Anonymous Outer Identity:"); ?> |
347 | 347 | </span> |
348 | 348 | </td> |
349 | 349 | <td> |
350 | - <input type='checkbox' <?php echo ($use_anon != FALSE ? "checked" : "" ) . ($realm == "" ? " disabled" : "" ); ?> name='anon_support' onclick=' |
|
350 | + <input type='checkbox' <?php echo ($use_anon != FALSE ? "checked" : "") . ($realm == "" ? " disabled" : ""); ?> name='anon_support' onclick=' |
|
351 | 351 | if (this.form.elements["anon_support"].checked != true) { |
352 | 352 | this.form.elements["anon_local"].setAttribute("disabled", "disabled"); |
353 | 353 | } else { |
354 | 354 | this.form.elements["anon_local"].removeAttribute("disabled"); |
355 | 355 | } |
356 | 356 | ;'/> |
357 | - <input type='text' <?php echo ($checkuser_outer == FALSE ? "disabled" : "" ); ?> name='anon_local' value='$anon_local'/> |
|
357 | + <input type='text' <?php echo ($checkuser_outer == FALSE ? "disabled" : ""); ?> name='anon_local' value='$anon_local'/> |
|
358 | 358 | </td> |
359 | 359 | </tr> |
360 | 360 | <tr> |
361 | 361 | |
362 | 362 | <!-- checkbox and input field for check realm outer id, available only when realm is known--> |
363 | 363 | <td> |
364 | - <span id='checkuser_label' style='<?php echo ($realm == "" ? "color:#999999" : "" ); ?>'> |
|
364 | + <span id='checkuser_label' style='<?php echo ($realm == "" ? "color:#999999" : ""); ?>'> |
|
365 | 365 | <?php echo _("Use special Outer Identity for realm checks:"); ?> |
366 | 366 | </span> |
367 | 367 | </td> |
368 | 368 | <td> |
369 | - <input type='checkbox' <?php echo ($checkuser_outer != FALSE ? "checked" : "" ) . ($realm == "" ? " disabled" : "" ); ?> name='checkuser_support' onclick=' |
|
369 | + <input type='checkbox' <?php echo ($checkuser_outer != FALSE ? "checked" : "") . ($realm == "" ? " disabled" : ""); ?> name='checkuser_support' onclick=' |
|
370 | 370 | if (this.form.elements["checkuser_support"].checked != true) { |
371 | 371 | this.form.elements["checkuser_local"].setAttribute("disabled", "disabled"); |
372 | 372 | } else { |
373 | 373 | this.form.elements["checkuser_local"].removeAttribute("disabled"); |
374 | 374 | } |
375 | 375 | ;'/> |
376 | - <input type='text' <?php echo ($checkuser_outer == FALSE ? "disabled" : "" ); ?> name='checkuser_local' value='$checkuser_value'/> |
|
376 | + <input type='text' <?php echo ($checkuser_outer == FALSE ? "disabled" : ""); ?> name='checkuser_local' value='$checkuser_value'/> |
|
377 | 377 | </td> |
378 | 378 | </tr> |
379 | 379 | </table> |
@@ -388,14 +388,14 @@ discard block |
||
388 | 388 | <p> |
389 | 389 | |
390 | 390 | <?php |
391 | - echo "<span id='redirect_label' style='" . ($realm == "" ? "color:#999999" : "" ) . "'><label for='redirect'>" . _("Redirect end users to own web page:") . "</label></span> |
|
392 | - <input type='checkbox' name='redirect' id='redirect' " . ($blacklisted === FALSE ? "" : "checked " ) . "onclick=' |
|
391 | + echo "<span id='redirect_label' style='" . ($realm == "" ? "color:#999999" : "") . "'><label for='redirect'>" . _("Redirect end users to own web page:") . "</label></span> |
|
392 | + <input type='checkbox' name='redirect' id='redirect' " . ($blacklisted === FALSE ? "" : "checked ") . "onclick=' |
|
393 | 393 | if (this.form.elements[\"redirect\"].checked != true) { |
394 | 394 | this.form.elements[\"redirect_target\"].setAttribute(\"disabled\", \"disabled\"); |
395 | 395 | } else { |
396 | 396 | this.form.elements[\"redirect_target\"].removeAttribute(\"disabled\"); |
397 | 397 | };'/> |
398 | - <input type='text' name='redirect_target' " . ($blacklisted !== FALSE ? "value='$blacklisted'" : "disabled" ) . "/>"; |
|
398 | + <input type='text' name='redirect_target' " . ($blacklisted !== FALSE ? "value='$blacklisted'" : "disabled") . "/>"; |
|
399 | 399 | ?> |
400 | 400 | </p> |
401 | 401 | |
@@ -411,7 +411,7 @@ discard block |
||
411 | 411 | function priority($eapType, $isenabled, $priority) { |
412 | 412 | echo "<td><select id='$eapType-priority' name='$eapType-priority' " . (!$isenabled ? "disabled='disabled'" : "") . ">"; |
413 | 413 | for ($a = 1; $a < 7; $a = $a + 1) |
414 | - echo "<option id='$eapType-$a' value='$a' " . ( $isenabled && $a == $priority ? "selected" : "" ) . ">$a</option>"; |
|
414 | + echo "<option id='$eapType-$a' value='$a' " . ($isenabled && $a == $priority ? "selected" : "") . ">$a</option>"; |
|
415 | 415 | echo "</select></td>"; |
416 | 416 | } |
417 | 417 |
@@ -175,10 +175,11 @@ discard block |
||
175 | 175 | ?> |
176 | 176 | <h1> |
177 | 177 | <?php |
178 | - if ($wizard_style) |
|
179 | - echo _("Step 3: Defining a user group profile"); |
|
180 | - else |
|
181 | - printf(_("Edit profile '%s' ..."), $prefill_name); |
|
178 | + if ($wizard_style) { |
|
179 | + echo _("Step 3: Defining a user group profile"); |
|
180 | + } else { |
|
181 | + printf(_("Edit profile '%s' ..."), $prefill_name); |
|
182 | + } |
|
182 | 183 | ?> |
183 | 184 | </h1> |
184 | 185 | <div class='infobox'> |
@@ -221,8 +222,9 @@ discard block |
||
221 | 222 | <strong><?php echo _("General Profile properties"); ?></strong> |
222 | 223 | </legend> |
223 | 224 | <?php |
224 | - if ($wizard_style) |
|
225 | - echo "<p>" . _("We will now define a profile for your user group(s). You can add as many profiles as you like by choosing the appropriate button on the end of the page. After we are done, the wizard is finished and you will be taken to the main IdP administration page.") . "</p>"; |
|
225 | + if ($wizard_style) { |
|
226 | + echo "<p>" . _("We will now define a profile for your user group(s). You can add as many profiles as you like by choosing the appropriate button on the end of the page. After we are done, the wizard is finished and you will be taken to the main IdP administration page.") . "</p>"; |
|
227 | + } |
|
226 | 228 | ?> |
227 | 229 | <h3><?php echo _("Profile Name and RADIUS realm"); ?></h3> |
228 | 230 | <?php |
@@ -230,8 +232,9 @@ discard block |
||
230 | 232 | echo "<p>" . _("First of all we need a name for the profile. This will be displayed to end users, so you may want to choose a descriptive name like 'Professors', 'Students of the Faculty of Bioscience', etc.") . "</p>"; |
231 | 233 | echo "<p>" . _("Optionally, you can provide a longer descriptive text about who this profile is for. If you specify it, it will be displayed on the download page after the user has selected the profile name in the list.") . "</p>"; |
232 | 234 | echo "<p>" . _("You can also tell us your RADIUS realm. "); |
233 | - if (count(Config::$RADIUSTESTS['UDP-hosts']) > 0 || Config::$RADIUSTESTS['TLS-discoverytag'] != "") |
|
234 | - printf(_("This is useful if you want to use the sanity check module later, which tests reachability of your realm in the %s infrastructure. "), CONFIG::$CONSORTIUM['name']); |
|
235 | + if (count(Config::$RADIUSTESTS['UDP-hosts']) > 0 || Config::$RADIUSTESTS['TLS-discoverytag'] != "") { |
|
236 | + printf(_("This is useful if you want to use the sanity check module later, which tests reachability of your realm in the %s infrastructure. "), CONFIG::$CONSORTIUM['name']); |
|
237 | + } |
|
235 | 238 | echo _("It is required to enter the realm name if you want to support anonymous outer identities (see below).") . "</p>"; |
236 | 239 | } |
237 | 240 | ?> |
@@ -242,9 +245,10 @@ discard block |
||
242 | 245 | if ($edit_mode) { |
243 | 246 | $existing_attribs = $my_profile->getAttributes(); |
244 | 247 | |
245 | - foreach ($existing_attribs as $existing_attribute) |
|
246 | - if ($existing_attribute['level'] == "Profile") |
|
248 | + foreach ($existing_attribs as $existing_attribute) { |
|
249 | + if ($existing_attribute['level'] == "Profile") |
|
247 | 250 | $prepopulate[] = $existing_attribute; |
251 | + } |
|
248 | 252 | } |
249 | 253 | add_option("profile", $prepopulate); |
250 | 254 | ?> |
@@ -382,8 +386,9 @@ discard block |
||
382 | 386 | <h3><?php echo _("Installer Download Location"); ?></h3> |
383 | 387 | |
384 | 388 | <?php |
385 | - if ($wizard_style) |
|
386 | - echo "<p>" . _("The CAT has a download area for end users. There, they will, for example, learn about the support pointers you entered earlier. The CAT can also immediately offer the installers for the profile for download. If you don't want that, you can instead enter a web site location where you want your users to be redirected to. You, as the administrator, can still download the profiles to place them on that page (see the 'Compatibility Matrix' button on the dashboard).") . "</p>"; |
|
389 | + if ($wizard_style) { |
|
390 | + echo "<p>" . _("The CAT has a download area for end users. There, they will, for example, learn about the support pointers you entered earlier. The CAT can also immediately offer the installers for the profile for download. If you don't want that, you can instead enter a web site location where you want your users to be redirected to. You, as the administrator, can still download the profiles to place them on that page (see the 'Compatibility Matrix' button on the dashboard).") . "</p>"; |
|
391 | + } |
|
387 | 392 | ?> |
388 | 393 | <p> |
389 | 394 | |
@@ -403,15 +408,17 @@ discard block |
||
403 | 408 | <fieldset class="option_container"> |
404 | 409 | <legend><strong><?php echo _("Supported EAP types"); ?></strong></legend> |
405 | 410 | <?php |
406 | - if ($wizard_style) |
|
407 | - echo "<p>" . _("Now, we need to know which EAP types your IdP supports. If you support multiple EAP types, you can assign every type a priority (1=highest). This tool will always generate an automatic installer for the EAP type with the highest priority; only if the user's device can't use that EAP type, we will use an EAP type further down in the list.") . "</p>"; |
|
411 | + if ($wizard_style) { |
|
412 | + echo "<p>" . _("Now, we need to know which EAP types your IdP supports. If you support multiple EAP types, you can assign every type a priority (1=highest). This tool will always generate an automatic installer for the EAP type with the highest priority; only if the user's device can't use that EAP type, we will use an EAP type further down in the list.") . "</p>"; |
|
413 | + } |
|
408 | 414 | ?> |
409 | 415 | <?php |
410 | 416 | |
411 | 417 | function priority($eapType, $isenabled, $priority) { |
412 | 418 | echo "<td><select id='$eapType-priority' name='$eapType-priority' " . (!$isenabled ? "disabled='disabled'" : "") . ">"; |
413 | - for ($a = 1; $a < 7; $a = $a + 1) |
|
414 | - echo "<option id='$eapType-$a' value='$a' " . ( $isenabled && $a == $priority ? "selected" : "" ) . ">$a</option>"; |
|
419 | + for ($a = 1; $a < 7; $a = $a + 1) { |
|
420 | + echo "<option id='$eapType-$a' value='$a' " . ( $isenabled && $a == $priority ? "selected" : "" ) . ">$a</option>"; |
|
421 | + } |
|
415 | 422 | echo "</select></td>"; |
416 | 423 | } |
417 | 424 | |
@@ -420,18 +427,20 @@ discard block |
||
420 | 427 | |
421 | 428 | $eapoptions = []; |
422 | 429 | |
423 | - foreach ($idpwideoptions as $option) |
|
424 | - if ($option['level'] == "IdP" && preg_match('/^eap/', $option['name'])) |
|
430 | + foreach ($idpwideoptions as $option) { |
|
431 | + if ($option['level'] == "IdP" && preg_match('/^eap/', $option['name'])) |
|
425 | 432 | $eapoptions[] = $option['name']; |
433 | + } |
|
426 | 434 | |
427 | 435 | $eapoptions = array_count_values($eapoptions); |
428 | 436 | |
429 | 437 | if (count($eapoptions) > 0) { |
430 | 438 | echo "<strong>" . _("EAP options inherited from Global level:") . "</strong><br />"; |
431 | - foreach ($eapoptions as $optionname => $count) |
|
432 | - /// option count and enumeration |
|
439 | + foreach ($eapoptions as $optionname => $count) { |
|
440 | + /// option count and enumeration |
|
433 | 441 | /// Example: "(3x) Server Name" |
434 | 442 | printf(_("(%dx) %s") . "<br />", $count, display_name($optionname)); |
443 | + } |
|
435 | 444 | } |
436 | 445 | |
437 | 446 | echo "</div></td>"; |
@@ -446,10 +455,11 @@ discard block |
||
446 | 455 | foreach ($methods as $a) { |
447 | 456 | $display = display_name($a); |
448 | 457 | $enabled = FALSE; |
449 | - if ($edit_mode) |
|
450 | - foreach ($prefill_methods as $prio => $value) { |
|
458 | + if ($edit_mode) { |
|
459 | + foreach ($prefill_methods as $prio => $value) { |
|
451 | 460 | if (display_name($a) == display_name($value)) { |
452 | 461 | $enabled = TRUE; |
462 | + } |
|
453 | 463 | $countactive = $prio + 1; |
454 | 464 | } |
455 | 465 | } |
@@ -488,8 +498,9 @@ discard block |
||
488 | 498 | <?php |
489 | 499 | foreach ($methods as $a) { |
490 | 500 | $display = display_name($a); |
491 | - if (!isset($D[display_name($a)])) |
|
492 | - print '<li class="eap1">' . display_name($a) . "</li>\n"; |
|
501 | + if (!isset($D[display_name($a)])) { |
|
502 | + print '<li class="eap1">' . display_name($a) . "</li>\n"; |
|
503 | + } |
|
493 | 504 | } |
494 | 505 | ?> |
495 | 506 | </ol> |
@@ -513,13 +524,15 @@ discard block |
||
513 | 524 | <?php |
514 | 525 | $idp_options = $my_inst->getAttributes(); |
515 | 526 | $has_support_options = []; |
516 | - foreach ($idp_options as $idp_option) |
|
517 | - if (preg_match("/^support:/", $idp_option['name'])) |
|
527 | + foreach ($idp_options as $idp_option) { |
|
528 | + if (preg_match("/^support:/", $idp_option['name'])) |
|
518 | 529 | $has_support_options[$idp_option['name']] = "SET"; |
530 | + } |
|
519 | 531 | if (count($has_support_options) > 0) { |
520 | 532 | $text = "<ul>"; |
521 | - foreach ($has_support_options as $key => $value) |
|
522 | - $text .= "<li><strong>" . display_name($key) . "</strong></li>"; |
|
533 | + foreach ($has_support_options as $key => $value) { |
|
534 | + $text .= "<li><strong>" . display_name($key) . "</strong></li>"; |
|
535 | + } |
|
523 | 536 | $text .= "</ul>"; |
524 | 537 | printf(ngettext("The option %s is already defined IdP-wide. If you set it here on profile level, this setting will override the IdP-wide one.", "The options %s are already defined IdP-wide. If you set them here on profile level, these settings will override the IdP-wide ones.", count($has_support_options)), $text); |
525 | 538 | } |
@@ -530,9 +543,10 @@ discard block |
||
530 | 543 | $prepopulate = []; |
531 | 544 | if ($edit_mode) { |
532 | 545 | $existing_attribs = $my_profile->getAttributes(); |
533 | - foreach ($existing_attribs as $existing_attribute) |
|
534 | - if ($existing_attribute['level'] == "Profile") |
|
546 | + foreach ($existing_attribs as $existing_attribute) { |
|
547 | + if ($existing_attribute['level'] == "Profile") |
|
535 | 548 | $prepopulate[] = $existing_attribute; |
549 | + } |
|
536 | 550 | } |
537 | 551 | add_option("support", $prepopulate); |
538 | 552 | ?> |
@@ -544,13 +558,15 @@ discard block |
||
544 | 558 | <p> |
545 | 559 | <?php |
546 | 560 | $has_eap_options = []; |
547 | - foreach ($idp_options as $idp_option) |
|
548 | - if (preg_match("/^eap:/", $idp_option['name'])) |
|
561 | + foreach ($idp_options as $idp_option) { |
|
562 | + if (preg_match("/^eap:/", $idp_option['name'])) |
|
549 | 563 | $has_eap_options[$idp_option['name']] = "SET"; |
564 | + } |
|
550 | 565 | if (count($has_eap_options) > 0) { |
551 | 566 | $text = "<ul>"; |
552 | - foreach ($has_eap_options as $key => $value) |
|
553 | - $text .= "<li><strong>" . display_name($key) . "</strong></li>"; |
|
567 | + foreach ($has_eap_options as $key => $value) { |
|
568 | + $text .= "<li><strong>" . display_name($key) . "</strong></li>"; |
|
569 | + } |
|
554 | 570 | $text .= "</ul>"; |
555 | 571 | printf(ngettext("The option %s is already defined IdP-wide. If you set it here on profile level, this setting will override the IdP-wide one.", "The options %s are already defined IdP-wide. If you set them here on profile level, these settings will override the IdP-wide ones.", count($has_eap_options)), $text); |
556 | 572 | } |
@@ -561,9 +577,10 @@ discard block |
||
561 | 577 | $prepopulate = []; |
562 | 578 | if ($edit_mode) { |
563 | 579 | $existing_attribs = $my_profile->getAttributes(); |
564 | - foreach ($existing_attribs as $existing_attribute) |
|
565 | - if ($existing_attribute['level'] == "Profile") |
|
580 | + foreach ($existing_attribs as $existing_attribute) { |
|
581 | + if ($existing_attribute['level'] == "Profile") |
|
566 | 582 | $prepopulate[] = $existing_attribute; |
583 | + } |
|
567 | 584 | } |
568 | 585 | add_option("eap", $prepopulate); |
569 | 586 | ?> |
@@ -576,13 +593,15 @@ discard block |
||
576 | 593 | <?php |
577 | 594 | $idp_options = $my_inst->getAttributes(); |
578 | 595 | $has_support_options = array(); |
579 | - foreach ($idp_options as $idp_option) |
|
580 | - if (preg_match("/^media:/", $idp_option['name'])) |
|
596 | + foreach ($idp_options as $idp_option) { |
|
597 | + if (preg_match("/^media:/", $idp_option['name'])) |
|
581 | 598 | $has_support_options[$idp_option['name']] = "SET"; |
599 | + } |
|
582 | 600 | if (count($has_support_options) > 0) { |
583 | 601 | $text = "<ul>"; |
584 | - foreach ($has_support_options as $key => $value) |
|
585 | - $text .= "<li><strong>" . display_name($key) . "</strong></li>"; |
|
602 | + foreach ($has_support_options as $key => $value) { |
|
603 | + $text .= "<li><strong>" . display_name($key) . "</strong></li>"; |
|
604 | + } |
|
586 | 605 | $text .= "</ul>"; |
587 | 606 | printf(ngettext("The option %s is already defined IdP-wide. If you set it here on profile level, this setting will override the IdP-wide one.", "The options %s are already defined IdP-wide. If you set them here on profile level, these settings will override the IdP-wide ones.", count($has_support_options)), $text); |
588 | 607 | } |
@@ -593,16 +612,18 @@ discard block |
||
593 | 612 | $prepopulate = array(); |
594 | 613 | if ($edit_mode) { |
595 | 614 | $existing_attribs = $my_profile->getAttributes(); |
596 | - foreach ($existing_attribs as $existing_attribute) |
|
597 | - if ($existing_attribute['level'] == "Profile") |
|
615 | + foreach ($existing_attribs as $existing_attribute) { |
|
616 | + if ($existing_attribute['level'] == "Profile") |
|
598 | 617 | $prepopulate[] = $existing_attribute; |
618 | + } |
|
599 | 619 | } |
600 | 620 | add_option("media", $prepopulate); |
601 | 621 | ?> |
602 | 622 | </table> |
603 | 623 | <button type='button' class='newoption' onclick='addDefaultMediaOptions()'><?php echo _("Add new option"); ?></button></fieldset> |
604 | 624 | <?php |
605 | -if ($wizard_style) |
|
625 | +if ($wizard_style) { |
|
606 | 626 | echo "<p>" . _("When you are sure that everything is correct, please click on 'Save data' and you will be taken to your IdP Dashboard page.") . "</p>"; |
627 | +} |
|
607 | 628 | echo "<p><button type='submit' name='submitbutton' value='" . BUTTON_SAVE . "'>" . _("Save data") . "</button><button type='button' class='delete' name='abortbutton' value='abort' onclick='javascript:window.location = \"overview_idp.php?inst_id=$my_inst->identifier\"'>" . _("Discard changes") . "</button></p></form>"; |
608 | 629 | footer(); |