@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | case "core\User": |
| 140 | 140 | return $this->userName; |
| 141 | 141 | default: |
| 142 | - throw new Exception("Operating on a class where we don't know the relevant identifier in the DB - " . get_class($this) . "!"); |
|
| 142 | + throw new Exception("Operating on a class where we don't know the relevant identifier in the DB - ".get_class($this)."!"); |
|
| 143 | 143 | } |
| 144 | 144 | } |
| 145 | 145 | |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | */ |
| 178 | 178 | public function beginFlushAttributes($extracondition = "") |
| 179 | 179 | { |
| 180 | - $quotedIdentifier = (!is_int($this->getRelevantIdentifier()) ? "\"" : "") . $this->getRelevantIdentifier() . (!is_int($this->getRelevantIdentifier()) ? "\"" : ""); |
|
| 180 | + $quotedIdentifier = (!is_int($this->getRelevantIdentifier()) ? "\"" : "").$this->getRelevantIdentifier().(!is_int($this->getRelevantIdentifier()) ? "\"" : ""); |
|
| 181 | 181 | $this->databaseHandle->exec("DELETE FROM $this->entityOptionTable WHERE $this->entityIdColumn = $quotedIdentifier AND option_name NOT LIKE '%_file' $extracondition"); |
| 182 | 182 | $this->updateFreshness(); |
| 183 | 183 | $execFlush = $this->databaseHandle->exec("SELECT row_id FROM $this->entityOptionTable WHERE $this->entityIdColumn = $quotedIdentifier $extracondition"); |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | */ |
| 198 | 198 | public function commitFlushAttributes(array $tobedeleted) |
| 199 | 199 | { |
| 200 | - $quotedIdentifier = (!is_int($this->getRelevantIdentifier()) ? "\"" : "") . $this->getRelevantIdentifier() . (!is_int($this->getRelevantIdentifier()) ? "\"" : ""); |
|
| 200 | + $quotedIdentifier = (!is_int($this->getRelevantIdentifier()) ? "\"" : "").$this->getRelevantIdentifier().(!is_int($this->getRelevantIdentifier()) ? "\"" : ""); |
|
| 201 | 201 | foreach (array_keys($tobedeleted) as $row_id) { |
| 202 | 202 | $this->databaseHandle->exec("DELETE FROM $this->entityOptionTable WHERE $this->entityIdColumn = $quotedIdentifier AND row_id = $row_id"); |
| 203 | 203 | $this->updateFreshness(); |
@@ -226,7 +226,7 @@ discard block |
||
| 226 | 226 | { |
| 227 | 227 | $relevantId = $this->getRelevantIdentifier(); |
| 228 | 228 | $identifierType = (is_int($relevantId) ? "i" : "s"); |
| 229 | - $this->databaseHandle->exec("INSERT INTO $this->entityOptionTable ($this->entityIdColumn, option_name, option_lang, option_value) VALUES(?,?,?,?)", $identifierType . "sss", $relevantId, $attrName, $attrLang, $attrValue); |
|
| 229 | + $this->databaseHandle->exec("INSERT INTO $this->entityOptionTable ($this->entityIdColumn, option_name, option_lang, option_value) VALUES(?,?,?,?)", $identifierType."sss", $relevantId, $attrName, $attrLang, $attrValue); |
|
| 230 | 230 | $this->updateFreshness(); |
| 231 | 231 | } |
| 232 | 232 | |
@@ -105,9 +105,9 @@ discard block |
||
| 105 | 105 | |
| 106 | 106 | $attributesLowLevel = array_merge($this->deviceLevelAttributes, $this->eapLevelAttributes); |
| 107 | 107 | |
| 108 | - $this->loggerInstance->debug(5, "Device-Level Attributes: " . /** @scrutinizer ignore-type */ print_r($this->deviceLevelAttributes, true)); |
|
| 109 | - $this->loggerInstance->debug(5, "EAP-Level Attributes: " . /** @scrutinizer ignore-type */ print_r($this->eapLevelAttributes, true)); |
|
| 110 | - $this->loggerInstance->debug(5, "All low-Level Attributes: " . /** @scrutinizer ignore-type */ print_r($attributesLowLevel, true)); |
|
| 108 | + $this->loggerInstance->debug(5, "Device-Level Attributes: "./** @scrutinizer ignore-type */ print_r($this->deviceLevelAttributes, true)); |
|
| 109 | + $this->loggerInstance->debug(5, "EAP-Level Attributes: "./** @scrutinizer ignore-type */ print_r($this->eapLevelAttributes, true)); |
|
| 110 | + $this->loggerInstance->debug(5, "All low-Level Attributes: "./** @scrutinizer ignore-type */ print_r($attributesLowLevel, true)); |
|
| 111 | 111 | |
| 112 | 112 | // now fetch and merge profile-level attributes if not already set on deeper level |
| 113 | 113 | |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | } |
| 138 | 138 | } |
| 139 | 139 | |
| 140 | - $this->loggerInstance->debug(5, "Merged Attributes: " . /** @scrutinizer ignore-type */ print_r($attributesLowLevel, true)); |
|
| 140 | + $this->loggerInstance->debug(5, "Merged Attributes: "./** @scrutinizer ignore-type */ print_r($attributesLowLevel, true)); |
|
| 141 | 141 | |
| 142 | 142 | // now, fetch and merge IdP-wide attributes |
| 143 | 143 | |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | // add the internal attribute to that effect |
| 153 | 153 | |
| 154 | 154 | if (isset($this->attributes['media:openroaming_always'])) { |
| 155 | - $this->attributes = array_merge($this->attributes, $this->addInternalAttributes([ "internal:openroaming" => TRUE ] )); |
|
| 155 | + $this->attributes = array_merge($this->attributes, $this->addInternalAttributes(["internal:openroaming" => TRUE])); |
|
| 156 | 156 | } |
| 157 | 157 | |
| 158 | 158 | $this->loggerInstance->debug(3, "--- END Constructing new Profile object ... ---\n"); |
@@ -200,7 +200,7 @@ discard block |
||
| 200 | 200 | "row_id" => $attributeQuery->row_id, |
| 201 | 201 | "flag" => $optinfo['flag'], |
| 202 | 202 | "device" => ($devicesOrEAPMethods == "DEVICES" ? $attributeQuery->deviceormethod : NULL), |
| 203 | - "eapmethod" => ($devicesOrEAPMethods == "DEVICES" ? 0 : (new \core\common\EAP($attributeQuery->deviceormethod))->getArrayRep() )]; |
|
| 203 | + "eapmethod" => ($devicesOrEAPMethods == "DEVICES" ? 0 : (new \core\common\EAP($attributeQuery->deviceormethod))->getArrayRep())]; |
|
| 204 | 204 | } |
| 205 | 205 | return $temparray; |
| 206 | 206 | } |
@@ -309,7 +309,7 @@ discard block |
||
| 309 | 309 | */ |
| 310 | 310 | public function setAnonymousIDSupport($shallwe) |
| 311 | 311 | { |
| 312 | - $this->databaseHandle->exec("UPDATE profile SET use_anon_outer = " . ($shallwe === true ? "1" : "0") . " WHERE profile_id = $this->identifier"); |
|
| 312 | + $this->databaseHandle->exec("UPDATE profile SET use_anon_outer = ".($shallwe === true ? "1" : "0")." WHERE profile_id = $this->identifier"); |
|
| 313 | 313 | } |
| 314 | 314 | |
| 315 | 315 | /** Toggle special username for realm checks |
@@ -319,7 +319,7 @@ discard block |
||
| 319 | 319 | * @return void |
| 320 | 320 | */ |
| 321 | 321 | public function setRealmCheckUser($shallwe, $localpart = NULL) { |
| 322 | - $this->databaseHandle->exec("UPDATE profile SET checkuser_outer = " . ($shallwe === true ? "1" : "0") . " WHERE profile_id = $this->identifier"); |
|
| 322 | + $this->databaseHandle->exec("UPDATE profile SET checkuser_outer = ".($shallwe === true ? "1" : "0")." WHERE profile_id = $this->identifier"); |
|
| 323 | 323 | if ($localpart !== NULL) { |
| 324 | 324 | $this->databaseHandle->exec("UPDATE profile SET checkuser_value = ? WHERE profile_id = $this->identifier", "s", $localpart); |
| 325 | 325 | } |
@@ -334,8 +334,8 @@ discard block |
||
| 334 | 334 | */ |
| 335 | 335 | public function setInputVerificationPreference($verify, $hint) |
| 336 | 336 | { |
| 337 | - $this->databaseHandle->exec("UPDATE profile SET verify_userinput_suffix = " . ($verify === true ? "1" : "0") . |
|
| 338 | - ", hint_userinput_suffix = " . ($hint === true ? "1" : "0") . |
|
| 337 | + $this->databaseHandle->exec("UPDATE profile SET verify_userinput_suffix = ".($verify === true ? "1" : "0"). |
|
| 338 | + ", hint_userinput_suffix = ".($hint === true ? "1" : "0"). |
|
| 339 | 339 | " WHERE profile_id = $this->identifier"); |
| 340 | 340 | } |
| 341 | 341 | |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | /* |
| 21 | 21 | * Class autoloader invocation, should be included prior to any other code at the entry points to the application |
| 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 | $auth->authenticate(); |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | $fed = new \core\Federation($inst->federation); |
| 54 | 54 | $allowSb = $fed->getAttributes("fed:silverbullet"); |
| 55 | 55 | if (count($allowSb) == 0) { |
| 56 | - throw new Exception("We were told to create a new SB profile, but this " . \config\ConfAssistant::CONSORTIUM['nomenclature_federation'] . " does not allow SB at all!"); |
|
| 56 | + throw new Exception("We were told to create a new SB profile, but this ".\config\ConfAssistant::CONSORTIUM['nomenclature_federation']." does not allow SB at all!"); |
|
| 57 | 57 | } |
| 58 | 58 | // okay, new SB profiles are allowed. |
| 59 | 59 | // but is there a support:email attribute on inst level? |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | // Create one. |
| 65 | 65 | $newProfile = $inst->newProfile(core\AbstractProfile::PROFILETYPE_SILVERBULLET); |
| 66 | 66 | // and modify the REQUEST_URI to add the new profile ID |
| 67 | - $_SERVER['REQUEST_URI'] = $_SERVER['REQUEST_URI'] . "&profile_id=" . $newProfile->identifier; |
|
| 67 | + $_SERVER['REQUEST_URI'] = $_SERVER['REQUEST_URI']."&profile_id=".$newProfile->identifier; |
|
| 68 | 68 | $_GET['profile_id'] = $newProfile->identifier; |
| 69 | 69 | $profile = $newProfile; |
| 70 | 70 | } else { |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | if (isset($_POST['command'])) { |
| 90 | 90 | switch ($_POST['command']) { |
| 91 | 91 | case \web\lib\common\FormElements::BUTTON_CLOSE: |
| 92 | - header("Location: overview_org.php?inst_id=" . $inst->identifier); |
|
| 92 | + header("Location: overview_org.php?inst_id=".$inst->identifier); |
|
| 93 | 93 | break; |
| 94 | 94 | case \web\lib\common\FormElements::BUTTON_TERMSOFUSE_ACCEPTED: |
| 95 | 95 | if (isset($_POST['agreement']) && $_POST['agreement'] == 'true') { |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | break; |
| 133 | 133 | } |
| 134 | 134 | $properName = $validator->syntaxConformUser($elements[0]); |
| 135 | - $properDate = new DateTime($elements[1] . " 00:00:00"); |
|
| 135 | + $properDate = new DateTime($elements[1]." 00:00:00"); |
|
| 136 | 136 | $numberOfActivations = $elements[2] ?? 5; |
| 137 | 137 | $number = $validator->integer($numberOfActivations); |
| 138 | 138 | if ($number === FALSE) { // invalid input received, default to sane |
@@ -235,18 +235,18 @@ discard block |
||
| 235 | 235 | // warn and ask for confirmation unless already confirmed |
| 236 | 236 | if (!isset($_POST['insecureconfirm']) || $_POST['insecureconfirm'] != "CONFIRM") { |
| 237 | 237 | echo $deco->pageheader(_("Insecure mail domain!"), "ADMIN-IDP-USERS"); |
| 238 | - echo "<p>" . sprintf(_("The mail domain of the mail address <strong>%s</strong> is not secure: some or all of the mail servers are not accepting encrypted connections (no consistent support for STARTTLS)."), $properEmail) . "</p>"; |
|
| 239 | - echo "<p>" . _("The invitation would need to be sent in cleartext across the internet, and can possibly be read and abused by anyone in transit.") . "</p>"; |
|
| 240 | - echo "<p>" . _("Do you want the system to send this mail anyway?") . "</p>"; |
|
| 238 | + echo "<p>".sprintf(_("The mail domain of the mail address <strong>%s</strong> is not secure: some or all of the mail servers are not accepting encrypted connections (no consistent support for STARTTLS)."), $properEmail)."</p>"; |
|
| 239 | + echo "<p>"._("The invitation would need to be sent in cleartext across the internet, and can possibly be read and abused by anyone in transit.")."</p>"; |
|
| 240 | + echo "<p>"._("Do you want the system to send this mail anyway?")."</p>"; |
|
| 241 | 241 | echo $formtext; |
| 242 | - echo "<button type='submit' class='delete'>" . _("DO NOT SEND") . "</button>"; |
|
| 242 | + echo "<button type='submit' class='delete'>"._("DO NOT SEND")."</button>"; |
|
| 243 | 243 | echo "</form>"; |
| 244 | 244 | echo $formtext; |
| 245 | - echo "<input type='hidden' name='command' value='" . \web\lib\common\FormElements::BUTTON_SENDINVITATIONMAILBYCAT . "'</>"; |
|
| 245 | + echo "<input type='hidden' name='command' value='".\web\lib\common\FormElements::BUTTON_SENDINVITATIONMAILBYCAT."'</>"; |
|
| 246 | 246 | echo "<input type='hidden' name='address' value='$properEmail'</>"; |
| 247 | - echo "<input type='hidden' name='token' value='" . $invitationObject->invitationTokenString . "'</>"; |
|
| 247 | + echo "<input type='hidden' name='token' value='".$invitationObject->invitationTokenString."'</>"; |
|
| 248 | 248 | echo "<input type='hidden' name='insecureconfirm' value='CONFIRM'/>"; |
| 249 | - echo "<button type='submit'>" . _("Send anyway.") . "</button>"; |
|
| 249 | + echo "<button type='submit'>"._("Send anyway.")."</button>"; |
|
| 250 | 250 | echo "</form>"; |
| 251 | 251 | echo $deco->footer(); |
| 252 | 252 | exit; |
@@ -297,7 +297,7 @@ discard block |
||
| 297 | 297 | $activeUsers = $profile->listActiveUsers(); |
| 298 | 298 | |
| 299 | 299 | |
| 300 | -echo $deco->defaultPagePrelude(sprintf(_('Managing %s users'), \core\ProfileSilverbullet::PRODUCTNAME )); |
|
| 300 | +echo $deco->defaultPagePrelude(sprintf(_('Managing %s users'), \core\ProfileSilverbullet::PRODUCTNAME)); |
|
| 301 | 301 | |
| 302 | 302 | ?> |
| 303 | 303 | <script src='js/option_expand.js' type='text/javascript'></script> |
@@ -337,12 +337,12 @@ discard block |
||
| 337 | 337 | <img src='../resources/images/icons/loading51.gif' id='spin' alt='loading...' style='position:absolute;left: 50%; top: 50%; transform: translate(-100px, -50px); display:none; z-index: 100;'> |
| 338 | 338 | <?php echo $uiElements->instLevelInfoBoxes($inst); ?> |
| 339 | 339 | <div class='infobox'> |
| 340 | - <h2><?php $tablecaption = sprintf(_('Current %s users'), \core\ProfileSilverbullet::PRODUCTNAME); echo $tablecaption;?></h2> |
|
| 340 | + <h2><?php $tablecaption = sprintf(_('Current %s users'), \core\ProfileSilverbullet::PRODUCTNAME); echo $tablecaption; ?></h2> |
|
| 341 | 341 | <table> |
| 342 | - <caption><?php echo $tablecaption;?></caption> |
|
| 342 | + <caption><?php echo $tablecaption; ?></caption> |
|
| 343 | 343 | <tr> |
| 344 | - <th class="wai-invisible" scope="col"><?php echo _("Property Type");?></th> |
|
| 345 | - <th class="wai-invisible" scope="col"><?php echo _("Property Value");?></th> |
|
| 344 | + <th class="wai-invisible" scope="col"><?php echo _("Property Type"); ?></th> |
|
| 345 | + <th class="wai-invisible" scope="col"><?php echo _("Property Value"); ?></th> |
|
| 346 | 346 | </tr> |
| 347 | 347 | |
| 348 | 348 | <tr> |
@@ -366,19 +366,19 @@ discard block |
||
| 366 | 366 | case "NOSTIPULATION": |
| 367 | 367 | break; |
| 368 | 368 | case "EMAIL-SENT": |
| 369 | - echo $boundaryPre . $uiElements->boxOkay(_("The e-mail was sent successfully."), _("E-mail OK."), FALSE) . $boundaryPost; |
|
| 369 | + echo $boundaryPre.$uiElements->boxOkay(_("The e-mail was sent successfully."), _("E-mail OK."), FALSE).$boundaryPost; |
|
| 370 | 370 | break; |
| 371 | 371 | case "EMAIL-NOTSENT": |
| 372 | - echo $boundaryPre . $uiElements->boxError(_("The e-mail was NOT sent."), _("E-mail not OK."), FALSE) . $boundaryPost; |
|
| 372 | + echo $boundaryPre.$uiElements->boxError(_("The e-mail was NOT sent."), _("E-mail not OK."), FALSE).$boundaryPost; |
|
| 373 | 373 | break; |
| 374 | 374 | case "SMS-SENT": |
| 375 | - echo $boundaryPre . $uiElements->boxOkay(_("The SMS was sent successfully."), _("SMS OK."), FALSE) . $boundaryPost; |
|
| 375 | + echo $boundaryPre.$uiElements->boxOkay(_("The SMS was sent successfully."), _("SMS OK."), FALSE).$boundaryPost; |
|
| 376 | 376 | break; |
| 377 | 377 | case "SMS-NOTSENT": |
| 378 | - echo $boundaryPre . $uiElements->boxOkay(_("The SMS was NOT sent."), _("SMS not OK."), FALSE) . $boundaryPost; |
|
| 378 | + echo $boundaryPre.$uiElements->boxOkay(_("The SMS was NOT sent."), _("SMS not OK."), FALSE).$boundaryPost; |
|
| 379 | 379 | break; |
| 380 | 380 | case "SMS-FRAGMENT": |
| 381 | - echo $boundaryPre . $uiElements->boxWarning(_("Only a fragment of the SMS was sent. You should re-send it."), _("SMS Fragment."), FALSE) . $boundaryPost; |
|
| 381 | + echo $boundaryPre.$uiElements->boxWarning(_("Only a fragment of the SMS was sent. You should re-send it."), _("SMS Fragment."), FALSE).$boundaryPost; |
|
| 382 | 382 | break; |
| 383 | 383 | } |
| 384 | 384 | ?> |
@@ -391,17 +391,17 @@ discard block |
||
| 391 | 391 | <?php |
| 392 | 392 | $bufferCurrentUsers = "<table class='sb-user-table' style='max-width:1920px;'> |
| 393 | 393 | <tr class='sb-title-row_id'> |
| 394 | - <td>" . _("User") . "</td> |
|
| 395 | - <td>" . _("Token/Certificate details") . "</td> |
|
| 396 | - <td>" . _("User/Token Expiry") . "</td> |
|
| 397 | - <td>" . _("Actions") . "</td> |
|
| 394 | + <td>" . _("User")."</td> |
|
| 395 | + <td>" . _("Token/Certificate details")."</td> |
|
| 396 | + <td>" . _("User/Token Expiry")."</td> |
|
| 397 | + <td>" . _("Actions")."</td> |
|
| 398 | 398 | </tr>"; |
| 399 | 399 | $bufferPreviousUsers = "<table class='sb-user-table' style='max-width:1920px;'> |
| 400 | 400 | <tr class='sb-title-row_id'> |
| 401 | - <td>" . _("User") . "</td> |
|
| 402 | - <td>" . _("Certificate details") . "</td> |
|
| 403 | - <td>" . _("User Expiry") . "</td> |
|
| 404 | - <td>" . _("Actions") . "</td> |
|
| 401 | + <td>" . _("User")."</td> |
|
| 402 | + <td>" . _("Certificate details")."</td> |
|
| 403 | + <td>" . _("User Expiry")."</td> |
|
| 404 | + <td>" . _("Actions")."</td> |
|
| 405 | 405 | </tr>"; |
| 406 | 406 | |
| 407 | 407 | natsort($allUsers); |
@@ -458,23 +458,23 @@ discard block |
||
| 458 | 458 | $display = empty(devices\Devices::listDevices()[$oneCert->device]['display']) ? $oneCert->device : devices\Devices::listDevices()[$oneCert->device]['display']; |
| 459 | 459 | |
| 460 | 460 | $bufferText = "<div class='sb-certificate-summary ca-summary' $style> |
| 461 | - <div class='sb-certificate-details'>" . _("Device:") . " " . $display . |
|
| 462 | - "<br>" . _("Serial Number:") . " " . dechex($oneCert->serial) . |
|
| 463 | - "<br>" . _("CN:") . " " . explode('@', $oneCert->username)[0] . "@…" . |
|
| 464 | - "<br>" . _("Expiry:") . " " . $oneCert->expiry . |
|
| 465 | - "<br>" . _("Issued:") . " " . $oneCert->issued . |
|
| 466 | - "</div>" . |
|
| 461 | + <div class='sb-certificate-details'>"._("Device:")." ".$display. |
|
| 462 | + "<br>"._("Serial Number:")." ".dechex($oneCert->serial). |
|
| 463 | + "<br>"._("CN:")." ".explode('@', $oneCert->username)[0]."@…". |
|
| 464 | + "<br>"._("Expiry:")." ".$oneCert->expiry. |
|
| 465 | + "<br>"._("Issued:")." ".$oneCert->issued. |
|
| 466 | + "</div>". |
|
| 467 | 467 | "<div style='text-align:right;padding-top: 5px; $buttonStyle'>"; |
| 468 | 468 | |
| 469 | 469 | if ($buttonText == "") { |
| 470 | 470 | $bufferText .= $formtext |
| 471 | - . "<input type='hidden' name='certSerial' value='" . $oneCert->serial . "'/>" |
|
| 472 | - . "<input type='hidden' name='certAlgo' value='" . $oneCert->ca_type . "'/>" |
|
| 471 | + . "<input type='hidden' name='certSerial' value='".$oneCert->serial."'/>" |
|
| 472 | + . "<input type='hidden' name='certAlgo' value='".$oneCert->ca_type."'/>" |
|
| 473 | 473 | . "<button type='submit' " |
| 474 | 474 | . "name='command' " |
| 475 | - . "value='" . \web\lib\common\FormElements::BUTTON_REVOKECREDENTIAL . "' " |
|
| 475 | + . "value='".\web\lib\common\FormElements::BUTTON_REVOKECREDENTIAL."' " |
|
| 476 | 476 | . "class='delete' " |
| 477 | - . "onclick='return confirm(\"" . sprintf(_("The device in question will stop functioning with %s. The revocation cannot be undone. Are you sure you want to do this?"), \config\ConfAssistant::CONSORTIUM['display_name']) . "\")'>" |
|
| 477 | + . "onclick='return confirm(\"".sprintf(_("The device in question will stop functioning with %s. The revocation cannot be undone. Are you sure you want to do this?"), \config\ConfAssistant::CONSORTIUM['display_name'])."\")'>" |
|
| 478 | 478 | . _("Revoke") |
| 479 | 479 | . "</button>" |
| 480 | 480 | . "</form>"; |
@@ -499,13 +499,13 @@ discard block |
||
| 499 | 499 | } |
| 500 | 500 | // wrap the revoked and expired certs in a div that is hidden by default |
| 501 | 501 | if ($textRevokedCerts !== "") { |
| 502 | - $textRevokedCerts = "<span style='text-decoration: underline;' id='$oneUserId-revoked-heading' onclick='document.getElementById(\"$oneUserId-revoked-certs\").style.display = \"block\"; document.getElementById(\"$oneUserId-revoked-heading\").style.display = \"none\";'>" . sprintf(ngettext("(show %d revoked certificate)", "(show %d revoked certificates)", $countRevoked), $countRevoked) . "</span><div id='$oneUserId-revoked-certs' style='display:none;'>" . $textRevokedCerts . "</div>"; |
|
| 502 | + $textRevokedCerts = "<span style='text-decoration: underline;' id='$oneUserId-revoked-heading' onclick='document.getElementById(\"$oneUserId-revoked-certs\").style.display = \"block\"; document.getElementById(\"$oneUserId-revoked-heading\").style.display = \"none\";'>".sprintf(ngettext("(show %d revoked certificate)", "(show %d revoked certificates)", $countRevoked), $countRevoked)."</span><div id='$oneUserId-revoked-certs' style='display:none;'>".$textRevokedCerts."</div>"; |
|
| 503 | 503 | } |
| 504 | 504 | if ($textExpiredCerts !== "") { |
| 505 | - $textExpiredCerts = "<span style='text-decoration: underline;' id='$oneUserId-expired-heading' onclick='document.getElementById(\"$oneUserId-expired-certs\").style.display = \"block\"; document.getElementById(\"$oneUserId-expired-heading\").style.display = \"none\";'>" . sprintf(ngettext("(show %d expired certificate)", "(show %d expired certificates)", $countExpired), $countExpired) . "</span><div id='$oneUserId-expired-certs' style='display:none;'>" . $textExpiredCerts . "</div>"; |
|
| 505 | + $textExpiredCerts = "<span style='text-decoration: underline;' id='$oneUserId-expired-heading' onclick='document.getElementById(\"$oneUserId-expired-certs\").style.display = \"block\"; document.getElementById(\"$oneUserId-expired-heading\").style.display = \"none\";'>".sprintf(ngettext("(show %d expired certificate)", "(show %d expired certificates)", $countExpired), $countExpired)."</span><div id='$oneUserId-expired-certs' style='display:none;'>".$textExpiredCerts."</div>"; |
|
| 506 | 506 | } |
| 507 | 507 | // and push out the HTML |
| 508 | - ${$outputBuffer} .= $textActiveCerts . "<br/>" . $textExpiredCerts . " " . $textRevokedCerts . "</td>"; |
|
| 508 | + ${$outputBuffer} .= $textActiveCerts."<br/>".$textExpiredCerts." ".$textRevokedCerts."</td>"; |
|
| 509 | 509 | $tokenHtmlBuffer = ""; |
| 510 | 510 | $hasOnePendingInvite = FALSE; |
| 511 | 511 | foreach ($tokensWithoutCerts as $invitationObject) { |
@@ -516,38 +516,38 @@ discard block |
||
| 516 | 516 | $tokenHtmlBuffer .= "<tr class='sb-certificate-row_id'><td></td>"; |
| 517 | 517 | $jsEncodedBody = str_replace('\n', '%0D%0A', str_replace('"', '', json_encode($invitationObject->invitationMailBody()))); |
| 518 | 518 | $tokenHtmlBuffer .= "<td>"; |
| 519 | - $tokenHtmlBuffer .= sprintf(_("The invitation token %s is ready for sending! Choose how to send it:"), "<input type='text' readonly='readonly' style='background-color:lightgrey;' size='60' value='" . $invitationObject->link() . "' name='token' class='identifiedtokenarea-" . $invitationObject->identifier . "'>(…)<br/>"); |
|
| 519 | + $tokenHtmlBuffer .= sprintf(_("The invitation token %s is ready for sending! Choose how to send it:"), "<input type='text' readonly='readonly' style='background-color:lightgrey;' size='60' value='".$invitationObject->link()."' name='token' class='identifiedtokenarea-".$invitationObject->identifier."'>(…)<br/>"); |
|
| 520 | 520 | $tokenHtmlBuffer .= "<table> |
| 521 | - <tr><td style='vertical-align:bottom;'>" . _("E-Mail:") . "</td><td> |
|
| 521 | + <tr><td style='vertical-align:bottom;'>" . _("E-Mail:")."</td><td> |
|
| 522 | 522 | $formtext |
| 523 | - <input type='hidden' value='" . $invitationObject->invitationTokenString . "' name='token'><br/> |
|
| 523 | + <input type='hidden' value='".$invitationObject->invitationTokenString."' name='token'><br/> |
|
| 524 | 524 | <input type='text' name='address' id='address-$invitationObject->identifier'/> |
| 525 | - <button type='button' onclick='window.location=\"mailto:\"+document.getElementById(\"address-$invitationObject->identifier\").value+\"?subject=" . $invitationObject->invitationMailSubject() . "&body=$jsEncodedBody\"; return false;'>" . _("Local mail client") . "</button> |
|
| 526 | - <button type='submit' name='command' onclick='document.getElementById(\"spin\").style.display =\"block\"' value='" . \web\lib\common\FormElements::BUTTON_SENDINVITATIONMAILBYCAT . "'>" . _("Send with CAT") . "</button> |
|
| 525 | + <button type='button' onclick='window.location=\"mailto:\"+document.getElementById(\"address-$invitationObject->identifier\").value+\"?subject=".$invitationObject->invitationMailSubject()."&body=$jsEncodedBody\"; return false;'>"._("Local mail client")."</button> |
|
| 526 | + <button type='submit' name='command' onclick='document.getElementById(\"spin\").style.display =\"block\"' value='" . \web\lib\common\FormElements::BUTTON_SENDINVITATIONMAILBYCAT."'>"._("Send with CAT")."</button> |
|
| 527 | 527 | </form> |
| 528 | 528 | </td></tr> |
| 529 | - <tr><td style='vertical-align:bottom;'>" . _("SMS:") . "</td><td> |
|
| 529 | + <tr><td style='vertical-align:bottom;'>" . _("SMS:")."</td><td> |
|
| 530 | 530 | $formtext |
| 531 | - <input type='hidden' value='" . $invitationObject->invitationTokenString . "' name='token'><br/> |
|
| 531 | + <input type='hidden' value='".$invitationObject->invitationTokenString."' name='token'><br/> |
|
| 532 | 532 | <input type='text' name='smsnumber' /> |
| 533 | - <button type='submit' name='command' value='" . \web\lib\common\FormElements::BUTTON_SENDINVITATIONSMS . "'>" . _("Send in SMS...") . "</button> |
|
| 533 | + <button type='submit' name='command' value='" . \web\lib\common\FormElements::BUTTON_SENDINVITATIONSMS."'>"._("Send in SMS...")."</button> |
|
| 534 | 534 | </form> |
| 535 | 535 | </td></tr> |
| 536 | - <tr><td style='vertical-align:bottom;'>" . _("Manual:") . "</td><td> |
|
| 537 | - <button type='button' class='clipboardButton' onclick='clipboardCopy(" . $invitationObject->identifier . ");'>" . _("Copy to Clipboard") . "</button> |
|
| 536 | + <tr><td style='vertical-align:bottom;'>" . _("Manual:")."</td><td> |
|
| 537 | + <button type='button' class='clipboardButton' onclick='clipboardCopy(" . $invitationObject->identifier.");'>"._("Copy to Clipboard")."</button> |
|
| 538 | 538 | <form style='display:inline-block;' method='post' action='inc/displayQRcode.inc.php' onsubmit='popupQRWindow(this); return false;' accept-charset='UTF-8'> |
| 539 | - <input type='hidden' value='" . $invitationObject->invitationTokenString . "' name='token'><br/> |
|
| 540 | - <button type='submit'>" . _("Display QR code") . "</button> |
|
| 539 | + <input type='hidden' value='" . $invitationObject->invitationTokenString."' name='token'><br/> |
|
| 540 | + <button type='submit'>" . _("Display QR code")."</button> |
|
| 541 | 541 | </form> |
| 542 | 542 | </td></tr> |
| 543 | 543 | |
| 544 | 544 | </table> |
| 545 | 545 | </td>"; |
| 546 | - $tokenHtmlBuffer .= "<td>" . _("Expiry Date:") . " " . $invitationObject->expiry . " UTC<br>" . _("Activations remaining:") . " " . sprintf(_("%d of %d"), $invitationObject->activationsRemaining, $invitationObject->activationsTotal) . "</td>"; |
|
| 546 | + $tokenHtmlBuffer .= "<td>"._("Expiry Date:")." ".$invitationObject->expiry." UTC<br>"._("Activations remaining:")." ".sprintf(_("%d of %d"), $invitationObject->activationsRemaining, $invitationObject->activationsTotal)."</td>"; |
|
| 547 | 547 | $tokenHtmlBuffer .= "<td>" |
| 548 | 548 | . $formtext |
| 549 | - . "<input type='hidden' name='invitationtoken' value='" . $invitationObject->invitationTokenString . "'/>" |
|
| 550 | - . "<button type='submit' name='command' value='" . \web\lib\common\FormElements::BUTTON_REVOKEINVITATION . "' class='delete'>" . _("Revoke") . "</button></form>" |
|
| 549 | + . "<input type='hidden' name='invitationtoken' value='".$invitationObject->invitationTokenString."'/>" |
|
| 550 | + . "<button type='submit' name='command' value='".\web\lib\common\FormElements::BUTTON_REVOKEINVITATION."' class='delete'>"._("Revoke")."</button></form>" |
|
| 551 | 551 | . "</td></tr>"; |
| 552 | 552 | break; |
| 553 | 553 | case core\SilverbulletInvitation::SB_TOKENSTATUS_EXPIRED: |
@@ -563,10 +563,10 @@ discard block |
||
| 563 | 563 | } |
| 564 | 564 | ${$outputBuffer} .= "<td>$formtext |
| 565 | 565 | <div class='sb-date-container' style='min-width: 200px;'> |
| 566 | - <span><input type='text' maxlength='19' class='sb-date-picker' name='userexpiry' value='" . $profile->getUserExpiryDate($oneUserId) . "'> (UTC)</span> |
|
| 566 | + <span><input type='text' maxlength='19' class='sb-date-picker' name='userexpiry' value='".$profile->getUserExpiryDate($oneUserId)."'> (UTC)</span> |
|
| 567 | 567 | </div> |
| 568 | 568 | <input type='hidden' name='userid' value='$oneUserId'/> |
| 569 | - <button type='submit' name='command' value='" . \web\lib\common\FormElements::BUTTON_CHANGEUSEREXPIRY . "'>" . _("Update") . "</button> |
|
| 569 | + <button type='submit' name='command' value='".\web\lib\common\FormElements::BUTTON_CHANGEUSEREXPIRY."'>"._("Update")."</button> |
|
| 570 | 570 | </form> |
| 571 | 571 | </td> |
| 572 | 572 | <td> |
@@ -574,33 +574,33 @@ discard block |
||
| 574 | 574 | |
| 575 | 575 | if ($hasOnePendingInvite || count($validCerts) > 0) { |
| 576 | 576 | $deletionText = sprintf(_("All of the currently active devices will stop functioning with %s. This cannot be undone. While the user can be re-activated later, they will then need to be re-provisioned with new invitation tokens. Are you sure you want to do this?"), \config\ConfAssistant::CONSORTIUM['display_name']); |
| 577 | - ${$outputBuffer} .= $formtext . " |
|
| 577 | + ${$outputBuffer} .= $formtext." |
|
| 578 | 578 | <input type='hidden' name='userid' value='$oneUserId'/> |
| 579 | 579 | <button type='submit' " |
| 580 | 580 | . "name='command' " |
| 581 | - . "value='" . \web\lib\common\FormElements::BUTTON_DEACTIVATEUSER . "' " |
|
| 581 | + . "value='".\web\lib\common\FormElements::BUTTON_DEACTIVATEUSER."' " |
|
| 582 | 582 | . "class='delete' " |
| 583 | - . ( count($validCerts) > 0 ? "onclick='return confirm(\"" . $deletionText . "\")' " : "" ) |
|
| 583 | + . (count($validCerts) > 0 ? "onclick='return confirm(\"".$deletionText."\")' " : "") |
|
| 584 | 584 | . ">" |
| 585 | 585 | . _("Deactivate User") |
| 586 | 586 | . "</button> |
| 587 | 587 | </form>"; |
| 588 | 588 | } |
| 589 | - ${$outputBuffer} .= "<form method='post' action='inc/userStats.inc.php?inst_id=" . $profile->institution . "&profile_id=" . $profile->identifier . "&user_id=$oneUserId' onsubmit='popupStatsWindow(this); return false;' accept-charset='UTF-8'> |
|
| 590 | - <button type='submit'>" . _("Show Authentication Records") . "</button> |
|
| 589 | + ${$outputBuffer} .= "<form method='post' action='inc/userStats.inc.php?inst_id=".$profile->institution."&profile_id=".$profile->identifier."&user_id=$oneUserId' onsubmit='popupStatsWindow(this); return false;' accept-charset='UTF-8'> |
|
| 590 | + <button type='submit'>"._("Show Authentication Records")."</button> |
|
| 591 | 591 | </form>"; |
| 592 | 592 | if (new DateTime() < new DateTime($expiryDate)) { // current user, allow sending new token |
| 593 | - ${$outputBuffer} .= $formtext . " |
|
| 593 | + ${$outputBuffer} .= $formtext." |
|
| 594 | 594 | <input type='hidden' name='userid' value='$oneUserId'/> |
| 595 | - <button type='submit' name='command' value='" . \web\lib\common\FormElements::BUTTON_NEWINVITATION . "'>" . _("New Invitation") . "</button> |
|
| 596 | - <label>" . _("Activations:") . " |
|
| 595 | + <button type='submit' name='command' value='".\web\lib\common\FormElements::BUTTON_NEWINVITATION."'>"._("New Invitation")."</button> |
|
| 596 | + <label>" . _("Activations:")." |
|
| 597 | 597 | <input type='text' name='invitationsquantity' value='5' maxlength='3' style='width: 30px;'/> |
| 598 | 598 | </label> |
| 599 | 599 | </form>"; |
| 600 | 600 | } elseif (count($profile->getUserAuthRecords($oneUserId)) == 0) { // previous user; if there are NO authentication records, allow full deletion - otherwise, need to keep user trace for abuse handling |
| 601 | - ${$outputBuffer} .= $formtext . " |
|
| 601 | + ${$outputBuffer} .= $formtext." |
|
| 602 | 602 | <input type='hidden' name='userid' value='$oneUserId'/> |
| 603 | - <button type='submit' class='delete' name='command' value='" . \web\lib\common\FormElements::BUTTON_DELETE . "'>" . _("Delete User") . "</button> |
|
| 603 | + <button type='submit' class='delete' name='command' value='".\web\lib\common\FormElements::BUTTON_DELETE."'>"._("Delete User")."</button> |
|
| 604 | 604 | </form>"; |
| 605 | 605 | } |
| 606 | 606 | ${$outputBuffer} .= "</div> |
@@ -632,13 +632,13 @@ discard block |
||
| 632 | 632 | . ' If all accounts shown as active above are indeed still valid, please check the box below and push "Save".' |
| 633 | 633 | . ' If any of the accounts are stale, please deactivate them by pushing the corresponding button before doing this.'), \config\ConfAssistant::SILVERBULLET['gracetime'] ?? core\ProfileSilverbullet::SB_ACKNOWLEDGEMENT_REQUIRED_DAYS); |
| 634 | 634 | |
| 635 | - echo $formtext . "<div style='padding-bottom: 20px;'>" |
|
| 635 | + echo $formtext."<div style='padding-bottom: 20px;'>" |
|
| 636 | 636 | . " |
| 637 | 637 | <p>$acknowledgeText</p> |
| 638 | 638 | <input type='checkbox' name='acknowledge' value='true'> |
| 639 | - <label>" . sprintf(_("I have verified that all configured users are still eligible for %s."),\config\ConfAssistant::CONSORTIUM['display_name']) . "</label> |
|
| 639 | + <label>".sprintf(_("I have verified that all configured users are still eligible for %s."), \config\ConfAssistant::CONSORTIUM['display_name'])."</label> |
|
| 640 | 640 | </div> |
| 641 | - <button type='submit' name='command' value='" . \web\lib\common\FormElements::BUTTON_ACKUSERELIGIBILITY . "'>" . _("Save") . "</button></form>"; |
|
| 641 | + <button type='submit' name='command' value='" . \web\lib\common\FormElements::BUTTON_ACKUSERELIGIBILITY."'>"._("Save")."</button></form>"; |
|
| 642 | 642 | } |
| 643 | 643 | ?> |
| 644 | 644 | </div> |
@@ -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(); |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | } else { |
| 39 | 39 | $link = 'http://'; |
| 40 | 40 | } |
| 41 | -$link .= $_SERVER['SERVER_NAME'] . $_SERVER['SCRIPT_NAME']; |
|
| 41 | +$link .= $_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME']; |
|
| 42 | 42 | $link = htmlspecialchars($link); |
| 43 | 43 | |
| 44 | 44 | echo $deco->defaultPagePrelude(sprintf(_("%s: %s Dashboard"), \config\Master::APPEARANCE['productname'], $uiElements->nomenclatureHotspot)); |
@@ -102,21 +102,21 @@ discard block |
||
| 102 | 102 | <?php |
| 103 | 103 | if (\config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS'] !== NULL) { |
| 104 | 104 | echo "<tr> |
| 105 | - <td>" . sprintf(_("Diagnose reachability and connection parameters of %ss"),$uiElements->nomenclatureInst) . "</td> |
|
| 105 | + <td>" . sprintf(_("Diagnose reachability and connection parameters of %ss"), $uiElements->nomenclatureInst)."</td> |
|
| 106 | 106 | <td><form method='post' action='../diag/action_realmcheck.php?inst_id=$my_inst->identifier' accept-charset='UTF-8'> |
| 107 | 107 | <!--<input type='text' name='realm' id='realm'>--> |
| 108 | 108 | <input type='hidden' name='comefrom' id='comefrom' value='$link'/> |
| 109 | - <button id='realmcheck' style='cursor:pointer;' type='submit'>" . _("Go!") . "</button> |
|
| 109 | + <button id='realmcheck' style='cursor:pointer;' type='submit'>"._("Go!")."</button> |
|
| 110 | 110 | </form> |
| 111 | 111 | </td> |
| 112 | 112 | </tr>"; |
| 113 | 113 | } |
| 114 | 114 | if (\config\ConfAssistant::CONSORTIUM['name'] == "eduroam") { // SW: APPROVED |
| 115 | 115 | echo "<tr> |
| 116 | - <td>" . sprintf(_("Check %s server status"), $uiElements->nomenclatureFed) . "</td> |
|
| 116 | + <td>" . sprintf(_("Check %s server status"), $uiElements->nomenclatureFed)."</td> |
|
| 117 | 117 | <td> |
| 118 | 118 | <form action='https://monitor.eduroam.org/mon_direct.php' accept-charset='UTF-8'> |
| 119 | - <button style='cursor:pointer;' type='submit'>" . _("Go!") . "</button> |
|
| 119 | + <button style='cursor:pointer;' type='submit'>" . _("Go!")."</button> |
|
| 120 | 120 | </form> |
| 121 | 121 | </td> |
| 122 | 122 | </tr>"; |
@@ -127,10 +127,10 @@ discard block |
||
| 127 | 127 | <?php |
| 128 | 128 | $hotspotProfiles = $my_inst->listDeployments(); |
| 129 | 129 | if (count($hotspotProfiles) == 0) { // no profiles yet. |
| 130 | - echo "<h2>" . sprintf(_("There are not yet any known deployments for your %s."), $uiElements->nomenclatureHotspot) . "</h2>"; |
|
| 130 | + echo "<h2>".sprintf(_("There are not yet any known deployments for your %s."), $uiElements->nomenclatureHotspot)."</h2>"; |
|
| 131 | 131 | } |
| 132 | 132 | if (count($hotspotProfiles) > 0) { // no profiles yet. |
| 133 | - echo "<h2>" . sprintf(_("Deployments for this %s"), $uiElements->nomenclatureHotspot) . "</h2>"; |
|
| 133 | + echo "<h2>".sprintf(_("Deployments for this %s"), $uiElements->nomenclatureHotspot)."</h2>"; |
|
| 134 | 134 | // display an info box with the connection data |
| 135 | 135 | } |
| 136 | 136 | |
@@ -149,19 +149,19 @@ discard block |
||
| 149 | 149 | ?> |
| 150 | 150 | <div style='display: table-row_id; margin-bottom: 20px;'> |
| 151 | 151 | <div class='profilebox' style='display: table-cell;'> |
| 152 | - <h2><?php echo core\DeploymentManaged::PRODUCTNAME . " (<span style='color:" . ( $deploymentObject->status == \core\AbstractDeployment::INACTIVE ? "red;'>" . _("inactive") : "green;'>" . _("active") ) . "</span>)"; ?></h2> |
|
| 152 | + <h2><?php echo core\DeploymentManaged::PRODUCTNAME." (<span style='color:".($deploymentObject->status == \core\AbstractDeployment::INACTIVE ? "red;'>"._("inactive") : "green;'>"._("active"))."</span>)"; ?></h2> |
|
| 153 | 153 | <table> |
| 154 | 154 | <tr> |
| 155 | 155 | <td><strong><?php echo _("Your primary RADIUS server") ?></strong><br/> |
| 156 | 156 | <?php |
| 157 | 157 | if ($deploymentObject->host1_v4 !== NULL) { |
| 158 | - echo _("IPv4") . ": " . $deploymentObject->host1_v4; |
|
| 158 | + echo _("IPv4").": ".$deploymentObject->host1_v4; |
|
| 159 | 159 | } |
| 160 | 160 | if ($deploymentObject->host1_v4 !== NULL && $deploymentObject->host1_v6 !== NULL) { |
| 161 | 161 | echo "<br/>"; |
| 162 | 162 | } |
| 163 | 163 | if ($deploymentObject->host1_v6 !== NULL) { |
| 164 | - echo _("IPv6") . ": " . $deploymentObject->host1_v6; |
|
| 164 | + echo _("IPv6").": ".$deploymentObject->host1_v6; |
|
| 165 | 165 | } |
| 166 | 166 | ?> |
| 167 | 167 | </td> |
@@ -169,9 +169,9 @@ discard block |
||
| 169 | 169 | <td><?php echo $deploymentObject->port1; ?></td> |
| 170 | 170 | <td> |
| 171 | 171 | <?php |
| 172 | - echo "<img src='" . $radiusMessages[$deploymentObject->radius_status_1]['icon'] . |
|
| 173 | - "' alt='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] . |
|
| 174 | - "' title='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] . "'>"; |
|
| 172 | + echo "<img src='".$radiusMessages[$deploymentObject->radius_status_1]['icon']. |
|
| 173 | + "' alt='".$radiusMessages[$deploymentObject->radius_status_1]['text']. |
|
| 174 | + "' title='".$radiusMessages[$deploymentObject->radius_status_1]['text']."'>"; |
|
| 175 | 175 | ?> |
| 176 | 176 | </td> |
| 177 | 177 | </tr> |
@@ -179,22 +179,22 @@ discard block |
||
| 179 | 179 | <td><strong><?php echo _("Your backup RADIUS server") ?><br/></strong> |
| 180 | 180 | <?php |
| 181 | 181 | if ($deploymentObject->host2_v4 !== NULL) { |
| 182 | - echo _("IPv4") . ": " . $deploymentObject->host2_v4; |
|
| 182 | + echo _("IPv4").": ".$deploymentObject->host2_v4; |
|
| 183 | 183 | } |
| 184 | 184 | if ($deploymentObject->host2_v4 !== NULL && $deploymentObject->host2_v6 !== NULL) { |
| 185 | 185 | echo "<br/>"; |
| 186 | 186 | } |
| 187 | 187 | if ($deploymentObject->host2_v6 !== NULL) { |
| 188 | - echo _("IPv6") . ": " . $deploymentObject->host2_v6; |
|
| 188 | + echo _("IPv6").": ".$deploymentObject->host2_v6; |
|
| 189 | 189 | } |
| 190 | 190 | ?></td> |
| 191 | 191 | <td><?php echo _("RADIUS port number: ") ?></td> |
| 192 | 192 | <td><?php echo $deploymentObject->port2; ?></td> |
| 193 | 193 | <td> |
| 194 | 194 | <?php |
| 195 | - echo "<img src='" . $radiusMessages[$deploymentObject->radius_status_2]['icon'] . |
|
| 196 | - "' alt='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] . |
|
| 197 | - "' title='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] . "'>"; |
|
| 195 | + echo "<img src='".$radiusMessages[$deploymentObject->radius_status_2]['icon']. |
|
| 196 | + "' alt='".$radiusMessages[$deploymentObject->radius_status_2]['text']. |
|
| 197 | + "' title='".$radiusMessages[$deploymentObject->radius_status_2]['text']."'>"; |
|
| 198 | 198 | ?> |
| 199 | 199 | </td> |
| 200 | 200 | </tr> |
@@ -245,12 +245,12 @@ discard block |
||
| 245 | 245 | if (array_key_exists('FAILURE', $res) && $res['FAILURE'] > 0) { |
| 246 | 246 | echo '<br>'; |
| 247 | 247 | if ($res['FAILURE'] == 2) { |
| 248 | - echo ' <span style="color: red;">' . _("Activation failure.") . '</span>'; |
|
| 248 | + echo ' <span style="color: red;">'._("Activation failure.").'</span>'; |
|
| 249 | 249 | } else { |
| 250 | 250 | if (isset($_GET['res'][1]) && $_GET['res']['1'] == 'FAILURE') { |
| 251 | - echo ' <span style="color: red;">' . _("Activation failure for your primary RADIUS server.") . '</span>'; |
|
| 251 | + echo ' <span style="color: red;">'._("Activation failure for your primary RADIUS server.").'</span>'; |
|
| 252 | 252 | } else { |
| 253 | - echo ' <span style="color: red;">' . _("Activation failure for your backup RADIUS server.") . '</span>'; |
|
| 253 | + echo ' <span style="color: red;">'._("Activation failure for your backup RADIUS server.").'</span>'; |
|
| 254 | 254 | } |
| 255 | 255 | } |
| 256 | 256 | } |
@@ -270,12 +270,12 @@ discard block |
||
| 270 | 270 | if ($res['FAILURE'] > 0) { |
| 271 | 271 | echo '<br>'; |
| 272 | 272 | if ($res['FAILURE'] == 2) { |
| 273 | - echo ' <span style="color: red;">' . _("Failure during deactivation, your request is queued for handling") . '</span>'; |
|
| 273 | + echo ' <span style="color: red;">'._("Failure during deactivation, your request is queued for handling").'</span>'; |
|
| 274 | 274 | } else { |
| 275 | 275 | if (isset($_GET['res'][1]) && $_GET['res']['1'] == 'FAILURE') { |
| 276 | - echo ' <span style="color: red;">' . _("Deactivation failure for your primary RADIUS server, your request is queued.") . '</span>'; |
|
| 276 | + echo ' <span style="color: red;">'._("Deactivation failure for your primary RADIUS server, your request is queued.").'</span>'; |
|
| 277 | 277 | } else { |
| 278 | - echo ' <span style="color: red;">' . _("Deactivation failure for your backup RADIUS server, your request is queued.") . '</span>'; |
|
| 278 | + echo ' <span style="color: red;">'._("Deactivation failure for your backup RADIUS server, your request is queued.").'</span>'; |
|
| 279 | 279 | } |
| 280 | 280 | } |
| 281 | 281 | } |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | */ |
| 113 | 113 | public function prefilledOptionTable(string $attributePrefix, $fed) |
| 114 | 114 | { |
| 115 | - $retval = "<table id='expandable_$attributePrefix" . "_options'>"; |
|
| 115 | + $retval = "<table id='expandable_$attributePrefix"."_options'>"; |
|
| 116 | 116 | |
| 117 | 117 | $prepopulate = []; |
| 118 | 118 | foreach ($this->listOfOptions as $existingAttribute) { |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | $prepopulate[] = $existingAttribute; |
| 121 | 121 | } |
| 122 | 122 | } |
| 123 | - if (is_array($prepopulate) && ( count($prepopulate) > 0 || $attributePrefix == "device-specific" || $attributePrefix == "eap-specific" )) { // editing... fill with values |
|
| 123 | + if (is_array($prepopulate) && (count($prepopulate) > 0 || $attributePrefix == "device-specific" || $attributePrefix == "eap-specific")) { // editing... fill with values |
|
| 124 | 124 | $retval .= $this->addOptionEdit($attributePrefix, $prepopulate); |
| 125 | 125 | } else { |
| 126 | 126 | $retval .= $this->addOptionNew($attributePrefix, $fed); |
@@ -153,7 +153,7 @@ discard block |
||
| 153 | 153 | $optiontypearray = $optioninfo->optionType($option['name']); |
| 154 | 154 | $loggerInstance = new \core\common\Logging(); |
| 155 | 155 | $loggerInstance->debug(5, "About to execute optiontext with PREFILL!\n"); |
| 156 | - $retval .= $this->optiontext([$option['name']], ($optiontypearray["type"] == "file" ? 'ROWID-' . $option['level'] . '-' . $option['row_id'] : $option['value']), $option['lang']); |
|
| 156 | + $retval .= $this->optiontext([$option['name']], ($optiontypearray["type"] == "file" ? 'ROWID-'.$option['level'].'-'.$option['row_id'] : $option['value']), $option['lang']); |
|
| 157 | 157 | } |
| 158 | 158 | } |
| 159 | 159 | return $retval; |
@@ -250,18 +250,18 @@ discard block |
||
| 250 | 250 | } |
| 251 | 251 | $descriptions["media:force_proxy"] = sprintf(_("The format of this option is: IPv4|IPv6|hostname:port . Forcing your users through a content filter of your own is a significant invasion of user self-determination. It also has technical issues. Please thoroughly read the discussion at %s before specifying a proxy with this option. This feature is currently experimental and only has an effect in Apple installers."), "https://github.com/GEANT/CAT/issues/96"); |
| 252 | 252 | $descriptions["managedsp:realmforvlan"] = sprintf(_("If you are also using %s, then your own realm is automatically tagged with the VLAN you choose, there is no need to add it here manually."), \core\ProfileSilverbullet::PRODUCTNAME); |
| 253 | - $descriptions["media:openroaming"] = sprintf(_("By opting in to OpenRoaming, you agree to be bound by the %s."), "eduroam Ecosystem Broker OpenRoaming Identity Provider Policy") . |
|
| 254 | - " " . |
|
| 255 | - sprintf(_("Note that your requirement to inform users about the OpenRoaming End User Terms and Conditions is fulfilled when directing your end users to the %s download portal for installer download. Any other means of providing the installers needs to present this information via its own channel."), \config\Master::APPEARANCE['productname']) . |
|
| 256 | - " " . |
|
| 257 | - _("You are also aware that for best technical interoperability, you need to add a DNS entry into the DNS zone of your RADIUS realm.") . |
|
| 258 | - " " . |
|
| 253 | + $descriptions["media:openroaming"] = sprintf(_("By opting in to OpenRoaming, you agree to be bound by the %s."), "eduroam Ecosystem Broker OpenRoaming Identity Provider Policy"). |
|
| 254 | + " ". |
|
| 255 | + sprintf(_("Note that your requirement to inform users about the OpenRoaming End User Terms and Conditions is fulfilled when directing your end users to the %s download portal for installer download. Any other means of providing the installers needs to present this information via its own channel."), \config\Master::APPEARANCE['productname']). |
|
| 256 | + " ". |
|
| 257 | + _("You are also aware that for best technical interoperability, you need to add a DNS entry into the DNS zone of your RADIUS realm."). |
|
| 258 | + " ". |
|
| 259 | 259 | _("Read the instructions in the wiki."); |
| 260 | 260 | \core\common\Entity::outOfThePotatoes(); |
| 261 | 261 | if (!isset($descriptions[$input])) { |
| 262 | 262 | return ""; |
| 263 | 263 | } |
| 264 | - return "<span class='tooltip' id='S$rowid-tooltip-$input' style='display:" . ($isVisible ? "block" : "none") . "' onclick='alert(\"" . $descriptions[$input] . "\")'><img src='../resources/images/icons/question-mark-icon.png" . "'></span>"; |
|
| 264 | + return "<span class='tooltip' id='S$rowid-tooltip-$input' style='display:".($isVisible ? "block" : "none")."' onclick='alert(\"".$descriptions[$input]."\")'><img src='../resources/images/icons/question-mark-icon.png"."'></span>"; |
|
| 265 | 265 | } |
| 266 | 266 | |
| 267 | 267 | /** |
@@ -275,19 +275,19 @@ discard block |
||
| 275 | 275 | private function selectElement($rowid, $list) |
| 276 | 276 | { |
| 277 | 277 | $jsmagic = "onchange=' |
| 278 | - if (/#ML#/.test(document.getElementById(\"option-S" . $rowid . "-select\").value)) { |
|
| 278 | + if (/#ML#/.test(document.getElementById(\"option-S" . $rowid."-select\").value)) { |
|
| 279 | 279 | document.getElementById(\"S$rowid-input-langselect\").style.display = \"block\"; |
| 280 | 280 | } else { |
| 281 | 281 | document.getElementById(\"S$rowid-input-langselect\").style.display = \"none\"; |
| 282 | 282 | }"; |
| 283 | 283 | foreach (array_keys($this->htmlDatatypeTexts) as $key) { |
| 284 | - $jsmagic .= "if (/#" . $key . "#/.test(document.getElementById(\"option-S" . $rowid . "-select\").value)) { |
|
| 285 | - document.getElementById(\"S$rowid-input-file\").style.display = \"" . ($key == \core\Options::TYPECODE_FILE ? "block" : "none") . "\"; |
|
| 286 | - document.getElementById(\"S$rowid-input-text\").style.display = \"" . ($key == \core\Options::TYPECODE_TEXT ? "block" : "none") . "\"; |
|
| 287 | - document.getElementById(\"S$rowid-input-string\").style.display = \"" . ($key == \core\Options::TYPECODE_STRING ? "block" : "none") . "\"; |
|
| 288 | - document.getElementById(\"S$rowid-input-enum_openroaming\").style.display = \"" . ($key == \core\Options::TYPECODE_ENUM_OPENROAMING ? "block" : "none") . "\"; |
|
| 289 | - document.getElementById(\"S$rowid-input-boolean\").style.display = \"" . ($key == \core\Options::TYPECODE_BOOLEAN ? "block" : "none") . "\"; |
|
| 290 | - document.getElementById(\"S$rowid-input-integer\").style.display = \"" . ($key == \core\Options::TYPECODE_INTEGER ? "block" : "none") . "\"; |
|
| 284 | + $jsmagic .= "if (/#".$key."#/.test(document.getElementById(\"option-S".$rowid."-select\").value)) { |
|
| 285 | + document.getElementById(\"S$rowid-input-file\").style.display = \"".($key == \core\Options::TYPECODE_FILE ? "block" : "none")."\"; |
|
| 286 | + document.getElementById(\"S$rowid-input-text\").style.display = \"".($key == \core\Options::TYPECODE_TEXT ? "block" : "none")."\"; |
|
| 287 | + document.getElementById(\"S$rowid-input-string\").style.display = \"".($key == \core\Options::TYPECODE_STRING ? "block" : "none")."\"; |
|
| 288 | + document.getElementById(\"S$rowid-input-enum_openroaming\").style.display = \"".($key == \core\Options::TYPECODE_ENUM_OPENROAMING ? "block" : "none")."\"; |
|
| 289 | + document.getElementById(\"S$rowid-input-boolean\").style.display = \"".($key == \core\Options::TYPECODE_BOOLEAN ? "block" : "none")."\"; |
|
| 290 | + document.getElementById(\"S$rowid-input-integer\").style.display = \"".($key == \core\Options::TYPECODE_INTEGER ? "block" : "none")."\"; |
|
| 291 | 291 | } |
| 292 | 292 | "; |
| 293 | 293 | // hide all tooltips (each is a <span>, and there are no other <span>s) |
@@ -318,7 +318,7 @@ discard block |
||
| 318 | 318 | $value = array_shift($list); |
| 319 | 319 | $listtype = $optioninfo->optionType($value); |
| 320 | 320 | $retval .= $uiElements->displayName($value); |
| 321 | - $retval .= "<input type='hidden' name='option[S$rowid]' value='$value#" . $listtype["type"] . "#" . $listtype["flag"] . "#'/>"; |
|
| 321 | + $retval .= "<input type='hidden' name='option[S$rowid]' value='$value#".$listtype["type"]."#".$listtype["flag"]."#'/>"; |
|
| 322 | 322 | $activelisttype = $listtype; |
| 323 | 323 | $tooltips = $this->tooltip($rowid, $value, TRUE); |
| 324 | 324 | break; |
@@ -326,7 +326,7 @@ discard block |
||
| 326 | 326 | $retval .= "<select id='option-S$rowid-select' name='option[S$rowid]' $jsmagic>"; |
| 327 | 327 | foreach ($list as $value) { |
| 328 | 328 | $listtype = $optioninfo->optionType($value); |
| 329 | - $retval .= "<option id='option-S$rowid-v-$value' value='$value#" . $listtype["type"] . "#" . $listtype["flag"] . "#' "; |
|
| 329 | + $retval .= "<option id='option-S$rowid-v-$value' value='$value#".$listtype["type"]."#".$listtype["flag"]."#' "; |
|
| 330 | 330 | if ($iterator == $this->optionIterator) { |
| 331 | 331 | $retval .= "selected='selected'"; |
| 332 | 332 | $activelisttype = $listtype; |
@@ -334,7 +334,7 @@ discard block |
||
| 334 | 334 | } else { |
| 335 | 335 | $tooltips .= $this->tooltip($rowid, $value, FALSE); |
| 336 | 336 | } |
| 337 | - $retval .= ">" . $uiElements->displayName($value) . "</option>"; |
|
| 337 | + $retval .= ">".$uiElements->displayName($value)."</option>"; |
|
| 338 | 338 | $iterator++; |
| 339 | 339 | } |
| 340 | 340 | |
@@ -360,9 +360,9 @@ discard block |
||
| 360 | 360 | private function selectLanguage($rowid, $makeVisible) |
| 361 | 361 | { |
| 362 | 362 | \core\common\Entity::intoThePotatoes(); |
| 363 | - $retval = "<select style='display:" . ($makeVisible ? "block" : "none") . "' name='value[S$rowid-lang]' id='S" . $rowid . "-input-langselect'> |
|
| 364 | - <option value='' name='select_language' selected>" . _("select language") . "</option> |
|
| 365 | - <option value='C' name='all_languages'>" . _("default/other languages") . "</option>"; |
|
| 363 | + $retval = "<select style='display:".($makeVisible ? "block" : "none")."' name='value[S$rowid-lang]' id='S".$rowid."-input-langselect'> |
|
| 364 | + <option value='' name='select_language' selected>" . _("select language")."</option> |
|
| 365 | + <option value='C' name='all_languages'>" . _("default/other languages")."</option>"; |
|
| 366 | 366 | foreach (\config\Master::LANGUAGES as $langindex => $possibleLang) { |
| 367 | 367 | $thislang = $possibleLang['display']; |
| 368 | 368 | $retval .= "<option value='$langindex' name='$langindex'>$thislang</option>"; |
@@ -383,7 +383,7 @@ discard block |
||
| 383 | 383 | { |
| 384 | 384 | $retval = ""; |
| 385 | 385 | foreach ($this->htmlDatatypeTexts as $key => $type) { |
| 386 | - $retval .= "<" . $type['html'] . " style='display:" . ($activetype['type'] == $key ? "block" : "none") . "' name='value[S$rowid-$key]' id='S" . $rowid . "-input-" . $key . "'" . $type['tail'] . ">"; |
|
| 386 | + $retval .= "<".$type['html']." style='display:".($activetype['type'] == $key ? "block" : "none")."' name='value[S$rowid-$key]' id='S".$rowid."-input-".$key."'".$type['tail'].">"; |
|
| 387 | 387 | } |
| 388 | 388 | return $retval; |
| 389 | 389 | } |
@@ -399,11 +399,11 @@ discard block |
||
| 399 | 399 | { |
| 400 | 400 | // first column: the <select> element with the names of options and their field-toggling JS magic |
| 401 | 401 | $selectorInfo = $this->selectElement($rowid, $list); |
| 402 | - $retval = "<td>" . $selectorInfo["TEXT"] . "</td>"; |
|
| 402 | + $retval = "<td>".$selectorInfo["TEXT"]."</td>"; |
|
| 403 | 403 | // second column: the <select> element for language selection - only visible if the active option is multi-lang |
| 404 | - $retval .= "<td>" . $this->selectLanguage($rowid, $selectorInfo['ACTIVE']['flag'] == "ML") . "</td>"; |
|
| 404 | + $retval .= "<td>".$this->selectLanguage($rowid, $selectorInfo['ACTIVE']['flag'] == "ML")."</td>"; |
|
| 405 | 405 | // third column: the actual input fields; the data type of the active option is visible, all others hidden |
| 406 | - $retval .= "<td>" . $this->inputFields($rowid, $selectorInfo['ACTIVE']) . "</td>"; |
|
| 406 | + $retval .= "<td>".$this->inputFields($rowid, $selectorInfo['ACTIVE'])."</td>"; |
|
| 407 | 407 | return $retval; |
| 408 | 408 | } |
| 409 | 409 | |
@@ -427,20 +427,20 @@ discard block |
||
| 427 | 427 | $retval .= "<td>"; |
| 428 | 428 | $uiElements = new UIElements(); |
| 429 | 429 | $listtype = $optioninfo->optionType($optionName); |
| 430 | - $retval .= "<span style='display:flex;'>" . $uiElements->displayName($optionName); |
|
| 431 | - $retval .= $this->tooltip($rowid, $optionName, TRUE) . "</span>"; |
|
| 432 | - $retval .= "<input type='hidden' id='option-S$rowid-select' name='option[S$rowid]' value='$optionName#" . $listtype["type"] . "#" . $listtype["flag"] . "#' ></td>"; |
|
| 430 | + $retval .= "<span style='display:flex;'>".$uiElements->displayName($optionName); |
|
| 431 | + $retval .= $this->tooltip($rowid, $optionName, TRUE)."</span>"; |
|
| 432 | + $retval .= "<input type='hidden' id='option-S$rowid-select' name='option[S$rowid]' value='$optionName#".$listtype["type"]."#".$listtype["flag"]."#' ></td>"; |
|
| 433 | 433 | |
| 434 | 434 | // language tag if any |
| 435 | 435 | $retval .= "<td>"; |
| 436 | 436 | if ($listtype["flag"] == "ML") { |
| 437 | 437 | |
| 438 | - $language = "(" . strtoupper($optionLang) . ")"; |
|
| 438 | + $language = "(".strtoupper($optionLang).")"; |
|
| 439 | 439 | if ($optionLang == 'C') { |
| 440 | 440 | $language = _("(default/other languages)"); |
| 441 | 441 | } |
| 442 | 442 | $retval .= $language; |
| 443 | - $retval .= "<input type='hidden' name='value[S$rowid-lang]' id='S" . $rowid . "-input-langselect' value='" . $optionLang . "' style='display:block'>"; |
|
| 443 | + $retval .= "<input type='hidden' name='value[S$rowid-lang]' id='S".$rowid."-input-langselect' value='".$optionLang."' style='display:block'>"; |
|
| 444 | 444 | } |
| 445 | 445 | $retval .= "</td>"; |
| 446 | 446 | // attribute content |
@@ -450,12 +450,12 @@ discard block |
||
| 450 | 450 | case \core\Options::TYPECODE_COORDINATES: |
| 451 | 451 | $this->allLocationCount = $this->allLocationCount + 1; |
| 452 | 452 | // display of the locations varies by map provider |
| 453 | - $classname = "\web\lib\admin\Map" . \config\ConfAssistant::MAPPROVIDER['PROVIDER']; |
|
| 453 | + $classname = "\web\lib\admin\Map".\config\ConfAssistant::MAPPROVIDER['PROVIDER']; |
|
| 454 | 454 | $link = $classname::optionListDisplayCode($optionValue, $this->allLocationCount); |
| 455 | - $retval .= "<input readonly style='display:none' type='text' name='value[S$rowid-" . \core\Options::TYPECODE_TEXT . "]' id='S$rowid-input-text' value='$optionValue'>$link"; |
|
| 455 | + $retval .= "<input readonly style='display:none' type='text' name='value[S$rowid-".\core\Options::TYPECODE_TEXT."]' id='S$rowid-input-text' value='$optionValue'>$link"; |
|
| 456 | 456 | break; |
| 457 | 457 | case \core\Options::TYPECODE_FILE: |
| 458 | - $retval .= "<input readonly type='text' name='value[S$rowid-" . \core\Options::TYPECODE_STRING . "]' id='S" . $rowid . "-input-string' style='display:none' value='" . urlencode($optionValue) . "'>"; |
|
| 458 | + $retval .= "<input readonly type='text' name='value[S$rowid-".\core\Options::TYPECODE_STRING."]' id='S".$rowid."-input-string' style='display:none' value='".urlencode($optionValue)."'>"; |
|
| 459 | 459 | $uiElements = new UIElements(); |
| 460 | 460 | switch ($optionName) { |
| 461 | 461 | case "eap:ca_file": |
@@ -477,7 +477,7 @@ discard block |
||
| 477 | 477 | break; |
| 478 | 478 | case \core\Options::TYPECODE_ENUM_OPENROAMING: // is a string after all |
| 479 | 479 | $displayedVariant = $this->enumPrettyPrints[$optionValue]; |
| 480 | - $retval .= "<strong>$displayedVariant</strong><input type='hidden' name='value[S$rowid-" . $listtype['type'] . "]' id='S" . $rowid . "-input-" . $listtype["type"] . "' value=\"" . htmlspecialchars($optionValue) . "\" style='display:block'>"; |
|
| 480 | + $retval .= "<strong>$displayedVariant</strong><input type='hidden' name='value[S$rowid-".$listtype['type']."]' id='S".$rowid."-input-".$listtype["type"]."' value=\"".htmlspecialchars($optionValue)."\" style='display:block'>"; |
|
| 481 | 481 | break; |
| 482 | 482 | case \core\Options::TYPECODE_STRING: |
| 483 | 483 | // fall-thorugh is intentional; mostly identical HTML code for the three types |
@@ -485,11 +485,11 @@ discard block |
||
| 485 | 485 | // fall-thorugh is intentional; mostly identical HTML code for the three types |
| 486 | 486 | case \core\Options::TYPECODE_TEXT: |
| 487 | 487 | $displayedVariant = $optionValue; // for all three types, value tag and actual display are identical |
| 488 | - $retval .= "<strong>$displayedVariant</strong><input type='hidden' name='value[S$rowid-" . $listtype['type'] . "]' id='S" . $rowid . "-input-" . $listtype["type"] . "' value=\"" . htmlspecialchars($optionValue) . "\" style='display:block'>"; |
|
| 488 | + $retval .= "<strong>$displayedVariant</strong><input type='hidden' name='value[S$rowid-".$listtype['type']."]' id='S".$rowid."-input-".$listtype["type"]."' value=\"".htmlspecialchars($optionValue)."\" style='display:block'>"; |
|
| 489 | 489 | break; |
| 490 | 490 | case \core\Options::TYPECODE_BOOLEAN: |
| 491 | 491 | $displayedVariant = ($optionValue == "on" ? _("on") : _("off")); |
| 492 | - $retval .= "<strong>$displayedVariant</strong><input type='hidden' name='value[S$rowid-" . $listtype['type'] . "]' id='S" . $rowid . "-input-" . $listtype["type"] . "' value=\"" . htmlspecialchars($optionValue) . "\" style='display:block'>"; |
|
| 492 | + $retval .= "<strong>$displayedVariant</strong><input type='hidden' name='value[S$rowid-".$listtype['type']."]' id='S".$rowid."-input-".$listtype["type"]."' value=\"".htmlspecialchars($optionValue)."\" style='display:block'>"; |
|
| 493 | 493 | break; |
| 494 | 494 | default: |
| 495 | 495 | // this should never happen! |
@@ -535,10 +535,10 @@ discard block |
||
| 535 | 535 | <td> |
| 536 | 536 | <button type='button' class='delete' onclick='"; |
| 537 | 537 | if ($prefillValue !== NULL && $item == "general:geo_coordinates") { |
| 538 | - $funcname = "Map" . \config\ConfAssistant::MAPPROVIDER['PROVIDER'] . 'DeleteCoord'; |
|
| 539 | - $retval .= 'if (typeof ' . $funcname . ' === "function") { ' . $funcname . '(' . $this->allLocationCount . '); } '; |
|
| 538 | + $funcname = "Map".\config\ConfAssistant::MAPPROVIDER['PROVIDER'].'DeleteCoord'; |
|
| 539 | + $retval .= 'if (typeof '.$funcname.' === "function") { '.$funcname.'('.$this->allLocationCount.'); } '; |
|
| 540 | 540 | } |
| 541 | - $retval .= 'deleteOption("option-S' . $rowid . '")'; |
|
| 541 | + $retval .= 'deleteOption("option-S'.$rowid.'")'; |
|
| 542 | 542 | $retval .= "'>-</button> |
| 543 | 543 | </td> |
| 544 | 544 | </tr>"; |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | sprintf(_("%s: Do not terminate EAP"), \core\ProfileSilverbullet::PRODUCTNAME) => "fed:silverbullet-noterm", |
| 134 | 134 | sprintf(_("%s: max users per profile"), \core\ProfileSilverbullet::PRODUCTNAME) => "fed:silverbullet-maxusers", |
| 135 | 135 | sprintf(_("Mint %s with CA on creation"), $this->nomenclatureIdP) => "fed:minted_ca_file", |
| 136 | - sprintf(_("OpenRoaming: Allow %s Opt-In"),$this->nomenclatureParticipant) => "fed:openroaming", |
|
| 136 | + sprintf(_("OpenRoaming: Allow %s Opt-In"), $this->nomenclatureParticipant) => "fed:openroaming", |
|
| 137 | 137 | _("OpenRoaming: Custom NAPTR Target") => "fed:openroaming_customtarget", |
| 138 | 138 | $ssidText => "media:SSID", |
| 139 | 139 | $passpointOiText => "media:consortium_OI", |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | $find = array_keys($displayNames, $input, TRUE); |
| 146 | 146 | |
| 147 | 147 | if (count($find) == 0) { // this is an error! throw an Exception |
| 148 | - throw new \Exception("The translation of an option name was requested, but the option is not known to the system: " . htmlentities($input)); |
|
| 148 | + throw new \Exception("The translation of an option name was requested, but the option is not known to the system: ".htmlentities($input)); |
|
| 149 | 149 | } |
| 150 | 150 | \core\common\Entity::outOfThePotatoes(); |
| 151 | 151 | // none of the strings have HTML in them, only translators can provide own text for it -> no threat, but complained about by the security review |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | |
| 168 | 168 | foreach ($optionlist as $option) { |
| 169 | 169 | $type = $optioninfo->optionType($option['name']); |
| 170 | - if (preg_match('/^' . $class . '/', $option['name']) && $option['level'] == "$level") { |
|
| 170 | + if (preg_match('/^'.$class.'/', $option['name']) && $option['level'] == "$level") { |
|
| 171 | 171 | // all non-multilang attribs get this assignment ... |
| 172 | 172 | $language = ""; |
| 173 | 173 | $content = $option['value']; |
@@ -185,19 +185,19 @@ discard block |
||
| 185 | 185 | $locationMarkers[] = $coords; |
| 186 | 186 | break; |
| 187 | 187 | case "file": |
| 188 | - $retval .= "<tr><td>" . $this->displayName($option['name']) . "</td><td>$language</td><td>"; |
|
| 188 | + $retval .= "<tr><td>".$this->displayName($option['name'])."</td><td>$language</td><td>"; |
|
| 189 | 189 | switch ($option['name']) { |
| 190 | 190 | case "general:logo_file": |
| 191 | 191 | case "fed:logo_file": |
| 192 | - $retval .= $this->previewImageinHTML('ROWID-' . $option['level'] . '-' . $option['row_id']); |
|
| 192 | + $retval .= $this->previewImageinHTML('ROWID-'.$option['level'].'-'.$option['row_id']); |
|
| 193 | 193 | break; |
| 194 | 194 | case "eap:ca_file": |
| 195 | 195 | // fall-through intended: display both the same way |
| 196 | 196 | case "fed:minted_ca_file": |
| 197 | - $retval .= $this->previewCAinHTML('ROWID-' . $option['level'] . '-' . $option['row_id']); |
|
| 197 | + $retval .= $this->previewCAinHTML('ROWID-'.$option['level'].'-'.$option['row_id']); |
|
| 198 | 198 | break; |
| 199 | 199 | case "support:info_file": |
| 200 | - $retval .= $this->previewInfoFileinHTML('ROWID-' . $option['level'] . '-' . $option['row_id']); |
|
| 200 | + $retval .= $this->previewInfoFileinHTML('ROWID-'.$option['level'].'-'.$option['row_id']); |
|
| 201 | 201 | break; |
| 202 | 202 | default: |
| 203 | 203 | } |
@@ -207,10 +207,10 @@ discard block |
||
| 207 | 207 | // do not display the option at all; it gets auto-set by the ProfileSilverbullet constructor and doesn't have to be seen |
| 208 | 208 | break; |
| 209 | 209 | } |
| 210 | - $retval .= "<tr><td>" . $this->displayName($option['name']) . "</td><td>$language</td><td><strong>" . ($content == "on" ? _("on") : _("off") ) . "</strong></td></tr>"; |
|
| 210 | + $retval .= "<tr><td>".$this->displayName($option['name'])."</td><td>$language</td><td><strong>".($content == "on" ? _("on") : _("off"))."</strong></td></tr>"; |
|
| 211 | 211 | break; |
| 212 | 212 | default: |
| 213 | - $retval .= "<tr><td>" . $this->displayName($option['name']) . "</td><td>$language</td><td><strong>$content</strong></td></tr>"; |
|
| 213 | + $retval .= "<tr><td>".$this->displayName($option['name'])."</td><td>$language</td><td><strong>$content</strong></td></tr>"; |
|
| 214 | 214 | } |
| 215 | 215 | } |
| 216 | 216 | } |
@@ -219,11 +219,11 @@ discard block |
||
| 219 | 219 | $locationCount = 0; |
| 220 | 220 | foreach ($locationMarkers as $g) { |
| 221 | 221 | $locationCount++; |
| 222 | - $marker .= '<marker name="' . $locationCount . '" lat="' . $g['lat'] . '" lng="' . $g['lon'] . '" />'; |
|
| 222 | + $marker .= '<marker name="'.$locationCount.'" lat="'.$g['lat'].'" lng="'.$g['lon'].'" />'; |
|
| 223 | 223 | } |
| 224 | 224 | $marker .= '<\/markers>'; // some validator says this should be escaped |
| 225 | 225 | $jMarker = json_encode($locationMarkers); |
| 226 | - $retval .= '<tr><td><script>markers=\'' . $marker . '\'; jmarkers = \'' . $jMarker . '\';</script></td><td></td><td></td></tr>'; |
|
| 226 | + $retval .= '<tr><td><script>markers=\''.$marker.'\'; jmarkers = \''.$jMarker.'\';</script></td><td></td><td></td></tr>'; |
|
| 227 | 227 | } |
| 228 | 228 | \core\common\Entity::outOfThePotatoes(); |
| 229 | 229 | return $retval; |
@@ -239,11 +239,11 @@ discard block |
||
| 239 | 239 | \core\common\Entity::intoThePotatoes(); |
| 240 | 240 | $idpoptions = $myInst->getAttributes(); |
| 241 | 241 | $retval = "<div class='infobox'> |
| 242 | - <h2>" . sprintf(_("General %s details"), $this->nomenclatureParticipant) . "</h2> |
|
| 242 | + <h2>" . sprintf(_("General %s details"), $this->nomenclatureParticipant)."</h2> |
|
| 243 | 243 | <table> |
| 244 | 244 | <tr> |
| 245 | 245 | <td> |
| 246 | - " . _("Country:") . " |
|
| 246 | + " . _("Country:")." |
|
| 247 | 247 | </td> |
| 248 | 248 | <td> |
| 249 | 249 | </td> |
@@ -253,16 +253,16 @@ discard block |
||
| 253 | 253 | $retval .= $myFed->name; |
| 254 | 254 | $retval .= "</strong> |
| 255 | 255 | </td> |
| 256 | - </tr>" . $this->infoblock($idpoptions, "general", "IdP") . " |
|
| 256 | + </tr>" . $this->infoblock($idpoptions, "general", "IdP")." |
|
| 257 | 257 | </table> |
| 258 | 258 | </div>"; |
| 259 | 259 | |
| 260 | 260 | $blocks = [["support", _("Global Helpdesk Details")], ["media", _("Media Properties")]]; |
| 261 | 261 | foreach ($blocks as $block) { |
| 262 | 262 | $retval .= "<div class='infobox'> |
| 263 | - <h2>" . $block[1] . "</h2> |
|
| 263 | + <h2>" . $block[1]."</h2> |
|
| 264 | 264 | <table>" . |
| 265 | - $this->infoblock($idpoptions, $block[0], "IdP") . |
|
| 265 | + $this->infoblock($idpoptions, $block[0], "IdP"). |
|
| 266 | 266 | "</table> |
| 267 | 267 | </div>"; |
| 268 | 268 | } |
@@ -277,12 +277,12 @@ discard block |
||
| 277 | 277 | */ |
| 278 | 278 | private function displaySize(int $number) { |
| 279 | 279 | if ($number > 1024 * 1024) { |
| 280 | - return round($number / 1024 / 1024, 2) . " MiB"; |
|
| 280 | + return round($number / 1024 / 1024, 2)." MiB"; |
|
| 281 | 281 | } |
| 282 | 282 | if ($number > 1024) { |
| 283 | - return round($number / 1024, 2) . " KiB"; |
|
| 283 | + return round($number / 1024, 2)." KiB"; |
|
| 284 | 284 | } |
| 285 | - return $number . " B"; |
|
| 285 | + return $number." B"; |
|
| 286 | 286 | } |
| 287 | 287 | |
| 288 | 288 | /** |
@@ -336,7 +336,7 @@ discard block |
||
| 336 | 336 | $ref = $validator->databaseReference($cAReference); |
| 337 | 337 | $rawResult = UIElements::getBlobFromDB($ref['table'], $ref['rowindex'], FALSE); |
| 338 | 338 | if (is_bool($rawResult)) { // we didn't actually get a CA! |
| 339 | - $retval = "<div class='ca-summary'>" . _("There was an error while retrieving the certificate from the database!") . "</div>"; |
|
| 339 | + $retval = "<div class='ca-summary'>"._("There was an error while retrieving the certificate from the database!")."</div>"; |
|
| 340 | 340 | \core\common\Entity::outOfThePotatoes(); |
| 341 | 341 | return $retval; |
| 342 | 342 | } |
@@ -352,14 +352,14 @@ discard block |
||
| 352 | 352 | |
| 353 | 353 | $details['name'] = preg_replace('/(.)\/(.)/', "$1<br/>$2", $details['name']); |
| 354 | 354 | $details['name'] = preg_replace('/\//', "", $details['name']); |
| 355 | - $certstatus = ( $details['root'] == 1 ? "R" : "I"); |
|
| 356 | - $certTooltip = ( $details['root'] == 1 ? _("Root CA") : _("Intermediate CA")); |
|
| 355 | + $certstatus = ($details['root'] == 1 ? "R" : "I"); |
|
| 356 | + $certTooltip = ($details['root'] == 1 ? _("Root CA") : _("Intermediate CA")); |
|
| 357 | 357 | if ($details['ca'] == 0 && $details['root'] != 1) { |
| 358 | - $retval = "<div class='ca-summary' style='background-color:red'><div style='position:absolute; right: 0px; width:20px; height:20px; background-color:maroon; border-radius:10px; text-align: center;'><div style='padding-top:3px; font-weight:bold; color:#ffffff;'>S</div></div>" . _("This is a <strong>SERVER</strong> certificate!") . "<br/>" . $details['name'] . "</div>"; |
|
| 358 | + $retval = "<div class='ca-summary' style='background-color:red'><div style='position:absolute; right: 0px; width:20px; height:20px; background-color:maroon; border-radius:10px; text-align: center;'><div style='padding-top:3px; font-weight:bold; color:#ffffff;'>S</div></div>"._("This is a <strong>SERVER</strong> certificate!")."<br/>".$details['name']."</div>"; |
|
| 359 | 359 | \core\common\Entity::outOfThePotatoes(); |
| 360 | 360 | return $retval; |
| 361 | 361 | } |
| 362 | - $retval = "<div class='ca-summary' ><div style='position:absolute; right: 0px; width:20px; height:20px; background-color:#0000ff; border-radius:10px; text-align: center;'><div title='$certTooltip' style='padding-top:3px; font-weight:bold; color:#ffffff;'>$certstatus</div></div>" . $details['name'] . "</div>"; |
|
| 362 | + $retval = "<div class='ca-summary' ><div style='position:absolute; right: 0px; width:20px; height:20px; background-color:#0000ff; border-radius:10px; text-align: center;'><div title='$certTooltip' style='padding-top:3px; font-weight:bold; color:#ffffff;'>$certstatus</div></div>".$details['name']."</div>"; |
|
| 363 | 363 | \core\common\Entity::outOfThePotatoes(); |
| 364 | 364 | return $retval; |
| 365 | 365 | } |
@@ -372,7 +372,7 @@ discard block |
||
| 372 | 372 | */ |
| 373 | 373 | public function previewImageinHTML($imageReference) { |
| 374 | 374 | \core\common\Entity::intoThePotatoes(); |
| 375 | - $retval = "<img style='max-width:150px' src='inc/filepreview.php?id=" . $imageReference . "' alt='" . _("Preview of logo file") . "'/>"; |
|
| 375 | + $retval = "<img style='max-width:150px' src='inc/filepreview.php?id=".$imageReference."' alt='"._("Preview of logo file")."'/>"; |
|
| 376 | 376 | \core\common\Entity::outOfThePotatoes(); |
| 377 | 377 | return $retval; |
| 378 | 378 | } |
@@ -389,13 +389,13 @@ discard block |
||
| 389 | 389 | $ref = $validator->databaseReference($fileReference); |
| 390 | 390 | $fileBlob = UIElements::getBlobFromDB($ref['table'], $ref['rowindex'], FALSE); |
| 391 | 391 | if (is_bool($fileBlob)) { // we didn't actually get a file! |
| 392 | - $retval = "<div class='ca-summary'>" . _("There was an error while retrieving the file from the database!") . "</div>"; |
|
| 392 | + $retval = "<div class='ca-summary'>"._("There was an error while retrieving the file from the database!")."</div>"; |
|
| 393 | 393 | \core\common\Entity::outOfThePotatoes(); |
| 394 | 394 | return $retval; |
| 395 | 395 | } |
| 396 | 396 | $decodedFileBlob = base64_decode($fileBlob); |
| 397 | 397 | $fileinfo = new \finfo(); |
| 398 | - $retval = "<div class='ca-summary'>" . _("File exists") . " (" . $fileinfo->buffer($decodedFileBlob, FILEINFO_MIME_TYPE) . ", " . $this->displaySize(strlen($decodedFileBlob)) . ")<br/><a href='inc/filepreview.php?id=$fileReference'>" . _("Preview") . "</a></div>"; |
|
| 398 | + $retval = "<div class='ca-summary'>"._("File exists")." (".$fileinfo->buffer($decodedFileBlob, FILEINFO_MIME_TYPE).", ".$this->displaySize(strlen($decodedFileBlob)).")<br/><a href='inc/filepreview.php?id=$fileReference'>"._("Preview")."</a></div>"; |
|
| 399 | 399 | \core\common\Entity::outOfThePotatoes(); |
| 400 | 400 | return $retval; |
| 401 | 401 | } |
@@ -423,7 +423,7 @@ discard block |
||
| 423 | 423 | $retval .= "<tr><td>"; |
| 424 | 424 | } |
| 425 | 425 | $finalCaption = ($caption !== NULL ? $caption : $uiMessages[$level]['text']); |
| 426 | - $retval .= "<img class='icon' src='" . $uiMessages[$level]['icon'] . "' alt='" . $finalCaption . "' title='" . $finalCaption . "'/>"; |
|
| 426 | + $retval .= "<img class='icon' src='".$uiMessages[$level]['icon']."' alt='".$finalCaption."' title='".$finalCaption."'/>"; |
|
| 427 | 427 | if (!$omittabletags) { |
| 428 | 428 | $retval .= "</td><td>"; |
| 429 | 429 | } |
@@ -505,8 +505,8 @@ discard block |
||
| 505 | 505 | return ""; |
| 506 | 506 | } |
| 507 | 507 | |
| 508 | - $loggerInstance->debug(4, "Consortium logo is at: " . ROOT . "/web/resources/images/consortium_logo_large.png"); |
|
| 509 | - $logogd = imagecreatefrompng(ROOT . "/web/resources/images/consortium_logo_large.png"); |
|
| 508 | + $loggerInstance->debug(4, "Consortium logo is at: ".ROOT."/web/resources/images/consortium_logo_large.png"); |
|
| 509 | + $logogd = imagecreatefrompng(ROOT."/web/resources/images/consortium_logo_large.png"); |
|
| 510 | 510 | if ($logogd === FALSE) { // consortium logo is bogus; don't do anything |
| 511 | 511 | return ""; |
| 512 | 512 | } |
@@ -532,7 +532,7 @@ discard block |
||
| 532 | 532 | imagecolorallocate($whiteimage, 255, 255, 255); |
| 533 | 533 | // also make sure the initial placement is a multitude of 12; otherwise "two half" symbols might be affected |
| 534 | 534 | $targetplacementx = (int) ($symbolsize * round(($sizeinput[0] / 2 - ($targetwidth - $symbolsize + 1) / 2) / $symbolsize)); |
| 535 | - $targetplacementy = (int) ($symbolsize * round(($sizeinput[1] / 2 - ($targetheight - $symbolsize + 1 ) / 2) / $symbolsize)); |
|
| 535 | + $targetplacementy = (int) ($symbolsize * round(($sizeinput[1] / 2 - ($targetheight - $symbolsize + 1) / 2) / $symbolsize)); |
|
| 536 | 536 | imagecopyresized($inputgd, $whiteimage, $targetplacementx - $symbolsize, $targetplacementy - $symbolsize, 0, 0, $targetwidth + 2 * $symbolsize, $targetheight + 2 * $symbolsize, $targetwidth + 2 * $symbolsize, $targetheight + 2 * $symbolsize); |
| 537 | 537 | imagecopyresized($inputgd, $logogd, $targetplacementx, $targetplacementy, 0, 0, $targetwidth, $targetheight, $sizelogo[0], $sizelogo[1]); |
| 538 | 538 | ob_start(); |
@@ -582,9 +582,9 @@ discard block |
||
| 582 | 582 | $message = "Your configuration appears to be fine."; |
| 583 | 583 | break; |
| 584 | 584 | default: |
| 585 | - throw new Exception("The result code level " . $test->test_result['global'] . " is not defined!"); |
|
| 585 | + throw new Exception("The result code level ".$test->test_result['global']." is not defined!"); |
|
| 586 | 586 | } |
| 587 | - $out .= $this->boxFlexible($test->test_result['global'], "<br><strong>Test Summary</strong><br>" . $message . "<br>See below for details<br><hr>"); |
|
| 587 | + $out .= $this->boxFlexible($test->test_result['global'], "<br><strong>Test Summary</strong><br>".$message."<br>See below for details<br><hr>"); |
|
| 588 | 588 | foreach ($test->out as $testValue) { |
| 589 | 589 | foreach ($testValue as $o) { |
| 590 | 590 | $out .= $this->boxFlexible($o['level'], $o['message']); |