@@ -326,9 +326,9 @@ |
||
326 | 326 | $otherTlsName = \core\common\Entity::getAttributeValue($this->attributes, 'eap-specific:tls_use_other_id', 0) === 'on' ? 'true' : 'false'; |
327 | 327 | if (isset(\core\common\Entity::getAttributeValue($this->attributes, 'device-specific:geantlink', $this->device_id)[0]) && |
328 | 328 | \core\common\Entity::getAttributeValue($this->attributes, 'device-specific:geantlink', $this->device_id)[0] === 'on') { |
329 | - $this->useGeantLink = true; |
|
329 | + $this->useGeantLink = true; |
|
330 | 330 | } else { |
331 | - $this->useGeantLink = false; |
|
331 | + $this->useGeantLink = false; |
|
332 | 332 | } |
333 | 333 | $eapConfig = $this->setEapObject(); |
334 | 334 | $eapConfig->setInnerType($this->selectedEap['INNER']); |
@@ -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'] : $option['value']), $option['lang']); |
|
156 | + $retval .= $this->optiontext([$option['name']], ($optiontypearray["type"] == "file" ? 'ROWID-'.$option['level'].'-'.$option['row'] : $option['value']), $option['lang']); |
|
157 | 157 | } |
158 | 158 | } |
159 | 159 | return $retval; |
@@ -252,18 +252,18 @@ discard block |
||
252 | 252 | } |
253 | 253 | $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"); |
254 | 254 | $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); |
255 | - $descriptions["media:openroaming"] = sprintf(_("By opting in to OpenRoaming, you agree to be bound by the %s."), "eduroam Ecosystem Broker OpenRoaming Identity Provider Policy") . |
|
256 | - " " . |
|
257 | - 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']) . |
|
258 | - " " . |
|
259 | - _("You are also aware that for best technical interoperability, you need to add a DNS entry into the DNS zone of your RADIUS realm.") . |
|
260 | - " " . |
|
255 | + $descriptions["media:openroaming"] = sprintf(_("By opting in to OpenRoaming, you agree to be bound by the %s."), "eduroam Ecosystem Broker OpenRoaming Identity Provider Policy"). |
|
256 | + " ". |
|
257 | + 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']). |
|
258 | + " ". |
|
259 | + _("You are also aware that for best technical interoperability, you need to add a DNS entry into the DNS zone of your RADIUS realm."). |
|
260 | + " ". |
|
261 | 261 | _("Read the instructions in the wiki."); |
262 | 262 | \core\common\Entity::outOfThePotatoes(); |
263 | 263 | if (!isset($descriptions[$input])) { |
264 | 264 | return ""; |
265 | 265 | } |
266 | - 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>"; |
|
266 | + 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>"; |
|
267 | 267 | } |
268 | 268 | |
269 | 269 | /** |
@@ -277,19 +277,19 @@ discard block |
||
277 | 277 | private function selectElement($rowid, $list) |
278 | 278 | { |
279 | 279 | $jsmagic = "onchange=' |
280 | - if (/#ML#/.test(document.getElementById(\"option-S" . $rowid . "-select\").value)) { |
|
280 | + if (/#ML#/.test(document.getElementById(\"option-S" . $rowid."-select\").value)) { |
|
281 | 281 | document.getElementById(\"S$rowid-input-langselect\").style.display = \"block\"; |
282 | 282 | } else { |
283 | 283 | document.getElementById(\"S$rowid-input-langselect\").style.display = \"none\"; |
284 | 284 | }"; |
285 | 285 | foreach (array_keys($this->htmlDatatypeTexts) as $key) { |
286 | - $jsmagic .= "if (/#" . $key . "#/.test(document.getElementById(\"option-S" . $rowid . "-select\").value)) { |
|
287 | - document.getElementById(\"S$rowid-input-file\").style.display = \"" . ($key == \core\Options::TYPECODE_FILE ? "block" : "none") . "\"; |
|
288 | - document.getElementById(\"S$rowid-input-text\").style.display = \"" . ($key == \core\Options::TYPECODE_TEXT ? "block" : "none") . "\"; |
|
289 | - document.getElementById(\"S$rowid-input-string\").style.display = \"" . ($key == \core\Options::TYPECODE_STRING ? "block" : "none") . "\"; |
|
290 | - document.getElementById(\"S$rowid-input-enum_openroaming\").style.display = \"" . ($key == \core\Options::TYPECODE_ENUM_OPENROAMING ? "block" : "none") . "\"; |
|
291 | - document.getElementById(\"S$rowid-input-boolean\").style.display = \"" . ($key == \core\Options::TYPECODE_BOOLEAN ? "block" : "none") . "\"; |
|
292 | - document.getElementById(\"S$rowid-input-integer\").style.display = \"" . ($key == \core\Options::TYPECODE_INTEGER ? "block" : "none") . "\"; |
|
286 | + $jsmagic .= "if (/#".$key."#/.test(document.getElementById(\"option-S".$rowid."-select\").value)) { |
|
287 | + document.getElementById(\"S$rowid-input-file\").style.display = \"".($key == \core\Options::TYPECODE_FILE ? "block" : "none")."\"; |
|
288 | + document.getElementById(\"S$rowid-input-text\").style.display = \"".($key == \core\Options::TYPECODE_TEXT ? "block" : "none")."\"; |
|
289 | + document.getElementById(\"S$rowid-input-string\").style.display = \"".($key == \core\Options::TYPECODE_STRING ? "block" : "none")."\"; |
|
290 | + document.getElementById(\"S$rowid-input-enum_openroaming\").style.display = \"".($key == \core\Options::TYPECODE_ENUM_OPENROAMING ? "block" : "none")."\"; |
|
291 | + document.getElementById(\"S$rowid-input-boolean\").style.display = \"".($key == \core\Options::TYPECODE_BOOLEAN ? "block" : "none")."\"; |
|
292 | + document.getElementById(\"S$rowid-input-integer\").style.display = \"".($key == \core\Options::TYPECODE_INTEGER ? "block" : "none")."\"; |
|
293 | 293 | } |
294 | 294 | "; |
295 | 295 | // hide all tooltips (each is a <span>, and there are no other <span>s) |
@@ -320,7 +320,7 @@ discard block |
||
320 | 320 | $value = array_shift($list); |
321 | 321 | $listtype = $optioninfo->optionType($value); |
322 | 322 | $retval .= $uiElements->displayName($value); |
323 | - $retval .= "<input type='hidden' name='option[S$rowid]' value='$value#" . $listtype["type"] . "#" . $listtype["flag"] . "#'/>"; |
|
323 | + $retval .= "<input type='hidden' name='option[S$rowid]' value='$value#".$listtype["type"]."#".$listtype["flag"]."#'/>"; |
|
324 | 324 | $activelisttype = $listtype; |
325 | 325 | $tooltips = $this->tooltip($rowid, $value, TRUE); |
326 | 326 | break; |
@@ -328,7 +328,7 @@ discard block |
||
328 | 328 | $retval .= "<select id='option-S$rowid-select' name='option[S$rowid]' $jsmagic>"; |
329 | 329 | foreach ($list as $value) { |
330 | 330 | $listtype = $optioninfo->optionType($value); |
331 | - $retval .= "<option id='option-S$rowid-v-$value' value='$value#" . $listtype["type"] . "#" . $listtype["flag"] . "#' "; |
|
331 | + $retval .= "<option id='option-S$rowid-v-$value' value='$value#".$listtype["type"]."#".$listtype["flag"]."#' "; |
|
332 | 332 | if ($iterator == $this->optionIterator) { |
333 | 333 | $retval .= "selected='selected'"; |
334 | 334 | $activelisttype = $listtype; |
@@ -336,7 +336,7 @@ discard block |
||
336 | 336 | } else { |
337 | 337 | $tooltips .= $this->tooltip($rowid, $value, FALSE); |
338 | 338 | } |
339 | - $retval .= ">" . $uiElements->displayName($value) . "</option>"; |
|
339 | + $retval .= ">".$uiElements->displayName($value)."</option>"; |
|
340 | 340 | $iterator++; |
341 | 341 | } |
342 | 342 | |
@@ -362,9 +362,9 @@ discard block |
||
362 | 362 | private function selectLanguage($rowid, $makeVisible) |
363 | 363 | { |
364 | 364 | \core\common\Entity::intoThePotatoes(); |
365 | - $retval = "<select style='display:" . ($makeVisible ? "block" : "none") . "' name='value[S$rowid-lang]' id='S" . $rowid . "-input-langselect'> |
|
366 | - <option value='' name='select_language' selected>" . _("select language") . "</option> |
|
367 | - <option value='C' name='all_languages'>" . _("default/other languages") . "</option>"; |
|
365 | + $retval = "<select style='display:".($makeVisible ? "block" : "none")."' name='value[S$rowid-lang]' id='S".$rowid."-input-langselect'> |
|
366 | + <option value='' name='select_language' selected>" . _("select language")."</option> |
|
367 | + <option value='C' name='all_languages'>" . _("default/other languages")."</option>"; |
|
368 | 368 | foreach (\config\Master::LANGUAGES as $langindex => $possibleLang) { |
369 | 369 | $thislang = $possibleLang['display']; |
370 | 370 | $retval .= "<option value='$langindex' name='$langindex'>$thislang</option>"; |
@@ -385,7 +385,7 @@ discard block |
||
385 | 385 | { |
386 | 386 | $retval = ""; |
387 | 387 | foreach ($this->htmlDatatypeTexts as $key => $type) { |
388 | - $retval .= "<" . $type['html'] . " style='display:" . ($activetype['type'] == $key ? "block" : "none") . "' name='value[S$rowid-$key]' id='S" . $rowid . "-input-" . $key . "'" . $type['tail'] . ">"; |
|
388 | + $retval .= "<".$type['html']." style='display:".($activetype['type'] == $key ? "block" : "none")."' name='value[S$rowid-$key]' id='S".$rowid."-input-".$key."'".$type['tail'].">"; |
|
389 | 389 | } |
390 | 390 | return $retval; |
391 | 391 | } |
@@ -401,11 +401,11 @@ discard block |
||
401 | 401 | { |
402 | 402 | // first column: the <select> element with the names of options and their field-toggling JS magic |
403 | 403 | $selectorInfo = $this->selectElement($rowid, $list); |
404 | - $retval = "<td>" . $selectorInfo["TEXT"] . "</td>"; |
|
404 | + $retval = "<td>".$selectorInfo["TEXT"]."</td>"; |
|
405 | 405 | // second column: the <select> element for language selection - only visible if the active option is multi-lang |
406 | - $retval .= "<td>" . $this->selectLanguage($rowid, $selectorInfo['ACTIVE']['flag'] == "ML") . "</td>"; |
|
406 | + $retval .= "<td>".$this->selectLanguage($rowid, $selectorInfo['ACTIVE']['flag'] == "ML")."</td>"; |
|
407 | 407 | // third column: the actual input fields; the data type of the active option is visible, all others hidden |
408 | - $retval .= "<td>" . $this->inputFields($rowid, $selectorInfo['ACTIVE']) . "</td>"; |
|
408 | + $retval .= "<td>".$this->inputFields($rowid, $selectorInfo['ACTIVE'])."</td>"; |
|
409 | 409 | return $retval; |
410 | 410 | } |
411 | 411 | |
@@ -429,20 +429,20 @@ discard block |
||
429 | 429 | $retval .= "<td>"; |
430 | 430 | $uiElements = new UIElements(); |
431 | 431 | $listtype = $optioninfo->optionType($optionName); |
432 | - $retval .= "<span style='display:flex;'>" . $uiElements->displayName($optionName); |
|
433 | - $retval .= $this->tooltip($rowid, $optionName, TRUE) . "</span>"; |
|
434 | - $retval .= "<input type='hidden' id='option-S$rowid-select' name='option[S$rowid]' value='$optionName#" . $listtype["type"] . "#" . $listtype["flag"] . "#' ></td>"; |
|
432 | + $retval .= "<span style='display:flex;'>".$uiElements->displayName($optionName); |
|
433 | + $retval .= $this->tooltip($rowid, $optionName, TRUE)."</span>"; |
|
434 | + $retval .= "<input type='hidden' id='option-S$rowid-select' name='option[S$rowid]' value='$optionName#".$listtype["type"]."#".$listtype["flag"]."#' ></td>"; |
|
435 | 435 | |
436 | 436 | // language tag if any |
437 | 437 | $retval .= "<td>"; |
438 | 438 | if ($listtype["flag"] == "ML") { |
439 | 439 | |
440 | - $language = "(" . strtoupper($optionLang) . ")"; |
|
440 | + $language = "(".strtoupper($optionLang).")"; |
|
441 | 441 | if ($optionLang == 'C') { |
442 | 442 | $language = _("(default/other languages)"); |
443 | 443 | } |
444 | 444 | $retval .= $language; |
445 | - $retval .= "<input type='hidden' name='value[S$rowid-lang]' id='S" . $rowid . "-input-langselect' value='" . $optionLang . "' style='display:block'>"; |
|
445 | + $retval .= "<input type='hidden' name='value[S$rowid-lang]' id='S".$rowid."-input-langselect' value='".$optionLang."' style='display:block'>"; |
|
446 | 446 | } |
447 | 447 | $retval .= "</td>"; |
448 | 448 | // attribute content |
@@ -452,12 +452,12 @@ discard block |
||
452 | 452 | case \core\Options::TYPECODE_COORDINATES: |
453 | 453 | $this->allLocationCount = $this->allLocationCount + 1; |
454 | 454 | // display of the locations varies by map provider |
455 | - $classname = "\web\lib\admin\Map" . \config\ConfAssistant::MAPPROVIDER['PROVIDER']; |
|
455 | + $classname = "\web\lib\admin\Map".\config\ConfAssistant::MAPPROVIDER['PROVIDER']; |
|
456 | 456 | $link = $classname::optionListDisplayCode($optionValue, $this->allLocationCount); |
457 | - $retval .= "<input readonly style='display:none' type='text' name='value[S$rowid-" . \core\Options::TYPECODE_TEXT . "]' id='S$rowid-input-text' value='$optionValue'>$link"; |
|
457 | + $retval .= "<input readonly style='display:none' type='text' name='value[S$rowid-".\core\Options::TYPECODE_TEXT."]' id='S$rowid-input-text' value='$optionValue'>$link"; |
|
458 | 458 | break; |
459 | 459 | case \core\Options::TYPECODE_FILE: |
460 | - $retval .= "<input readonly type='text' name='value[S$rowid-" . \core\Options::TYPECODE_STRING . "]' id='S" . $rowid . "-input-string' style='display:none' value='" . urlencode($optionValue) . "'>"; |
|
460 | + $retval .= "<input readonly type='text' name='value[S$rowid-".\core\Options::TYPECODE_STRING."]' id='S".$rowid."-input-string' style='display:none' value='".urlencode($optionValue)."'>"; |
|
461 | 461 | $uiElements = new UIElements(); |
462 | 462 | switch ($optionName) { |
463 | 463 | case "eap:ca_file": |
@@ -479,7 +479,7 @@ discard block |
||
479 | 479 | break; |
480 | 480 | case \core\Options::TYPECODE_ENUM_OPENROAMING: // is a string after all |
481 | 481 | $displayedVariant = $this->enumPrettyPrints[$optionValue]; |
482 | - $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'>"; |
|
482 | + $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'>"; |
|
483 | 483 | break; |
484 | 484 | case \core\Options::TYPECODE_STRING: |
485 | 485 | // fall-thorugh is intentional; mostly identical HTML code for the three types |
@@ -487,11 +487,11 @@ discard block |
||
487 | 487 | // fall-thorugh is intentional; mostly identical HTML code for the three types |
488 | 488 | case \core\Options::TYPECODE_TEXT: |
489 | 489 | $displayedVariant = $optionValue; // for all three types, value tag and actual display are identical |
490 | - $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'>"; |
|
490 | + $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'>"; |
|
491 | 491 | break; |
492 | 492 | case \core\Options::TYPECODE_BOOLEAN: |
493 | 493 | $displayedVariant = ($optionValue == "on" ? _("on") : _("off")); |
494 | - $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'>"; |
|
494 | + $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'>"; |
|
495 | 495 | break; |
496 | 496 | default: |
497 | 497 | // this should never happen! |
@@ -537,10 +537,10 @@ discard block |
||
537 | 537 | <td> |
538 | 538 | <button type='button' class='delete' onclick='"; |
539 | 539 | if ($prefillValue !== NULL && $item == "general:geo_coordinates") { |
540 | - $funcname = "Map" . \config\ConfAssistant::MAPPROVIDER['PROVIDER'] . 'DeleteCoord'; |
|
541 | - $retval .= 'if (typeof ' . $funcname . ' === "function") { ' . $funcname . '(' . $this->allLocationCount . '); } '; |
|
540 | + $funcname = "Map".\config\ConfAssistant::MAPPROVIDER['PROVIDER'].'DeleteCoord'; |
|
541 | + $retval .= 'if (typeof '.$funcname.' === "function") { '.$funcname.'('.$this->allLocationCount.'); } '; |
|
542 | 542 | } |
543 | - $retval .= 'deleteOption("option-S' . $rowid . '")'; |
|
543 | + $retval .= 'deleteOption("option-S'.$rowid.'")'; |
|
544 | 544 | $retval .= "'>-</button> |
545 | 545 | </td> |
546 | 546 | </tr>"; |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | nsArray::Set Delete_files "GEANTLink-ARM64.msi" |
93 | 93 | File "GEANTLink-ARM64.msi" |
94 | 94 | IfSilent +2 |
95 | - MessageBox MB_OK "<?php WindowsCommon::echoNsis( _("An additional piece of software 'GEANTlink' needs to be installed. This installation requires Administrator rights; you will be prompted to give permission for that action."))?>" |
|
95 | + MessageBox MB_OK "<?php WindowsCommon::echoNsis(_("An additional piece of software 'GEANTlink' needs to be installed. This installation requires Administrator rights; you will be prompted to give permission for that action."))?>" |
|
96 | 96 | !insertmacro debug_cat 1 "Run GEANTLink installer" |
97 | 97 | !insertmacro debug_cat 3 'Execute: msiexec.exe /i "$OUTDIR\GEANTLink-$Platform.msi" REBOOT=Supress' |
98 | 98 | ClearErrors |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | Pop $rebootRequired |
105 | 105 | ${Else} |
106 | 106 | IfSilent +2 |
107 | - MessageBox MB_OK "<?php WindowsCommon::echoNsis( _("Error installing GEANTLink.\$\\nEmbedded installer didn't complete successfully."))?>" |
|
107 | + MessageBox MB_OK "<?php WindowsCommon::echoNsis(_("Error installing GEANTLink.\$\\nEmbedded installer didn't complete successfully."))?>" |
|
108 | 108 | Quit |
109 | 109 | ${EndIf} |
110 | 110 | Cont2: |
@@ -117,11 +117,11 @@ discard block |
||
117 | 117 | $this->possibleFailureReasons = $_SESSION["SUSPECTS"] ?? []; // if we know nothing, don't talk to anyone |
118 | 118 | $this->additionalFindings = $_SESSION["EVIDENCE"] ?? []; |
119 | 119 | |
120 | - $this->subjectPrefix = _("[eduroam Diagnostics]") . " "; |
|
120 | + $this->subjectPrefix = _("[eduroam Diagnostics]")." "; |
|
121 | 121 | $this->finalGreeting = "\n" |
122 | 122 | . _("(This service is in an early stage. We apologise if this is a false alert. If this is the case, please send an email report to [email protected], forwarding the entire message (including the 'SUSPECTS' and 'EVIDENCE' data at the end), and explain why this is a false positive.)") |
123 | 123 | . "\n" |
124 | - . _("Yours sincerely,") . "\n" |
|
124 | + . _("Yours sincerely,")."\n" |
|
125 | 125 | . "\n" |
126 | 126 | . _("Ed U. Roam, the eduroam diagnostics algorithm"); |
127 | 127 | |
@@ -132,13 +132,13 @@ discard block |
||
132 | 132 | "bcc" => [], |
133 | 133 | "reply-to" => [Logopath::TARGET_EDUROAM_OT], |
134 | 134 | "subject" => _("[POLICYVIOLATION NATIONAL] IdP with no entry in eduroam database"), |
135 | - "body" => _("Dear NRO administrator,") . "\n" |
|
135 | + "body" => _("Dear NRO administrator,")."\n" |
|
136 | 136 | . "\n" |
137 | - . wordwrap(sprintf(_("an end-user requested diagnostics for realm %s. Real-time connectivity checks determined that the realm exists, but we were unable to find an IdP with that realm in the eduroam database."), $this->additionalFindings['REALM'])) . "\n" |
|
137 | + . wordwrap(sprintf(_("an end-user requested diagnostics for realm %s. Real-time connectivity checks determined that the realm exists, but we were unable to find an IdP with that realm in the eduroam database."), $this->additionalFindings['REALM']))."\n" |
|
138 | 138 | . "\n" |
139 | - . _("By not listing IdPs in the eduroam database, you are violating the eduroam policy.") . "\n" |
|
139 | + . _("By not listing IdPs in the eduroam database, you are violating the eduroam policy.")."\n" |
|
140 | 140 | . "\n" |
141 | - . _("Additionally, this creates operational issues. In particular, we are unable to direct end users to their IdP for further diagnosis/instructions because there are no contact points for that IdP in the database.") . "\n" |
|
141 | + . _("Additionally, this creates operational issues. In particular, we are unable to direct end users to their IdP for further diagnosis/instructions because there are no contact points for that IdP in the database.")."\n" |
|
142 | 142 | . "\n" |
143 | 143 | . _("Please stop the policy violation ASAP by listing the IdP which is associated to this realm.") |
144 | 144 | . "\n", |
@@ -149,11 +149,11 @@ discard block |
||
149 | 149 | "bcc" => [], |
150 | 150 | "reply-to" => [Logopath::TARGET_ENDUSER], |
151 | 151 | "subject" => _("[TECHNICAL PROBLEM] Administrator suspects technical problem with your IdP"), |
152 | - "body" => _("Dear IdP administrator,") . "\n" |
|
152 | + "body" => _("Dear IdP administrator,")."\n" |
|
153 | 153 | . "\n" |
154 | 154 | . sprintf(_("an organisation administrator requested diagnostics for realm %s. "), $this->additionalFindings['REALM']) |
155 | 155 | . "\n" |
156 | - . _("Real-time connectivity checks determined that the realm appears to be working in acceptable parameters, but the administrator insisted to contact you with the supplemental information below.") . "\n" |
|
156 | + . _("Real-time connectivity checks determined that the realm appears to be working in acceptable parameters, but the administrator insisted to contact you with the supplemental information below.")."\n" |
|
157 | 157 | . "\n", |
158 | 158 | ], |
159 | 159 | Logopath::IDP_SUSPECTED_PROBLEM_INTERACTIVE_EVIDENCED => [ |
@@ -162,11 +162,11 @@ discard block |
||
162 | 162 | "bcc" => [], |
163 | 163 | "reply-to" => [Logopath::TARGET_ENDUSER], |
164 | 164 | "subject" => _("[TECHNICAL PROBLEM] Administrator suspects technical problem with your IdP"), |
165 | - "body" => _("Dear IdP administrator,") . "\n" |
|
165 | + "body" => _("Dear IdP administrator,")."\n" |
|
166 | 166 | . "\n" |
167 | 167 | . sprintf(_("an organisation administrator requested diagnostics for realm %s. "), $this->additionalFindings['REALM']) |
168 | 168 | . "\n" |
169 | - . _("Real-time connectivity checks determined that the realm indeed has an operational problem at this point in time. Please see the supplemental information below.") . "\n" |
|
169 | + . _("Real-time connectivity checks determined that the realm indeed has an operational problem at this point in time. Please see the supplemental information below.")."\n" |
|
170 | 170 | . "\n", |
171 | 171 | ], |
172 | 172 | ]; |
@@ -174,13 +174,13 @@ discard block |
||
174 | 174 | // add exalted human-readable information to main mail body |
175 | 175 | foreach ($this->mailStack as $oneEntry) { |
176 | 176 | if (isset($this->additionalFindings['INTERACTIVE_ENDUSER_AUTH_TIMESTAMP'])) { |
177 | - $oneEntry["body"] .= _("Authentication/Attempt Timestamp of user session:") . " " . $this->additionalFindings['INTERACTIVE_ENDUSER_AUTH_TIMESTAMP'] . "\n"; |
|
177 | + $oneEntry["body"] .= _("Authentication/Attempt Timestamp of user session:")." ".$this->additionalFindings['INTERACTIVE_ENDUSER_AUTH_TIMESTAMP']."\n"; |
|
178 | 178 | } |
179 | 179 | if (isset($this->additionalFindings['INTERACTIVE_ENDUSER_MAC'])) { |
180 | - $oneEntry["body"] .= _("MAC address of end user in question:") . " " . $this->additionalFindings['INTERACTIVE_ENDUSER_MAC'] . "\n"; |
|
180 | + $oneEntry["body"] .= _("MAC address of end user in question:")." ".$this->additionalFindings['INTERACTIVE_ENDUSER_MAC']."\n"; |
|
181 | 181 | } |
182 | 182 | if (isset($this->additionalFindings['INTERACTIVE_ADDITIONAL_COMMENTS'])) { |
183 | - $oneEntry["body"] .= _("Additional Comments:") . " " . $this->additionalFindings['INTERACTIVE_ADDITIONAL_COMMENTS'] . "\n"; |
|
183 | + $oneEntry["body"] .= _("Additional Comments:")." ".$this->additionalFindings['INTERACTIVE_ADDITIONAL_COMMENTS']."\n"; |
|
184 | 184 | } |
185 | 185 | } |
186 | 186 | |
@@ -344,7 +344,7 @@ discard block |
||
344 | 344 | |
345 | 345 | $handle = \core\common\OutsideComm::mailHandle(); |
346 | 346 | // let's identify ourselves |
347 | - $handle->FromName = \config\Master::APPEARANCE['productname'] . " Real-Time Diagnostics System"; |
|
347 | + $handle->FromName = \config\Master::APPEARANCE['productname']." Real-Time Diagnostics System"; |
|
348 | 348 | // add recipients |
349 | 349 | foreach (Logopath::CATEGORYBINDING as $arrayName => $functionName) { |
350 | 350 | foreach ($theMail[$arrayName] as $onePrincipal) { |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | $this->test_result = []; |
130 | 130 | $this->test_result['global'] = 0; |
131 | 131 | // parse the schema file to find out the number of expected rows... |
132 | - $schema = file(dirname(dirname(__FILE__)) . "/schema/schema.sql"); |
|
132 | + $schema = file(dirname(dirname(__FILE__))."/schema/schema.sql"); |
|
133 | 133 | $this->profileOptionCount = 0; |
134 | 134 | $passedTheWindmill = FALSE; |
135 | 135 | foreach ($schema as $schemaLine) { |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | { |
157 | 157 | $this->out[$test] = []; |
158 | 158 | $this->name = $test; |
159 | - $m_name = 'test' . $test; |
|
159 | + $m_name = 'test'.$test; |
|
160 | 160 | $this->test_result[$test] = 0; |
161 | 161 | if (!method_exists($this, $m_name)) { |
162 | 162 | $this->storeTestResult(\core\common\Entity::L_ERROR, "Configuration error, no test configured for <strong>$test</strong>."); |
@@ -269,9 +269,9 @@ discard block |
||
269 | 269 | private function testPhp() |
270 | 270 | { |
271 | 271 | if (version_compare(phpversion(), $this->needversionPHP, '>=')) { |
272 | - $this->storeTestResult(\core\common\Entity::L_OK, "<strong>PHP</strong> is sufficiently recent. You are running " . phpversion() . "."); |
|
272 | + $this->storeTestResult(\core\common\Entity::L_OK, "<strong>PHP</strong> is sufficiently recent. You are running ".phpversion()."."); |
|
273 | 273 | } else { |
274 | - $this->storeTestResult(\core\common\Entity::L_ERROR, "<strong>PHP</strong> is too old. We need at least $this->needversionPHP, but you only have " . phpversion() . "."); |
|
274 | + $this->storeTestResult(\core\common\Entity::L_ERROR, "<strong>PHP</strong> is too old. We need at least $this->needversionPHP, but you only have ".phpversion()."."); |
|
275 | 275 | } |
276 | 276 | } |
277 | 277 | |
@@ -284,12 +284,12 @@ discard block |
||
284 | 284 | */ |
285 | 285 | private function runConstantsTest($config) |
286 | 286 | { |
287 | - $templateConfig = file_get_contents(ROOT . "/config/$config-template.php"); |
|
288 | - $newTemplateConfig = preg_replace("/class *$config/", "class $config" . "_template", $templateConfig); |
|
289 | - file_put_contents(ROOT . "/var/tmp/$config-template.php", $newTemplateConfig); |
|
290 | - include(ROOT . "/var/tmp/$config-template.php"); |
|
291 | - unlink(ROOT . "/var/tmp/$config-template.php"); |
|
292 | - $rft = new \ReflectionClass("\config\\$config" . "_template"); |
|
287 | + $templateConfig = file_get_contents(ROOT."/config/$config-template.php"); |
|
288 | + $newTemplateConfig = preg_replace("/class *$config/", "class $config"."_template", $templateConfig); |
|
289 | + file_put_contents(ROOT."/var/tmp/$config-template.php", $newTemplateConfig); |
|
290 | + include(ROOT."/var/tmp/$config-template.php"); |
|
291 | + unlink(ROOT."/var/tmp/$config-template.php"); |
|
292 | + $rft = new \ReflectionClass("\config\\$config"."_template"); |
|
293 | 293 | $templateConstants = $rft->getConstants(); |
294 | 294 | $failResults = []; |
295 | 295 | foreach ($templateConstants as $constant => $value) { |
@@ -306,7 +306,7 @@ discard block |
||
306 | 306 | * Check if all required constants are set |
307 | 307 | */ |
308 | 308 | private function testConfigConstants() { |
309 | - set_error_handler(function ($severity, $message, $file, $line) { |
|
309 | + set_error_handler(function($severity, $message, $file, $line) { |
|
310 | 310 | throw new \ErrorException($message, $severity, $severity, $file, $line); |
311 | 311 | }); |
312 | 312 | |
@@ -317,7 +317,7 @@ discard block |
||
317 | 317 | $failCount = $failCount + count($failResults); |
318 | 318 | if (count($failResults) > 0) { |
319 | 319 | $this->storeTestResult(\core\common\Entity::L_ERROR, |
320 | - "<strong>The following constants are not set:</strong>" . implode(', ', $failResults)); |
|
320 | + "<strong>The following constants are not set:</strong>".implode(', ', $failResults)); |
|
321 | 321 | } |
322 | 322 | } |
323 | 323 | |
@@ -341,7 +341,7 @@ discard block |
||
341 | 341 | $this->storeTestResult(\core\common\Entity::L_OK, "<strong>cat_base_url</strong> set correctly"); |
342 | 342 | } else { |
343 | 343 | $rootFromScript = $m[1] === '' ? '/' : $m[1]; |
344 | - $this->storeTestResult(\core\common\Entity::L_ERROR, "<strong>cat_base_url</strong> is set to <strong>" . \config\Master::PATHS['cat_base_url'] . "</strong> and should be <strong>$rootFromScript</strong>"); |
|
344 | + $this->storeTestResult(\core\common\Entity::L_ERROR, "<strong>cat_base_url</strong> is set to <strong>".\config\Master::PATHS['cat_base_url']."</strong> and should be <strong>$rootFromScript</strong>"); |
|
345 | 345 | } |
346 | 346 | } |
347 | 347 | |
@@ -362,7 +362,7 @@ discard block |
||
362 | 362 | if (count($probeReturns) == 0) { |
363 | 363 | $this->storeTestResult(common\Entity::L_OK, "All configured RADIUS/UDP probes are reachable."); |
364 | 364 | } else { |
365 | - $this->storeTestResult(common\Entity::L_ERROR, "The following RADIUS probes are NOT reachable: " . implode(', ', $probeReturns)); |
|
365 | + $this->storeTestResult(common\Entity::L_ERROR, "The following RADIUS probes are NOT reachable: ".implode(', ', $probeReturns)); |
|
366 | 366 | } |
367 | 367 | } |
368 | 368 | |
@@ -380,9 +380,9 @@ discard block |
||
380 | 380 | $SSPconfig = \SimpleSAML\Configuration::getInstance(); |
381 | 381 | $sspVersion = explode('.', $SSPconfig->getVersion()); |
382 | 382 | if ((int) $sspVersion[0] >= $this->needversionSSP['major'] && (int) $sspVersion[1] >= $this->needversionSSP['minor']) { |
383 | - $this->storeTestResult(\core\common\Entity::L_OK, "<strong>simpleSAMLphp</strong> is sufficiently recent. You are running " . implode('.', $sspVersion)); |
|
383 | + $this->storeTestResult(\core\common\Entity::L_OK, "<strong>simpleSAMLphp</strong> is sufficiently recent. You are running ".implode('.', $sspVersion)); |
|
384 | 384 | } else { |
385 | - $this->storeTestResult(\core\common\Entity::L_ERROR, "<strong>simpleSAMLphp</strong> is too old. We need at least " . implode('.', $this->needversionSSP)); |
|
385 | + $this->storeTestResult(\core\common\Entity::L_ERROR, "<strong>simpleSAMLphp</strong> is too old. We need at least ".implode('.', $this->needversionSSP)); |
|
386 | 386 | } |
387 | 387 | } |
388 | 388 | } |
@@ -409,7 +409,7 @@ discard block |
||
409 | 409 | $A = $this->getExecPath('zip'); |
410 | 410 | if ($A['exec'] != "") { |
411 | 411 | $fullOutput = []; |
412 | - $t = exec($A['exec'] . ' --version', $fullOutput); |
|
412 | + $t = exec($A['exec'].' --version', $fullOutput); |
|
413 | 413 | if ($A['exec_is'] == "EXPLICIT") { |
414 | 414 | $this->storeTestResult(\core\common\Entity::L_OK, "<strong>".$fullOutput[1]."</strong> was found and is configured explicitly in your config."); |
415 | 415 | } else { |
@@ -447,8 +447,8 @@ discard block |
||
447 | 447 | */ |
448 | 448 | private function testLogdir() |
449 | 449 | { |
450 | - if (fopen(\config\Master::PATHS['logdir'] . "/debug.log", "a") == FALSE) { |
|
451 | - $this->storeTestResult(\core\common\Entity::L_WARN, "Log files in <strong>" . \config\Master::PATHS['logdir'] . "</strong> are not writable!"); |
|
450 | + if (fopen(\config\Master::PATHS['logdir']."/debug.log", "a") == FALSE) { |
|
451 | + $this->storeTestResult(\core\common\Entity::L_WARN, "Log files in <strong>".\config\Master::PATHS['logdir']."</strong> are not writable!"); |
|
452 | 452 | } else { |
453 | 453 | $this->storeTestResult(\core\common\Entity::L_OK, "Log directory is writable."); |
454 | 454 | } |
@@ -576,7 +576,7 @@ discard block |
||
576 | 576 | { |
577 | 577 | $A = $this->getExecPath('openssl'); |
578 | 578 | if ($A['exec'] != "") { |
579 | - $t = exec($A['exec'] . ' version'); |
|
579 | + $t = exec($A['exec'].' version'); |
|
580 | 580 | if ($A['exec_is'] == "EXPLICIT") { |
581 | 581 | $this->storeTestResult(\core\common\Entity::L_OK, "<strong>$t</strong> was found and is configured explicitly in your config."); |
582 | 582 | } else { |
@@ -604,14 +604,14 @@ discard block |
||
604 | 604 | } |
605 | 605 | $A = $this->getExecPath('makensis'); |
606 | 606 | if ($A['exec'] != "") { |
607 | - $t = exec($A['exec'] . ' -VERSION'); |
|
607 | + $t = exec($A['exec'].' -VERSION'); |
|
608 | 608 | if ($A['exec_is'] == "EXPLICIT") { |
609 | 609 | $this->storeTestResult(\core\common\Entity::L_OK, "<strong>makensis $t</strong> was found and is configured explicitly in your config."); |
610 | 610 | } else { |
611 | 611 | $this->storeTestResult(\core\common\Entity::L_WARN, "<strong>makensis $t</strong> was found, but is not configured with an absolute path in your config."); |
612 | 612 | } |
613 | 613 | $outputArray = []; |
614 | - exec($A['exec'] . ' -HELP', $outputArray); |
|
614 | + exec($A['exec'].' -HELP', $outputArray); |
|
615 | 615 | $t1 = count(preg_grep('/INPUTCHARSET/', $outputArray)); |
616 | 616 | if ($t1 == 1 && \config\ConfAssistant::NSIS_VERSION == 2) { |
617 | 617 | $this->storeTestResult(\core\common\Entity::L_ERROR, "Declared NSIS_VERSION does not seem to match the file pointed to by PATHS['makensis']!"); |
@@ -641,7 +641,7 @@ discard block |
||
641 | 641 | $NSIS_Module_status = []; |
642 | 642 | foreach ($this->NSISModules as $module) { |
643 | 643 | unset($out); |
644 | - exec(\config\ConfAssistant::PATHS['makensis'] . " -V1 '-X!include $module' '-XOutFile $exe' '-XSection X' '-XSectionEnd'", $out, $retval); |
|
644 | + exec(\config\ConfAssistant::PATHS['makensis']." -V1 '-X!include $module' '-XOutFile $exe' '-XSection X' '-XSectionEnd'", $out, $retval); |
|
645 | 645 | if ($retval > 0) { |
646 | 646 | $NSIS_Module_status[$module] = 0; |
647 | 647 | } else { |
@@ -708,8 +708,8 @@ discard block |
||
708 | 708 | $locales = shell_exec("locale -a"); |
709 | 709 | $allthere = ""; |
710 | 710 | foreach (\config\Master::LANGUAGES as $onelanguage) { |
711 | - if (preg_match("/" . $onelanguage['locale'] . "/", $locales) == 0) { |
|
712 | - $allthere .= $onelanguage['locale'] . " "; |
|
711 | + if (preg_match("/".$onelanguage['locale']."/", $locales) == 0) { |
|
712 | + $allthere .= $onelanguage['locale']." "; |
|
713 | 713 | } |
714 | 714 | } |
715 | 715 | if ($allthere == "") { |
@@ -723,47 +723,47 @@ discard block |
||
723 | 723 | ["SETTING" => \config\Master::APPEARANCE['from-mail'], |
724 | 724 | "DEFVALUE" => "[email protected]", |
725 | 725 | "COMPLAINTSTRING" => "APPEARANCE/from-mail ", |
726 | - "REQUIRED" => FALSE,], |
|
726 | + "REQUIRED" => FALSE, ], |
|
727 | 727 | ["SETTING" => \config\Master::APPEARANCE['support-contact']['url'], |
728 | 728 | "DEFVALUE" => "[email protected]?body=Only%20English%20language%20please!", |
729 | 729 | "COMPLAINTSTRING" => "APPEARANCE/support-contact/url ", |
730 | - "REQUIRED" => FALSE,], |
|
730 | + "REQUIRED" => FALSE, ], |
|
731 | 731 | ["SETTING" => \config\Master::APPEARANCE['support-contact']['display'], |
732 | 732 | "DEFVALUE" => "[email protected]", |
733 | 733 | "COMPLAINTSTRING" => "APPEARANCE/support-contact/display ", |
734 | - "REQUIRED" => FALSE,], |
|
734 | + "REQUIRED" => FALSE, ], |
|
735 | 735 | ["SETTING" => \config\Master::APPEARANCE['support-contact']['developer-mail'], |
736 | 736 | "DEFVALUE" => "[email protected]", |
737 | 737 | "COMPLAINTSTRING" => "APPEARANCE/support-contact/mail ", |
738 | - "REQUIRED" => FALSE,], |
|
738 | + "REQUIRED" => FALSE, ], |
|
739 | 739 | ["SETTING" => \config\Master::APPEARANCE['abuse-mail'], |
740 | 740 | "DEFVALUE" => "[email protected]", |
741 | 741 | "COMPLAINTSTRING" => "APPEARANCE/abuse-mail ", |
742 | - "REQUIRED" => FALSE,], |
|
742 | + "REQUIRED" => FALSE, ], |
|
743 | 743 | ["SETTING" => \config\Master::APPEARANCE['MOTD'], |
744 | 744 | "DEFVALUE" => "Release Candidate. All bugs to be shot on sight!", |
745 | 745 | "COMPLAINTSTRING" => "APPEARANCE/MOTD ", |
746 | - "REQUIRED" => FALSE,], |
|
746 | + "REQUIRED" => FALSE, ], |
|
747 | 747 | ["SETTING" => \config\Master::APPEARANCE['webcert_CRLDP'], |
748 | 748 | "DEFVALUE" => ['list', 'of', 'CRL', 'pointers'], |
749 | 749 | "COMPLAINTSTRING" => "APPEARANCE/webcert_CRLDP ", |
750 | - "REQUIRED" => TRUE,], |
|
750 | + "REQUIRED" => TRUE, ], |
|
751 | 751 | ["SETTING" => \config\Master::APPEARANCE['webcert_OCSP'], |
752 | 752 | "DEFVALUE" => ['list', 'of', 'OCSP', 'pointers'], |
753 | 753 | "COMPLAINTSTRING" => "APPEARANCE/webcert_OCSP ", |
754 | - "REQUIRED" => TRUE,], |
|
754 | + "REQUIRED" => TRUE, ], |
|
755 | 755 | ["SETTING" => \config\Master::DB['INST']['host'], |
756 | 756 | "DEFVALUE" => "db.host.example", |
757 | 757 | "COMPLAINTSTRING" => "DB/INST ", |
758 | - "REQUIRED" => TRUE,], |
|
758 | + "REQUIRED" => TRUE, ], |
|
759 | 759 | ["SETTING" => \config\Master::DB['INST']['host'], |
760 | 760 | "DEFVALUE" => "db.host.example", |
761 | 761 | "COMPLAINTSTRING" => "DB/USER ", |
762 | - "REQUIRED" => TRUE,], |
|
762 | + "REQUIRED" => TRUE, ], |
|
763 | 763 | ["SETTING" => \config\Master::DB['EXTERNAL']['host'], |
764 | 764 | "DEFVALUE" => "customerdb.otherhost.example", |
765 | 765 | "COMPLAINTSTRING" => "DB/EXTERNAL ", |
766 | - "REQUIRED" => FALSE,], |
|
766 | + "REQUIRED" => FALSE, ], |
|
767 | 767 | ]; |
768 | 768 | |
769 | 769 | /** |
@@ -792,11 +792,11 @@ discard block |
||
792 | 792 | if (isset(\config\Diagnostics::RADIUSTESTS['TLS-clientcerts'])) { |
793 | 793 | foreach (\config\Diagnostics::RADIUSTESTS['TLS-clientcerts'] as $cadata) { |
794 | 794 | foreach ($cadata['certificates'] as $cert_files) { |
795 | - if (file_get_contents(ROOT . "/config/cli-certs/" . $cert_files['public']) === FALSE) { |
|
796 | - $defaultvalues .= "CERTIFICATE/" . $cert_files['public'] . " "; |
|
795 | + if (file_get_contents(ROOT."/config/cli-certs/".$cert_files['public']) === FALSE) { |
|
796 | + $defaultvalues .= "CERTIFICATE/".$cert_files['public']." "; |
|
797 | 797 | } |
798 | - if (file_get_contents(ROOT . "/config/cli-certs/" . $cert_files['private']) === FALSE) { |
|
799 | - $defaultvalues .= "CERTIFICATE/" . $cert_files['private'] . " "; |
|
798 | + if (file_get_contents(ROOT."/config/cli-certs/".$cert_files['private']) === FALSE) { |
|
799 | + $defaultvalues .= "CERTIFICATE/".$cert_files['private']." "; |
|
800 | 800 | } |
801 | 801 | } |
802 | 802 | } |
@@ -889,14 +889,14 @@ discard block |
||
889 | 889 | if ($global_no_cache) { |
890 | 890 | foreach ($Devs as $dev => $D) { |
891 | 891 | if (empty($D['options']['no_cache']) || $D['options']['no_cache'] != 0) { |
892 | - $no_cache_dev .= $dev . " "; |
|
892 | + $no_cache_dev .= $dev." "; |
|
893 | 893 | $no_cache_dev_count++; |
894 | 894 | } |
895 | 895 | } |
896 | 896 | } else { |
897 | 897 | foreach ($Devs as $dev => $D) { |
898 | 898 | if (!empty($D['options']['no_cache']) && $D['options']['no_cache'] != 0) { |
899 | - $no_cache_dev .= $dev . " "; |
|
899 | + $no_cache_dev .= $dev." "; |
|
900 | 900 | $no_cache_dev_count++; |
901 | 901 | } |
902 | 902 | } |
@@ -935,13 +935,13 @@ discard block |
||
935 | 935 | $mail->isHTML(FALSE); |
936 | 936 | $mail->CharSet = 'UTF-8'; |
937 | 937 | $mail->From = \config\Master::APPEARANCE['from-mail']; |
938 | - $mail->FromName = \config\Master::APPEARANCE['productname'] . " Invitation System"; |
|
938 | + $mail->FromName = \config\Master::APPEARANCE['productname']." Invitation System"; |
|
939 | 939 | $mail->addAddress(\config\Master::APPEARANCE['abuse-mail']); |
940 | 940 | $mail->Subject = "testing CAT configuration mail"; |
941 | 941 | $mail->Body = "Testing CAT mailing\n"; |
942 | 942 | $sent = $mail->send(); |
943 | 943 | if ($sent) { |
944 | - $this->storeTestResult(\core\common\Entity::L_OK, "mailer settings appear to be working, check " . \config\Master::APPEARANCE['abuse-mail'] . " mailbox if the message was receiced."); |
|
944 | + $this->storeTestResult(\core\common\Entity::L_OK, "mailer settings appear to be working, check ".\config\Master::APPEARANCE['abuse-mail']." mailbox if the message was receiced."); |
|
945 | 945 | } else { |
946 | 946 | $this->storeTestResult(\core\common\Entity::L_ERROR, "mailer settings failed, check the Config::MAILSETTINGS"); |
947 | 947 | } |
@@ -189,8 +189,7 @@ |
||
189 | 189 | foreach ($allIdPs as $id => $name) { |
190 | 190 | echo '<option value="' . $id . '">' . $name . "</option>"; |
191 | 191 | } |
192 | - |
|
193 | - **/ |
|
192 | + **/ |
|
194 | 193 | ?> |
195 | 194 | </select> |
196 | 195 | <br/> |
@@ -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 | $auth = new \web\lib\admin\Authentication(); |
32 | 32 | $deco = new \web\lib\admin\PageDecoration(); |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | // also send user back to the overview page |
73 | 73 | if (isset($_POST['requestcert']) && $_POST['requestcert'] == \web\lib\common\FormElements::BUTTON_SAVE) { |
74 | 74 | // basic sanity checks before we hand this over to openssl |
75 | - $sanitisedCsr = $validator->string($_POST['CSR'] ?? "" , TRUE); |
|
75 | + $sanitisedCsr = $validator->string($_POST['CSR'] ?? "", TRUE); |
|
76 | 76 | if (openssl_csr_get_public_key($sanitisedCsr) === FALSE) { |
77 | 77 | throw new Exception("Sorry: Unable to parse the submitted public key - no public key inside?"); |
78 | 78 | } |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | $fed = $validator->existingFederation($_POST['NRO-list']); |
87 | 87 | $country = strtoupper($fed->tld); |
88 | 88 | $DN[] = "C=$country"; |
89 | - $DN[] = "O=NRO of " . $cat->knownFederations[strtoupper($fed->tld)]; |
|
89 | + $DN[] = "O=NRO of ".$cat->knownFederations[strtoupper($fed->tld)]; |
|
90 | 90 | $externalDb = new \core\ExternalEduroamDBData(); |
91 | 91 | $serverInfo = $externalDb->listExternalTlsServersFederation($fed->tld); |
92 | 92 | $serverList = explode(",", array_key_first($serverInfo)); |
@@ -109,14 +109,14 @@ discard block |
||
109 | 109 | default: |
110 | 110 | throw new Exception("Sorry: Unknown level of issuance requested."); |
111 | 111 | } |
112 | - echo "<p style='font-size: large'>" . _("Requesting a certificate with the following properties"); |
|
112 | + echo "<p style='font-size: large'>"._("Requesting a certificate with the following properties"); |
|
113 | 113 | echo "<ul>"; |
114 | - echo "<li>" . _("Policy OIDs: ") . implode(", ", $policies) . "</li>"; |
|
115 | - echo "<li>" . _("Distinguished Name: ") . implode(", ", $DN) . "</li>"; |
|
116 | - echo "<li>" . _("subjectAltName:DNS : ") . implode(", ", $serverList) . "</li>"; |
|
114 | + echo "<li>"._("Policy OIDs: ").implode(", ", $policies)."</li>"; |
|
115 | + echo "<li>"._("Distinguished Name: ").implode(", ", $DN)."</li>"; |
|
116 | + echo "<li>"._("subjectAltName:DNS : ").implode(", ", $serverList)."</li>"; |
|
117 | 117 | $firstName = $serverInfo[array_key_first($serverInfo)][0]["name"]; |
118 | 118 | $firstMail = $serverInfo[array_key_first($serverInfo)][0]["mail"]; |
119 | - echo "<li>" . _("Requester Contact Details: ") . $firstName . " <" . $firstMail . ">" . "</li>"; |
|
119 | + echo "<li>"._("Requester Contact Details: ").$firstName." <".$firstMail.">"."</li>"; |
|
120 | 120 | echo "</ul></p>"; |
121 | 121 | /* $ossl = proc_open("openssl req -subj '/".implode("/", $DN)."'", [ 0 => ["pipe", "r"], 1 => ["pipe", "w"], 2 => [ "file", "/tmp/voodoo-error", "a"] ], $pipes); |
122 | 122 | if (is_resource($ossl)) { |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | "CSR_STRING" => /* $newCsr */ $vettedCsr, |
135 | 135 | "USERNAME" => $firstName, |
136 | 136 | "USERMAIL" => $firstMail, |
137 | - "SUBJECT" => implode(",", $DN) , |
|
137 | + "SUBJECT" => implode(",", $DN), |
|
138 | 138 | "ALTNAMES" => $serverList, |
139 | 139 | "FED" => $country]; |
140 | 140 | // our certs can be good for max 5 years |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | echo "<p>"._("The certificate was requested.")."</p>"; |
143 | 143 | ?> |
144 | 144 | <form action="overview_certificates.php" method="GET"> |
145 | - <button type="submit"><?php echo _("Back to Certificate Overview");?></button> |
|
145 | + <button type="submit"><?php echo _("Back to Certificate Overview"); ?></button> |
|
146 | 146 | </form> |
147 | 147 | <?php |
148 | 148 | echo $deco->footer(); |
@@ -151,14 +151,14 @@ discard block |
||
151 | 151 | |
152 | 152 | // if we did not get a SAVE button, display UI for a fresh request instead |
153 | 153 | ?> |
154 | - <h2><?php echo _("1. Certificate Holder Details");?></h2> |
|
154 | + <h2><?php echo _("1. Certificate Holder Details"); ?></h2> |
|
155 | 155 | <form action="action_req_certificate.php" method="POST"> |
156 | 156 | <input type="radio" name="LEVEL" id="NRO" value="NRO" checked><?php printf(_("Certificate for %s role"), $uiElements->nomenclatureFed); ?></input> |
157 | 157 | <?php |
158 | 158 | if (count($feds) == 1) { |
159 | 159 | $fedObject = new \core\Federation($feds[0]['value']); |
160 | - echo " <strong>" . $cat->knownFederations[$fedObject->tld] . "</strong>"; |
|
161 | - echo '<input type="hidden" name="NRO-list" id="NRO-list" value="' . $fedObject->tld . '"/>'; |
|
160 | + echo " <strong>".$cat->knownFederations[$fedObject->tld]."</strong>"; |
|
161 | + echo '<input type="hidden" name="NRO-list" id="NRO-list" value="'.$fedObject->tld.'"/>'; |
|
162 | 162 | } else { |
163 | 163 | ?> |
164 | 164 | <select name="NRO-list" id="NRO-list"> |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | <?php |
167 | 167 | foreach ($feds as $oneFed) { |
168 | 168 | $fedObject = new \core\Federation($oneFed['value']); |
169 | - echo '<option value="' . strtoupper($fedObject->tld) . '">' . $cat->knownFederations[$fedObject->tld] . "</option>"; |
|
169 | + echo '<option value="'.strtoupper($fedObject->tld).'">'.$cat->knownFederations[$fedObject->tld]."</option>"; |
|
170 | 170 | } |
171 | 171 | ?> |
172 | 172 | </select> |
@@ -194,10 +194,10 @@ discard block |
||
194 | 194 | ?> |
195 | 195 | </select> |
196 | 196 | <br/> |
197 | - <h2><?php echo _("2. CSR generation");?></h2> |
|
198 | - <p><?php echo _("One way to generate an acceptable certificate request is via this openssl one-liner:");?></p> |
|
197 | + <h2><?php echo _("2. CSR generation"); ?></h2> |
|
198 | + <p><?php echo _("One way to generate an acceptable certificate request is via this openssl one-liner:"); ?></p> |
|
199 | 199 | <p>openssl req -new -newkey rsa:4096 -out test.csr -keyout test.key -subj /DC=test/DC=test/DC=eduroam/C=XY/O=WillBeReplaced/CN=will.be.replaced</p> |
200 | - <h2><?php echo _("3. Submission");?></h2> |
|
200 | + <h2><?php echo _("3. Submission"); ?></h2> |
|
201 | 201 | <?php echo _("Please paste your CSR here:"); ?><br/><textarea name="CSR" id="CSR" rows="20" cols="85"/></textarea><br/> |
202 | 202 | <button type="submit" name="requestcert" id="requestcert" value="<?php echo \web\lib\common\FormElements::BUTTON_SAVE ?>"><?php echo _("Send request"); ?></button> |
203 | 203 | </form> |
@@ -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 | $auth = new \web\lib\admin\Authentication(); |
32 | 32 | $deco = new \web\lib\admin\PageDecoration(); |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | $feds = $user->getAttributes("user:fedadmin"); |
71 | 71 | foreach ($feds as $oneFed) { |
72 | 72 | $theFed = new \core\Federation($oneFed['value']); |
73 | - printf("<p>" . _("Certificate Information for %s %s"), $uiElements->nomenclatureFed, $theFed->name) . "</p>"; |
|
73 | + printf("<p>"._("Certificate Information for %s %s"), $uiElements->nomenclatureFed, $theFed->name)."</p>"; |
|
74 | 74 | foreach ($theFed->listTlsCertificates() as $oneCert) { |
75 | 75 | if ($oneCert['STATUS'] == "REQUESTED") { |
76 | 76 | $theFed->updateCertificateStatus($oneCert['REQSERIAL']); |
@@ -81,12 +81,12 @@ discard block |
||
81 | 81 | foreach ($theFed->listTlsCertificates() as $oneCert) { // fetch list a second time, in case we got a cert |
82 | 82 | $status = $oneCert['STATUS']; |
83 | 83 | echo "<tr>"; |
84 | - echo "<td>" . $oneCert['REQSERIAL'] . "</td><td>" . $oneCert['DN'] . "</td><td>" . $status . "</td><td>" . $oneCert['EXPIRY'] . "</td>"; |
|
84 | + echo "<td>".$oneCert['REQSERIAL']."</td><td>".$oneCert['DN']."</td><td>".$status."</td><td>".$oneCert['EXPIRY']."</td>"; |
|
85 | 85 | if ($status == "ISSUED") { |
86 | 86 | ?> |
87 | 87 | <td> |
88 | 88 | <form action='inc/showCert.inc.php' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8' method="POST"> |
89 | - <input type="hidden" name="certdata" value="<?php echo $oneCert['CERT'];?>"/> |
|
89 | + <input type="hidden" name="certdata" value="<?php echo $oneCert['CERT']; ?>"/> |
|
90 | 90 | <button type="submit">Display</button> |
91 | 91 | </form> |
92 | 92 | <td> |
@@ -20,7 +20,7 @@ |
||
20 | 20 | */ |
21 | 21 | ?> |
22 | 22 | <?php |
23 | -require_once dirname(dirname(dirname(dirname(__FILE__)))) . "/config/_config.php"; |
|
23 | +require_once dirname(dirname(dirname(dirname(__FILE__))))."/config/_config.php"; |
|
24 | 24 | |
25 | 25 | $auth = new \web\lib\admin\Authentication(); |
26 | 26 | $languageInstance = new \core\common\Language(); |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | return $this->counter; |
127 | 127 | } |
128 | 128 | |
129 | - $cachedNumber = @file_get_contents(ROOT . "/var/tmp/cachedSPNumber.serialised"); |
|
129 | + $cachedNumber = @file_get_contents(ROOT."/var/tmp/cachedSPNumber.serialised"); |
|
130 | 130 | if ($cachedNumber !== FALSE) { |
131 | 131 | $numberData = unserialize($cachedNumber); |
132 | 132 | $now = new \DateTime(); |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | } else { // data in cache is too old or doesn't exist. We really need to ask the database |
140 | 140 | $list = $this->listAllServiceProviders(); |
141 | 141 | $this->counter = count($list); |
142 | - file_put_contents(ROOT . "/var/tmp/cachedSPNumber.serialised", serialize(["number" => $this->counter, "timestamp" => new \DateTime()])); |
|
142 | + file_put_contents(ROOT."/var/tmp/cachedSPNumber.serialised", serialize(["number" => $this->counter, "timestamp" => new \DateTime()])); |
|
143 | 143 | return $this->counter; |
144 | 144 | } |
145 | 145 | } |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | $returnarray = []; |
189 | 189 | $query = "SELECT id_institution AS id, country, inst_realm as realmlist, name AS collapsed_name, contact AS collapsed_contact, type FROM view_active_institution WHERE country = ?"; |
190 | 190 | if ($eduroamDbType !== NULL) { |
191 | - $query .= " AND ( type = '" . ExternalEduroamDBData::TYPE_IDPSP . "' OR type = '" . $eduroamDbType . "')"; |
|
191 | + $query .= " AND ( type = '".ExternalEduroamDBData::TYPE_IDPSP."' OR type = '".$eduroamDbType."')"; |
|
192 | 192 | } |
193 | 193 | $externals = $this->db->exec($query, "s", $tld); |
194 | 194 | // was a SELECT query, so a resource and not a boolean |
@@ -291,7 +291,7 @@ discard block |
||
291 | 291 | $instServerTransaction = $this->db->exec($query, "s", $tld); |
292 | 292 | while ($instServerResponses = mysqli_fetch_object(/** @scrutinizer ignore-type */ $instServerTransaction)) { |
293 | 293 | $contactList = $this->dissectCollapsedContacts($instServerResponses->contacts); |
294 | - $retval[$instServerResponses->ROid . $instServerResponses->instid] = [ |
|
294 | + $retval[$instServerResponses->ROid.$instServerResponses->instid] = [ |
|
295 | 295 | "names" => $this->splitNames($instServerResponses->inst_name), |
296 | 296 | "type" => $instServerResponses->type, |
297 | 297 | "servers" => $instServerResponses->servers, |