@@ -19,7 +19,7 @@ |
||
19 | 19 | * <base_url>/copyright.php after deploying the software |
20 | 20 | */ |
21 | 21 | |
22 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
22 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
23 | 23 | |
24 | 24 | $deco = new \web\lib\admin\PageDecoration(); |
25 | 25 | $uiElements = new web\lib\admin\UIElements(); |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | * <base_url>/copyright.php after deploying the software |
20 | 20 | */ |
21 | 21 | |
22 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
22 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
23 | 23 | require_once CONFIG['AUTHENTICATION']['ssp-path-to-autoloader']; |
24 | 24 | |
25 | 25 | $deco = new \web\lib\admin\PageDecoration(); |
@@ -38,13 +38,13 @@ discard block |
||
38 | 38 | if ($cutoff !== FALSE) { |
39 | 39 | $substring = substr($_SERVER['PHP_SELF'], 0, $cutoff); |
40 | 40 | if ($substring !== FALSE) { |
41 | - $url = "//" . htmlspecialchars($_SERVER['SERVER_NAME']) . $substring; |
|
41 | + $url = "//".htmlspecialchars($_SERVER['SERVER_NAME']).$substring; |
|
42 | 42 | } |
43 | 43 | } |
44 | 44 | header("Location: $url"); |
45 | 45 | } else { |
46 | 46 | /* Logout failed. Tell the user to close the browser. */ |
47 | 47 | echo $deco->pageheader(_("Incomplete Logout"), "ADMIN", FALSE); |
48 | - echo "<p>" . _("We were unable to log you out of all your sessions. To be completely sure that you are logged out, you need to close your web browser.") . "</p>"; |
|
48 | + echo "<p>"._("We were unable to log you out of all your sessions. To be completely sure that you are logged out, you need to close your web browser.")."</p>"; |
|
49 | 49 | echo $deco->footer(); |
50 | 50 | } |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | |
28 | 28 | ?> |
29 | 29 | <?php |
30 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
30 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
31 | 31 | |
32 | 32 | $deco = new \web\lib\admin\PageDecoration(); |
33 | 33 | $validator = new \web\lib\common\InputValidation(); |
@@ -127,8 +127,8 @@ discard block |
||
127 | 127 | <?php |
128 | 128 | echo $uiElements->instLevelInfoBoxes($my_inst); |
129 | 129 | |
130 | - echo "<form enctype='multipart/form-data' action='edit_profile_result.php?inst_id=$my_inst->identifier" . ($my_profile !== NULL ? "&profile_id=" . $my_profile->identifier : "") . "' method='post' accept-charset='UTF-8'> |
|
131 | - <input type='hidden' name='MAX_FILE_SIZE' value='" . CONFIG['MAX_UPLOAD_SIZE'] . "'>"; |
|
130 | + echo "<form enctype='multipart/form-data' action='edit_profile_result.php?inst_id=$my_inst->identifier".($my_profile !== NULL ? "&profile_id=".$my_profile->identifier : "")."' method='post' accept-charset='UTF-8'> |
|
131 | + <input type='hidden' name='MAX_FILE_SIZE' value='" . CONFIG['MAX_UPLOAD_SIZE']."'>"; |
|
132 | 132 | $optionDisplay = new \web\lib\admin\OptionDisplay($profile_options, "Profile"); |
133 | 133 | ?> |
134 | 134 | <fieldset class="option_container"> |
@@ -137,19 +137,19 @@ discard block |
||
137 | 137 | </legend> |
138 | 138 | <?php |
139 | 139 | if ($wizardStyle) { |
140 | - 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>"; |
|
140 | + 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>"; |
|
141 | 141 | } |
142 | 142 | ?> |
143 | 143 | <h3><?php echo _("Profile Name and RADIUS realm"); ?></h3> |
144 | 144 | <?php |
145 | 145 | if ($wizardStyle) { |
146 | - 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>"; |
|
147 | - 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>"; |
|
148 | - echo "<p>" . _("You can also tell us your RADIUS realm. "); |
|
146 | + 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>"; |
|
147 | + 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>"; |
|
148 | + echo "<p>"._("You can also tell us your RADIUS realm. "); |
|
149 | 149 | if (CONFIG['FUNCTIONALITY_LOCATIONS']['DIAGNOSTICS'] !== NULL) { |
150 | 150 | 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_CONFASSISTANT['CONSORTIUM']['display_name']); |
151 | 151 | } |
152 | - echo _("It is required to enter the realm name if you want to support anonymous outer identities (see below).") . "</p>"; |
|
152 | + echo _("It is required to enter the realm name if you want to support anonymous outer identities (see below).")."</p>"; |
|
153 | 153 | } |
154 | 154 | |
155 | 155 | echo $optionDisplay->prefilledOptionTable("profile"); |
@@ -203,9 +203,9 @@ discard block |
||
203 | 203 | |
204 | 204 | <?php |
205 | 205 | if ($wizardStyle) { |
206 | - echo "<p>" . sprintf(_("Some installers support a feature called 'Anonymous outer identity'. If you don't know what this is, please read <a href='%s'>this article</a>."), "https://confluence.terena.org/display/H2eduroam/eap-types") . "</p>"; |
|
207 | - echo "<p>" . _("On some platforms, the installers can suggest username endings and/or verify the user input to contain the realm suffix.") . "</p>"; |
|
208 | - echo "<p>" . _("The realm check feature needs to know an outer ID which actually gets a chance to authenticate. If your RADIUS server lets only select usernames pass, it is useful to supply the information which of those (outer ID) username we can use for testing.") . "</p>"; |
|
206 | + echo "<p>".sprintf(_("Some installers support a feature called 'Anonymous outer identity'. If you don't know what this is, please read <a href='%s'>this article</a>."), "https://confluence.terena.org/display/H2eduroam/eap-types")."</p>"; |
|
207 | + echo "<p>"._("On some platforms, the installers can suggest username endings and/or verify the user input to contain the realm suffix.")."</p>"; |
|
208 | + echo "<p>"._("The realm check feature needs to know an outer ID which actually gets a chance to authenticate. If your RADIUS server lets only select usernames pass, it is useful to supply the information which of those (outer ID) username we can use for testing.")."</p>"; |
|
209 | 209 | } |
210 | 210 | ?> |
211 | 211 | <p> |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | </td> |
223 | 223 | <td> |
224 | 224 | <input type='checkbox' <?php |
225 | - echo ($verify != FALSE ? "checked" : "" ); |
|
225 | + echo ($verify != FALSE ? "checked" : ""); |
|
226 | 226 | ?> name='verify_support' onclick=' |
227 | 227 | if (this.form.elements["verify_support"].checked !== true || this.form.elements["realm"].value.length == 0) { |
228 | 228 | this.form.elements["hint_support"].setAttribute("disabled", "disabled"); |
@@ -230,48 +230,48 @@ discard block |
||
230 | 230 | this.form.elements["hint_support"].removeAttribute("disabled"); |
231 | 231 | } |
232 | 232 | ;'/> |
233 | - <span id='hint_label' style='<?php echo ($realm == "" ? "color:#999999" : "" ); ?>'> |
|
233 | + <span id='hint_label' style='<?php echo ($realm == "" ? "color:#999999" : ""); ?>'> |
|
234 | 234 | <?php echo _("Prefill user input with realm suffix:"); ?> |
235 | 235 | </span> |
236 | - <input type='checkbox' <?php echo ($verify == FALSE ? "disabled" : "" ); ?> name='hint_support' <?php echo ( $hint != FALSE ? "checked" : "" ); ?> /> |
|
236 | + <input type='checkbox' <?php echo ($verify == FALSE ? "disabled" : ""); ?> name='hint_support' <?php echo ($hint != FALSE ? "checked" : ""); ?> /> |
|
237 | 237 | </td> |
238 | 238 | </tr> |
239 | 239 | <tr> |
240 | 240 | |
241 | 241 | <!-- checkbox and input field for anonymity support, available only when realm is known--> |
242 | 242 | <td> |
243 | - <span id='anon_support_label' style='<?php echo ($realm == "" ? "color:#999999" : "" ); ?>'> |
|
243 | + <span id='anon_support_label' style='<?php echo ($realm == "" ? "color:#999999" : ""); ?>'> |
|
244 | 244 | <?php echo _("Enable Anonymous Outer Identity:"); ?> |
245 | 245 | </span> |
246 | 246 | </td> |
247 | 247 | <td> |
248 | - <input type='checkbox' <?php echo ($useAnon != FALSE ? "checked" : "" ) . ($realm == "" ? " disabled" : "" ); ?> name='anon_support' onclick=' |
|
248 | + <input type='checkbox' <?php echo ($useAnon != FALSE ? "checked" : "").($realm == "" ? " disabled" : ""); ?> name='anon_support' onclick=' |
|
249 | 249 | if (this.form.elements["anon_support"].checked !== true) { |
250 | 250 | this.form.elements["anon_local"].setAttribute("disabled", "disabled"); |
251 | 251 | } else { |
252 | 252 | this.form.elements["anon_local"].removeAttribute("disabled"); |
253 | 253 | } |
254 | 254 | ;'/> |
255 | - <input type='text' <?php echo ($checkuserOuter == FALSE ? "disabled" : "" ); ?> name='anon_local' value='<?php echo $anonLocal; ?>'/> |
|
255 | + <input type='text' <?php echo ($checkuserOuter == FALSE ? "disabled" : ""); ?> name='anon_local' value='<?php echo $anonLocal; ?>'/> |
|
256 | 256 | </td> |
257 | 257 | </tr> |
258 | 258 | <tr> |
259 | 259 | |
260 | 260 | <!-- checkbox and input field for check realm outer id, available only when realm is known--> |
261 | 261 | <td> |
262 | - <span id='checkuser_label' style='<?php echo ($realm == "" ? "color:#999999" : "" ); ?>'> |
|
262 | + <span id='checkuser_label' style='<?php echo ($realm == "" ? "color:#999999" : ""); ?>'> |
|
263 | 263 | <?php echo _("Use special Outer Identity for realm checks:"); ?> |
264 | 264 | </span> |
265 | 265 | </td> |
266 | 266 | <td> |
267 | - <input type='checkbox' <?php echo ($checkuserOuter != FALSE ? "checked" : "" ) . ($realm == "" ? " disabled" : "" ); ?> name='checkuser_support' onclick=' |
|
267 | + <input type='checkbox' <?php echo ($checkuserOuter != FALSE ? "checked" : "").($realm == "" ? " disabled" : ""); ?> name='checkuser_support' onclick=' |
|
268 | 268 | if (this.form.elements["checkuser_support"].checked !== true) { |
269 | 269 | this.form.elements["checkuser_local"].setAttribute("disabled", "disabled"); |
270 | 270 | } else { |
271 | 271 | this.form.elements["checkuser_local"].removeAttribute("disabled"); |
272 | 272 | } |
273 | 273 | ;'/> |
274 | - <input type='text' <?php echo ($checkuserOuter == FALSE ? "disabled" : "" ); ?> name='checkuser_local' value='<?php echo $checkuserValue; ?>'/> |
|
274 | + <input type='text' <?php echo ($checkuserOuter == FALSE ? "disabled" : ""); ?> name='checkuser_local' value='<?php echo $checkuserValue; ?>'/> |
|
275 | 275 | </td> |
276 | 276 | </tr> |
277 | 277 | </table> |
@@ -281,20 +281,20 @@ discard block |
||
281 | 281 | |
282 | 282 | <?php |
283 | 283 | if ($wizardStyle) { |
284 | - 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>"; |
|
284 | + 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>"; |
|
285 | 285 | } |
286 | 286 | ?> |
287 | 287 | <p> |
288 | 288 | |
289 | 289 | <?php |
290 | - echo "<span id='redirect_label' style='" . ($realm == "" ? "color:#999999" : "" ) . "'><label for='redirect'>" . _("Redirect end users to own web page:") . "</label></span> |
|
291 | - <input type='checkbox' name='redirect' id='redirect' " . ($blacklisted === FALSE ? "" : "checked " ) . "onclick=' |
|
290 | + echo "<span id='redirect_label' style='".($realm == "" ? "color:#999999" : "")."'><label for='redirect'>"._("Redirect end users to own web page:")."</label></span> |
|
291 | + <input type='checkbox' name='redirect' id='redirect' " . ($blacklisted === FALSE ? "" : "checked ")."onclick=' |
|
292 | 292 | if (this.form.elements[\"redirect\"].checked != true) { |
293 | 293 | this.form.elements[\"redirect_target\"].setAttribute(\"disabled\", \"disabled\"); |
294 | 294 | } else { |
295 | 295 | this.form.elements[\"redirect_target\"].removeAttribute(\"disabled\"); |
296 | 296 | };'/> |
297 | - <input type='text' name='redirect_target' " . ($blacklisted !== FALSE ? "value='$blacklisted'" : "disabled" ) . "/>"; |
|
297 | + <input type='text' name='redirect_target' " . ($blacklisted !== FALSE ? "value='$blacklisted'" : "disabled")."/>"; |
|
298 | 298 | ?> |
299 | 299 | </p> |
300 | 300 | |
@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | <legend><strong><?php echo _("Supported EAP types"); ?></strong></legend> |
304 | 304 | <?php |
305 | 305 | if ($wizardStyle) { |
306 | - 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>"; |
|
306 | + 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>"; |
|
307 | 307 | } |
308 | 308 | ?> |
309 | 309 | <?php |
@@ -317,9 +317,9 @@ discard block |
||
317 | 317 | * @return void |
318 | 318 | */ |
319 | 319 | function priority(string $eapType, bool $isenabled, int $priority) { |
320 | - echo "<td><select id='$eapType-priority' name='$eapType-priority' " . (!$isenabled ? "disabled='disabled'" : "") . ">"; |
|
320 | + echo "<td><select id='$eapType-priority' name='$eapType-priority' ".(!$isenabled ? "disabled='disabled'" : "").">"; |
|
321 | 321 | for ($a = 1; $a < 7; $a = $a + 1) { |
322 | - echo "<option id='$eapType-$a' value='$a' " . ( $isenabled && $a == $priority ? "selected" : "" ) . ">$a</option>"; |
|
322 | + echo "<option id='$eapType-$a' value='$a' ".($isenabled && $a == $priority ? "selected" : "").">$a</option>"; |
|
323 | 323 | } |
324 | 324 | echo "</select></td>"; |
325 | 325 | } |
@@ -335,7 +335,7 @@ discard block |
||
335 | 335 | * @return void |
336 | 336 | */ |
337 | 337 | function inherited_options($idpwideoptions, $eapType, $isVisible) { |
338 | - echo "<td><div style='" . (!$isVisible ? "visibility:hidden" : "") . "' class='inheritedoptions' id='$eapType-inherited-global'>"; |
|
338 | + echo "<td><div style='".(!$isVisible ? "visibility:hidden" : "")."' class='inheritedoptions' id='$eapType-inherited-global'>"; |
|
339 | 339 | |
340 | 340 | $eapoptions = []; |
341 | 341 | |
@@ -348,12 +348,12 @@ discard block |
||
348 | 348 | $eapoptionsNames = array_count_values($eapoptions); |
349 | 349 | |
350 | 350 | if (count($eapoptionsNames) > 0) { |
351 | - echo "<strong>" . _("EAP options inherited from Global level:") . "</strong><br />"; |
|
351 | + echo "<strong>"._("EAP options inherited from Global level:")."</strong><br />"; |
|
352 | 352 | foreach ($eapoptionsNames as $optionname => $count) { |
353 | 353 | /// option count and enumeration |
354 | 354 | /// Example: "(3x) Server Name" |
355 | 355 | $uiElements = new web\lib\admin\UIElements(); |
356 | - printf(_("(%dx) %s") . "<br />", $count, $uiElements->displayName($optionname)); |
|
356 | + printf(_("(%dx) %s")."<br />", $count, $uiElements->displayName($optionname)); |
|
357 | 357 | } |
358 | 358 | } |
359 | 359 | |
@@ -388,7 +388,7 @@ discard block |
||
388 | 388 | <?php |
389 | 389 | $D = []; |
390 | 390 | foreach ($prefill_methods as $prio => $value) { |
391 | - print '<li>' . $value->getPrintableRep() . "</li>\n"; |
|
391 | + print '<li>'.$value->getPrintableRep()."</li>\n"; |
|
392 | 392 | $D[$value->getPrintableRep()] = $prio; |
393 | 393 | } |
394 | 394 | ?> |
@@ -414,7 +414,7 @@ discard block |
||
414 | 414 | } |
415 | 415 | $display = $a->getPrintableRep(); |
416 | 416 | if (!isset($D[$a->getPrintableRep()])) { |
417 | - print '<li class="eap1">' . $a->getPrintableRep() . "</li>\n"; |
|
417 | + print '<li class="eap1">'.$a->getPrintableRep()."</li>\n"; |
|
418 | 418 | } |
419 | 419 | } |
420 | 420 | ?> |
@@ -427,8 +427,8 @@ discard block |
||
427 | 427 | foreach ($methods as $a) { |
428 | 428 | $display = $a->getPrintableRep(); |
429 | 429 | $v = isset($D[$display]) ? $D[$display] : ''; |
430 | - print '<input type="hidden" class="eapm" name="' . $display . '" id="EAP-' . $display . '" value="' . $display . '">'; |
|
431 | - print '<input type="hidden" class="eapmv" name="' . $display . '-priority" id="EAP-' . $display . '-priority" value="' . $v . '">'; |
|
430 | + print '<input type="hidden" class="eapm" name="'.$display.'" id="EAP-'.$display.'" value="'.$display.'">'; |
|
431 | + print '<input type="hidden" class="eapmv" name="'.$display.'-priority" id="EAP-'.$display.'-priority" value="'.$v.'">'; |
|
432 | 432 | } |
433 | 433 | ?> |
434 | 434 | <br style="clear:both;" /> |
@@ -448,11 +448,11 @@ discard block |
||
448 | 448 | foreach ($optionsAlreadySet as $optionNames) { |
449 | 449 | if (preg_match("/^support:/", $optionNames)) { |
450 | 450 | $has_support_options[$optionNames] = "SET"; |
451 | - $support_text .= "<li><strong>" . $uiElements->displayName($optionNames) . "</strong></li>"; |
|
451 | + $support_text .= "<li><strong>".$uiElements->displayName($optionNames)."</strong></li>"; |
|
452 | 452 | } |
453 | 453 | if (preg_match("/^media:/", $optionNames)) { |
454 | 454 | $has_media_options[$$optionNames] = "SET"; |
455 | - $media_text .= "<li><strong>" . $uiElements->displayName($optionNames) . "</strong></li>"; |
|
455 | + $media_text .= "<li><strong>".$uiElements->displayName($optionNames)."</strong></li>"; |
|
456 | 456 | } |
457 | 457 | } |
458 | 458 | $fields = [ |
@@ -461,22 +461,22 @@ discard block |
||
461 | 461 | "media" => _("Media Properties for this profile")]; |
462 | 462 | |
463 | 463 | foreach ($fields as $name => $description) { |
464 | - echo "<fieldset class='option_container' id='" . $name . "_override'> |
|
464 | + echo "<fieldset class='option_container' id='".$name."_override'> |
|
465 | 465 | <legend><strong>$description</strong></legend> |
466 | 466 | <p>"; |
467 | 467 | |
468 | - if (count(${"has_" . $name . "_options"}) > 0) { |
|
469 | - 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_" . $name . "_options"})), "<ul>" . ${$name . "_text"} . "</ul>"); |
|
468 | + if (count(${"has_".$name."_options"}) > 0) { |
|
469 | + 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_".$name."_options"})), "<ul>".${$name."_text"}."</ul>"); |
|
470 | 470 | } |
471 | 471 | |
472 | 472 | echo "</p>"; |
473 | 473 | echo $optionDisplay->prefilledOptionTable($name); |
474 | - echo "<button type='button' class='newoption' onclick='getXML(\"$name\")'>" . _("Add new option") . "</button>"; |
|
474 | + echo "<button type='button' class='newoption' onclick='getXML(\"$name\")'>"._("Add new option")."</button>"; |
|
475 | 475 | echo "</fieldset>"; |
476 | 476 | } |
477 | 477 | |
478 | 478 | if ($wizardStyle) { |
479 | - 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>"; |
|
479 | + 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>"; |
|
480 | 480 | } |
481 | -echo "<p><button type='submit' name='submitbutton' value='" . web\lib\common\FormElements::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>"; |
|
481 | +echo "<p><button type='submit' name='submitbutton' value='".web\lib\common\FormElements::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>"; |
|
482 | 482 | echo $deco->footer(); |
@@ -19,7 +19,7 @@ |
||
19 | 19 | * <base_url>/copyright.php after deploying the software |
20 | 20 | */ |
21 | 21 | |
22 | -require_once dirname(dirname(dirname(dirname(__FILE__)))) . "/config/_config.php"; |
|
22 | +require_once dirname(dirname(dirname(dirname(__FILE__))))."/config/_config.php"; |
|
23 | 23 | |
24 | 24 | CAT_session_start(); |
25 | 25 |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | */ |
21 | 21 | ?> |
22 | 22 | <?php |
23 | -require_once dirname(dirname(dirname(dirname(__FILE__)))) . "/config/_config.php"; |
|
23 | +require_once dirname(dirname(dirname(dirname(__FILE__))))."/config/_config.php"; |
|
24 | 24 | |
25 | 25 | $auth = new \web\lib\admin\Authentication(); |
26 | 26 | $languageInstance = new \core\common\Language(); |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | $ownermgmt = new \core\UserManagement(); |
83 | 83 | $ownermgmt->addAdminToIdp($my_inst, $_SESSION['user']); |
84 | 84 | } else { |
85 | - echo "Fatal Error: you wanted to take control over an " . CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_institution'] . ", but are not a " . CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_federation'] . " operator!"; |
|
85 | + echo "Fatal Error: you wanted to take control over an ".CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_institution'].", but are not a ".CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_federation']." operator!"; |
|
86 | 86 | exit(1); |
87 | 87 | } |
88 | 88 | break; |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | default: |
119 | 119 | throw new Exception("Error: unknown encryption status of invitation!?!"); |
120 | 120 | } |
121 | - echo $uiElements->boxRemark(ngettext("The invitation email was sent successfully.", "All invitation emails were sent successfully.", $counter) . " " . $cryptText, _("Sent successfully.")); |
|
121 | + echo $uiElements->boxRemark(ngettext("The invitation email was sent successfully.", "All invitation emails were sent successfully.", $counter)." ".$cryptText, _("Sent successfully.")); |
|
122 | 122 | break; |
123 | 123 | case "FAILURE": |
124 | 124 | echo $uiElements->boxError(_("No invitation email could be sent!"), _("Sending failure!")); |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | default: |
139 | 139 | throw new Exception("Error: unknown encryption status of invitation!?!"); |
140 | 140 | } |
141 | - echo $uiElements->boxWarning(sprintf(_("Some invitation emails were sent successfully (%s in total), the others failed."), $counter) . " " . $cryptText, _("Partial success.")); |
|
141 | + echo $uiElements->boxWarning(sprintf(_("Some invitation emails were sent successfully (%s in total), the others failed."), $counter)." ".$cryptText, _("Partial success.")); |
|
142 | 142 | break; |
143 | 143 | case "INVALIDSYNTAX": |
144 | 144 | echo $uiElements->boxError(_("The invitation email address was malformed, no invitation was sent!"), _("The invitation email address was malformed, no invitation was sent!")); |
@@ -186,9 +186,9 @@ discard block |
||
186 | 186 | |
187 | 187 | echo "</td> |
188 | 188 | <td> |
189 | - <form action='inc/manageAdmins.inc.php?inst_id=" . $my_inst->identifier . "' method='post' " . ( $oneowner['ID'] != $_SESSION['user'] ? "onsubmit='popupRedirectWindow(this); return false;'" : "" ) . " accept-charset='UTF-8'> |
|
190 | - <input type='hidden' name='admin_id' value='" . $oneowner['ID'] . "'></input> |
|
191 | - <button type='submit' name='submitbutton' class='delete' value='" . web\lib\common\FormElements::BUTTON_DELETE . "'>" . _("Delete Administrator") . "</button> |
|
189 | + <form action='inc/manageAdmins.inc.php?inst_id=" . $my_inst->identifier."' method='post' ".($oneowner['ID'] != $_SESSION['user'] ? "onsubmit='popupRedirectWindow(this); return false;'" : "")." accept-charset='UTF-8'> |
|
190 | + <input type='hidden' name='admin_id' value='" . $oneowner['ID']."'></input> |
|
191 | + <button type='submit' name='submitbutton' class='delete' value='" . web\lib\common\FormElements::BUTTON_DELETE."'>"._("Delete Administrator")."</button> |
|
192 | 192 | </form> |
193 | 193 | </td> |
194 | 194 | </tr>"; |
@@ -202,10 +202,10 @@ discard block |
||
202 | 202 | $loggerInstance = new \core\common\Logging(); |
203 | 203 | $loggerInstance->debug(4, "Displaying pending invitations for $my_inst->identifier.\n"); |
204 | 204 | if (count($pending_invites) > 0) { |
205 | - echo "<strong>" . _("Pending invitations for this IdP") . "</strong>"; |
|
205 | + echo "<strong>"._("Pending invitations for this IdP")."</strong>"; |
|
206 | 206 | echo "<table>"; |
207 | 207 | foreach ($pending_invites as $invitee) { |
208 | - echo "<tr><td>" . $invitee['mail'] . "</td><td>".sprintf(_("(expires %s)"), $invitee['expiry'])."</td></tr>"; |
|
208 | + echo "<tr><td>".$invitee['mail']."</td><td>".sprintf(_("(expires %s)"), $invitee['expiry'])."</td></tr>"; |
|
209 | 209 | } |
210 | 210 | echo "</table>"; |
211 | 211 | } |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | |
228 | 228 | if (!$is_admin_himself) { |
229 | 229 | echo "<form action='inc/manageAdmins.inc.php?inst_id=$my_inst->identifier' method='post' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'> |
230 | - <button type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_TAKECONTROL . "'>" . sprintf(_("Take control of this %s"), $uiElements->nomenclatureInst) . "</button> |
|
230 | + <button type='submit' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_TAKECONTROL."'>".sprintf(_("Take control of this %s"), $uiElements->nomenclatureInst)."</button> |
|
231 | 231 | </form>"; |
232 | 232 | } |
233 | 233 | } |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | * <base_url>/copyright.php after deploying the software |
20 | 20 | */ |
21 | 21 | |
22 | -require_once dirname(dirname(dirname(dirname(__FILE__)))) . "/config/_config.php"; |
|
22 | +require_once dirname(dirname(dirname(dirname(__FILE__))))."/config/_config.php"; |
|
23 | 23 | |
24 | 24 | $auth = new \web\lib\admin\Authentication(); |
25 | 25 | $loggerInstance = new \core\common\Logging(); |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | $remaining_attribs = $my_profile->beginFlushMethodLevelAttributes($eaptype->getIntegerRep(), NULL); |
86 | 86 | $optionParser->processSubmittedFields($my_profile, $_POST, $_FILES, $eaptype->getIntegerRep(), NULL); |
87 | 87 | } |
88 | - $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile " . $my_profile->identifier . " - device/EAP-Type settings changed"); |
|
88 | + $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile ".$my_profile->identifier." - device/EAP-Type settings changed"); |
|
89 | 89 | header("Location: ../overview_installers.php?inst_id=$my_inst->identifier&profile_id=$my_profile->identifier"); |
90 | 90 | exit; |
91 | 91 | } |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | } |
100 | 100 | $captiontext = sprintf(_("device <strong>%s</strong>"), $device['display']); |
101 | 101 | $keyword = "device-specific"; |
102 | - $extrainput = "<input type='hidden' name='device' value='" . $device_key . "'/>"; |
|
102 | + $extrainput = "<input type='hidden' name='device' value='".$device_key."'/>"; |
|
103 | 103 | } elseif ($eaptype !== NULL) { |
104 | 104 | foreach ($my_profile->getAttributes() as $attrib) { |
105 | 105 | if (isset($attrib['eapmethod']) && $attrib['eapmethod'] == $eaptype->getArrayRep()) { |
@@ -109,12 +109,12 @@ discard block |
||
109 | 109 | |
110 | 110 | $captiontext = sprintf(_("EAP-Type <strong>%s</strong>"), $eaptype->getPrintableRep()); |
111 | 111 | $keyword = "eap-specific"; |
112 | - $extrainput = "<input type='hidden' name='eaptype' value='" . $eaptype->getIntegerRep() . "'>"; |
|
112 | + $extrainput = "<input type='hidden' name='eaptype' value='".$eaptype->getIntegerRep()."'>"; |
|
113 | 113 | } else { |
114 | 114 | throw new Exception("previous type checks make it impossible to reach this code path."); |
115 | 115 | } |
116 | 116 | ?> |
117 | -<p><?php echo _("Fine-tuning options for ") . $captiontext; ?></p> |
|
117 | +<p><?php echo _("Fine-tuning options for ").$captiontext; ?></p> |
|
118 | 118 | <hr/> |
119 | 119 | |
120 | 120 | <form action='inc/toggleRedirect.inc.php?inst_id=<?php echo $my_inst->identifier; ?>&profile_id=<?php echo $my_profile->identifier; ?>' method='post' accept-charset='UTF-8'><?php echo $extrainput; ?> |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | $interesting_attribs = []; |
124 | 124 | |
125 | 125 | foreach ($attribs as $attrib) { |
126 | - if ($attrib['level'] == "Method" && preg_match('/^' . $keyword . ':/', $attrib['name'])) { |
|
126 | + if ($attrib['level'] == "Method" && preg_match('/^'.$keyword.':/', $attrib['name'])) { |
|
127 | 127 | $interesting_attribs[] = $attrib; |
128 | 128 | } |
129 | 129 | } |
@@ -20,7 +20,7 @@ |
||
20 | 20 | */ |
21 | 21 | ?> |
22 | 22 | <?php |
23 | -require_once dirname(dirname(dirname(dirname(__FILE__)))) . "/config/_config.php"; |
|
23 | +require_once dirname(dirname(dirname(dirname(__FILE__))))."/config/_config.php"; |
|
24 | 24 | |
25 | 25 | $auth = new \web\lib\admin\Authentication(); |
26 | 26 |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | ?> |
22 | 22 | <?php |
23 | 23 | |
24 | -require_once dirname(dirname(dirname(dirname(__FILE__)))) . "/config/_config.php"; |
|
24 | +require_once dirname(dirname(dirname(dirname(__FILE__))))."/config/_config.php"; |
|
25 | 25 | |
26 | 26 | /** |
27 | 27 | * retrieves a binary object from the database and pushes it out to the browser |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | // Set data type and caching for 30 days |
41 | 41 | $info = new finfo(); |
42 | 42 | $filetype = $info->buffer($finalBlob, FILEINFO_MIME_TYPE); |
43 | - header("Content-type: " . $filetype); |
|
43 | + header("Content-type: ".$filetype); |
|
44 | 44 | |
45 | 45 | switch ($filetype) { |
46 | 46 | case "text/rtf": // fall-through, same treatment |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | $offset = 60 * 60 * 24 * 30; |
59 | 59 | // gmdate can't possibly fail, because it operates on time() and an integer offset |
60 | 60 | |
61 | - $ExpStr = "Expires: " . /** @scrutinizer ignore-type */ gmdate("D, d M Y H:i:s", time() + $offset) . " GMT"; |
|
61 | + $ExpStr = "Expires: "./** @scrutinizer ignore-type */ gmdate("D, d M Y H:i:s", time() + $offset)." GMT"; |
|
62 | 62 | header($ExpStr); |
63 | 63 | |
64 | 64 | // Print out the image |
@@ -99,84 +99,84 @@ |
||
99 | 99 | } |
100 | 100 | |
101 | 101 | switch ($operationMode) { |
102 | - case OPERATION_MODE_EDIT: |
|
103 | - $idp = $validator->IdP($_GET['inst_id']); |
|
104 | - // editing IdPs is done from within the popup. When we're done, send the |
|
105 | - // user back to the popup (append the result of the operation later) |
|
106 | - $redirect_destination = "manageAdmins.inc.php?inst_id=" . $idp->identifier . "&"; |
|
107 | - $mailaddress = abortOnBogusMail($newmailaddress, $redirect_destination); |
|
108 | - // is the user primary admin of this IdP? |
|
109 | - $is_owner = $idp->isPrimaryOwner($_SESSION['user']); |
|
110 | - // check if he is (also) federation admin for the federation this IdP is in. His invitations have more blessing then. |
|
111 | - $fedadmin = $userObject->isFederationAdmin($idp->federation); |
|
112 | - // check if he is either one, if not, complain |
|
113 | - if (!$is_owner && !$fedadmin) { |
|
114 | - echo "<p>" . sprintf(_("Something's wrong... you are a %s admin, but not for the %s the requested %s belongs to!"), $uiElements->nomenclatureFed, $uiElements->nomenclatureFed, $uiElements->nomenclatureInst) . "</p>"; |
|
115 | - exit(1); |
|
116 | - } |
|
102 | + case OPERATION_MODE_EDIT: |
|
103 | + $idp = $validator->IdP($_GET['inst_id']); |
|
104 | + // editing IdPs is done from within the popup. When we're done, send the |
|
105 | + // user back to the popup (append the result of the operation later) |
|
106 | + $redirect_destination = "manageAdmins.inc.php?inst_id=" . $idp->identifier . "&"; |
|
107 | + $mailaddress = abortOnBogusMail($newmailaddress, $redirect_destination); |
|
108 | + // is the user primary admin of this IdP? |
|
109 | + $is_owner = $idp->isPrimaryOwner($_SESSION['user']); |
|
110 | + // check if he is (also) federation admin for the federation this IdP is in. His invitations have more blessing then. |
|
111 | + $fedadmin = $userObject->isFederationAdmin($idp->federation); |
|
112 | + // check if he is either one, if not, complain |
|
113 | + if (!$is_owner && !$fedadmin) { |
|
114 | + echo "<p>" . sprintf(_("Something's wrong... you are a %s admin, but not for the %s the requested %s belongs to!"), $uiElements->nomenclatureFed, $uiElements->nomenclatureFed, $uiElements->nomenclatureInst) . "</p>"; |
|
115 | + exit(1); |
|
116 | + } |
|
117 | 117 | |
118 | - $prettyprintname = $idp->name; |
|
119 | - $newtokens = $mgmt->createTokens($fedadmin, $mailaddress, $idp); |
|
120 | - $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP " . $idp->identifier . " - Token created for " . implode(",", $mailaddress)); |
|
121 | - $introtext = "CO-ADMIN"; |
|
122 | - break; |
|
123 | - case OPERATION_MODE_NEWUNLINKED: |
|
124 | - $redirect_destination = "../overview_federation.php?"; |
|
125 | - $mailaddress = abortOnBogusMail($newmailaddress, $redirect_destination); |
|
126 | - // run an input check and conversion of the raw inputs... just in case |
|
127 | - $newinstname = $validator->string($_POST['name']); |
|
128 | - $newcountry = $validator->string($_POST['country']); |
|
129 | - $new_idp_authorized_fedadmin = $userObject->isFederationAdmin($newcountry); |
|
130 | - if ($new_idp_authorized_fedadmin !== TRUE) { |
|
131 | - throw new Exception("Something's wrong... you want to create a new " . $uiElements->nomenclatureInst . ", but are not a " . $uiElements->nomenclatureFed . " admin for the " . $uiElements->nomenclatureFed . " it should be in!"); |
|
132 | - } |
|
133 | - $federation = $validator->Federation($newcountry); |
|
134 | - $prettyprintname = $newinstname; |
|
135 | - $introtext = "NEW-FED"; |
|
136 | - // send the user back to his federation overview page, append the result of the operation later |
|
137 | - // do the token creation magic |
|
138 | - $newtokens = $mgmt->createTokens(TRUE, $mailaddress, $newinstname, 0, $newcountry); |
|
139 | - $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP FUTURE - Token created for " . implode(",", $mailaddress)); |
|
140 | - break; |
|
141 | - case OPERATION_MODE_NEWFROMDB: |
|
142 | - $redirect_destination = "../overview_federation.php?"; |
|
143 | - $mailaddress = abortOnBogusMail($newmailaddress, $redirect_destination); |
|
144 | - // a real external DB entry was submitted and all the required parameters are there |
|
145 | - $newexternalid = $validator->string($_POST['externals']); |
|
146 | - $extinfo = $catInstance->getExternalDBEntityDetails($newexternalid); |
|
147 | - $new_idp_authorized_fedadmin = $userObject->isFederationAdmin($extinfo['country']); |
|
148 | - if ($new_idp_authorized_fedadmin !== TRUE) { |
|
149 | - throw new Exception("Something's wrong... you want to create a new " . $uiElements->nomenclatureInst . ", but are not a " . $uiElements->nomenclatureFed . " admin for the " . $uiElements->nomenclatureFed . " it should be in!"); |
|
150 | - } |
|
151 | - $federation = $validator->Federation($extinfo['country']); |
|
152 | - $newcountry = $extinfo['country']; |
|
153 | - // see if the inst name is defined in the currently set language; if not, pick its English name; if N/A, pick the last in the list |
|
154 | - $prettyprintname = ""; |
|
155 | - foreach ($extinfo['names'] as $lang => $name) { |
|
156 | - if ($lang == $languageInstance->getLang()) { |
|
157 | - $prettyprintname = $name; |
|
118 | + $prettyprintname = $idp->name; |
|
119 | + $newtokens = $mgmt->createTokens($fedadmin, $mailaddress, $idp); |
|
120 | + $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP " . $idp->identifier . " - Token created for " . implode(",", $mailaddress)); |
|
121 | + $introtext = "CO-ADMIN"; |
|
122 | + break; |
|
123 | + case OPERATION_MODE_NEWUNLINKED: |
|
124 | + $redirect_destination = "../overview_federation.php?"; |
|
125 | + $mailaddress = abortOnBogusMail($newmailaddress, $redirect_destination); |
|
126 | + // run an input check and conversion of the raw inputs... just in case |
|
127 | + $newinstname = $validator->string($_POST['name']); |
|
128 | + $newcountry = $validator->string($_POST['country']); |
|
129 | + $new_idp_authorized_fedadmin = $userObject->isFederationAdmin($newcountry); |
|
130 | + if ($new_idp_authorized_fedadmin !== TRUE) { |
|
131 | + throw new Exception("Something's wrong... you want to create a new " . $uiElements->nomenclatureInst . ", but are not a " . $uiElements->nomenclatureFed . " admin for the " . $uiElements->nomenclatureFed . " it should be in!"); |
|
158 | 132 | } |
159 | - } |
|
160 | - if ($prettyprintname == "" && isset($extinfo['names']['en'])) { |
|
161 | - $prettyprintname = $extinfo['names']['en']; |
|
162 | - } |
|
163 | - if ($prettyprintname == "") { |
|
164 | - foreach ($extinfo['names'] as $name) { |
|
165 | - $prettyprintname = $name; |
|
133 | + $federation = $validator->Federation($newcountry); |
|
134 | + $prettyprintname = $newinstname; |
|
135 | + $introtext = "NEW-FED"; |
|
136 | + // send the user back to his federation overview page, append the result of the operation later |
|
137 | + // do the token creation magic |
|
138 | + $newtokens = $mgmt->createTokens(TRUE, $mailaddress, $newinstname, 0, $newcountry); |
|
139 | + $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP FUTURE - Token created for " . implode(",", $mailaddress)); |
|
140 | + break; |
|
141 | + case OPERATION_MODE_NEWFROMDB: |
|
142 | + $redirect_destination = "../overview_federation.php?"; |
|
143 | + $mailaddress = abortOnBogusMail($newmailaddress, $redirect_destination); |
|
144 | + // a real external DB entry was submitted and all the required parameters are there |
|
145 | + $newexternalid = $validator->string($_POST['externals']); |
|
146 | + $extinfo = $catInstance->getExternalDBEntityDetails($newexternalid); |
|
147 | + $new_idp_authorized_fedadmin = $userObject->isFederationAdmin($extinfo['country']); |
|
148 | + if ($new_idp_authorized_fedadmin !== TRUE) { |
|
149 | + throw new Exception("Something's wrong... you want to create a new " . $uiElements->nomenclatureInst . ", but are not a " . $uiElements->nomenclatureFed . " admin for the " . $uiElements->nomenclatureFed . " it should be in!"); |
|
166 | 150 | } |
167 | - } |
|
168 | - // fill the rest of the text |
|
169 | - $introtext = "EXISTING-FED"; |
|
170 | - // do the token creation magic |
|
171 | - $newtokens = $mgmt->createTokens(TRUE, $mailaddress, $prettyprintname, $newexternalid); |
|
172 | - $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP FUTURE - Token created for " . implode(",", $mailaddress)); |
|
173 | - break; |
|
174 | - default: // includes OPERATION_MODE_INVALID |
|
175 | - $wrongcontent = print_r($_POST, TRUE); |
|
176 | - echo "<pre>Wrong parameters in POST: |
|
151 | + $federation = $validator->Federation($extinfo['country']); |
|
152 | + $newcountry = $extinfo['country']; |
|
153 | + // see if the inst name is defined in the currently set language; if not, pick its English name; if N/A, pick the last in the list |
|
154 | + $prettyprintname = ""; |
|
155 | + foreach ($extinfo['names'] as $lang => $name) { |
|
156 | + if ($lang == $languageInstance->getLang()) { |
|
157 | + $prettyprintname = $name; |
|
158 | + } |
|
159 | + } |
|
160 | + if ($prettyprintname == "" && isset($extinfo['names']['en'])) { |
|
161 | + $prettyprintname = $extinfo['names']['en']; |
|
162 | + } |
|
163 | + if ($prettyprintname == "") { |
|
164 | + foreach ($extinfo['names'] as $name) { |
|
165 | + $prettyprintname = $name; |
|
166 | + } |
|
167 | + } |
|
168 | + // fill the rest of the text |
|
169 | + $introtext = "EXISTING-FED"; |
|
170 | + // do the token creation magic |
|
171 | + $newtokens = $mgmt->createTokens(TRUE, $mailaddress, $prettyprintname, $newexternalid); |
|
172 | + $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP FUTURE - Token created for " . implode(",", $mailaddress)); |
|
173 | + break; |
|
174 | + default: // includes OPERATION_MODE_INVALID |
|
175 | + $wrongcontent = print_r($_POST, TRUE); |
|
176 | + echo "<pre>Wrong parameters in POST: |
|
177 | 177 | " . htmlspecialchars($wrongcontent) . " |
178 | 178 | </pre>"; |
179 | - exit(1); |
|
179 | + exit(1); |
|
180 | 180 | } |
181 | 181 | |
182 | 182 | // send, and invalidate the token immediately if the mail could not be sent! |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | * <base_url>/copyright.php after deploying the software |
20 | 20 | */ |
21 | 21 | |
22 | -require_once dirname(dirname(dirname(__DIR__))) . "/config/_config.php"; |
|
22 | +require_once dirname(dirname(dirname(__DIR__)))."/config/_config.php"; |
|
23 | 23 | |
24 | 24 | $auth = new \web\lib\admin\Authentication(); |
25 | 25 | $auth->authenticate(); |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | $addressSegments = explode(",", $newmailaddress); |
47 | 47 | $confirmedMails = []; |
48 | 48 | if ($addressSegments === FALSE) { |
49 | - header("Location: $redirect_destination" . "invitation=INVALIDSYNTAX"); |
|
49 | + header("Location: $redirect_destination"."invitation=INVALIDSYNTAX"); |
|
50 | 50 | exit; |
51 | 51 | } |
52 | 52 | foreach ($addressSegments as $oneAddressCandidate) { |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | } |
57 | 57 | } |
58 | 58 | if (count($confirmedMails) == 0) { |
59 | - header("Location: $redirect_destination" . "invitation=INVALIDSYNTAX"); |
|
59 | + header("Location: $redirect_destination"."invitation=INVALIDSYNTAX"); |
|
60 | 60 | exit; |
61 | 61 | } else { |
62 | 62 | return $confirmedMails; |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | $idp = $validator->IdP($_GET['inst_id']); |
104 | 104 | // editing IdPs is done from within the popup. When we're done, send the |
105 | 105 | // user back to the popup (append the result of the operation later) |
106 | - $redirect_destination = "manageAdmins.inc.php?inst_id=" . $idp->identifier . "&"; |
|
106 | + $redirect_destination = "manageAdmins.inc.php?inst_id=".$idp->identifier."&"; |
|
107 | 107 | $mailaddress = abortOnBogusMail($newmailaddress, $redirect_destination); |
108 | 108 | // is the user primary admin of this IdP? |
109 | 109 | $is_owner = $idp->isPrimaryOwner($_SESSION['user']); |
@@ -111,13 +111,13 @@ discard block |
||
111 | 111 | $fedadmin = $userObject->isFederationAdmin($idp->federation); |
112 | 112 | // check if he is either one, if not, complain |
113 | 113 | if (!$is_owner && !$fedadmin) { |
114 | - echo "<p>" . sprintf(_("Something's wrong... you are a %s admin, but not for the %s the requested %s belongs to!"), $uiElements->nomenclatureFed, $uiElements->nomenclatureFed, $uiElements->nomenclatureInst) . "</p>"; |
|
114 | + echo "<p>".sprintf(_("Something's wrong... you are a %s admin, but not for the %s the requested %s belongs to!"), $uiElements->nomenclatureFed, $uiElements->nomenclatureFed, $uiElements->nomenclatureInst)."</p>"; |
|
115 | 115 | exit(1); |
116 | 116 | } |
117 | 117 | |
118 | 118 | $prettyprintname = $idp->name; |
119 | 119 | $newtokens = $mgmt->createTokens($fedadmin, $mailaddress, $idp); |
120 | - $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP " . $idp->identifier . " - Token created for " . implode(",", $mailaddress)); |
|
120 | + $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP ".$idp->identifier." - Token created for ".implode(",", $mailaddress)); |
|
121 | 121 | $introtext = "CO-ADMIN"; |
122 | 122 | break; |
123 | 123 | case OPERATION_MODE_NEWUNLINKED: |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | $newcountry = $validator->string($_POST['country']); |
129 | 129 | $new_idp_authorized_fedadmin = $userObject->isFederationAdmin($newcountry); |
130 | 130 | if ($new_idp_authorized_fedadmin !== TRUE) { |
131 | - throw new Exception("Something's wrong... you want to create a new " . $uiElements->nomenclatureInst . ", but are not a " . $uiElements->nomenclatureFed . " admin for the " . $uiElements->nomenclatureFed . " it should be in!"); |
|
131 | + throw new Exception("Something's wrong... you want to create a new ".$uiElements->nomenclatureInst.", but are not a ".$uiElements->nomenclatureFed." admin for the ".$uiElements->nomenclatureFed." it should be in!"); |
|
132 | 132 | } |
133 | 133 | $federation = $validator->Federation($newcountry); |
134 | 134 | $prettyprintname = $newinstname; |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | // send the user back to his federation overview page, append the result of the operation later |
137 | 137 | // do the token creation magic |
138 | 138 | $newtokens = $mgmt->createTokens(TRUE, $mailaddress, $newinstname, 0, $newcountry); |
139 | - $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP FUTURE - Token created for " . implode(",", $mailaddress)); |
|
139 | + $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP FUTURE - Token created for ".implode(",", $mailaddress)); |
|
140 | 140 | break; |
141 | 141 | case OPERATION_MODE_NEWFROMDB: |
142 | 142 | $redirect_destination = "../overview_federation.php?"; |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | $extinfo = $catInstance->getExternalDBEntityDetails($newexternalid); |
147 | 147 | $new_idp_authorized_fedadmin = $userObject->isFederationAdmin($extinfo['country']); |
148 | 148 | if ($new_idp_authorized_fedadmin !== TRUE) { |
149 | - throw new Exception("Something's wrong... you want to create a new " . $uiElements->nomenclatureInst . ", but are not a " . $uiElements->nomenclatureFed . " admin for the " . $uiElements->nomenclatureFed . " it should be in!"); |
|
149 | + throw new Exception("Something's wrong... you want to create a new ".$uiElements->nomenclatureInst.", but are not a ".$uiElements->nomenclatureFed." admin for the ".$uiElements->nomenclatureFed." it should be in!"); |
|
150 | 150 | } |
151 | 151 | $federation = $validator->Federation($extinfo['country']); |
152 | 152 | $newcountry = $extinfo['country']; |
@@ -169,12 +169,12 @@ discard block |
||
169 | 169 | $introtext = "EXISTING-FED"; |
170 | 170 | // do the token creation magic |
171 | 171 | $newtokens = $mgmt->createTokens(TRUE, $mailaddress, $prettyprintname, $newexternalid); |
172 | - $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP FUTURE - Token created for " . implode(",", $mailaddress)); |
|
172 | + $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP FUTURE - Token created for ".implode(",", $mailaddress)); |
|
173 | 173 | break; |
174 | 174 | default: // includes OPERATION_MODE_INVALID |
175 | 175 | $wrongcontent = print_r($_POST, TRUE); |
176 | 176 | echo "<pre>Wrong parameters in POST: |
177 | -" . htmlspecialchars($wrongcontent) . " |
|
177 | +" . htmlspecialchars($wrongcontent)." |
|
178 | 178 | </pre>"; |
179 | 179 | exit(1); |
180 | 180 | } |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | $mgmt->invalidateToken($onetoken); |
191 | 191 | } else { |
192 | 192 | $status[$onetoken] = $sent["TRANSPORT"]; |
193 | - if (! $sent["TRANSPORT"]) { |
|
193 | + if (!$sent["TRANSPORT"]) { |
|
194 | 194 | $allEncrypted = FALSE; |
195 | 195 | } else { |
196 | 196 | $allClear = FALSE; |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | } |
200 | 200 | |
201 | 201 | if (count($status) == 0) { |
202 | - header("Location: $redirect_destination" . "invitation=FAILURE"); |
|
202 | + header("Location: $redirect_destination"."invitation=FAILURE"); |
|
203 | 203 | exit; |
204 | 204 | } |
205 | 205 | $finalDestParams = "invitation=SUCCESS"; |
@@ -215,4 +215,4 @@ discard block |
||
215 | 215 | $finalDestParams .= "&transportsecurity=PARTIAL"; |
216 | 216 | } |
217 | 217 | |
218 | -header("Location: $redirect_destination" . $finalDestParams); |
|
218 | +header("Location: $redirect_destination".$finalDestParams); |