@@ -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(); |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | switch ($_POST['submitbutton']) { |
| 41 | 41 | case web\lib\common\FormElements::BUTTON_DELETE: |
| 42 | 42 | $myInstOriginal->destroy(); |
| 43 | - $loggerInstance->writeAudit($_SESSION['user'], "DEL", "IdP " . $instId); |
|
| 43 | + $loggerInstance->writeAudit($_SESSION['user'], "DEL", "IdP ".$instId); |
|
| 44 | 44 | header("Location: overview_user.php"); |
| 45 | 45 | exit; |
| 46 | 46 | case web\lib\common\FormElements::BUTTON_FLUSH_AND_RESTART: |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | } |
| 51 | 51 | // flush all IdP attributes and send user to creation wizard |
| 52 | 52 | $myInstOriginal->flushAttributes(); |
| 53 | - $loggerInstance->writeAudit($_SESSION['user'], "DEL", "IdP starting over" . $instId); |
|
| 53 | + $loggerInstance->writeAudit($_SESSION['user'], "DEL", "IdP starting over".$instId); |
|
| 54 | 54 | header("Location: edit_idp.php?inst_id=$instId&wizard=true"); |
| 55 | 55 | exit; |
| 56 | 56 | case web\lib\common\FormElements::BUTTON_SAVE: |
@@ -63,19 +63,19 @@ discard block |
||
| 63 | 63 | exit(0); |
| 64 | 64 | } |
| 65 | 65 | $inst_name = $myInstOriginal->name; |
| 66 | - echo "<h1>" . sprintf(_("Submitted attributes for IdP '%s'"), $inst_name) . "</h1>"; |
|
| 66 | + echo "<h1>".sprintf(_("Submitted attributes for IdP '%s'"), $inst_name)."</h1>"; |
|
| 67 | 67 | echo "<table>"; |
| 68 | 68 | echo $optionParser->processSubmittedFields($myInstOriginal, $_POST, $_FILES); |
| 69 | 69 | echo "</table>"; |
| 70 | 70 | // delete cached logo, if present |
| 71 | - $dir = ROOT . '/web/downloads/logos/'; |
|
| 72 | - $globResult = glob($dir . $myInstOriginal->identifier . "_*.png"); |
|
| 71 | + $dir = ROOT.'/web/downloads/logos/'; |
|
| 72 | + $globResult = glob($dir.$myInstOriginal->identifier."_*.png"); |
|
| 73 | 73 | if ($globResult === FALSE) { // we should catch the improbable error condition |
| 74 | 74 | $globResult = []; |
| 75 | 75 | } |
| 76 | 76 | array_map('unlink', $globResult); |
| 77 | 77 | $loggerInstance->debug(4, "UNLINK from $dir\n"); |
| 78 | - $loggerInstance->writeAudit($_SESSION['user'], "MOD", "IdP " . $myInstOriginal->identifier . " - attributes changed"); |
|
| 78 | + $loggerInstance->writeAudit($_SESSION['user'], "MOD", "IdP ".$myInstOriginal->identifier." - attributes changed"); |
|
| 79 | 79 | |
| 80 | 80 | // re-instantiate ourselves... profiles need fresh data |
| 81 | 81 | |
@@ -85,15 +85,15 @@ discard block |
||
| 85 | 85 | |
| 86 | 86 | if (isset(CONFIG_CONFASSISTANT['CONSORTIUM']['ssid']) && count(CONFIG_CONFASSISTANT['CONSORTIUM']['ssid']) > 0) { |
| 87 | 87 | foreach (CONFIG_CONFASSISTANT['CONSORTIUM']['ssid'] as $ssidname) { |
| 88 | - $ssids[] = $ssidname . " " . (isset(CONFIG_CONFASSISTANT['CONSORTIUM']['tkipsupport']) && CONFIG_CONFASSISTANT['CONSORTIUM']['tkipsupport'] === TRUE ? _("(WPA2/AES and WPA/TKIP)") : _("(WPA2/AES)") ); |
|
| 88 | + $ssids[] = $ssidname." ".(isset(CONFIG_CONFASSISTANT['CONSORTIUM']['tkipsupport']) && CONFIG_CONFASSISTANT['CONSORTIUM']['tkipsupport'] === TRUE ? _("(WPA2/AES and WPA/TKIP)") : _("(WPA2/AES)")); |
|
| 89 | 89 | } |
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | foreach ($myInstReinstantiated->getAttributes("media:SSID_with_legacy") as $ssidname) { |
| 93 | - $ssids[] = $ssidname['value'] . " " . _("(WPA2/AES and WPA/TKIP)"); |
|
| 93 | + $ssids[] = $ssidname['value']." "._("(WPA2/AES and WPA/TKIP)"); |
|
| 94 | 94 | } |
| 95 | 95 | foreach ($myInstReinstantiated->getAttributes("media:SSID") as $ssidname) { |
| 96 | - $ssids[] = $ssidname['value'] . " " . _("(WPA2/AES)"); |
|
| 96 | + $ssids[] = $ssidname['value']." "._("(WPA2/AES)"); |
|
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | echo "<table>"; |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | if (count($ssids) > 0) { |
| 102 | 102 | $printedlist = ""; |
| 103 | 103 | foreach ($ssids as $names) { |
| 104 | - $printedlist = $printedlist . "$names "; |
|
| 104 | + $printedlist = $printedlist."$names "; |
|
| 105 | 105 | } |
| 106 | 106 | echo $uiElements->boxOkay(sprintf(_("Your installers will configure the following SSIDs: <strong>%s</strong>"), $printedlist), _("SSIDs configured")); |
| 107 | 107 | } |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | // did we get an email address? then, show the silverbullet jumpstart button |
| 130 | 130 | // otherwise, issue a smartass comment |
| 131 | 131 | if (count($myInstReinstantiated->getAttributes("support:email")) > 0) { |
| 132 | - echo "<form method='post' action='edit_silverbullet.php?inst_id=$myInstReinstantiated->identifier' accept-charset='UTF-8'><button type='submit'>" . sprintf(_("Continue to %s properties"), \core\ProfileSilverbullet::PRODUCTNAME) . "</button></form>"; |
|
| 132 | + echo "<form method='post' action='edit_silverbullet.php?inst_id=$myInstReinstantiated->identifier' accept-charset='UTF-8'><button type='submit'>".sprintf(_("Continue to %s properties"), \core\ProfileSilverbullet::PRODUCTNAME)."</button></form>"; |
|
| 133 | 133 | } else { |
| 134 | 134 | echo "<table>"; |
| 135 | 135 | 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->nomenclatureInst), _("No support e-mail!")); |
@@ -137,10 +137,10 @@ discard block |
||
| 137 | 137 | } |
| 138 | 138 | } |
| 139 | 139 | if (CONFIG['FUNCTIONALITY_LOCATIONS']['CONFASSISTANT_RADIUS'] == "LOCAL") { |
| 140 | - echo "<br/><form method='post' action='edit_profile.php?inst_id=$myInstReinstantiated->identifier' accept-charset='UTF-8'><button type='submit'>" . _("Continue to RADIUS/EAP profile definition") . "</button></form>"; |
|
| 140 | + echo "<br/><form method='post' action='edit_profile.php?inst_id=$myInstReinstantiated->identifier' accept-charset='UTF-8'><button type='submit'>"._("Continue to RADIUS/EAP profile definition")."</button></form>"; |
|
| 141 | 141 | } |
| 142 | 142 | } |
| 143 | - echo "<br/><form method='post' action='overview_idp.php?inst_id=$myInstReinstantiated->identifier' accept-charset='UTF-8'><button type='submit'>" . _("Continue to dashboard") . "</button></form>"; |
|
| 143 | + echo "<br/><form method='post' action='overview_idp.php?inst_id=$myInstReinstantiated->identifier' accept-charset='UTF-8'><button type='submit'>"._("Continue to dashboard")."</button></form>"; |
|
| 144 | 144 | echo $deco->footer(); |
| 145 | 145 | break; |
| 146 | 146 | default: |
@@ -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(); |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | $profile = $my_profile; |
| 63 | 63 | } else { |
| 64 | 64 | $profile = $my_inst->newProfile(core\AbstractProfile::PROFILETYPE_RADIUS); |
| 65 | - $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP " . $my_inst->identifier . " - Profile created"); |
|
| 65 | + $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP ".$my_inst->identifier." - Profile created"); |
|
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | // extended input checks |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | $uiElements = new web\lib\admin\UIElements(); |
| 129 | 129 | // set realm info, if submitted |
| 130 | 130 | if ($realm !== FALSE) { |
| 131 | - $profile->setRealm($anonLocal . "@" . $realm); |
|
| 131 | + $profile->setRealm($anonLocal."@".$realm); |
|
| 132 | 132 | echo $uiElements->boxOkay(sprintf(_("Realm: <strong>%s</strong>"), $realm)); |
| 133 | 133 | } else { |
| 134 | 134 | $profile->setRealm(""); |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | echo $uiElements->boxError(_("Realm check username cannot be configured: realm is missing!")); |
| 152 | 152 | } else { |
| 153 | 153 | $profile->setRealmcheckUser(true, $checkuser_name); |
| 154 | - echo $uiElements->boxOkay(sprintf(_("Special username for realm check is <strong>%s</strong>, the value is <strong>%s</strong>"), _("ON"), $checkuser_name . "@" . $realm)); |
|
| 154 | + echo $uiElements->boxOkay(sprintf(_("Special username for realm check is <strong>%s</strong>, the value is <strong>%s</strong>"), _("ON"), $checkuser_name."@".$realm)); |
|
| 155 | 155 | } |
| 156 | 156 | } else { |
| 157 | 157 | $profile->setRealmCheckUser(false); |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | } else { |
| 165 | 165 | $profile->setInputVerificationPreference($verify, $hint); |
| 166 | 166 | if ($hint !== FALSE) { |
| 167 | - $extratext = " " . sprintf(_("and the input field will be prefilled with '<strong>@%s</strong>'."), $realm); |
|
| 167 | + $extratext = " ".sprintf(_("and the input field will be prefilled with '<strong>@%s</strong>'."), $realm); |
|
| 168 | 168 | } else { |
| 169 | 169 | $extratext = "."; |
| 170 | 170 | } |
@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | echo $uiElements->boxOkay(_("Redirection is <strong>OFF</strong>")); |
| 202 | 202 | } |
| 203 | 203 | |
| 204 | - $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile " . $profile->identifier . " - attributes changed"); |
|
| 204 | + $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile ".$profile->identifier." - attributes changed"); |
|
| 205 | 205 | |
| 206 | 206 | // re-instantiate $profile, we need to do completion checks and need fresh data for isEapTypeDefinitionComplete() |
| 207 | 207 | |
@@ -214,23 +214,23 @@ discard block |
||
| 214 | 214 | if ($a->getIntegerRep() == \core\common\EAP::INTEGER_SILVERBULLET) { // do not allow adding silverbullet via the backdoor |
| 215 | 215 | continue; |
| 216 | 216 | } |
| 217 | - if (isset($_POST[$a->getPrintableRep()]) && isset($_POST[$a->getPrintableRep() . "-priority"]) && is_numeric($_POST[$a->getPrintableRep() . "-priority"])) { |
|
| 218 | - $priority = (int) $_POST[$a->getPrintableRep() . "-priority"]; |
|
| 217 | + if (isset($_POST[$a->getPrintableRep()]) && isset($_POST[$a->getPrintableRep()."-priority"]) && is_numeric($_POST[$a->getPrintableRep()."-priority"])) { |
|
| 218 | + $priority = (int) $_POST[$a->getPrintableRep()."-priority"]; |
|
| 219 | 219 | // add EAP type to profile as requested, but ... |
| 220 | 220 | $profile->addSupportedEapMethod($a, $priority); |
| 221 | - $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile " . $profile->identifier . " - supported EAP types changed"); |
|
| 221 | + $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile ".$profile->identifier." - supported EAP types changed"); |
|
| 222 | 222 | // see if we can enable the EAP type, or if info is missing |
| 223 | 223 | $eapcompleteness = $profile->isEapTypeDefinitionComplete($a); |
| 224 | 224 | if ($eapcompleteness === true) { |
| 225 | - echo $uiElements->boxOkay(_("Supported EAP Type: ") . "<strong>" . $a->getPrintableRep() . "</strong>"); |
|
| 225 | + echo $uiElements->boxOkay(_("Supported EAP Type: ")."<strong>".$a->getPrintableRep()."</strong>"); |
|
| 226 | 226 | } else { |
| 227 | 227 | $warntext = ""; |
| 228 | 228 | if (is_array($eapcompleteness)) { |
| 229 | 229 | foreach ($eapcompleteness as $item) { |
| 230 | - $warntext .= "<strong>" . $uiElements->displayName($item) . "</strong> "; |
|
| 230 | + $warntext .= "<strong>".$uiElements->displayName($item)."</strong> "; |
|
| 231 | 231 | } |
| 232 | 232 | } |
| 233 | - 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.")); |
|
| 233 | + 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.")); |
|
| 234 | 234 | } |
| 235 | 235 | } |
| 236 | 236 | } |
@@ -246,7 +246,7 @@ discard block |
||
| 246 | 246 | <?php |
| 247 | 247 | if (count($reloadedProfile->getEapMethodsinOrderOfPreference(1)) > 0) { |
| 248 | 248 | echo "<form method='post' action='overview_installers.php?inst_id=$my_inst->identifier&profile_id=$reloadedProfile->identifier' accept-charset='UTF-8'> |
| 249 | - <button type='submit'>" . _("Continue to Installer Fine-Tuning and Download") . "</button> |
|
| 249 | + <button type='submit'>"._("Continue to Installer Fine-Tuning and Download")."</button> |
|
| 250 | 250 | </form>"; |
| 251 | 251 | } |
| 252 | 252 | echo $deco->footer(); |