@@ -150,7 +150,6 @@ discard block |
||
| 150 | 150 | * mails, just configure the signing cert with these parameters. All must |
| 151 | 151 | * be non-NULL for signing to happen. If you don't need a keypass, make |
| 152 | 152 | * it an empty string instead. |
| 153 | - |
|
| 154 | 153 | * @var array |
| 155 | 154 | */ |
| 156 | 155 | const MAILSETTINGS = [// we always use Submission |
@@ -163,8 +162,8 @@ discard block |
||
| 163 | 162 | 'keyfilename' => NULL, |
| 164 | 163 | 'keypass' => NULL, |
| 165 | 164 | 'notify_nro' => false, // normally should be set to TRUE abd causes |
| 166 | - // notifications being sent to NRO admins when |
|
| 167 | - // important changes are made |
|
| 165 | + // notifications being sent to NRO admins when |
|
| 166 | + // important changes are made |
|
| 168 | 167 | ]; |
| 169 | 168 | /** |
| 170 | 169 | * List of all supported languages in CAT. Comment some if you want to disable them |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | echo $deco->pageheader(sprintf(_("%s: Edit Profile - Result"), \config\Master::APPEARANCE['productname']), "ADMIN-IDP"); |
| 54 | 54 | } else { |
| 55 | 55 | $profile = $my_inst->newProfile(core\AbstractProfile::PROFILETYPE_RADIUS); |
| 56 | - $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP ". $my_inst->identifier." - Profile created"); |
|
| 56 | + $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP ".$my_inst->identifier." - Profile created"); |
|
| 57 | 57 | echo $deco->pageheader(sprintf(_("%s: Profile wizard (step 3 completed)"), \config\Master::APPEARANCE['productname']), "ADMIN-IDP"); |
| 58 | 58 | } |
| 59 | 59 | if (!$profile instanceof \core\ProfileRADIUS) { |
@@ -63,9 +63,9 @@ discard block |
||
| 63 | 63 | $realm = FALSE; |
| 64 | 64 | $anon_support = FALSE; |
| 65 | 65 | $attributes = $profile->getAttributes(); |
| 66 | - $anonLocal = \core\common\Entity::getAttributeValue($attributes, "internal:anon_local_value", 0) ?? "anonymous"; |
|
| 66 | + $anonLocal = \core\common\Entity::getAttributeValue($attributes, "internal:anon_local_value", 0) ?? "anonymous"; |
|
| 67 | 67 | $checkuser_support = FALSE; |
| 68 | - $checkuser_local = \core\common\Entity::getAttributeValue($attributes, "internal:checkuser_value", 0) ?? "anonymous"; |
|
| 68 | + $checkuser_local = \core\common\Entity::getAttributeValue($attributes, "internal:checkuser_value", 0) ?? "anonymous"; |
|
| 69 | 69 | $verify_support = FALSE; |
| 70 | 70 | $hint_support = FALSE; |
| 71 | 71 | $redirect = FALSE; |
@@ -303,7 +303,7 @@ discard block |
||
| 303 | 303 | // for now (no OpenRoaming client certs available) only run server-side tests |
| 304 | 304 | foreach ($listOfIPs as $oneIP) { |
| 305 | 305 | $connectionResult = $connectionTests->cApathCheck($oneIP); |
| 306 | - if ($connectionResult != core\diag\AbstractTest::RETVAL_OK || ( isset($connectionTests->TLS_CA_checks_result['cert_oddity']) && count($connectionTests->TLS_CA_checks_result['cert_oddity']) > 0)) { |
|
| 306 | + if ($connectionResult != core\diag\AbstractTest::RETVAL_OK || (isset($connectionTests->TLS_CA_checks_result['cert_oddity']) && count($connectionTests->TLS_CA_checks_result['cert_oddity']) > 0)) { |
|
| 307 | 307 | $allHostsOkay = FALSE; |
| 308 | 308 | } else { |
| 309 | 309 | $oneHostOkay = TRUE; |
@@ -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(__FILE__))) . "/config/_config.php"; |
|
| 23 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
| 24 | 24 | |
| 25 | 25 | $auth = new \web\lib\admin\Authentication(); |
| 26 | 26 | $loggerInstance = new \core\common\Logging(); |
@@ -33,15 +33,15 @@ discard block |
||
| 33 | 33 | $myInstOriginal = $validator->existingIdP($_GET['inst_id'], $_SESSION['user']); |
| 34 | 34 | $instId = $myInstOriginal->identifier; |
| 35 | 35 | |
| 36 | -$hello = _("To whom it may concern,") . "\n\n"; |
|
| 37 | -$bye = _("This mail is merely a cross-check because these changes can be security-relevant. If the change was expected, you do not need to take any action.") . "\n\n" . |
|
| 38 | - _("Greetings, ") . "\n\n" . |
|
| 36 | +$hello = _("To whom it may concern,")."\n\n"; |
|
| 37 | +$bye = _("This mail is merely a cross-check because these changes can be security-relevant. If the change was expected, you do not need to take any action.")."\n\n". |
|
| 38 | + _("Greetings, ")."\n\n". |
|
| 39 | 39 | \config\Master::APPEARANCE['productname_long']; |
| 40 | 40 | |
| 41 | 41 | switch ($_POST['submitbutton']) { |
| 42 | 42 | case web\lib\common\FormElements::BUTTON_DELETE: |
| 43 | 43 | $myInstOriginal->destroy(); |
| 44 | - $loggerInstance->writeAudit($_SESSION['user'], "DEL", "IdP " . $instId); |
|
| 44 | + $loggerInstance->writeAudit($_SESSION['user'], "DEL", "IdP ".$instId); |
|
| 45 | 45 | header("Location: overview_user.php"); |
| 46 | 46 | exit; |
| 47 | 47 | case web\lib\common\FormElements::BUTTON_FLUSH_AND_RESTART: |
@@ -51,9 +51,9 @@ discard block |
||
| 51 | 51 | } |
| 52 | 52 | // flush all IdP attributes and send user to creation wizard |
| 53 | 53 | $myInstOriginal->flushAttributes(); |
| 54 | - $loggerInstance->writeAudit($_SESSION['user'], "DEL", "IdP starting over" . $instId); |
|
| 55 | - $text = $hello . |
|
| 56 | - sprintf(_("the %s %s / %s / (previously known as) '%s' has deleted all properties and is starting over freshly. This means that its not recognisable by its name any more, and it may assume a different name in the future. You will get another mail if and when the name change happens."), $ui->nomenclatureParticipant, strtoupper($myInstOriginal->federation), $myInstOriginal->identifier, $myInstOriginal->name) . "\n\n" . |
|
| 54 | + $loggerInstance->writeAudit($_SESSION['user'], "DEL", "IdP starting over".$instId); |
|
| 55 | + $text = $hello. |
|
| 56 | + sprintf(_("the %s %s / %s / (previously known as) '%s' has deleted all properties and is starting over freshly. This means that its not recognisable by its name any more, and it may assume a different name in the future. You will get another mail if and when the name change happens."), $ui->nomenclatureParticipant, strtoupper($myInstOriginal->federation), $myInstOriginal->identifier, $myInstOriginal->name)."\n\n". |
|
| 57 | 57 | $bye; |
| 58 | 58 | $fed = new core\Federation($myInstOriginal->federation); |
| 59 | 59 | if (\config\Master::MAILSETTINGS['notify_nro']) { |
@@ -74,19 +74,19 @@ discard block |
||
| 74 | 74 | exit(0); |
| 75 | 75 | } |
| 76 | 76 | $inst_name = $myInstOriginal->name; |
| 77 | - echo "<h1>" . sprintf(_("Submitted attributes for IdP '%s'"), $inst_name) . "</h1>"; |
|
| 77 | + echo "<h1>".sprintf(_("Submitted attributes for IdP '%s'"), $inst_name)."</h1>"; |
|
| 78 | 78 | echo "<table>"; |
| 79 | 79 | echo $optionParser->processSubmittedFields($myInstOriginal, $_POST, $_FILES); |
| 80 | 80 | echo "</table>"; |
| 81 | 81 | // delete cached logo, if present |
| 82 | - $dir = ROOT . '/web/downloads/logos/'; |
|
| 83 | - $globResult = glob($dir . $myInstOriginal->identifier . "_*.png"); |
|
| 82 | + $dir = ROOT.'/web/downloads/logos/'; |
|
| 83 | + $globResult = glob($dir.$myInstOriginal->identifier."_*.png"); |
|
| 84 | 84 | if ($globResult === FALSE) { // we should catch the improbable error condition |
| 85 | 85 | $globResult = []; |
| 86 | 86 | } |
| 87 | 87 | array_map('unlink', $globResult); |
| 88 | 88 | $loggerInstance->debug(4, "UNLINK from $dir\n"); |
| 89 | - $loggerInstance->writeAudit($_SESSION['user'], "MOD", "IdP " . $myInstOriginal->identifier . " - attributes changed"); |
|
| 89 | + $loggerInstance->writeAudit($_SESSION['user'], "MOD", "IdP ".$myInstOriginal->identifier." - attributes changed"); |
|
| 90 | 90 | |
| 91 | 91 | // re-instantiate ourselves... profiles need fresh data |
| 92 | 92 | $myInstReinstantiated = $validator->existingIdP($_GET['inst_id'], $_SESSION['user']); |
@@ -95,10 +95,10 @@ discard block |
||
| 95 | 95 | if (count($significantChanges) > 0) { |
| 96 | 96 | // send a notification/alert mail to someone we know is in charge |
| 97 | 97 | /// were made to the *Identity Provider* *LU* / integer number of IdP / (previously known as) Name |
| 98 | - $text = $hello . sprintf(_("significant changes were made to the %s %s / %s / (previously known as) '%s'."), $ui->nomenclatureParticipant, strtoupper($myInstOriginal->federation), $myInstOriginal->identifier, $myInstOriginal->name) . "\n\n"; |
|
| 98 | + $text = $hello.sprintf(_("significant changes were made to the %s %s / %s / (previously known as) '%s'."), $ui->nomenclatureParticipant, strtoupper($myInstOriginal->federation), $myInstOriginal->identifier, $myInstOriginal->name)."\n\n"; |
|
| 99 | 99 | if (isset($significantChanges[\core\IdP::INSTNAME_CHANGED])) { |
| 100 | - $text .= sprintf(_("The %s has changed its name. The details are below:"), $ui->nomenclatureParticipant) . "\n\n"; |
|
| 101 | - $text .= $significantChanges[\core\IdP::INSTNAME_CHANGED] . "\n\n"; |
|
| 100 | + $text .= sprintf(_("The %s has changed its name. The details are below:"), $ui->nomenclatureParticipant)."\n\n"; |
|
| 101 | + $text .= $significantChanges[\core\IdP::INSTNAME_CHANGED]."\n\n"; |
|
| 102 | 102 | } |
| 103 | 103 | $text .= $bye; |
| 104 | 104 | // (currently, send hard-wired to NRO - future: for linked insts, check eduroam DBv2 and send to registered admins directly) |
@@ -116,12 +116,12 @@ discard block |
||
| 116 | 116 | |
| 117 | 117 | if (isset(\config\ConfAssistant::CONSORTIUM['ssid']) && count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0) { |
| 118 | 118 | foreach (\config\ConfAssistant::CONSORTIUM['ssid'] as $ssidname) { |
| 119 | - $ssids[] = $ssidname . " " . _("(WPA2/AES)"); |
|
| 119 | + $ssids[] = $ssidname." "._("(WPA2/AES)"); |
|
| 120 | 120 | } |
| 121 | 121 | } |
| 122 | 122 | |
| 123 | 123 | foreach ($myInstReinstantiated->getAttributes("media:SSID") as $ssidname) { |
| 124 | - $ssids[] = $ssidname['value'] . " " . _("(WPA2/AES)"); |
|
| 124 | + $ssids[] = $ssidname['value']." "._("(WPA2/AES)"); |
|
| 125 | 125 | } |
| 126 | 126 | |
| 127 | 127 | echo "<table>"; |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | if (count($ssids) > 0) { |
| 130 | 130 | $printedlist = ""; |
| 131 | 131 | foreach ($ssids as $names) { |
| 132 | - $printedlist = $printedlist . "$names "; |
|
| 132 | + $printedlist = $printedlist."$names "; |
|
| 133 | 133 | } |
| 134 | 134 | echo $uiElements->boxOkay(sprintf(_("Your installers will configure the following SSIDs: <strong>%s</strong>"), $printedlist), _("SSIDs configured")); |
| 135 | 135 | } |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | $myfed = new \core\Federation($myInstReinstantiated->federation); |
| 151 | 151 | $allow_sb = $myfed->getAttributes("fed:silverbullet"); |
| 152 | 152 | // only show IdP parts if fed has enabled hosted services && participant is an SP-type |
| 153 | - if (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_SILVERBULLET'] == "LOCAL" && count($allow_sb) > 0 && preg_match("/IdP/", $myInstReinstantiated->type) ) { |
|
| 153 | + if (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_SILVERBULLET'] == "LOCAL" && count($allow_sb) > 0 && preg_match("/IdP/", $myInstReinstantiated->type)) { |
|
| 154 | 154 | // show the new profile jumpstart buttons only if we do not have any profile at all |
| 155 | 155 | if (count($myInstReinstantiated->listProfiles()) == 0) { |
| 156 | 156 | |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | // did we get an email address? then, show the silverbullet jumpstart button |
| 159 | 159 | // otherwise, issue a smartass comment |
| 160 | 160 | if (count($myInstReinstantiated->getAttributes("support:email")) > 0) { |
| 161 | - echo "<form method='post' action='edit_silverbullet.php?inst_id=$instId' accept-charset='UTF-8'><button type='submit'>" . sprintf(_("Continue to %s properties"), \core\ProfileSilverbullet::PRODUCTNAME) . "</button></form>"; |
|
| 161 | + echo "<form method='post' action='edit_silverbullet.php?inst_id=$instId' accept-charset='UTF-8'><button type='submit'>".sprintf(_("Continue to %s properties"), \core\ProfileSilverbullet::PRODUCTNAME)."</button></form>"; |
|
| 162 | 162 | } else { |
| 163 | 163 | echo "<table>"; |
| 164 | 164 | echo $uiElements->boxError(sprintf(_("You did not submit an e-mail address. This is required for %s. Please go to the %s dashboard and edit your helpdesk settings to include a helpdesk e-mail address."), core\ProfileSilverbullet::PRODUCTNAME, $ui->nomenclatureParticipant), _("No support e-mail!")); |
@@ -166,11 +166,11 @@ discard block |
||
| 166 | 166 | } |
| 167 | 167 | |
| 168 | 168 | if (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_RADIUS'] == "LOCAL") { |
| 169 | - echo "<br/><form method='post' action='edit_profile.php?inst_id=$instId' accept-charset='UTF-8'><button type='submit'>" . _("Continue to RADIUS/EAP profile definition") . "</button></form>"; |
|
| 169 | + echo "<br/><form method='post' action='edit_profile.php?inst_id=$instId' accept-charset='UTF-8'><button type='submit'>"._("Continue to RADIUS/EAP profile definition")."</button></form>"; |
|
| 170 | 170 | } |
| 171 | 171 | } |
| 172 | 172 | } |
| 173 | - echo "<br/><form method='post' action='overview_org.php?inst_id=$instId' accept-charset='UTF-8'><button type='submit'>" . _("Continue to dashboard") . "</button></form>"; |
|
| 173 | + echo "<br/><form method='post' action='overview_org.php?inst_id=$instId' accept-charset='UTF-8'><button type='submit'>"._("Continue to dashboard")."</button></form>"; |
|
| 174 | 174 | |
| 175 | 175 | break; |
| 176 | 176 | default: |