@@ -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']) { |
@@ -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 | $auth->authenticate(); |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | |
| 36 | 36 | // if we have a pushed close button, submit attributes and send user back to the overview page |
| 37 | 37 | // if external DB sync is disabled globally, the user never gets to this page. If he came here *anyway* -> send him back immediately. |
| 38 | -if ((isset($_POST['submitbutton']) && $_POST['submitbutton'] == web\lib\common\FormElements::BUTTON_CLOSE ) || \config\Master::DB['enforce-external-sync'] == FALSE) { |
|
| 38 | +if ((isset($_POST['submitbutton']) && $_POST['submitbutton'] == web\lib\common\FormElements::BUTTON_CLOSE) || \config\Master::DB['enforce-external-sync'] == FALSE) { |
|
| 39 | 39 | header("Location: ../overview_federation.php"); |
| 40 | 40 | exit; |
| 41 | 41 | } |
@@ -92,9 +92,9 @@ discard block |
||
| 92 | 92 | $cat = new \core\CAT(); |
| 93 | 93 | switch ($my_inst->getExternalDBSyncState()) { |
| 94 | 94 | case \core\IdP::EXTERNAL_DB_SYNCSTATE_SYNCED: |
| 95 | - printf(_("This %s is linked to the %s database."), $uiElements->nomenclatureParticipant, \config\ConfAssistant::CONSORTIUM['display_name']) . "</p>"; |
|
| 96 | - echo "<p>" . sprintf(_("The following information about the IdP is stored in the %s DB and %s DB:"), \config\Master::APPEARANCE['productname'], \config\ConfAssistant::CONSORTIUM['display_name']) . "</p>"; |
|
| 97 | - echo "<table><tr><td>" . sprintf(_("Information in <strong>%s Database</strong>"), \config\Master::APPEARANCE['productname']) . "</td><td>" . sprintf(_("Information in <strong>%s Database</strong>"), \config\ConfAssistant::CONSORTIUM['display_name']) . "</td></tr>"; |
|
| 95 | + printf(_("This %s is linked to the %s database."), $uiElements->nomenclatureParticipant, \config\ConfAssistant::CONSORTIUM['display_name'])."</p>"; |
|
| 96 | + echo "<p>".sprintf(_("The following information about the IdP is stored in the %s DB and %s DB:"), \config\Master::APPEARANCE['productname'], \config\ConfAssistant::CONSORTIUM['display_name'])."</p>"; |
|
| 97 | + echo "<table><tr><td>".sprintf(_("Information in <strong>%s Database</strong>"), \config\Master::APPEARANCE['productname'])."</td><td>".sprintf(_("Information in <strong>%s Database</strong>"), \config\ConfAssistant::CONSORTIUM['display_name'])."</td></tr>"; |
|
| 98 | 98 | echo "<tr><td>"; |
| 99 | 99 | // left-hand side: CAT DB |
| 100 | 100 | echo "<table>"; |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | } else { |
| 107 | 107 | $language = \config\Master::LANGUAGES[$name['lang']]['display'] ?? "(unsupported language)"; |
| 108 | 108 | } |
| 109 | - echo "<tr><td>" . sprintf(_("%s Name (%s)"), $uiElements->nomenclatureParticipant, $language) . "</td><td>" . $name['value'] . "</td></tr>"; |
|
| 109 | + echo "<tr><td>".sprintf(_("%s Name (%s)"), $uiElements->nomenclatureParticipant, $language)."</td><td>".$name['value']."</td></tr>"; |
|
| 110 | 110 | } |
| 111 | 111 | |
| 112 | 112 | $admins = $my_inst->listOwners(); |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | if (count($username) == 0) { |
| 118 | 118 | $username[0]['value'] = _("Unnamed User"); |
| 119 | 119 | } |
| 120 | - echo "<tr><td>" . _("Administrator [invited as]") . "</td><td>" . $username[0]['value'] . " [" . $admin['MAIL'] . "]</td></tr>"; |
|
| 120 | + echo "<tr><td>"._("Administrator [invited as]")."</td><td>".$username[0]['value']." [".$admin['MAIL']."]</td></tr>"; |
|
| 121 | 121 | } |
| 122 | 122 | echo "</table>"; |
| 123 | 123 | // end of left-hand side |
@@ -127,38 +127,38 @@ discard block |
||
| 127 | 127 | $externalid = $extIdObject->external_db_id; |
| 128 | 128 | $ROid = $extIdObject->ROid; |
| 129 | 129 | if (is_bool($extIdObject)) { // we are in SYNCED state so this cannot happen |
| 130 | - throw new Exception("We are in SYNCSTATE_SYNCED but still there is no external DB Id available for the " . $uiElements->nomenclatureParticipant . "!"); |
|
| 130 | + throw new Exception("We are in SYNCSTATE_SYNCED but still there is no external DB Id available for the ".$uiElements->nomenclatureParticipant."!"); |
|
| 131 | 131 | } |
| 132 | 132 | |
| 133 | 133 | $extinfo = $cat->getExternalDBEntityDetails($externalid, $ROid); |
| 134 | 134 | |
| 135 | 135 | echo "<table>"; |
| 136 | 136 | foreach ($extinfo['names'] as $lang => $name) { |
| 137 | - echo "<tr><td>" . sprintf(_("%s Name (%s)"), $uiElements->nomenclatureParticipant, $lang) . "</td><td>$name</td>"; |
|
| 137 | + echo "<tr><td>".sprintf(_("%s Name (%s)"), $uiElements->nomenclatureParticipant, $lang)."</td><td>$name</td>"; |
|
| 138 | 138 | } |
| 139 | 139 | foreach ($extinfo['admins'] as $number => $admin_details) { |
| 140 | - echo "<tr><td>" . _("Administrator email") . "</td><td>" . $admin_details['email'] . "</td></tr>"; |
|
| 140 | + echo "<tr><td>"._("Administrator email")."</td><td>".$admin_details['email']."</td></tr>"; |
|
| 141 | 141 | } |
| 142 | 142 | echo "</table>"; |
| 143 | 143 | // end of right-hand side |
| 144 | 144 | echo "</td></tr></table>"; |
| 145 | - echo "<p>" . _("If this mapping is not correct any more, you can remove the link:") . " "; |
|
| 145 | + echo "<p>"._("If this mapping is not correct any more, you can remove the link:")." "; |
|
| 146 | 146 | echo "<form name='form-unlink-inst' action='inc/manageDBLink.inc.php?inst_id=$my_inst->identifier' method='post' accept-charset='UTF-8'>"; |
| 147 | - echo "<button type='submit' class='delete' name='submitbutton' id='submit' value='" . web\lib\common\FormElements::BUTTON_DELETE . "'>" . _("Unlink") . "</button></form>"; |
|
| 147 | + echo "<button type='submit' class='delete' name='submitbutton' id='submit' value='".web\lib\common\FormElements::BUTTON_DELETE."'>"._("Unlink")."</button></form>"; |
|
| 148 | 148 | break; |
| 149 | 149 | case \core\IdP::EXTERNAL_DB_SYNCSTATE_NOT_SYNCED: |
| 150 | 150 | $temparray = []; |
| 151 | - printf(_("This %s is not yet linked to the %s database."), $uiElements->nomenclatureParticipant, \config\ConfAssistant::CONSORTIUM['display_name']) . " "; |
|
| 152 | - echo "<strong>" . _("This means that its profiles are not made available on the user download page.") . "</strong> "; |
|
| 151 | + printf(_("This %s is not yet linked to the %s database."), $uiElements->nomenclatureParticipant, \config\ConfAssistant::CONSORTIUM['display_name'])." "; |
|
| 152 | + echo "<strong>"._("This means that its profiles are not made available on the user download page.")."</strong> "; |
|
| 153 | 153 | printf(_("You can link it to the %s database below."), \config\ConfAssistant::CONSORTIUM['display_name']); |
| 154 | 154 | $candidates = $my_inst->getExternalDBSyncCandidates($my_inst->type); |
| 155 | 155 | echo "<br/><form name='form-link-inst' action='inc/manageDBLink.inc.php?inst_id=$my_inst->identifier' method='post' accept-charset='UTF-8'>"; |
| 156 | - printf(_("Please select an entity from the %s DB which corresponds to this CAT %s."), \config\ConfAssistant::CONSORTIUM['display_name'], $uiElements->nomenclatureParticipant) . " "; |
|
| 156 | + printf(_("Please select an entity from the %s DB which corresponds to this CAT %s."), \config\ConfAssistant::CONSORTIUM['display_name'], $uiElements->nomenclatureParticipant)." "; |
|
| 157 | 157 | if (count($candidates) > 0) { |
| 158 | 158 | printf(_("Particularly promising entries (names in CAT and %s DB are a 100%% match) are on top of the list."), \config\ConfAssistant::CONSORTIUM['display_name']); |
| 159 | 159 | } |
| 160 | 160 | echo "<table>"; |
| 161 | - echo "<tr><th>" . _("Link to this entity?") . "</th><th>" . sprintf(_("%s Name"), $uiElements->nomenclatureParticipant) . "</th><th>" . _("Administrators") . "</th></tr>"; |
|
| 161 | + echo "<tr><th>"._("Link to this entity?")."</th><th>".sprintf(_("%s Name"), $uiElements->nomenclatureParticipant)."</th><th>"._("Administrators")."</th></tr>"; |
|
| 162 | 162 | |
| 163 | 163 | foreach ($candidates as $candidate) { |
| 164 | 164 | $info = $cat->getExternalDBEntityDetails($candidate, strtoupper($my_inst->federation).'01'); |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | } |
| 169 | 169 | echo "</td><td>"; |
| 170 | 170 | foreach ($info['admins'] as $number => $admin_details) { |
| 171 | - echo "[E-Mail] " . $admin_details['email'] . "<br/>"; |
|
| 171 | + echo "[E-Mail] ".$admin_details['email']."<br/>"; |
|
| 172 | 172 | } |
| 173 | 173 | echo "</td></tr>"; |
| 174 | 174 | $temparray[] = $candidate; |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | $buffer = ""; |
| 181 | 181 | |
| 182 | 182 | foreach ($unmappedentities as $v) { |
| 183 | - $buffer .= "<option value='" . $v['ID'] . "'>[ID " . $v['ID'] . "] " . $v['name'] . "</option>"; |
|
| 183 | + $buffer .= "<option value='".$v['ID']."'>[ID ".$v['ID']."] ".$v['name']."</option>"; |
|
| 184 | 184 | } |
| 185 | 185 | |
| 186 | 186 | if ($buffer != "") { |
@@ -191,9 +191,9 @@ discard block |
||
| 191 | 191 | } |
| 192 | 192 | // issue a big red warning if there are no link candidates at all in the federation |
| 193 | 193 | if (empty($buffer) && empty($candidates)) { |
| 194 | - echo "<tr><td style='color:#ff0000' colspan='2'>" . sprintf(_('There is no single unmapped %s in the external database for this %s!'), $uiElements->nomenclatureParticipant, $uiElements->nomenclatureFed) . "</td></tr>"; |
|
| 194 | + echo "<tr><td style='color:#ff0000' colspan='2'>".sprintf(_('There is no single unmapped %s in the external database for this %s!'), $uiElements->nomenclatureParticipant, $uiElements->nomenclatureFed)."</td></tr>"; |
|
| 195 | 195 | } |
| 196 | - echo "</table><button type='submit' name='submitbutton' id='submit' value='" . web\lib\common\FormElements::BUTTON_SAVE . "' disabled >" . _("Create Link") . "</button></form>"; |
|
| 196 | + echo "</table><button type='submit' name='submitbutton' id='submit' value='".web\lib\common\FormElements::BUTTON_SAVE."' disabled >"._("Create Link")."</button></form>"; |
|
| 197 | 197 | break; |
| 198 | 198 | default: |
| 199 | 199 | } |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | private function inputValidationError($customtext) |
| 41 | 41 | { |
| 42 | 42 | \core\common\Entity::intoThePotatoes(); |
| 43 | - $retval = "<p>" . _("Input validation error: ") . $customtext . "</p>"; |
|
| 43 | + $retval = "<p>"._("Input validation error: ").$customtext."</p>"; |
|
| 44 | 44 | \core\common\Entity::outOfThePotatoes(); |
| 45 | 45 | return $retval; |
| 46 | 46 | } |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | $postFed = $fedIdentifiers[$correctIndex]; |
| 98 | 98 | $temp = new \core\Federation($postFed); |
| 99 | 99 | if ($owner === NULL) { |
| 100 | - return [$temp,'readonly']; |
|
| 100 | + return [$temp, 'readonly']; |
|
| 101 | 101 | } |
| 102 | 102 | $user = new \core\User($owner); |
| 103 | 103 | foreach ($temp->listFederationAdmins() as $oneowner) { |
@@ -105,9 +105,9 @@ discard block |
||
| 105 | 105 | return [$temp, 'fullaccess']; |
| 106 | 106 | } |
| 107 | 107 | } |
| 108 | - if ($user->isSuperadmin()|| $user->isSupport()) { |
|
| 108 | + if ($user->isSuperadmin() || $user->isSupport()) { |
|
| 109 | 109 | $this->loggerInstance->debug(4, "You are the superadmin/support\n"); |
| 110 | - return [$temp,'readonly']; |
|
| 110 | + return [$temp, 'readonly']; |
|
| 111 | 111 | } |
| 112 | 112 | throw new Exception($this->inputValidationError(sprintf("User is not %s administrator!", \core\common\Entity::$nomenclature_fed))); |
| 113 | 113 | } |
@@ -168,18 +168,18 @@ discard block |
||
| 168 | 168 | } |
| 169 | 169 | if ($user->isFederationAdmin($temp->federation)) { |
| 170 | 170 | $this->loggerInstance->debug(4, "You are fed admin for this IdP\n"); |
| 171 | - return [$temp,'readonly']; |
|
| 171 | + return [$temp, 'readonly']; |
|
| 172 | 172 | } |
| 173 | 173 | if ($user->isSuperadmin() || $user->isSupport()) { |
| 174 | 174 | $this->loggerInstance->debug(4, "You are the superadmin/support\n"); |
| 175 | - return [$temp,'readonly']; |
|
| 175 | + return [$temp, 'readonly']; |
|
| 176 | 176 | } |
| 177 | 177 | throw new Exception($this->inputValidationError("This IdP identifier is not accessible!")); |
| 178 | 178 | } |
| 179 | 179 | if ($claimedFedBinding !== NULL && strtoupper($temp->federation) != strtoupper($claimedFedBinding->tld)) { |
| 180 | 180 | throw new Exception($this->inputValidationError("This IdP does not belong to the claimed federation!")); |
| 181 | 181 | } |
| 182 | - return [$temp,'nouser']; |
|
| 182 | + return [$temp, 'nouser']; |
|
| 183 | 183 | } |
| 184 | 184 | |
| 185 | 185 | /** |
@@ -257,7 +257,7 @@ discard block |
||
| 257 | 257 | * @throws Exception |
| 258 | 258 | */ |
| 259 | 259 | public function existingExtInstitution($extId, $userEmail = NULL, $ROid = NULL) { |
| 260 | - if ($ROid === NULL || !preg_match('/^[A-Z][A-Z]01$/', $ROid) ) { |
|
| 260 | + if ($ROid === NULL || !preg_match('/^[A-Z][A-Z]01$/', $ROid)) { |
|
| 261 | 261 | throw new Exception("$ROid: No correct federation identifier profided"); |
| 262 | 262 | } |
| 263 | 263 | if ($userEmail === NULL) { |
@@ -645,7 +645,7 @@ discard block |
||
| 645 | 645 | try { |
| 646 | 646 | $image->readImageBlob($binary); |
| 647 | 647 | } catch (\ImagickException $exception) { |
| 648 | - echo "Error" . $exception->getMessage(); |
|
| 648 | + echo "Error".$exception->getMessage(); |
|
| 649 | 649 | return FALSE; |
| 650 | 650 | } |
| 651 | 651 | // image survived the sanity check |