@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | */ |
27 | 27 | ?> |
28 | 28 | <?php |
29 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
29 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
30 | 30 | |
31 | 31 | $deco = new \web\lib\admin\PageDecoration(); |
32 | 32 | $validator = new \web\lib\common\InputValidation(); |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | $detectRealm = $validator->string($_POST['realm_to_detect']); |
128 | 128 | $localname = $validator->string($_POST['username_to_detect']); |
129 | 129 | $checker = new \core\diag\RADIUSTests($detectRealm, $localname); |
130 | - $detectionResult = $checker->autodetectCAWithProbe($localname . "@" . $detectRealm); |
|
130 | + $detectionResult = $checker->autodetectCAWithProbe($localname."@".$detectRealm); |
|
131 | 131 | $loggerInstance->debug(2, "CA Auto-Detection yields:"); |
132 | 132 | $loggerInstance->debug(2, $detectionResult); |
133 | 133 | if ($detectionResult['ROOT_CA'] !== NULL) { // we are lucky! |
@@ -171,8 +171,8 @@ discard block |
||
171 | 171 | <?php |
172 | 172 | echo $uiElements->instLevelInfoBoxes($my_inst); |
173 | 173 | |
174 | - 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'> |
|
175 | - <input type='hidden' name='MAX_FILE_SIZE' value='" . \config\Master::MAX_UPLOAD_SIZE . "'>"; |
|
174 | + 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'> |
|
175 | + <input type='hidden' name='MAX_FILE_SIZE' value='" . \config\Master::MAX_UPLOAD_SIZE."'>"; |
|
176 | 176 | $optionDisplay = new \web\lib\admin\OptionDisplay($profile_options, \core\Options::LEVEL_PROFILE); |
177 | 177 | ?> |
178 | 178 | <fieldset class="option_container"> |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | </legend> |
182 | 182 | <?php |
183 | 183 | if ($wizardStyle) { |
184 | - 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>"; |
|
184 | + 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>"; |
|
185 | 185 | } |
186 | 186 | ?> |
187 | 187 | <h3><?php echo _("Profile Name and RADIUS realm"); ?> |
@@ -258,37 +258,37 @@ discard block |
||
258 | 258 | <tr> |
259 | 259 | <!-- checkbox and input field for anonymity support, available only when realm is known--> |
260 | 260 | <td> |
261 | - <span id='anon_support_label' style='<?php echo ($realm == "" ? "color:#999999" : "" ); ?>'> |
|
261 | + <span id='anon_support_label' style='<?php echo ($realm == "" ? "color:#999999" : ""); ?>'> |
|
262 | 262 | <?php echo _("Enable Anonymous Outer Identity:"); ?> |
263 | 263 | </span> |
264 | 264 | </td> |
265 | 265 | <td> |
266 | - <input type='checkbox' <?php echo ($useAnon != FALSE ? "checked" : "" ) . ($realm == "" ? " disabled" : "" ); ?> name='anon_support' onclick=' |
|
266 | + <input type='checkbox' <?php echo ($useAnon != FALSE ? "checked" : "").($realm == "" ? " disabled" : ""); ?> name='anon_support' onclick=' |
|
267 | 267 | if (this.form.elements["anon_support"].checked !== true) { |
268 | 268 | this.form.elements["anon_local"].setAttribute("disabled", "disabled"); |
269 | 269 | } else { |
270 | 270 | this.form.elements["anon_local"].removeAttribute("disabled"); |
271 | 271 | } |
272 | 272 | ;'/> |
273 | - <input type='text' <?php echo ($useAnon == FALSE ? "disabled" : "" ); ?> name='anon_local' value='<?php echo $anonLocal; ?>'/> |
|
273 | + <input type='text' <?php echo ($useAnon == FALSE ? "disabled" : ""); ?> name='anon_local' value='<?php echo $anonLocal; ?>'/> |
|
274 | 274 | </td> |
275 | 275 | </tr> |
276 | 276 | <tr> |
277 | 277 | <!-- checkbox and input field for check realm outer id, available only when realm is known--> |
278 | 278 | <td> |
279 | - <span id='checkuser_label' style='<?php echo ($realm == "" ? "color:#999999" : "" ); ?>'> |
|
279 | + <span id='checkuser_label' style='<?php echo ($realm == "" ? "color:#999999" : ""); ?>'> |
|
280 | 280 | <?php echo _("Use special Outer Identity for realm checks:"); ?> |
281 | 281 | </span> |
282 | 282 | </td> |
283 | 283 | <td> |
284 | - <input type='checkbox' <?php echo ($checkuserOuter != FALSE ? "checked" : "" ) . ($realm == "" ? " disabled" : "" ); ?> name='checkuser_support' onclick=' |
|
284 | + <input type='checkbox' <?php echo ($checkuserOuter != FALSE ? "checked" : "").($realm == "" ? " disabled" : ""); ?> name='checkuser_support' onclick=' |
|
285 | 285 | if (this.form.elements["checkuser_support"].checked !== true) { |
286 | 286 | this.form.elements["checkuser_local"].setAttribute("disabled", "disabled"); |
287 | 287 | } else { |
288 | 288 | this.form.elements["checkuser_local"].removeAttribute("disabled"); |
289 | 289 | } |
290 | 290 | ;'/> |
291 | - <input type='text' <?php echo ($checkuserOuter == FALSE ? "disabled" : "" ); ?> name='checkuser_local' value='<?php echo $checkuserValue; ?>'/> |
|
291 | + <input type='text' <?php echo ($checkuserOuter == FALSE ? "disabled" : ""); ?> name='checkuser_local' value='<?php echo $checkuserValue; ?>'/> |
|
292 | 292 | </td> |
293 | 293 | </tr> |
294 | 294 | <tr> |
@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | </td> |
304 | 304 | <td> |
305 | 305 | <input type='checkbox' <?php |
306 | - echo ($verify != FALSE ? "checked" : "" ); |
|
306 | + echo ($verify != FALSE ? "checked" : ""); |
|
307 | 307 | ?> name='verify_support' onclick=' |
308 | 308 | if (this.form.elements["verify_support"].checked !== true || this.form.elements["realm"].value.length == 0) { |
309 | 309 | this.form.elements["hint_support"].setAttribute("disabled", "disabled"); |
@@ -315,12 +315,12 @@ discard block |
||
315 | 315 | </tr> |
316 | 316 | <tr> |
317 | 317 | <td> |
318 | - <span id='hint_label' style='<?php echo ($realm == "" ? "color:#999999" : "" ); ?>'> |
|
318 | + <span id='hint_label' style='<?php echo ($realm == "" ? "color:#999999" : ""); ?>'> |
|
319 | 319 | <?php echo _("Enforce exact realm in username"); ?> |
320 | 320 | </span> |
321 | 321 | </td> |
322 | 322 | <td> |
323 | - <input type='checkbox' <?php echo ($verify == FALSE ? "disabled" : "" ); ?> name='hint_support' <?php echo ( $hint != FALSE ? "checked" : "" ); ?> /> |
|
323 | + <input type='checkbox' <?php echo ($verify == FALSE ? "disabled" : ""); ?> name='hint_support' <?php echo ($hint != FALSE ? "checked" : ""); ?> /> |
|
324 | 324 | </td> |
325 | 325 | </tr> |
326 | 326 | </table> |
@@ -334,14 +334,14 @@ discard block |
||
334 | 334 | <p> |
335 | 335 | |
336 | 336 | <?php |
337 | - echo "<span id='redirect_label' style='" . ($realm == "" ? "color:#999999" : "" ) . "'><label for='redirect'>" . _("Redirect end users to own web page:") . "</label></span> |
|
338 | - <input type='checkbox' name='redirect' id='redirect' " . ($blacklisted === FALSE ? "" : "checked " ) . "onclick=' |
|
337 | + echo "<span id='redirect_label' style='".($realm == "" ? "color:#999999" : "")."'><label for='redirect'>"._("Redirect end users to own web page:")."</label></span> |
|
338 | + <input type='checkbox' name='redirect' id='redirect' " . ($blacklisted === FALSE ? "" : "checked ")."onclick=' |
|
339 | 339 | if (this.form.elements[\"redirect\"].checked != true) { |
340 | 340 | this.form.elements[\"redirect_target\"].setAttribute(\"disabled\", \"disabled\"); |
341 | 341 | } else { |
342 | 342 | this.form.elements[\"redirect_target\"].removeAttribute(\"disabled\"); |
343 | 343 | };'/> |
344 | - <input type='text' name='redirect_target' " . ($blacklisted !== FALSE ? "value='$blacklisted'" : "disabled" ) . "/>"; |
|
344 | + <input type='text' name='redirect_target' " . ($blacklisted !== FALSE ? "value='$blacklisted'" : "disabled")."/>"; |
|
345 | 345 | ?> |
346 | 346 | </p> |
347 | 347 | |
@@ -381,7 +381,7 @@ discard block |
||
381 | 381 | <?php |
382 | 382 | $D = []; |
383 | 383 | foreach ($prefill_methods as $prio => $value) { |
384 | - print '<li>' . $value->getPrintableRep() . "</li>\n"; |
|
384 | + print '<li>'.$value->getPrintableRep()."</li>\n"; |
|
385 | 385 | $D[$value->getPrintableRep()] = $prio; |
386 | 386 | } |
387 | 387 | ?> |
@@ -407,7 +407,7 @@ discard block |
||
407 | 407 | } |
408 | 408 | $display = $a->getPrintableRep(); |
409 | 409 | if (!isset($D[$a->getPrintableRep()])) { |
410 | - print '<li class="eap1">' . $a->getPrintableRep() . "</li>\n"; |
|
410 | + print '<li class="eap1">'.$a->getPrintableRep()."</li>\n"; |
|
411 | 411 | } |
412 | 412 | } |
413 | 413 | ?> |
@@ -420,8 +420,8 @@ discard block |
||
420 | 420 | foreach ($methods as $a) { |
421 | 421 | $display = $a->getPrintableRep(); |
422 | 422 | $v = isset($D[$display]) ? $D[$display] : ''; |
423 | - print '<input type="hidden" class="eapm" name="' . $display . '" id="EAP-' . $display . '" value="' . $display . '">'; |
|
424 | - print '<input type="hidden" class="eapmv" name="' . $display . '-priority" id="EAP-' . $display . '-priority" value="' . $v . '">'; |
|
423 | + print '<input type="hidden" class="eapm" name="'.$display.'" id="EAP-'.$display.'" value="'.$display.'">'; |
|
424 | + print '<input type="hidden" class="eapmv" name="'.$display.'-priority" id="EAP-'.$display.'-priority" value="'.$v.'">'; |
|
425 | 425 | } |
426 | 426 | ?> |
427 | 427 | <br style="clear:both;" /> |
@@ -441,11 +441,11 @@ discard block |
||
441 | 441 | foreach ($optionsAlreadySet as $optionNames) { |
442 | 442 | if (preg_match("/^support:/", $optionNames)) { |
443 | 443 | $has_support_options[$optionNames] = "SET"; |
444 | - $support_text .= "<li><strong>" . $uiElements->displayName($optionNames) . "</strong></li>"; |
|
444 | + $support_text .= "<li><strong>".$uiElements->displayName($optionNames)."</strong></li>"; |
|
445 | 445 | } |
446 | 446 | if (preg_match("/^media:/", $optionNames)) { |
447 | 447 | $has_media_options[$optionNames] = "SET"; |
448 | - $media_text .= "<li><strong>" . $uiElements->displayName($optionNames) . "</strong></li>"; |
|
448 | + $media_text .= "<li><strong>".$uiElements->displayName($optionNames)."</strong></li>"; |
|
449 | 449 | } |
450 | 450 | } |
451 | 451 | $fields = [ |
@@ -454,12 +454,12 @@ discard block |
||
454 | 454 | "media" => _("Media Properties for this profile")]; |
455 | 455 | |
456 | 456 | foreach ($fields as $name => $description) { |
457 | - echo "<fieldset class='option_container' id='" . $name . "_override'> |
|
457 | + echo "<fieldset class='option_container' id='".$name."_override'> |
|
458 | 458 | <legend><strong>$description</strong></legend> |
459 | 459 | <p>"; |
460 | 460 | echo $wizard->displayHelp($name); |
461 | - if (count(${"has_" . $name . "_options"}) > 0) { |
|
462 | - 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>"); |
|
461 | + if (count(${"has_".$name."_options"}) > 0) { |
|
462 | + 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>"); |
|
463 | 463 | } |
464 | 464 | echo "</p>"; |
465 | 465 | echo $optionDisplay->prefilledOptionTable($name, $my_inst->federation); |
@@ -469,7 +469,7 @@ discard block |
||
469 | 469 | echo "</fieldset>"; |
470 | 470 | } |
471 | 471 | if ($wizardStyle) { |
472 | - 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>"; |
|
472 | + 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>"; |
|
473 | 473 | } |
474 | 474 | if ($editMode == 'readonly') { |
475 | 475 | $discardLabel = _("Return"); |
@@ -477,6 +477,6 @@ discard block |
||
477 | 477 | if ($editMode == 'fullaccess') { |
478 | 478 | $discardLabel = _("Discard changes"); |
479 | 479 | } |
480 | -echo "<p><button type='submit' id='submitbutton' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_SAVE . "'>" . _("Save data") . "</button><button type='button' class='delete' id=='abortbutton' style='visibility: visible' value='abort' onclick='javascript:window.location = \"overview_org.php?inst_id=$my_inst->identifier\"'>".$discardLabel."</button></p></form>"; |
|
480 | +echo "<p><button type='submit' id='submitbutton' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_SAVE."'>"._("Save data")."</button><button type='button' class='delete' id=='abortbutton' style='visibility: visible' value='abort' onclick='javascript:window.location = \"overview_org.php?inst_id=$my_inst->identifier\"'>".$discardLabel."</button></p></form>"; |
|
481 | 481 | echo $deco->footer(); |
482 | 482 |
@@ -27,7 +27,7 @@ |
||
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(); |
@@ -27,7 +27,7 @@ |
||
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(); |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | ?> |
30 | 30 | |
31 | 31 | <?php |
32 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
32 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
33 | 33 | |
34 | 34 | $deco = new \web\lib\admin\PageDecoration(); |
35 | 35 | $validator = new \web\lib\common\InputValidation(); |
@@ -101,13 +101,13 @@ discard block |
||
101 | 101 | } |
102 | 102 | } |
103 | 103 | |
104 | -$newProfileName = $validator->string($_POST['new_profile'], true); |
|
104 | +$newProfileName = $validator->string($_POST['new_profile'], true); |
|
105 | 105 | $origProfileName = $validator->string($_POST['orig_profile_name'], true); |
106 | 106 | $handle = \core\DBConnection::handle("INST"); |
107 | 107 | |
108 | 108 | $result = runSelect($my_profile->identifier, $fields, 'profile', $handle); |
109 | 109 | $row = $result->fetch_assoc(); |
110 | -$row['showtime']= 0; |
|
110 | +$row['showtime'] = 0; |
|
111 | 111 | $row['preference'] = 1000; |
112 | 112 | copyRow($row, $fields, 'profile', $handle); |
113 | 113 | $newProfileId = $handle->lastID(); |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | * License: see the web/copyright.inc.php file in the file structure or |
20 | 20 | * <base_url>/copyright.php after deploying the software |
21 | 21 | */ |
22 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
22 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
23 | 23 | $languageInstance = new \core\common\Language(); |
24 | 24 | $languageInstance->setTextDomain("diagnostics"); |
25 | 25 | $loggerInstance = new \core\common\Logging(); |
@@ -63,47 +63,47 @@ discard block |
||
63 | 63 | $select = "<div id='sp_abuse_problem'> |
64 | 64 | <select style='margin-left: 0px;' id='select_sp_problem'>"; |
65 | 65 | foreach ($sp_problem as $pname => $pdesc) { |
66 | - $select = $select . "<option value='$pname'>$pdesc</option>\n"; |
|
66 | + $select = $select."<option value='$pname'>$pdesc</option>\n"; |
|
67 | 67 | } |
68 | - $select = $select . "</select></div>"; |
|
68 | + $select = $select."</select></div>"; |
|
69 | 69 | $res = " |
70 | 70 | <input type='hidden' name='token' id='token' value=''> |
71 | 71 | <input type='hidden' name='tests_result' id='tests_result' value=''> |
72 | 72 | <table id='sp_questions'> |
73 | 73 | <tr id='sp_problem_selector'> |
74 | - <td>" . _("Select your problem") . "</td> |
|
74 | + <td>" . _("Select your problem")."</td> |
|
75 | 75 | <td>$select</td> |
76 | 76 | </tr> |
77 | 77 | <tr> |
78 | - <td>" . _("What is the realm of the IdP in question?") . "</td> |
|
78 | + <td>"._("What is the realm of the IdP in question?")."</td> |
|
79 | 79 | <td> |
80 | 80 | <input type='text' name='admin_realm' id='admin_realm' value='$realmFromURL'> |
81 | - <button class='diag_button' id='realm_in_db_admin' style='display: none;' accesskey='R' type='button'>" . |
|
82 | - _("Check this realm") . |
|
81 | + <button class='diag_button' id='realm_in_db_admin' style='display: none;' accesskey='R' type='button'>". |
|
82 | + _("Check this realm"). |
|
83 | 83 | "</button> |
84 | 84 | <div id='tests_info_area'></div> |
85 | 85 | </td> |
86 | 86 | </tr> |
87 | 87 | <tr id='outer_user_row' class='hidden_row'> |
88 | - <td>" . _("Do you prefer to use a specific outer identity for diagnostics test?") . "</td> |
|
88 | + <td>" . _("Do you prefer to use a specific outer identity for diagnostics test?")."</td> |
|
89 | 89 | <td> <input type='text' name='outer_user' id='outer_user' value=''><span id='outer_user_realm'></span> |
90 | 90 | </tr> |
91 | 91 | <tr class='hidden_row'> |
92 | - <td>" . _("What is the authentication timestamp of the user session in question?") . "</td> |
|
92 | + <td>" . _("What is the authentication timestamp of the user session in question?")."</td> |
|
93 | 93 | <td><input type='text' id='timestamp' name='timestamp'> |
94 | 94 | <div id='datepicker'></div> |
95 | 95 | </td> |
96 | 96 | </tr> |
97 | 97 | <tr class='hidden_row'> |
98 | - <td>" . _("What is the MAC address of the user session in question?") . "</td> |
|
98 | + <td>" . _("What is the MAC address of the user session in question?")."</td> |
|
99 | 99 | <td><input type='text' id='mac' name='mac'></td> |
100 | 100 | </tr> |
101 | 101 | <tr class='hidden_row'> |
102 | - <td>" . _("Additional comments") . "</td> |
|
102 | + <td>" . _("Additional comments")."</td> |
|
103 | 103 | <td><textarea id='freetext' name='freetext' cols='60' rows='5'></textarea></td> |
104 | 104 | </tr> |
105 | 105 | <tr class='hidden_row'> |
106 | - <td>" . _("Please specify an email address on which the IdP can contact you") . "</td> |
|
106 | + <td>" . _("Please specify an email address on which the IdP can contact you")."</td> |
|
107 | 107 | <td><input type='text' id='email' name='email'></td> |
108 | 108 | </tr> |
109 | 109 | <tr> |
@@ -111,82 +111,82 @@ discard block |
||
111 | 111 | <td></td> |
112 | 112 | </tr> |
113 | 113 | <tr class='hidden_row' id='send_query_to_idp'> |
114 | - <td>" . _("Now you can send your query") . "</td> |
|
115 | - <td><button type='submit' class='diag_button' id='submit_idp_query' name='go'>" . _("Send") . "</button></td> |
|
114 | + <td>" . _("Now you can send your query")."</td> |
|
115 | + <td><button type='submit' class='diag_button' id='submit_idp_query' name='go'>" . _("Send")."</button></td> |
|
116 | 116 | </tr> |
117 | 117 | </table>"; |
118 | - $res = $res . $javascript; |
|
118 | + $res = $res.$javascript; |
|
119 | 119 | } |
120 | 120 | if ($queryType == 'idp') { |
121 | 121 | $select = "<div id='idp_reported_problem' style='display:;'> |
122 | 122 | <select style='margin-left:0px;' id='select_idp_problem'>"; |
123 | 123 | foreach ($idp_problem as $pname => $pdesc) { |
124 | - $select = $select . "<option value='$pname'>$pdesc</option>\n"; |
|
124 | + $select = $select."<option value='$pname'>$pdesc</option>\n"; |
|
125 | 125 | } |
126 | - $select = $select . "</select></div>"; |
|
126 | + $select = $select."</select></div>"; |
|
127 | 127 | $res = " |
128 | 128 | <table id='idp_questions'> |
129 | 129 | <tr> |
130 | - <td>" . _("Select your problem") . "</td> |
|
130 | + <td>" . _("Select your problem")."</td> |
|
131 | 131 | <td>$select</td> |
132 | 132 | </tr> |
133 | 133 | <tr> |
134 | - <td>" . _("Identify the SP by one of following means") . "</td> |
|
134 | + <td>"._("Identify the SP by one of following means")."</td> |
|
135 | 135 | <td></td> |
136 | 136 | </tr> |
137 | 137 | <tr id='by_opname'> |
138 | - <td>" . _("SP Operator-Name attribute") . "</td> |
|
138 | + <td>" . _("SP Operator-Name attribute")."</td> |
|
139 | 139 | <td><input type='text' id='opname' name='opname' value=''></td> |
140 | 140 | </tr> |
141 | 141 | <tr id='spmanually'> |
142 | - <td>" . _("Select the SP manually:") . "</td> |
|
142 | + <td>" . _("Select the SP manually:")."</td> |
|
143 | 143 | <td> |
144 | 144 | <div id='select_asp_country'><a href='' id='asp_countries_list'> |
145 | - <span id='opnameselect'>" . _("click to select country and organisation") . "</a></span> |
|
145 | + <span id='opnameselect'>" . _("click to select country and organisation")."</a></span> |
|
146 | 146 | </div> |
147 | 147 | <div id='select_asp_area'></div> |
148 | 148 | </td> |
149 | 149 | </tr> |
150 | 150 | <tr id='asp_desc' style='display: none;'> |
151 | - <td>" . _("or") . ' ' . _("at least describe the SP location") . "</td> |
|
151 | + <td>" . _("or").' '._("at least describe the SP location")."</td> |
|
152 | 152 | <td><input type='text' id='asp_location' name='asp_location' value=''></td> |
153 | 153 | </tr> |
154 | 154 | <tr> |
155 | - <td>" . _("What is the outer ID of the user session in question?") . "</td> |
|
155 | + <td>" . _("What is the outer ID of the user session in question?")."</td> |
|
156 | 156 | <td><input type='text' id='outer_id' name='outer_id' value=''></td> |
157 | 157 | </tr> |
158 | 158 | <tr> |
159 | - <td>" . _("What is the authentication timestamp of the user session in question?") . "</td> |
|
159 | + <td>" . _("What is the authentication timestamp of the user session in question?")."</td> |
|
160 | 160 | <td> |
161 | 161 | <input type='text' id='timestamp' name='timestamp'> |
162 | 162 | <div id='datepicker'></div> |
163 | 163 | </td> |
164 | 164 | </tr> |
165 | 165 | <tr> |
166 | - <td>" . _("What is the MAC address of the user session in question?") . "</td> |
|
166 | + <td>" . _("What is the MAC address of the user session in question?")."</td> |
|
167 | 167 | <td><input type='text' id='mac' name='mac'></td> |
168 | 168 | </tr> |
169 | 169 | <tr> |
170 | - <td>" . _("Additional comments about the problem") . "</td> |
|
170 | + <td>" . _("Additional comments about the problem")."</td> |
|
171 | 171 | <td><textarea id='freetext' name='freetext' cols='60' rows='5'></textarea></td> |
172 | 172 | </tr> |
173 | 173 | <tr> |
174 | - <td>" . _("Do you have any contact details by which the user wishes to be contacted by the SP?") . "</td> |
|
174 | + <td>" . _("Do you have any contact details by which the user wishes to be contacted by the SP?")."</td> |
|
175 | 175 | <td><textarea id='c_details' name='c_details' cols='60' rows='5'></textarea></td> |
176 | 176 | </tr> |
177 | 177 | <tr> |
178 | - <td>" . _("Please specify an email address on which the SP can contact you") . "</td> |
|
178 | + <td>" . _("Please specify an email address on which the SP can contact you")."</td> |
|
179 | 179 | <td><input type='text' id='email' name='email'></td> |
180 | 180 | </tr> |
181 | 181 | <tr class='hidden_row' id='send_query_to_sp'> |
182 | - <td>" . _("Now you can send your query") . "</td> |
|
183 | - <td><button type='submit' class='diag_button' id='submit_sp_query' name='go'>" . _("Send") . "</button></td> |
|
182 | + <td>" . _("Now you can send your query")."</td> |
|
183 | + <td><button type='submit' class='diag_button' id='submit_sp_query' name='go'>" . _("Send")."</button></td> |
|
184 | 184 | </tr> |
185 | 185 | </table>"; |
186 | - $res = $res . $javascript; |
|
186 | + $res = $res.$javascript; |
|
187 | 187 | } |
188 | 188 | if ($queryType == 'idp_send' || $queryType == 'sp_send') { |
189 | - include_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
189 | + include_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
190 | 190 | $cat = new \core\CAT(); |
191 | 191 | $returnArray = array(); |
192 | 192 | if (count((array) $o) > 0) { |
@@ -195,8 +195,8 @@ discard block |
||
195 | 195 | switch ($key) { |
196 | 196 | case 'realm': |
197 | 197 | $pos = strpos($value, '@'); |
198 | - if ($pos !== FALSE ) { |
|
199 | - $value = substr($value, $pos+1); |
|
198 | + if ($pos !== FALSE) { |
|
199 | + $value = substr($value, $pos + 1); |
|
200 | 200 | } |
201 | 201 | case 'email': |
202 | 202 | $returnArray[$key] = filter_var($value, FILTER_VALIDATE_EMAIL); |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | $mail = \core\common\OutsideComm::mailHandle(); |
238 | 238 | $emails = ['[email protected]']; |
239 | 239 | //$emails = explode(',', $returnArray['idpcontact']); |
240 | - $mail->FromName = \config\Master::APPEARANCE['productname'] . " Notification System"; |
|
240 | + $mail->FromName = \config\Master::APPEARANCE['productname']." Notification System"; |
|
241 | 241 | foreach ($emails as $email) { |
242 | 242 | $mail->addAddress($email); |
243 | 243 | } |
@@ -247,11 +247,11 @@ discard block |
||
247 | 247 | } else { |
248 | 248 | $link = 'http://'; |
249 | 249 | } |
250 | - $link .= $_SERVER['SERVER_NAME'] . \core\CAT::getRootUrlPath() . '/diag/show_realmcheck.php?token=' . $returnArray['token']; |
|
250 | + $link .= $_SERVER['SERVER_NAME'].\core\CAT::getRootUrlPath().'/diag/show_realmcheck.php?token='.$returnArray['token']; |
|
251 | 251 | $returnArray['testurl'] = $link; |
252 | 252 | $mail->Subject = _('Suspected a technical problem with the IdP'); |
253 | - $txt = _("We suspect a technical problem with the IdP handling the realm") . ' ' . |
|
254 | - $returnArray['realm'] . ".\n"; |
|
253 | + $txt = _("We suspect a technical problem with the IdP handling the realm").' '. |
|
254 | + $returnArray['realm'].".\n"; |
|
255 | 255 | $txt .= _("The CAT diagnostic test was run for this realm during reporting.\n"); |
256 | 256 | $txt .= _("The overall result was "); |
257 | 257 | if ($returnArray['tests_result'] == 0) { |
@@ -259,15 +259,15 @@ discard block |
||
259 | 259 | } else { |
260 | 260 | $txt .= _("failure"); |
261 | 261 | } |
262 | - $txt .= ".\n" . _("To see details go to "); |
|
262 | + $txt .= ".\n"._("To see details go to "); |
|
263 | 263 | $txt .= "$link\n\n"; |
264 | - $txt .= _("The reported problem details are as follows") . "\n"; |
|
265 | - $txt .= _("timestamp") . ": " . $returnArray['timestamp'] . "\n"; |
|
266 | - $txt .= _("client MAC address") . ": " . $returnArray['mac'] . "\n"; |
|
264 | + $txt .= _("The reported problem details are as follows")."\n"; |
|
265 | + $txt .= _("timestamp").": ".$returnArray['timestamp']."\n"; |
|
266 | + $txt .= _("client MAC address").": ".$returnArray['mac']."\n"; |
|
267 | 267 | if ($returnArray['freetext']) { |
268 | - $txt .= _("additional comments") . ': ' . $returnArray['freetext'] . "\n"; |
|
268 | + $txt .= _("additional comments").': '.$returnArray['freetext']."\n"; |
|
269 | 269 | } |
270 | - $txt .= "\n" . _("You can contact the incident reporter at") . ' ' . $returnArray['email']; |
|
270 | + $txt .= "\n"._("You can contact the incident reporter at").' '.$returnArray['email']; |
|
271 | 271 | |
272 | 272 | $mail->Body = $txt; |
273 | 273 | $sent = $mail->send(); |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | $telepath = new \core\diag\Telepath($givenRealm); |
109 | 109 | $outerUser = $telepath->getOuter(); |
110 | 110 | } |
111 | - $testsuite = new \core\diag\RADIUSTests($givenRealm, $outerUser . '@' . $givenRealm); |
|
111 | + $testsuite = new \core\diag\RADIUSTests($givenRealm, $outerUser.'@'.$givenRealm); |
|
112 | 112 | |
113 | 113 | $naptr = $rfc7585suite->relevantNAPTR(); |
114 | 114 | if ($naptr != \core\diag\RADIUSTests::RETVAL_NOTCONFIGURED && $naptr > 0) { |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | $json_data = json_encode($returnArray); |
207 | 207 | |
208 | 208 | if ($token) { |
209 | - $loggerInstance->debug(4, 'JSON data written to ' .$jsonDir.'/'.$token); |
|
209 | + $loggerInstance->debug(4, 'JSON data written to '.$jsonDir.'/'.$token); |
|
210 | 210 | file_put_contents($jsonDir.'/'.$token.'/realm', $json_data); |
211 | 211 | } |
212 | 212 | header("Content-type: application/json; utf-8"); |
@@ -332,7 +332,7 @@ discard block |
||
332 | 332 | // for now (no OpenRoaming client certs available) only run server-side tests |
333 | 333 | foreach ($listOfIPs as $oneIP) { |
334 | 334 | $connectionResult = $connectionTests->cApathCheck($oneIP); |
335 | - if ($connectionResult != \core\diag\AbstractTest::RETVAL_OK || ( isset($connectionTests->TLS_CA_checks_result['cert_oddity']) && count($connectionTests->TLS_CA_checks_result['cert_oddity']) > 0)) { |
|
335 | + if ($connectionResult != \core\diag\AbstractTest::RETVAL_OK || (isset($connectionTests->TLS_CA_checks_result['cert_oddity']) && count($connectionTests->TLS_CA_checks_result['cert_oddity']) > 0)) { |
|
336 | 336 | $allHostsOkay = FALSE; |
337 | 337 | } else { |
338 | 338 | $oneHostOkay = TRUE; |
@@ -486,7 +486,7 @@ discard block |
||
486 | 486 | // which is different from the outer username we put into installers |
487 | 487 | return $this->getAttributes("internal:checkuser_value")[0]['value']."@".$realm; |
488 | 488 | } |
489 | - if (count($this->getAttributes("internal:use_anon_outer")) > 0 && $this->getAttributes("internal:anon_local_value")[0]['value'] != NULL ) { |
|
489 | + if (count($this->getAttributes("internal:use_anon_outer")) > 0 && $this->getAttributes("internal:anon_local_value")[0]['value'] != NULL) { |
|
490 | 490 | // no special check username, but there is an anon outer ID for |
491 | 491 | // installers - so let's use that one |
492 | 492 | return $this->getAttributes("internal:anon_local_value")[0]['value']."@".$realm; |
@@ -642,7 +642,7 @@ discard block |
||
642 | 642 | } |
643 | 643 | |
644 | 644 | $monthlyList = []; |
645 | - $monthly = $this->frontendHandle->exec("SELECT downloads_user,device_id FROM downloads_history WHERE profile_id=? AND stat_date=DATE_FORMAT(NOW(),'%Y-%m-01')", "i", $this->identifier); |
|
645 | + $monthly = $this->frontendHandle->exec("SELECT downloads_user,device_id FROM downloads_history WHERE profile_id=? AND stat_date=DATE_FORMAT(NOW(),'%Y-%m-01')", "i", $this->identifier); |
|
646 | 646 | while ($statsQuery = mysqli_fetch_object(/** @scrutinizer ignore-type */ $monthly)) { |
647 | 647 | $monthlyList[$statsQuery->device_id] = $statsQuery->downloads_user; |
648 | 648 | } |
@@ -654,7 +654,7 @@ discard block |
||
654 | 654 | } |
655 | 655 | |
656 | 656 | \core\common\Entity::intoThePotatoes(); |
657 | - ksort($finalarray, SORT_STRING|SORT_FLAG_CASE); |
|
657 | + ksort($finalarray, SORT_STRING | SORT_FLAG_CASE); |
|
658 | 658 | \core\common\Entity::outOfThePotatoes(); |
659 | 659 | return $finalarray; |
660 | 660 | } |
@@ -964,7 +964,7 @@ discard block |
||
964 | 964 | $profileStatus = self::CERT_STATUS_NONE; |
965 | 965 | foreach ($rows as $row) { |
966 | 966 | $encodedCert = $row[0]; |
967 | - $tm = $x509->processCertificate(base64_decode($encodedCert))['full_details']['validTo_time_t']- time(); |
|
967 | + $tm = $x509->processCertificate(base64_decode($encodedCert))['full_details']['validTo_time_t'] - time(); |
|
968 | 968 | if ($tm < \config\ConfAssistant::CERT_WARNINGS['expiry_critical']) { |
969 | 969 | $certStatus = self::CERT_STATUS_ERROR; |
970 | 970 | } elseif ($tm < \config\ConfAssistant::CERT_WARNINGS['expiry_warning']) { |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | */ |
27 | 27 | ?> |
28 | 28 | <?php |
29 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
29 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
30 | 30 | |
31 | 31 | $auth = new \web\lib\admin\Authentication(); |
32 | 32 | $deco = new \web\lib\admin\PageDecoration(); |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | $feds = $user->getAttributes("user:fedadmin"); |
71 | 71 | foreach ($feds as $oneFed) { |
72 | 72 | $theFed = new \core\Federation($oneFed['value']); |
73 | - printf("<h2>" . _("Certificate Information for %s %s")."</h2>", $uiElements->nomenclatureFed, $theFed->name); |
|
73 | + printf("<h2>"._("Certificate Information for %s %s")."</h2>", $uiElements->nomenclatureFed, $theFed->name); |
|
74 | 74 | foreach ($theFed->listTlsCertificates() as $oneCert) { |
75 | 75 | if ($oneCert['STATUS'] == "REQUESTED") { |
76 | 76 | $theFed->updateCertificateStatus($oneCert['REQSERIAL']); |
@@ -81,12 +81,12 @@ discard block |
||
81 | 81 | foreach ($theFed->listTlsCertificates() as $oneCert) { // fetch list a second time, in case we got a cert |
82 | 82 | $status = $oneCert['STATUS']; |
83 | 83 | echo "<tr>"; |
84 | - echo "<td>" . $oneCert['REQSERIAL'] . "</td><td>" . $oneCert['DN'] . "</td><td>" . $status . "</td><td>" . $oneCert['EXPIRY'] . "</td>"; |
|
84 | + echo "<td>".$oneCert['REQSERIAL']."</td><td>".$oneCert['DN']."</td><td>".$status."</td><td>".$oneCert['EXPIRY']."</td>"; |
|
85 | 85 | if ($status == "ISSUED") { |
86 | 86 | ?> |
87 | 87 | <td> |
88 | 88 | <form action='inc/showCert.inc.php' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8' method="POST"> |
89 | - <input type="hidden" name="certdata" value="<?php echo $oneCert['CERT'];?>"/> |
|
89 | + <input type="hidden" name="certdata" value="<?php echo $oneCert['CERT']; ?>"/> |
|
90 | 90 | <button type="submit">Display</button> |
91 | 91 | </form> |
92 | 92 | <td> |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | * <base_url>/copyright.php after deploying the software |
21 | 21 | */ |
22 | 22 | |
23 | -require_once dirname(dirname(dirname(__DIR__))) . "/config/_config.php"; |
|
23 | +require_once dirname(dirname(dirname(__DIR__)))."/config/_config.php"; |
|
24 | 24 | |
25 | 25 | $auth = new \web\lib\admin\Authentication(); |
26 | 26 | $auth->authenticate(); |
@@ -102,9 +102,9 @@ discard block |
||
102 | 102 | $idp = $validator->existingIdP($_GET['inst_id']); |
103 | 103 | // editing IdPs is done from within the popup. When we're done, send the |
104 | 104 | // user back to the popup (append the result of the operation later) |
105 | - $redirectDestination = "manageAdmins.inc.php?inst_id=" . $idp->identifier . "&"; |
|
105 | + $redirectDestination = "manageAdmins.inc.php?inst_id=".$idp->identifier."&"; |
|
106 | 106 | if (count($validAddresses) == 0) { |
107 | - header("Location: $redirectDestination" . "invitation=INVALIDSYNTAX"); |
|
107 | + header("Location: $redirectDestination"."invitation=INVALIDSYNTAX"); |
|
108 | 108 | exit(1); |
109 | 109 | } |
110 | 110 | // is the user primary admin of this IdP? |
@@ -113,13 +113,13 @@ discard block |
||
113 | 113 | $fedadmin = $userObject->isFederationAdmin($idp->federation); |
114 | 114 | // check if he is either one, if not, complain |
115 | 115 | if (!$is_owner && !$fedadmin) { |
116 | - 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->nomenclatureParticipant) . "</p>"; |
|
116 | + 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->nomenclatureParticipant)."</p>"; |
|
117 | 117 | exit(1); |
118 | 118 | } |
119 | 119 | |
120 | 120 | $prettyprintname = $idp->name; |
121 | 121 | $newtokens = $mgmt->createTokens($fedadmin, $validAddresses, $idp); |
122 | - $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP " . $idp->identifier . " - Token created for " . implode(",", $validAddresses)); |
|
122 | + $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP ".$idp->identifier." - Token created for ".implode(",", $validAddresses)); |
|
123 | 123 | $introtext = "CO-ADMIN"; |
124 | 124 | $participant_type = $idp->type; |
125 | 125 | break; |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | $participant_type = $validator->partType($_POST['participant_type']); |
136 | 136 | $new_idp_authorized_fedadmin = $userObject->isFederationAdmin($newcountry); |
137 | 137 | if ($new_idp_authorized_fedadmin !== TRUE) { |
138 | - throw new Exception("Something's wrong... you want to create a new " . $uiElements->nomenclatureParticipant . ", but are not a " . $uiElements->nomenclatureFed . " admin for the " . $uiElements->nomenclatureFed . " it should be in!"); |
|
138 | + throw new Exception("Something's wrong... you want to create a new ".$uiElements->nomenclatureParticipant.", but are not a ".$uiElements->nomenclatureFed." admin for the ".$uiElements->nomenclatureFed." it should be in!"); |
|
139 | 139 | } |
140 | 140 | $federation = $validator->existingFederation($newcountry); |
141 | 141 | $prettyprintname = $newinstname; |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | // send the user back to his federation overview page, append the result of the operation later |
144 | 144 | // do the token creation magic |
145 | 145 | $newtokens = $mgmt->createTokens(TRUE, $validAddresses, $newinstname, 0, $newcountry, $participant_type); |
146 | - $loggerInstance->writeAudit($_SESSION['user'], "NEW", "ORG FUTURE - Token created for $participant_type " . implode(",", $validAddresses)); |
|
146 | + $loggerInstance->writeAudit($_SESSION['user'], "NEW", "ORG FUTURE - Token created for $participant_type ".implode(",", $validAddresses)); |
|
147 | 147 | break; |
148 | 148 | case OPERATION_MODE_NEWFROMDB: |
149 | 149 | $redirectDestination = "../overview_federation.php?"; |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | $extinfo = $catInstance->getExternalDBEntityDetails($newexternalid, strtoupper($fedId).'01'); |
158 | 158 | $new_idp_authorized_fedadmin = $userObject->isFederationAdmin($extinfo['country']); |
159 | 159 | if ($new_idp_authorized_fedadmin !== TRUE) { |
160 | - throw new Exception("Something's wrong... you want to create a new " . $uiElements->nomenclatureParticipant . ", but are not a " . $uiElements->nomenclatureFed . " admin for the " . $uiElements->nomenclatureFed . " it should be in!"); |
|
160 | + throw new Exception("Something's wrong... you want to create a new ".$uiElements->nomenclatureParticipant.", but are not a ".$uiElements->nomenclatureFed." admin for the ".$uiElements->nomenclatureFed." it should be in!"); |
|
161 | 161 | } |
162 | 162 | $federation = $validator->existingFederation($extinfo['country']); |
163 | 163 | $newcountry = $extinfo['country']; |
@@ -181,14 +181,14 @@ discard block |
||
181 | 181 | $introtext = "EXISTING-FED"; |
182 | 182 | // do the token creation magic |
183 | 183 | $newtokens = $mgmt->createTokens(TRUE, $validAddresses, $prettyprintname, $newexternalid, $fedId); |
184 | - $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP FUTURE - Token created for " . implode(",", $validAddresses)); |
|
184 | + $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP FUTURE - Token created for ".implode(",", $validAddresses)); |
|
185 | 185 | break; |
186 | 186 | default: // includes OPERATION_MODE_INVALID |
187 | 187 | // second param is TRUE, so the variable *will* contain a string |
188 | 188 | // i.e. ignore Scrutinizer type warning later |
189 | 189 | $wrongcontent = print_r($_POST, TRUE); |
190 | 190 | echo "<pre>Wrong parameters in POST: |
191 | -" . htmlspecialchars(/** @scrutinizer ignore-type */ $wrongcontent) . " |
|
191 | +" . htmlspecialchars(/** @scrutinizer ignore-type */ $wrongcontent)." |
|
192 | 192 | </pre>"; |
193 | 193 | exit(1); |
194 | 194 | } |
@@ -213,14 +213,14 @@ discard block |
||
213 | 213 | } |
214 | 214 | |
215 | 215 | if (count($status) == 0) { |
216 | - header("Location: $redirectDestination" . "invitation=FAILURE"); |
|
216 | + header("Location: $redirectDestination"."invitation=FAILURE"); |
|
217 | 217 | exit; |
218 | 218 | } |
219 | 219 | $finalDestParams = "invitation=SUCCESS"; |
220 | 220 | if (count($status) < count($totalSegments)) { // only a subset of mails was sent, update status |
221 | 221 | $finalDestParams = "invitation=PARTIAL"; |
222 | 222 | } |
223 | -$finalDestParams .= "&successcount=" . count($status); |
|
223 | +$finalDestParams .= "&successcount=".count($status); |
|
224 | 224 | if ($allEncrypted === TRUE) { |
225 | 225 | $finalDestParams .= "&transportsecurity=ENCRYPTED"; |
226 | 226 | } elseif ($allClear === TRUE) { |
@@ -229,4 +229,4 @@ discard block |
||
229 | 229 | $finalDestParams .= "&transportsecurity=PARTIAL"; |
230 | 230 | } |
231 | 231 | |
232 | -header("Location: $redirectDestination" . $finalDestParams); |
|
232 | +header("Location: $redirectDestination".$finalDestParams); |