@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | * <base_url>/copyright.php after deploying the software |
20 | 20 | */ |
21 | 21 | |
22 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
22 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
23 | 23 | |
24 | 24 | $auth = new \web\lib\admin\Authentication(); |
25 | 25 | $deco = new \web\lib\admin\PageDecoration(); |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | $profile = $validator->Profile($_GET['profile_id'], $my_inst->identifier); |
56 | 56 | } else { |
57 | 57 | $profile = $my_inst->newProfile(core\AbstractProfile::PROFILETYPE_RADIUS); |
58 | - $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP " . $my_inst->identifier . " - Profile created"); |
|
58 | + $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP ".$my_inst->identifier." - Profile created"); |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | if (!$profile instanceof \core\ProfileRADIUS) { |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | $uiElements = new web\lib\admin\UIElements(); |
118 | 118 | // set realm info, if submitted |
119 | 119 | if ($realm !== FALSE) { |
120 | - $profile->setRealm($anonLocal . "@" . $realm); |
|
120 | + $profile->setRealm($anonLocal."@".$realm); |
|
121 | 121 | echo $uiElements->boxOkay(sprintf(_("Realm: <strong>%s</strong>"), $realm)); |
122 | 122 | } else { |
123 | 123 | $profile->setRealm(""); |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | echo $uiElements->boxError(_("Realm check username cannot be configured: realm is missing!")); |
141 | 141 | } else { |
142 | 142 | $profile->setRealmcheckUser(true, $checkuser_name); |
143 | - echo $uiElements->boxOkay(sprintf(_("Special username for realm check is <strong>%s</strong>, the value is <strong>%s</strong>"), _("ON"), $checkuser_name . "@" . $realm)); |
|
143 | + echo $uiElements->boxOkay(sprintf(_("Special username for realm check is <strong>%s</strong>, the value is <strong>%s</strong>"), _("ON"), $checkuser_name."@".$realm)); |
|
144 | 144 | } |
145 | 145 | } else { |
146 | 146 | $profile->setRealmCheckUser(false); |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | } else { |
154 | 154 | $profile->setInputVerificationPreference($verify, $hint); |
155 | 155 | if ($hint !== FALSE) { |
156 | - $extratext = " " . sprintf(_("and the input field will be prefilled with '<strong>@%s</strong>'."), $realm); |
|
156 | + $extratext = " ".sprintf(_("and the input field will be prefilled with '<strong>@%s</strong>'."), $realm); |
|
157 | 157 | } else { |
158 | 158 | $extratext = "."; |
159 | 159 | } |
@@ -190,30 +190,30 @@ discard block |
||
190 | 190 | echo $uiElements->boxOkay(_("Redirection is <strong>OFF</strong>")); |
191 | 191 | } |
192 | 192 | |
193 | - $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile " . $profile->identifier . " - attributes changed"); |
|
193 | + $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile ".$profile->identifier." - attributes changed"); |
|
194 | 194 | |
195 | 195 | // re-instantiate $profile, we need to do completion checks and need fresh data for isEapTypeDefinitionComplete() |
196 | 196 | foreach (\core\common\EAP::listKnownEAPTypes() as $a) { |
197 | 197 | if ($a->getIntegerRep() == \core\common\EAP::INTEGER_SILVERBULLET) { // do not allow adding silverbullet via the backdoor |
198 | 198 | continue; |
199 | 199 | } |
200 | - if (isset($_POST[$a->getPrintableRep()]) && isset($_POST[$a->getPrintableRep() . "-priority"]) && is_numeric($_POST[$a->getPrintableRep() . "-priority"])) { |
|
201 | - $priority = (int) $_POST[$a->getPrintableRep() . "-priority"]; |
|
200 | + if (isset($_POST[$a->getPrintableRep()]) && isset($_POST[$a->getPrintableRep()."-priority"]) && is_numeric($_POST[$a->getPrintableRep()."-priority"])) { |
|
201 | + $priority = (int) $_POST[$a->getPrintableRep()."-priority"]; |
|
202 | 202 | // add EAP type to profile as requested, but ... |
203 | 203 | $profile->addSupportedEapMethod($a, $priority); |
204 | - $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile " . $profile->identifier . " - supported EAP types changed"); |
|
204 | + $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile ".$profile->identifier." - supported EAP types changed"); |
|
205 | 205 | // see if we can enable the EAP type, or if info is missing |
206 | 206 | $eapcompleteness = $profile->isEapTypeDefinitionComplete($a); |
207 | 207 | if ($eapcompleteness === true) { |
208 | - echo $uiElements->boxOkay(_("Supported EAP Type: ") . "<strong>" . $a->getPrintableRep() . "</strong>"); |
|
208 | + echo $uiElements->boxOkay(_("Supported EAP Type: ")."<strong>".$a->getPrintableRep()."</strong>"); |
|
209 | 209 | } else { |
210 | 210 | $warntext = ""; |
211 | 211 | if (is_array($eapcompleteness)) { |
212 | 212 | foreach ($eapcompleteness as $item) { |
213 | - $warntext .= "<strong>" . $uiElements->displayName($item) . "</strong> "; |
|
213 | + $warntext .= "<strong>".$uiElements->displayName($item)."</strong> "; |
|
214 | 214 | } |
215 | 215 | } |
216 | - echo $uiElements->boxWarning(sprintf(_("Supported EAP Type: <strong>%s</strong> is missing required information %s !"), $a->getPrintableRep(), $warntext) . "<br/>" . _("The EAP type was added to the profile, but you need to complete the missing information before we can produce installers for you.")); |
|
216 | + echo $uiElements->boxWarning(sprintf(_("Supported EAP Type: <strong>%s</strong> is missing required information %s !"), $a->getPrintableRep(), $warntext)."<br/>"._("The EAP type was added to the profile, but you need to complete the missing information before we can produce installers for you.")); |
|
217 | 217 | } |
218 | 218 | } |
219 | 219 | } |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | <?php |
230 | 230 | if (count($reloadedProfile->getEapMethodsinOrderOfPreference(1)) > 0) { |
231 | 231 | echo "<form method='post' action='overview_installers.php?inst_id=$my_inst->identifier&profile_id=$reloadedProfile->identifier' accept-charset='UTF-8'> |
232 | - <button type='submit'>" . _("Continue to Installer Fine-Tuning and Download") . "</button> |
|
232 | + <button type='submit'>"._("Continue to Installer Fine-Tuning and Download")."</button> |
|
233 | 233 | </form>"; |
234 | 234 | } |
235 | 235 | echo $deco->footer(); |