@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | * ****************************************************************************** |
10 | 10 | */ |
11 | 11 | |
12 | -require_once dirname(dirname(dirname(dirname(__FILE__)))) . "/config/_config.php"; |
|
12 | +require_once dirname(dirname(dirname(dirname(__FILE__))))."/config/_config.php"; |
|
13 | 13 | $auth = new \web\lib\admin\Authentication(); |
14 | 14 | $auth->authenticate(); |
15 | 15 | $languageInstance = new \core\common\Language(); |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | if ($editMode == 'fullaccess') { |
20 | 20 | $deployment = $validator->existingDeploymentManaged($_GET['deployment_id'], $inst); |
21 | 21 | $format = ''; |
22 | - if (isset($_GET['as']) && $_GET['as']=='csv') { |
|
22 | + if (isset($_GET['as']) && $_GET['as'] == 'csv') { |
|
23 | 23 | $format = 'csv'; |
24 | 24 | } |
25 | 25 | if (!isset($_POST['stats'])) { |
@@ -67,19 +67,19 @@ discard block |
||
67 | 67 | echo _("Protocol is a protocol used between a client and RADIUS server, for TLS it is a / separated tuple TLS/TLS-Client-Cert-Serial"); |
68 | 68 | ?></p> |
69 | 69 | <table class='authrecord'> |
70 | - <caption><?php echo $tablecaption;?></caption> |
|
70 | + <caption><?php echo $tablecaption; ?></caption> |
|
71 | 71 | <tr> |
72 | - <th scope="col"><strong><?php echo _("Timestamp (UTC)");?></strong></th> |
|
73 | - <th scope="col"><strong><?php echo _("Outer-Identity");?></strong></th> |
|
74 | - <th scope="col"><strong><?php echo _("Result");?></strong></th> |
|
75 | - <th scope="col"><strong><?php echo _("MAC Address");?></strong></th> |
|
76 | - <th scope="col"><strong><?php echo _("Chargeable-User-Identity");?></strong></th> |
|
77 | - <th scope="col"><strong><?php echo _("AP Identifier");?></strong></th> |
|
78 | - <th scope="col"><strong><?php echo _("Protocol");?></strong></th> |
|
72 | + <th scope="col"><strong><?php echo _("Timestamp (UTC)"); ?></strong></th> |
|
73 | + <th scope="col"><strong><?php echo _("Outer-Identity"); ?></strong></th> |
|
74 | + <th scope="col"><strong><?php echo _("Result"); ?></strong></th> |
|
75 | + <th scope="col"><strong><?php echo _("MAC Address"); ?></strong></th> |
|
76 | + <th scope="col"><strong><?php echo _("Chargeable-User-Identity"); ?></strong></th> |
|
77 | + <th scope="col"><strong><?php echo _("AP Identifier"); ?></strong></th> |
|
78 | + <th scope="col"><strong><?php echo _("Protocol"); ?></strong></th> |
|
79 | 79 | </tr> |
80 | 80 | <?php |
81 | 81 | foreach ($userAuthData as $oneRecord) { |
82 | - echo "<tr class='".($oneRecord['result'] == "OK" ? "auth-success" : "auth-fail" )."'>" |
|
82 | + echo "<tr class='".($oneRecord['result'] == "OK" ? "auth-success" : "auth-fail")."'>" |
|
83 | 83 | . "<td>".$oneRecord['activity_time']."</td>" |
84 | 84 | // $oneRecord['CN'] is a simple string, not an array, so disable Scrutinizer type check here |
85 | 85 | . "<td>".$oneRecord['outer_user']."</td>" |
@@ -19,12 +19,12 @@ discard block |
||
19 | 19 | * <base_url>/copyright.php after deploying the software |
20 | 20 | */ |
21 | 21 | |
22 | -require_once dirname(dirname(dirname(dirname(__FILE__)))) . "/config/_config.php"; |
|
22 | +require_once dirname(dirname(dirname(dirname(__FILE__))))."/config/_config.php"; |
|
23 | 23 | |
24 | 24 | \core\CAT::sessionStart(); |
25 | 25 | $validator = new \web\lib\common\InputValidation(); |
26 | 26 | |
27 | -if (!isset($_GET["class"] )) { |
|
27 | +if (!isset($_GET["class"])) { |
|
28 | 28 | throw new Exception("Unknown type of option!"); |
29 | 29 | } |
30 | 30 | |
@@ -42,6 +42,6 @@ discard block |
||
42 | 42 | |
43 | 43 | // add one option of the specified class |
44 | 44 | |
45 | -$list = \web\lib\admin\OptionDisplay::enumerateOptionsToDisplay($_GET["class"], $_GET['fedid'], (isset($_GET["device"])?$_GET["device"]:NULL)); |
|
45 | +$list = \web\lib\admin\OptionDisplay::enumerateOptionsToDisplay($_GET["class"], $_GET['fedid'], (isset($_GET["device"]) ? $_GET["device"] : NULL)); |
|
46 | 46 | $optionDisplay = new \web\lib\admin\OptionDisplay($list); |
47 | 47 | echo $optionDisplay->optiontext(array_values($list)); |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | */ |
28 | 28 | ?> |
29 | 29 | <?php |
30 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
30 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
31 | 31 | $auth = new \web\lib\admin\Authentication(); |
32 | 32 | $deco = new \web\lib\admin\PageDecoration(); |
33 | 33 | $validator = new \web\lib\common\InputValidation(); |
@@ -96,29 +96,29 @@ discard block |
||
96 | 96 | 'HINT' => _("See CSR generation rules below."), |
97 | 97 | ]; |
98 | 98 | $settings = array(); |
99 | - if (isset($_SESSION['CSR_ERRORS']) && $_SESSION['CSR_ERRORS'] != '') { |
|
100 | - print '<h3 id="errorbox"><font color="red">'. $messages[$_SESSION['CSR_ERRORS']]; |
|
99 | + if (isset($_SESSION['CSR_ERRORS']) && $_SESSION['CSR_ERRORS'] != '') { |
|
100 | + print '<h3 id="errorbox"><font color="red">'.$messages[$_SESSION['CSR_ERRORS']]; |
|
101 | 101 | if ($_SESSION['CSR_ERRORS'] == 'SOAP_ERROR' && isset($_SESSION['csr_faultcode'])) { |
102 | - print '<br>'. _('Reason') . ': '. $_SESSION['csr_faultcode']; |
|
102 | + print '<br>'._('Reason').': '.$_SESSION['csr_faultcode']; |
|
103 | 103 | unset($_SESSION['csr_faultcode']); |
104 | 104 | } else { |
105 | 105 | if ($_SESSION['CSR_ERRORS'] == 'WRONG_SUBJECT' && isset($_SESSION['csr_subject'])) { |
106 | - print '<br>'. _('Your subject is:') . ' '. $_SESSION['csr_subject']; |
|
106 | + print '<br>'._('Your subject is:').' '.$_SESSION['csr_subject']; |
|
107 | 107 | unset($_SESSION['csr_subject']); |
108 | 108 | } |
109 | - print '<br>' . $messages['HINT']; |
|
109 | + print '<br>'.$messages['HINT']; |
|
110 | 110 | } |
111 | 111 | print '</font></h3>'; |
112 | 112 | unset($_SESSION['CSR_ERRORS']); |
113 | 113 | } |
114 | - if (isset($_SESSION['FORM_SETTINGS']) && $_SESSION['FORM_SETTINGS'] != '') { |
|
114 | + if (isset($_SESSION['FORM_SETTINGS']) && $_SESSION['FORM_SETTINGS'] != '') { |
|
115 | 115 | $settings = $_SESSION['FORM_SETTINGS']; |
116 | 116 | unset($_SESSION['FORM_SETTINGS']); |
117 | 117 | } |
118 | 118 | if (empty($settings) && isset($_POST['LEVEL'])) { |
119 | 119 | $settings = array('LEVEL' => $_POST['LEVEL'], 'NRO-list' => $_POST['NRO-list'], 'INST-list' => $_POST['INST-list']); |
120 | 120 | } |
121 | - if ( isset($_POST['requestcert']) && $_POST['requestcert'] == \web\lib\common\FormElements::BUTTON_SAVE) { |
|
121 | + if (isset($_POST['requestcert']) && $_POST['requestcert'] == \web\lib\common\FormElements::BUTTON_SAVE) { |
|
122 | 122 | // basic sanity checks before we hand this over to openssl |
123 | 123 | $sanitisedCsr = $validator->string($_POST['CSR'] ?? "", TRUE); |
124 | 124 | |
@@ -139,14 +139,14 @@ discard block |
||
139 | 139 | $dn .= ', '; |
140 | 140 | } |
141 | 141 | if (is_array($subject[$sk])) { |
142 | - $dn .= $sk . '=' . implode(', ' . $sk . '=', $subject[$sk]); |
|
142 | + $dn .= $sk.'='.implode(', '.$sk.'=', $subject[$sk]); |
|
143 | 143 | } else { |
144 | - $dn .= $sk . '=' . $subject[$sk]; |
|
144 | + $dn .= $sk.'='.$subject[$sk]; |
|
145 | 145 | } |
146 | 146 | } |
147 | 147 | if ($subject_keys[0] == 'DC' && $subject['DC']) { |
148 | 148 | foreach ($subject['DC'] as $v) { |
149 | - $dc[] = 'DC=' . $v; |
|
149 | + $dc[] = 'DC='.$v; |
|
150 | 150 | } |
151 | 151 | if ($DN !== array_reverse($dc)) { |
152 | 152 | $dc = array(); |
@@ -174,11 +174,11 @@ discard block |
||
174 | 174 | } |
175 | 175 | $fed = $validator->existingFederation($_POST['NRO-list']); |
176 | 176 | $country = strtoupper($fed->tld); |
177 | - $code = isset($cat->knownFederations[$country]['code']) ? $cat->knownFederations[$country]['code'] : $country ; |
|
177 | + $code = isset($cat->knownFederations[$country]['code']) ? $cat->knownFederations[$country]['code'] : $country; |
|
178 | 178 | $DN[] = "C=$code"; |
179 | - $DN[] = "O=NRO of " . iconv('UTF-8', 'ASCII//TRANSLIT', $cat->knownFederations[$country]['name']); |
|
179 | + $DN[] = "O=NRO of ".iconv('UTF-8', 'ASCII//TRANSLIT', $cat->knownFederations[$country]['name']); |
|
180 | 180 | $serverInfo = $externalDb->listExternalTlsServersFederation($fed->tld); |
181 | - $DN[] = "CN=" . $serverList[0]; |
|
181 | + $DN[] = "CN=".$serverList[0]; |
|
182 | 182 | $policies[] = "eduroam IdP"; |
183 | 183 | $policies[] = "eduroam SP"; |
184 | 184 | $firstName = $serverInfo[array_key_first($serverInfo)][0]["name"]; |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | throw new Exception(sprintf("Sorry: you are not %s admin for the %s requested in the form.", $uiElements->nomenclatureFed, $uiElements->nomenclatureFed)); |
194 | 194 | } |
195 | 195 | $country = strtoupper($matches[1]); |
196 | - $code = isset($cat->knownFederations[$country]['code']) ? $cat->knownFederations[$country]['code'] : $country ; |
|
196 | + $code = isset($cat->knownFederations[$country]['code']) ? $cat->knownFederations[$country]['code'] : $country; |
|
197 | 197 | $DN[] = "C=$code"; |
198 | 198 | $serverInfo = $extInsts[$_POST['INST-list']]; |
199 | 199 | if (isset($serverInfo["names"]["en"])) { |
@@ -205,14 +205,14 @@ discard block |
||
205 | 205 | $modou = 1; |
206 | 206 | $ou = str_replace(",", "/,", $ou); |
207 | 207 | } |
208 | - $ou = preg_replace('/\s+/', ' ', $ou); |
|
208 | + $ou = preg_replace('/\s+/', ' ', $ou); |
|
209 | 209 | if (strlen($ou) >= 64) { |
210 | 210 | $ou = substr($ou, 0, 64); |
211 | 211 | $modou += 2; |
212 | 212 | } |
213 | 213 | $DN[] = "O=".iconv('UTF-8', 'ASCII//TRANSLIT', $ou); |
214 | 214 | $serverList = explode(",", $serverInfo["servers"]); |
215 | - $DN[] = "CN=" . $serverList[0]; |
|
215 | + $DN[] = "CN=".$serverList[0]; |
|
216 | 216 | switch ($serverInfo["type"]) { |
217 | 217 | case core\IdP::TYPE_IDPSP: |
218 | 218 | $policies[] = "eduroam IdP"; |
@@ -231,13 +231,13 @@ discard block |
||
231 | 231 | default: |
232 | 232 | throw new Exception("Sorry: Unknown level of issuance requested."); |
233 | 233 | } |
234 | - echo "<p style='font-size: large'>" . _("Requesting a certificate with the following properties"); |
|
234 | + echo "<p style='font-size: large'>"._("Requesting a certificate with the following properties"); |
|
235 | 235 | echo "<ul>"; |
236 | - echo "<li>" . _("Policy OIDs: ") . implode(", ", $policies) . "</li>"; |
|
237 | - echo "<li>" . _("Distinguished Name: ") . implode(", ", $DN); |
|
236 | + echo "<li>"._("Policy OIDs: ").implode(", ", $policies)."</li>"; |
|
237 | + echo "<li>"._("Distinguished Name: ").implode(", ", $DN); |
|
238 | 238 | if ($modou > 0) { |
239 | 239 | echo " ("; |
240 | - echo _("Organization field adjusted"). ': '; |
|
240 | + echo _("Organization field adjusted").': '; |
|
241 | 241 | $desc = array(); |
242 | 242 | if ($modou >= 2) { |
243 | 243 | $desc[] = _("truncated to 64 chars"); |
@@ -249,8 +249,8 @@ discard block |
||
249 | 249 | echo ")"; |
250 | 250 | } |
251 | 251 | echo "</li>"; |
252 | - echo "<li>" . _("subjectAltName:DNS : ") . implode(", ", $serverList) . "</li>"; |
|
253 | - echo "<li>" . _("Requester Contact Details: ") . $firstName . " <" . $firstMail . ">" . "</li>"; |
|
252 | + echo "<li>"._("subjectAltName:DNS : ").implode(", ", $serverList)."</li>"; |
|
253 | + echo "<li>"._("Requester Contact Details: ").$firstName." <".$firstMail.">"."</li>"; |
|
254 | 254 | echo "</ul></p>"; |
255 | 255 | $vettedCsr = $validator->string($_POST['CSR'], true); |
256 | 256 | $newCsrWithMeta = [ |
@@ -265,11 +265,11 @@ discard block |
||
265 | 265 | $loggerInstance->debug(2, $DN, "CERT DN: ", "\n"); |
266 | 266 | // our certs can be good for max 5 years |
267 | 267 | $fed->requestCertificate($user->identifier, $newCsrWithMeta, $expiryDays); |
268 | - echo "<p>" . _("The certificate was requested.") . "</p>"; |
|
268 | + echo "<p>"._("The certificate was requested.")."</p>"; |
|
269 | 269 | if (isset($_SESSION['CSR_ERRORS']) && $_SESSION['CSR_ERRORS'] == 'SOAP_ERROR') { |
270 | - print '<h3 id="errorbox"><font color="red">'. $messages[$_SESSION['CSR_ERRORS']]; |
|
270 | + print '<h3 id="errorbox"><font color="red">'.$messages[$_SESSION['CSR_ERRORS']]; |
|
271 | 271 | if (isset($_SESSION['csr_faultcode'])) { |
272 | - print '<br>'. _('Reason') . ': '. $_SESSION['csr_faultcode']; |
|
272 | + print '<br>'._('Reason').': '.$_SESSION['csr_faultcode']; |
|
273 | 273 | unset($_SESSION['csr_faultcode']); |
274 | 274 | } |
275 | 275 | unset($_SESSION['CSR_ERRORS']); |
@@ -293,7 +293,7 @@ discard block |
||
293 | 293 | switch (count($feds)) { |
294 | 294 | case 0: |
295 | 295 | echo "<div>"; |
296 | - echo $uiElements->boxRemark("<strong>" . sprintf(_("None of your %s servers has complete information in the database."),$uiElements->nomenclatureFed)."</strong>" . _("At least the DNS names of TLS servers and a role-based contact mail address are required.")); |
|
296 | + echo $uiElements->boxRemark("<strong>".sprintf(_("None of your %s servers has complete information in the database."), $uiElements->nomenclatureFed)."</strong>"._("At least the DNS names of TLS servers and a role-based contact mail address are required.")); |
|
297 | 297 | echo "</div>"; |
298 | 298 | break; |
299 | 299 | case 1: |
@@ -301,22 +301,22 @@ discard block |
||
301 | 301 | if (empty($settings) || (isset($settings['LEVEL']) && $settings['LEVEL'] == 'NRO')) { |
302 | 302 | echo ' checked'; |
303 | 303 | } |
304 | - echo '>' . sprintf(_("Certificate for %s") ." ", $uiElements->nomenclatureFed) . '</input>'; |
|
305 | - echo " <strong>" . $cat->knownFederations[$feds[0]->tld]['name'] . "</strong>"; |
|
306 | - echo '<input type="hidden" name="NRO-list" id="NRO-list" value="' . $feds[0]->tld . '"/>'; |
|
304 | + echo '>'.sprintf(_("Certificate for %s")." ", $uiElements->nomenclatureFed).'</input>'; |
|
305 | + echo " <strong>".$cat->knownFederations[$feds[0]->tld]['name']."</strong>"; |
|
306 | + echo '<input type="hidden" name="NRO-list" id="NRO-list" value="'.$feds[0]->tld.'"/>'; |
|
307 | 307 | break; |
308 | 308 | default: |
309 | 309 | echo '<input type="radio" name="LEVEL" id="NRO" value="NRO"'; |
310 | 310 | if (empty($settings) || isset($settings['LEVEL']) && $settings['LEVEL'] == 'NRO') { |
311 | 311 | echo ' checked'; |
312 | 312 | } |
313 | - echo '>' . sprintf(_("Certificate for %s") ." ", $uiElements->nomenclatureFed) . '</input>'; |
|
313 | + echo '>'.sprintf(_("Certificate for %s")." ", $uiElements->nomenclatureFed).'</input>'; |
|
314 | 314 | ?> |
315 | 315 | <select name="NRO-list" id="NRO-list"> |
316 | 316 | <option value="notset"><?php echo _("---PLEASE CHOOSE---"); ?></option> |
317 | 317 | <?php |
318 | 318 | foreach ($feds as $oneFed) { |
319 | - echo '<option value="' . strtoupper($oneFed->tld) . '">' . $cat->knownFederations[$oneFed->tld]['name'] . "</option>"; |
|
319 | + echo '<option value="'.strtoupper($oneFed->tld).'">'.$cat->knownFederations[$oneFed->tld]['name']."</option>"; |
|
320 | 320 | #echo '<option value="AAA' . strtoupper($oneFed->tld) . '">' . $oneIdP["names"][$langObject->getLang()] . "</option>"; |
321 | 321 | |
322 | 322 | } |
@@ -329,21 +329,21 @@ discard block |
||
329 | 329 | <script> |
330 | 330 | var instservers = []; |
331 | 331 | var instpolicies = []; |
332 | - var nroservers = '<?php echo str_replace(",", ", ", array_key_first($serverInfo));?>'; |
|
332 | + var nroservers = '<?php echo str_replace(",", ", ", array_key_first($serverInfo)); ?>'; |
|
333 | 333 | <?php |
334 | 334 | $allIdPs = []; |
335 | 335 | foreach ($allAuthorizedFeds as $oneFed) { |
336 | 336 | foreach ($externalDb->listExternalTlsServersInstitution($oneFed['value']) as $id => $oneIdP) { |
337 | - if (count($oneIdP['contacts']) ==0) { |
|
337 | + if (count($oneIdP['contacts']) == 0) { |
|
338 | 338 | continue; |
339 | 339 | } |
340 | - $allIdPs[$id] = '[' . substr($id, 0, 2) . '] ' . $oneIdP["name"]; |
|
341 | - echo "instservers['" . $id . "']='" . str_replace(",", ", ", $oneIdP["servers"]) . "';\n"; |
|
342 | - echo "instpolicies['" . $id . "']='"; |
|
340 | + $allIdPs[$id] = '['.substr($id, 0, 2).'] '.$oneIdP["name"]; |
|
341 | + echo "instservers['".$id."']='".str_replace(",", ", ", $oneIdP["servers"])."';\n"; |
|
342 | + echo "instpolicies['".$id."']='"; |
|
343 | 343 | if ($oneIdP["type"] == 'IdPSP') { |
344 | 344 | echo "eduroam IdP/SP"; |
345 | 345 | } else { |
346 | - echo "eduroam " . $oneIdP["type"]; |
|
346 | + echo "eduroam ".$oneIdP["type"]; |
|
347 | 347 | } |
348 | 348 | echo "';\n"; |
349 | 349 | } |
@@ -391,9 +391,9 @@ discard block |
||
391 | 391 | <option value="notset"><?php echo _("---PLEASE CHOOSE---"); ?></option> |
392 | 392 | <?php |
393 | 393 | foreach ($allIdPs as $id => $name) { |
394 | - echo '<option value="' . $id . '"'; |
|
394 | + echo '<option value="'.$id.'"'; |
|
395 | 395 | if (isset($settings['INST-list']) && $settings['INST-list'] == $id) { echo ' selected'; } |
396 | - echo '>' . $name . "</option>"; |
|
396 | + echo '>'.$name."</option>"; |
|
397 | 397 | } |
398 | 398 | ?> |
399 | 399 | </select> |
@@ -407,7 +407,7 @@ discard block |
||
407 | 407 | <?php |
408 | 408 | echo _('According to the above settings you will receive') |
409 | 409 | ?> |
410 | - <span id='certlevel'><?php echo _('NRO level certificate');?></span> |
|
410 | + <span id='certlevel'><?php echo _('NRO level certificate'); ?></span> |
|
411 | 411 | |
412 | 412 | for server names: |
413 | 413 | <span id='serversinfo'><?php echo str_replace(",", ", ", array_key_first($serverInfo)); ?></span> |
@@ -424,12 +424,12 @@ discard block |
||
424 | 424 | <?php |
425 | 425 | } else { |
426 | 426 | echo "<div>"; |
427 | - echo $uiElements->boxRemark(sprintf(_("<strong>No organisation inside your %s has complete information in the database</strong>."." "._("At least the DNS names of TLS servers and a role-based contact mail address are required.")),$uiElements->nomenclatureFed), "No TLS capable org!", true); |
|
427 | + echo $uiElements->boxRemark(sprintf(_("<strong>No organisation inside your %s has complete information in the database</strong>."." "._("At least the DNS names of TLS servers and a role-based contact mail address are required.")), $uiElements->nomenclatureFed), "No TLS capable org!", true); |
|
428 | 428 | echo "</div>"; |
429 | 429 | } |
430 | 430 | ?> |
431 | 431 | <?php |
432 | - echo '<div id="ondb"><h4 style="margin: 0">' . _("Can't you find an institution on the select list above?") . '</h4>'; |
|
432 | + echo '<div id="ondb"><h4 style="margin: 0">'._("Can't you find an institution on the select list above?").'</h4>'; |
|
433 | 433 | echo _("Most likely we do not have required data on this institution in the eduroam database."); |
434 | 434 | echo '<br/>'; |
435 | 435 | ?> |
@@ -437,16 +437,16 @@ discard block |
||
437 | 437 | <?php |
438 | 438 | echo _('On this page'); |
439 | 439 | echo '</a> '; |
440 | - echo _('you can check what information is in the datatabase') . '.'; |
|
440 | + echo _('you can check what information is in the datatabase').'.'; |
|
441 | 441 | echo '</div>'; |
442 | 442 | if (count($feds) > 0 || count($allIdPs) > 0) {?> |
443 | 443 | <h2><?php echo _("2. CSR generation"); ?></h2> |
444 | 444 | <p> |
445 | 445 | <?php |
446 | - echo _("The CSR subject field has to start with ") .'<b>' . $subject_prefix . '</b> and follow the pattern given in the example.<br>'; |
|
446 | + echo _("The CSR subject field has to start with ").'<b>'.$subject_prefix.'</b> and follow the pattern given in the example.<br>'; |
|
447 | 447 | echo _("One way to generate an acceptable certificate request is via this openssl one-liner:"); ?></p> |
448 | 448 | <?php |
449 | - echo "<b>openssl req -new -newkey rsa:4096 -out test.csr -keyout test.key -subj /". implode('/', array_reverse($DN)) ."/C=XY/O=WillBeReplaced/CN=will.be.replaced</b>"; |
|
449 | + echo "<b>openssl req -new -newkey rsa:4096 -out test.csr -keyout test.key -subj /".implode('/', array_reverse($DN))."/C=XY/O=WillBeReplaced/CN=will.be.replaced</b>"; |
|
450 | 450 | ?> |
451 | 451 | <h2><?php echo _("3. Submission"); ?></h2> |
452 | 452 | <?php echo _("Please paste your CSR here:"); ?><br><textarea name="CSR" id="CSR" rows="20" cols="85"/></textarea><br/> |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | ?> |
31 | 31 | <?php |
32 | 32 | |
33 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
33 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
34 | 34 | |
35 | 35 | $auth = new \web\lib\admin\Authentication(); |
36 | 36 | $deco = new \web\lib\admin\PageDecoration(); |
@@ -44,24 +44,24 @@ discard block |
||
44 | 44 | |
45 | 45 | |
46 | 46 | if (!isset($_GET['token'])) { |
47 | - $elements->errorPage(_("Error creating new IdP binding!"),_("This page needs to be called with a valid invitation token!")); |
|
47 | + $elements->errorPage(_("Error creating new IdP binding!"), _("This page needs to be called with a valid invitation token!")); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | if (\config\ConfAssistant::CONSORTIUM['selfservice_registration'] === NULL && $_GET['token'] == "SELF-REGISTER") { |
51 | - $elements->errorPage(_("Error creating new IdP binding!"),_("You tried to register in self-service, but this deployment does not allow self-service!")); |
|
51 | + $elements->errorPage(_("Error creating new IdP binding!"), _("You tried to register in self-service, but this deployment does not allow self-service!")); |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | switch ($_GET['token']) { |
55 | 55 | case "EDUGAIN-SELF-REGISTER": |
56 | 56 | $token = "EDUGAIN-SELF-REGISTER"; |
57 | - $extIdUnfiltered = filter_input(INPUT_GET,'extid'); |
|
57 | + $extIdUnfiltered = filter_input(INPUT_GET, 'extid'); |
|
58 | 58 | $extIdArray = explode('-', htmlspecialchars(strip_tags($extIdUnfiltered)), 2); |
59 | 59 | $ROid = $extIdArray[0]; |
60 | 60 | $extId = $extIdArray[1]; |
61 | - $fed = new \core\Federation(strtoupper(substr($ROid,0,2))); |
|
61 | + $fed = new \core\Federation(strtoupper(substr($ROid, 0, 2))); |
|
62 | 62 | $newInstFlag = $fed->getAttributes('fed:autoregister-new-inst'); |
63 | 63 | if ($newInstFlag === []) { |
64 | - $elements->errorPage(_("Error creating new IdP!"),_("You tried to register in self-service, but this federation does not allow self-service!")); |
|
64 | + $elements->errorPage(_("Error creating new IdP!"), _("You tried to register in self-service, but this federation does not allow self-service!")); |
|
65 | 65 | } |
66 | 66 | // we must be sure that this person admins the ext institution and that it falls into the current federation |
67 | 67 | if ($validator->existingExtInstitution($extId, $userEmail, $ROid) === 1) { |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | // and check that this institution does not match anuthing in CAT. |
71 | 71 | $usermgmt = new \core\UserManagement(); |
72 | 72 | if ($usermgmt->checkForCatMatch($extId, $ROid) === 1) { |
73 | - $elements->errorPage(_("Error creating new IdP!"),_("You tried to register a new institution while it already has a match in CAT or your email is not not listed as admin for this institution in the eduroam DB!")); |
|
73 | + $elements->errorPage(_("Error creating new IdP!"), _("You tried to register a new institution while it already has a match in CAT or your email is not not listed as admin for this institution in the eduroam DB!")); |
|
74 | 74 | } |
75 | 75 | break; |
76 | 76 | case "SELF-REGISTER": |
@@ -79,23 +79,23 @@ discard block |
||
79 | 79 | $federation = \config\ConfAssistant::CONSORTIUM['selfservice_registration']; |
80 | 80 | break; |
81 | 81 | default: |
82 | - $tokenUnfiltered = $validator->token(filter_input(INPUT_GET,'token')); |
|
82 | + $tokenUnfiltered = $validator->token(filter_input(INPUT_GET, 'token')); |
|
83 | 83 | $token = htmlspecialchars(strip_tags($tokenUnfiltered)); |
84 | 84 | $checkval = $usermgmt->checkTokenValidity($token); |
85 | 85 | } |
86 | 86 | |
87 | 87 | if ($checkval < 0) { |
88 | 88 | echo $deco->pageheader(_("Error creating new IdP binding!"), "ADMIN-IDP"); |
89 | - echo "<h1>" . _("Error creating new IdP binding!") . "</h1>"; |
|
89 | + echo "<h1>"._("Error creating new IdP binding!")."</h1>"; |
|
90 | 90 | switch ($checkval) { |
91 | 91 | case \core\UserManagement::TOKENSTATUS_FAIL_ALREADYCONSUMED: |
92 | - echo "<p>" . sprintf(_("Sorry... this token has already been used. The %s is already created. If you got the invitation from a mailing list, probably someone else used it before you."), $elements->nomenclatureParticipant) . "</p>"; |
|
92 | + echo "<p>".sprintf(_("Sorry... this token has already been used. The %s is already created. If you got the invitation from a mailing list, probably someone else used it before you."), $elements->nomenclatureParticipant)."</p>"; |
|
93 | 93 | break; |
94 | 94 | case \core\UserManagement::TOKENSTATUS_FAIL_EXPIRED: |
95 | - echo "<p>" . sprintf(_("Sorry... this token has expired. Invitation tokens are valid for 24 hours. The %s administrator can create a new one for you."), $elements->nomenclatureFed) . "</p>"; |
|
95 | + echo "<p>".sprintf(_("Sorry... this token has expired. Invitation tokens are valid for 24 hours. The %s administrator can create a new one for you."), $elements->nomenclatureFed)."</p>"; |
|
96 | 96 | break; |
97 | 97 | default: |
98 | - echo "<p>" . _("Sorry... you have come to the enrollment page without a valid token. Are you a nasty person? If not, you should go to <a href='overview_user.php'>your profile page</a> instead.") . "</p>"; |
|
98 | + echo "<p>"._("Sorry... you have come to the enrollment page without a valid token. Are you a nasty person? If not, you should go to <a href='overview_user.php'>your profile page</a> instead.")."</p>"; |
|
99 | 99 | } |
100 | 100 | echo $deco->footer(); |
101 | 101 | throw new Exception("Terminating because something is wrong with the token we received."); |
@@ -109,17 +109,17 @@ discard block |
||
109 | 109 | switch ($token) { |
110 | 110 | case "EDUGAIN-SELF-REGISTER": |
111 | 111 | $newidp = $usermgmt->createIdPFromExternal($extId, $fed, $user); |
112 | - $loggerInstance->writeAudit($user, "MOD", "IdP " . $newidp->identifier . " - selfservice eduGAIN registration"); |
|
112 | + $loggerInstance->writeAudit($user, "MOD", "IdP ".$newidp->identifier." - selfservice eduGAIN registration"); |
|
113 | 113 | break; |
114 | 114 | case "SELF-REGISTER": |
115 | 115 | $fed = new \core\Federation($federation); |
116 | 116 | $newidp = new \core\IdP($fed->newIdP('SELF', core\IdP::TYPE_IDPSP, $user, "FED", "SELFSERVICE")); |
117 | - $loggerInstance->writeAudit($user, "MOD", "IdP " . $newidp->identifier . " - selfservice registration"); |
|
117 | + $loggerInstance->writeAudit($user, "MOD", "IdP ".$newidp->identifier." - selfservice registration"); |
|
118 | 118 | break; |
119 | 119 | default: |
120 | 120 | $newidp = $usermgmt->createIdPFromToken($token, $user); |
121 | 121 | $usermgmt->invalidateToken($token); |
122 | - $loggerInstance->writeAudit($user, "MOD", "IdP " . $newidp->identifier . " - Token used and invalidated"); |
|
122 | + $loggerInstance->writeAudit($user, "MOD", "IdP ".$newidp->identifier." - Token used and invalidated"); |
|
123 | 123 | break; |
124 | 124 | } |
125 | 125 |
@@ -73,17 +73,17 @@ discard block |
||
73 | 73 | $retval = "<div class='sidebar'><p>"; |
74 | 74 | $user = new \core\User($_SESSION['user']); |
75 | 75 | if ($advancedControls) { |
76 | - $retval .= "<strong>" . _("You are:") . "</strong> ".$_SESSION['name'] |
|
76 | + $retval .= "<strong>"._("You are:")."</strong> ".$_SESSION['name'] |
|
77 | 77 | ."<br/> |
78 | 78 | <br/>"; |
79 | 79 | if ($user->isFederationAdmin()) { |
80 | - $retval .= "<a href='" . \core\CAT::getRootUrlPath() . "/admin/overview_federation.php'>" . _("The NRO page") . "</a> "; |
|
80 | + $retval .= "<a href='".\core\CAT::getRootUrlPath()."/admin/overview_federation.php'>"._("The NRO page")."</a> "; |
|
81 | 81 | |
82 | 82 | } |
83 | - $retval .= "<a href='" . \core\CAT::getRootUrlPath() . "/admin/overview_user.php'>" . _("Go to your Profile page") . "</a> |
|
84 | - <a href='" . \core\CAT::getRootUrlPath() . "/admin/inc/logout.php'>" . _("Logout") . "</a> "; |
|
83 | + $retval .= "<a href='".\core\CAT::getRootUrlPath()."/admin/overview_user.php'>"._("Go to your Profile page")."</a> |
|
84 | + <a href='" . \core\CAT::getRootUrlPath()."/admin/inc/logout.php'>"._("Logout")."</a> "; |
|
85 | 85 | } |
86 | - $retval .= "<a href='" . \core\CAT::getRootUrlPath() . "/'>" . _("Start page") . "</a> |
|
86 | + $retval .= "<a href='".\core\CAT::getRootUrlPath()."/'>"._("Start page")."</a> |
|
87 | 87 | </p> |
88 | 88 | </div> <!-- sidebar -->"; |
89 | 89 | \core\common\Entity::outOfThePotatoes(); |
@@ -107,23 +107,23 @@ discard block |
||
107 | 107 | <h1>$cap1</h1> |
108 | 108 | </div><!--header_captions--> |
109 | 109 | <div id='langselection' style='padding-top:20px; padding-".$this->start.":10px;'> |
110 | - <form action='$place' method='GET' accept-charset='UTF-8'>" . _("View this page in") . " |
|
110 | + <form action='$place' method='GET' accept-charset='UTF-8'>"._("View this page in")." |
|
111 | 111 | <select id='lang' name='lang' onchange='this.form.submit()'>"; |
112 | 112 | |
113 | 113 | foreach (\config\Master::LANGUAGES as $lang => $getValue) { |
114 | - $retval .= "<option value='$lang' " . (strtoupper($language) == strtoupper($lang) ? "selected" : "" ) . " >" . $getValue['display'] . "</option> "; |
|
114 | + $retval .= "<option value='$lang' ".(strtoupper($language) == strtoupper($lang) ? "selected" : "")." >".$getValue['display']."</option> "; |
|
115 | 115 | } |
116 | 116 | $retval .= "</select>"; |
117 | 117 | |
118 | 118 | foreach ($_GET as $getVar => $getValue) { |
119 | 119 | $filterValue = htmlspecialchars(strip_tags(filter_input(INPUT_GET, $getVar))); |
120 | 120 | if ($getVar != "lang" && $getValue != "") { |
121 | - $retval .= "<input type='hidden' name='" . htmlspecialchars($getVar) . "' value='" . htmlspecialchars($filterValue) . "'>"; |
|
121 | + $retval .= "<input type='hidden' name='".htmlspecialchars($getVar)."' value='".htmlspecialchars($filterValue)."'>"; |
|
122 | 122 | } |
123 | 123 | } |
124 | 124 | $retval .= "</form> |
125 | 125 | </div><!--langselection-->"; |
126 | - $logoUrl = \core\CAT::getRootUrlPath() . "/resources/images/consortium_logo.png"; |
|
126 | + $logoUrl = \core\CAT::getRootUrlPath()."/resources/images/consortium_logo.png"; |
|
127 | 127 | $retval .= "<div class='consortium_logo'> |
128 | 128 | <img id='test_locate' src='$logoUrl' alt='Consortium Logo'> |
129 | 129 | </div> <!-- consortium_logo --> |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | |
217 | 217 | if (isset(\config\Master::APPEARANCE['MOTD']) && \config\Master::APPEARANCE['MOTD'] != "") { |
218 | 218 | $retval .= "<div id='header_MOTD' style='display:inline-block; padding-".$this->start.":20px;vertical-align:top;'> |
219 | - <p class='MOTD'>" . \config\Master::APPEARANCE['MOTD'] . "</p> |
|
219 | + <p class='MOTD'>" . \config\Master::APPEARANCE['MOTD']."</p> |
|
220 | 220 | </div><!--header_MOTD-->"; |
221 | 221 | } |
222 | 222 | $retval .= $this->sidebar($advancedControls); |
@@ -242,11 +242,11 @@ discard block |
||
242 | 242 | <html xmlns='http://www.w3.org/1999/xhtml' lang='$ourlocale'".($this->langObject->rtl ? "dir='rtl'" : "")."> |
243 | 243 | <head lang='$ourlocale'> |
244 | 244 | <meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>"; |
245 | - $cssUrl = \core\CAT::getRootUrlPath() . "/resources/css/cat.css.php"; |
|
245 | + $cssUrl = \core\CAT::getRootUrlPath()."/resources/css/cat.css.php"; |
|
246 | 246 | $retval .= "<link rel='stylesheet' type='text/css' href='$cssUrl' />"; |
247 | 247 | $retval .= "<script src='".\core\CAT::getRootUrlPath()."/external/jquery/jquery.js'></script>"; |
248 | 248 | $retval .= "<script src='".\core\CAT::getRootUrlPath()."/admin/js/click_button.js'></script>"; |
249 | - $retval .= "<title>" . htmlspecialchars($pagetitle) . "</title>"; |
|
249 | + $retval .= "<title>".htmlspecialchars($pagetitle)."</title>"; |
|
250 | 250 | return $retval; |
251 | 251 | } |
252 | 252 | |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | // we may need to jump up one dir if we are either in admin/ or accountstatus/ |
261 | 261 | // (accountstatus courtesy of my good mood. It's userspace not admin space so |
262 | 262 | // it shouldn't be using this function any more.) |
263 | - $logoBase = \core\CAT::getRootUrlPath() . "/resources/images"; |
|
263 | + $logoBase = \core\CAT::getRootUrlPath()."/resources/images"; |
|
264 | 264 | return "<span id='logos'><img src='$logoBase/dante.png' alt='DANTE' style='height:23px;width:47px'/> |
265 | 265 | <img src='$logoBase/eu.png' alt='EU' style='height:23px;width:27px;border-width:0px;'/></span> |
266 | 266 | <span id='eu_text' style='text-align:right;'><a href='http://ec.europa.eu/dgs/connect/index_en.htm' style='text-decoration:none; vertical-align:top;'>European Commission Communications Networks, Content and Technology</a></span>"; |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | $wizard = new \web\lib\admin\Wizard($wizardMode); |
139 | 139 | $wizard->setMessages(); |
140 | 140 | $retval = "<fieldset class='option_container_map'> |
141 | - <legend><strong>" . _("Location") . "</strong></legend>"; |
|
141 | + <legend><strong>" . _("Location")."</strong></legend>"; |
|
142 | 142 | $retval .= $wizard->displayHelp("location"); |
143 | 143 | if ($additional) { |
144 | 144 | $retval .= _("You can enter an <strong>additional</strong> location here. You can see the already defined locations in the 'General Information' field."); |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | */ |
156 | 156 | protected function htmlPostEdit($allowDirectInput) { |
157 | 157 | \core\common\Entity::intoThePotatoes(); |
158 | - $retval = "<br/>" . _("Latitude:") . " <input style='width:80px' name='geo_lat' id='geo_lat' " .($allowDirectInput ? "": "readonly"). ">" . _("Longitude:") . " <input name='geo_long' id='geo_long' style='width:80px' " .($allowDirectInput ? "": "readonly"). "></fieldset>"; |
|
158 | + $retval = "<br/>"._("Latitude:")." <input style='width:80px' name='geo_lat' id='geo_lat' ".($allowDirectInput ? "" : "readonly").">"._("Longitude:")." <input name='geo_long' id='geo_long' style='width:80px' ".($allowDirectInput ? "" : "readonly")."></fieldset>"; |
|
159 | 159 | \core\common\Entity::outOfThePotatoes(); |
160 | 160 | return $retval; |
161 | 161 | } |
@@ -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); |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | if (preg_match("/^$class:/", $option['name']) && !preg_match("/($blackListOnPrefill)/", $option['name'])) { |
155 | 155 | $optiontypearray = $optioninfo->optionType($option['name']); |
156 | 156 | $loggerInstance->debug(5, "About to execute optiontext with PREFILL!\n"); |
157 | - $retval .= $this->optiontext([$option['name']], ($optiontypearray["type"] == "file" ? 'ROWID-' . $option['level'] . '-' . $option['row_id'] : $option['value']), $option['lang']); |
|
157 | + $retval .= $this->optiontext([$option['name']], ($optiontypearray["type"] == "file" ? 'ROWID-'.$option['level'].'-'.$option['row_id'] : $option['value']), $option['lang']); |
|
158 | 158 | } |
159 | 159 | } |
160 | 160 | return $retval; |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | * @param string $fed the federation TLD, to determine fed ops preference context |
171 | 171 | * @return array the list of options to display |
172 | 172 | */ |
173 | - public static function enumerateOptionsToDisplay($class, $fed, $device='') |
|
173 | + public static function enumerateOptionsToDisplay($class, $fed, $device = '') |
|
174 | 174 | { |
175 | 175 | $optioninfo = \core\Options::instance(); |
176 | 176 | $loggerInstance = new \core\common\Logging(); |
@@ -266,18 +266,18 @@ discard block |
||
266 | 266 | } |
267 | 267 | $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"); |
268 | 268 | $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); |
269 | - $descriptions["media:openroaming"] = sprintf(_("By opting in to OpenRoaming, you agree to be bound by the %s."), "eduroam Ecosystem Broker OpenRoaming Identity Provider Policy") . |
|
270 | - " " . |
|
271 | - 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']) . |
|
272 | - " " . |
|
273 | - _("You are also aware that for best technical interoperability, you need to add a DNS entry into the DNS zone of your RADIUS realm.") . |
|
274 | - " " . |
|
269 | + $descriptions["media:openroaming"] = sprintf(_("By opting in to OpenRoaming, you agree to be bound by the %s."), "eduroam Ecosystem Broker OpenRoaming Identity Provider Policy"). |
|
270 | + " ". |
|
271 | + 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']). |
|
272 | + " ". |
|
273 | + _("You are also aware that for best technical interoperability, you need to add a DNS entry into the DNS zone of your RADIUS realm."). |
|
274 | + " ". |
|
275 | 275 | _("Read the instructions in the wiki."); |
276 | 276 | \core\common\Entity::outOfThePotatoes(); |
277 | 277 | if (!isset($descriptions[$input])) { |
278 | 278 | return ""; |
279 | 279 | } |
280 | - 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>"; |
|
280 | + 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>"; |
|
281 | 281 | } |
282 | 282 | |
283 | 283 | /** |
@@ -291,19 +291,19 @@ discard block |
||
291 | 291 | private function selectElement($rowid, $list) |
292 | 292 | { |
293 | 293 | $jsmagic = "onchange=' |
294 | - if (/#ML#/.test(document.getElementById(\"option-S" . $rowid . "-select\").value)) { |
|
294 | + if (/#ML#/.test(document.getElementById(\"option-S" . $rowid."-select\").value)) { |
|
295 | 295 | document.getElementById(\"S$rowid-input-langselect\").style.display = \"block\"; |
296 | 296 | } else { |
297 | 297 | document.getElementById(\"S$rowid-input-langselect\").style.display = \"none\"; |
298 | 298 | }"; |
299 | 299 | foreach (array_keys($this->htmlDatatypeTexts) as $key) { |
300 | - $jsmagic .= "if (/#" . $key . "#/.test(document.getElementById(\"option-S" . $rowid . "-select\").value)) { |
|
301 | - document.getElementById(\"S$rowid-input-file\").style.display = \"" . ($key == \core\Options::TYPECODE_FILE ? "block" : "none") . "\"; |
|
302 | - document.getElementById(\"S$rowid-input-text\").style.display = \"" . ($key == \core\Options::TYPECODE_TEXT ? "block" : "none") . "\"; |
|
303 | - document.getElementById(\"S$rowid-input-string\").style.display = \"" . ($key == \core\Options::TYPECODE_STRING ? "block" : "none") . "\"; |
|
304 | - document.getElementById(\"S$rowid-input-enum_openroaming\").style.display = \"" . ($key == \core\Options::TYPECODE_ENUM_OPENROAMING ? "block" : "none") . "\"; |
|
305 | - document.getElementById(\"S$rowid-input-boolean\").style.display = \"" . ($key == \core\Options::TYPECODE_BOOLEAN ? "block" : "none") . "\"; |
|
306 | - document.getElementById(\"S$rowid-input-integer\").style.display = \"" . ($key == \core\Options::TYPECODE_INTEGER ? "block" : "none") . "\"; |
|
300 | + $jsmagic .= "if (/#".$key."#/.test(document.getElementById(\"option-S".$rowid."-select\").value)) { |
|
301 | + document.getElementById(\"S$rowid-input-file\").style.display = \"".($key == \core\Options::TYPECODE_FILE ? "block" : "none")."\"; |
|
302 | + document.getElementById(\"S$rowid-input-text\").style.display = \"".($key == \core\Options::TYPECODE_TEXT ? "block" : "none")."\"; |
|
303 | + document.getElementById(\"S$rowid-input-string\").style.display = \"".($key == \core\Options::TYPECODE_STRING ? "block" : "none")."\"; |
|
304 | + document.getElementById(\"S$rowid-input-enum_openroaming\").style.display = \"".($key == \core\Options::TYPECODE_ENUM_OPENROAMING ? "block" : "none")."\"; |
|
305 | + document.getElementById(\"S$rowid-input-boolean\").style.display = \"".($key == \core\Options::TYPECODE_BOOLEAN ? "block" : "none")."\"; |
|
306 | + document.getElementById(\"S$rowid-input-integer\").style.display = \"".($key == \core\Options::TYPECODE_INTEGER ? "block" : "none")."\"; |
|
307 | 307 | } |
308 | 308 | "; |
309 | 309 | // hide all tooltips (each is a <span>, and there are no other <span>s) |
@@ -334,7 +334,7 @@ discard block |
||
334 | 334 | $value = array_shift($list); |
335 | 335 | $listtype = $optioninfo->optionType($value); |
336 | 336 | $retval .= $uiElements->displayName($value); |
337 | - $retval .= "<input type='hidden' name='option[S$rowid]' value='$value#" . $listtype["type"] . "#" . $listtype["flag"] . "#'/>"; |
|
337 | + $retval .= "<input type='hidden' name='option[S$rowid]' value='$value#".$listtype["type"]."#".$listtype["flag"]."#'/>"; |
|
338 | 338 | $activelisttype = $listtype; |
339 | 339 | $tooltips = $this->tooltip($rowid, $value, TRUE); |
340 | 340 | break; |
@@ -347,7 +347,7 @@ discard block |
||
347 | 347 | array_multisort($sortArray, SORT_ASC, $list); |
348 | 348 | foreach ($list as $value) { |
349 | 349 | $listtype = $optioninfo->optionType($value); |
350 | - $retval .= "<option id='option-S$rowid-v-$value' value='$value#" . $listtype["type"] . "#" . $listtype["flag"] . "#' "; |
|
350 | + $retval .= "<option id='option-S$rowid-v-$value' value='$value#".$listtype["type"]."#".$listtype["flag"]."#' "; |
|
351 | 351 | if ($iterator == $this->optionIterator) { |
352 | 352 | $retval .= "selected='selected'"; |
353 | 353 | $activelisttype = $listtype; |
@@ -355,7 +355,7 @@ discard block |
||
355 | 355 | } else { |
356 | 356 | $tooltips .= $this->tooltip($rowid, $value, FALSE); |
357 | 357 | } |
358 | - $retval .= ">" . $uiElements->displayName($value) . "</option>"; |
|
358 | + $retval .= ">".$uiElements->displayName($value)."</option>"; |
|
359 | 359 | $iterator++; |
360 | 360 | } |
361 | 361 | |
@@ -381,9 +381,9 @@ discard block |
||
381 | 381 | private function selectLanguage($rowid, $makeVisible) |
382 | 382 | { |
383 | 383 | \core\common\Entity::intoThePotatoes(); |
384 | - $retval = "<select style='display:" . ($makeVisible ? "block" : "none") . "' name='value[S$rowid-lang]' id='S" . $rowid . "-input-langselect'> |
|
385 | - <option value='' name='select_language' selected>" . _("select language") . "</option> |
|
386 | - <option value='C' name='all_languages'>" . _("default/other languages") . "</option>"; |
|
384 | + $retval = "<select style='display:".($makeVisible ? "block" : "none")."' name='value[S$rowid-lang]' id='S".$rowid."-input-langselect'> |
|
385 | + <option value='' name='select_language' selected>" . _("select language")."</option> |
|
386 | + <option value='C' name='all_languages'>" . _("default/other languages")."</option>"; |
|
387 | 387 | foreach (\config\Master::LANGUAGES as $langindex => $possibleLang) { |
388 | 388 | $thislang = $possibleLang['display']; |
389 | 389 | $retval .= "<option value='$langindex' name='$langindex'>$thislang</option>"; |
@@ -404,7 +404,7 @@ discard block |
||
404 | 404 | { |
405 | 405 | $retval = ""; |
406 | 406 | foreach ($this->htmlDatatypeTexts as $key => $type) { |
407 | - $retval .= "<" . $type['html'] . " style='display:" . ($activetype['type'] == $key ? "block" : "none") . "' name='value[S$rowid-$key]' id='S" . $rowid . "-input-" . $key . "'" . $type['tail'] . ">"; |
|
407 | + $retval .= "<".$type['html']." style='display:".($activetype['type'] == $key ? "block" : "none")."' name='value[S$rowid-$key]' id='S".$rowid."-input-".$key."'".$type['tail'].">"; |
|
408 | 408 | } |
409 | 409 | return $retval; |
410 | 410 | } |
@@ -420,11 +420,11 @@ discard block |
||
420 | 420 | { |
421 | 421 | // first column: the <select> element with the names of options and their field-toggling JS magic |
422 | 422 | $selectorInfo = $this->selectElement($rowid, $list); |
423 | - $retval = "<td>" . $selectorInfo["TEXT"] . "</td>"; |
|
423 | + $retval = "<td>".$selectorInfo["TEXT"]."</td>"; |
|
424 | 424 | // second column: the <select> element for language selection - only visible if the active option is multi-lang |
425 | - $retval .= "<td>" . $this->selectLanguage($rowid, $selectorInfo['ACTIVE']['flag'] == "ML") . "</td>"; |
|
425 | + $retval .= "<td>".$this->selectLanguage($rowid, $selectorInfo['ACTIVE']['flag'] == "ML")."</td>"; |
|
426 | 426 | // third column: the actual input fields; the data type of the active option is visible, all others hidden |
427 | - $retval .= "<td>" . $this->inputFields($rowid, $selectorInfo['ACTIVE']) . "</td>"; |
|
427 | + $retval .= "<td>".$this->inputFields($rowid, $selectorInfo['ACTIVE'])."</td>"; |
|
428 | 428 | return $retval; |
429 | 429 | } |
430 | 430 | |
@@ -448,20 +448,20 @@ discard block |
||
448 | 448 | $retval .= "<td>"; |
449 | 449 | $uiElements = new UIElements(); |
450 | 450 | $listtype = $optioninfo->optionType($optionName); |
451 | - $retval .= "<span style='display:flex;'>" . $uiElements->displayName($optionName); |
|
452 | - $retval .= $this->tooltip($rowid, $optionName, TRUE) . "</span>"; |
|
453 | - $retval .= "<input type='hidden' id='option-S$rowid-select' name='option[S$rowid]' value='$optionName#" . $listtype["type"] . "#" . $listtype["flag"] . "#' ></td>"; |
|
451 | + $retval .= "<span style='display:flex;'>".$uiElements->displayName($optionName); |
|
452 | + $retval .= $this->tooltip($rowid, $optionName, TRUE)."</span>"; |
|
453 | + $retval .= "<input type='hidden' id='option-S$rowid-select' name='option[S$rowid]' value='$optionName#".$listtype["type"]."#".$listtype["flag"]."#' ></td>"; |
|
454 | 454 | |
455 | 455 | // language tag if any |
456 | 456 | $retval .= "<td>"; |
457 | 457 | if ($listtype["flag"] == "ML") { |
458 | 458 | |
459 | - $language = "(" . strtoupper($optionLang) . ")"; |
|
459 | + $language = "(".strtoupper($optionLang).")"; |
|
460 | 460 | if ($optionLang == 'C') { |
461 | 461 | $language = _("(default/other languages)"); |
462 | 462 | } |
463 | 463 | $retval .= $language; |
464 | - $retval .= "<input type='hidden' name='value[S$rowid-lang]' id='S" . $rowid . "-input-langselect' value='" . $optionLang . "' style='display:block'>"; |
|
464 | + $retval .= "<input type='hidden' name='value[S$rowid-lang]' id='S".$rowid."-input-langselect' value='".$optionLang."' style='display:block'>"; |
|
465 | 465 | } |
466 | 466 | $retval .= "</td>"; |
467 | 467 | // attribute content |
@@ -471,12 +471,12 @@ discard block |
||
471 | 471 | case \core\Options::TYPECODE_COORDINATES: |
472 | 472 | $this->allLocationCount = $this->allLocationCount + 1; |
473 | 473 | // display of the locations varies by map provider |
474 | - $classname = "\web\lib\admin\Map" . \config\ConfAssistant::MAPPROVIDER['PROVIDER']; |
|
474 | + $classname = "\web\lib\admin\Map".\config\ConfAssistant::MAPPROVIDER['PROVIDER']; |
|
475 | 475 | $link = $classname::optionListDisplayCode($optionValue, $this->allLocationCount); |
476 | - $retval .= "<input readonly style='display:none' type='text' name='value[S$rowid-" . \core\Options::TYPECODE_TEXT . "]' id='S$rowid-input-text' value='$optionValue'>$link"; |
|
476 | + $retval .= "<input readonly style='display:none' type='text' name='value[S$rowid-".\core\Options::TYPECODE_TEXT."]' id='S$rowid-input-text' value='$optionValue'>$link"; |
|
477 | 477 | break; |
478 | 478 | case \core\Options::TYPECODE_FILE: |
479 | - $retval .= "<input readonly type='text' name='value[S$rowid-" . \core\Options::TYPECODE_STRING . "]' id='S" . $rowid . "-input-string' style='display:none' value='" . urlencode($optionValue) . "'>"; |
|
479 | + $retval .= "<input readonly type='text' name='value[S$rowid-".\core\Options::TYPECODE_STRING."]' id='S".$rowid."-input-string' style='display:none' value='".urlencode($optionValue)."'>"; |
|
480 | 480 | $uiElements = new UIElements(); |
481 | 481 | switch ($optionName) { |
482 | 482 | case "eap:ca_file": |
@@ -498,7 +498,7 @@ discard block |
||
498 | 498 | break; |
499 | 499 | case \core\Options::TYPECODE_ENUM_OPENROAMING: // is a string after all |
500 | 500 | $displayedVariant = $this->enumPrettyPrints[$optionValue]; |
501 | - $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'>"; |
|
501 | + $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'>"; |
|
502 | 502 | break; |
503 | 503 | case \core\Options::TYPECODE_STRING: |
504 | 504 | // fall-thorugh is intentional; mostly identical HTML code for the three types |
@@ -506,11 +506,11 @@ discard block |
||
506 | 506 | // fall-thorugh is intentional; mostly identical HTML code for the three types |
507 | 507 | case \core\Options::TYPECODE_TEXT: |
508 | 508 | $displayedVariant = $optionValue; // for all three types, value tag and actual display are identical |
509 | - $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'>"; |
|
509 | + $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'>"; |
|
510 | 510 | break; |
511 | 511 | case \core\Options::TYPECODE_BOOLEAN: |
512 | 512 | $displayedVariant = ($optionValue == "on" ? _("on") : _("off")); |
513 | - $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'>"; |
|
513 | + $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'>"; |
|
514 | 514 | break; |
515 | 515 | default: |
516 | 516 | // this should never happen! |
@@ -556,10 +556,10 @@ discard block |
||
556 | 556 | <td> |
557 | 557 | <button type='button' class='delete' onclick='"; |
558 | 558 | if ($prefillValue !== NULL && $item == "general:geo_coordinates") { |
559 | - $funcname = "Map" . \config\ConfAssistant::MAPPROVIDER['PROVIDER'] . 'DeleteCoord'; |
|
560 | - $retval .= 'if (typeof ' . $funcname . ' === "function") { ' . $funcname . '(' . $this->allLocationCount . '); } '; |
|
559 | + $funcname = "Map".\config\ConfAssistant::MAPPROVIDER['PROVIDER'].'DeleteCoord'; |
|
560 | + $retval .= 'if (typeof '.$funcname.' === "function") { '.$funcname.'('.$this->allLocationCount.'); } '; |
|
561 | 561 | } |
562 | - $retval .= 'deleteOption("option-S' . $rowid . '")'; |
|
562 | + $retval .= 'deleteOption("option-S'.$rowid.'")'; |
|
563 | 563 | $retval .= "'>-</button> |
564 | 564 | </td> |
565 | 565 | </tr>"; |
@@ -107,83 +107,83 @@ discard block |
||
107 | 107 | foreach ($optionsList as $option) { |
108 | 108 | $this->optionsHelp[$option] = $this->displayName($option, true); |
109 | 109 | } |
110 | - array_multisort(array_column($this->optionsHelp,'display'), SORT_ASC, $this->optionsHelp); |
|
110 | + array_multisort(array_column($this->optionsHelp, 'display'), SORT_ASC, $this->optionsHelp); |
|
111 | 111 | } |
112 | 112 | |
113 | 113 | public function setMessages() { |
114 | 114 | // FED general |
115 | - $h = "<p><h3>" . _("Here you set federation-level options.") . "</h3><p>"; |
|
116 | - $h .= "<i>" . _("The following options are available:") . "</i><p>"; |
|
115 | + $h = "<p><h3>"._("Here you set federation-level options.")."</h3><p>"; |
|
116 | + $h .= "<i>"._("The following options are available:")."</i><p>"; |
|
117 | 117 | $h .= "<dl>"; |
118 | 118 | foreach ($this->optionsHelp as $o) { |
119 | - $h .= "<dt>". $o['display'] . "</dt>"; |
|
120 | - $h .= "<dd>" . $o['help'] . "</dd>"; |
|
119 | + $h .= "<dt>".$o['display']."</dt>"; |
|
120 | + $h .= "<dd>".$o['help']."</dd>"; |
|
121 | 121 | } |
122 | 122 | $h .= "</dl>"; |
123 | 123 | $this->helpMessage['fed_general'] = $h; |
124 | 124 | // SUPPORT |
125 | - $h = "<p>" . _("This section can be used to upload specific Terms of Use for your users and to display details of how your users can reach your local helpdesk.") . "</p>"; |
|
125 | + $h = "<p>"._("This section can be used to upload specific Terms of Use for your users and to display details of how your users can reach your local helpdesk.")."</p>"; |
|
126 | 126 | if (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_RADIUS'] == "LOCAL") { |
127 | - $h .= "<p>" . |
|
128 | - sprintf(_("Do you provide helpdesk services for your users? If so, it would be nice if you would tell us the pointers to this helpdesk."), $this->nomenclatureParticipant) . "</p>" . |
|
129 | - "<p>" . |
|
130 | - _("If you enter a value here, it will be added to the installers for all your users, and will be displayed on the download page. If you operate separate helpdesks for different user groups (we call this 'profiles') specify per-profile helpdesk information later in this wizard. If you operate no help desk at all, just leave these fields empty.") . "</p>"; |
|
127 | + $h .= "<p>". |
|
128 | + sprintf(_("Do you provide helpdesk services for your users? If so, it would be nice if you would tell us the pointers to this helpdesk."), $this->nomenclatureParticipant)."</p>". |
|
129 | + "<p>". |
|
130 | + _("If you enter a value here, it will be added to the installers for all your users, and will be displayed on the download page. If you operate separate helpdesks for different user groups (we call this 'profiles') specify per-profile helpdesk information later in this wizard. If you operate no help desk at all, just leave these fields empty.")."</p>"; |
|
131 | 131 | if (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_SILVERBULLET'] == "LOCAL") { |
132 | - $h .= "<p>" . sprintf(_("For %s deployments, providing at least a local e-mail contact is required."), \config\ConfAssistant::SILVERBULLET['product_name']) . " " . _("This is the contact point for your organisation. It may be displayed publicly.") . "</p>"; |
|
132 | + $h .= "<p>".sprintf(_("For %s deployments, providing at least a local e-mail contact is required."), \config\ConfAssistant::SILVERBULLET['product_name'])." "._("This is the contact point for your organisation. It may be displayed publicly.")."</p>"; |
|
133 | 133 | } |
134 | 134 | } elseif (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_SILVERBULLET'] == "LOCAL") { |
135 | - $h .= "<p>" . _("Providing at least a local support e-mail contact is required.") . " " . _("This is the contact point for your end users' level 1 support.") . "</p>"; |
|
135 | + $h .= "<p>"._("Providing at least a local support e-mail contact is required.")." "._("This is the contact point for your end users' level 1 support.")."</p>"; |
|
136 | 136 | } |
137 | 137 | $this->helpMessage['support'] = $h; |
138 | 138 | |
139 | 139 | // MEDIA |
140 | - $h = "<p>" . |
|
141 | - sprintf(_("In this section, you define on which media %s should be configured on user devices."), \config\ConfAssistant::CONSORTIUM['display_name']) . "</p><ul>"; |
|
140 | + $h = "<p>". |
|
141 | + sprintf(_("In this section, you define on which media %s should be configured on user devices."), \config\ConfAssistant::CONSORTIUM['display_name'])."</p><ul>"; |
|
142 | 142 | $h .= "<li>"; |
143 | - $h .= "<strong>" . ( count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0 ? _("Additional SSIDs:") : _("SSIDs:")) . " </strong>"; |
|
143 | + $h .= "<strong>".(count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0 ? _("Additional SSIDs:") : _("SSIDs:"))." </strong>"; |
|
144 | 144 | if (count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0) { |
145 | 145 | $ssidlist = ""; |
146 | 146 | foreach (\config\ConfAssistant::CONSORTIUM['ssid'] as $ssid) { |
147 | - $ssidlist .= ", '<strong>" . $ssid . "</strong>'"; |
|
147 | + $ssidlist .= ", '<strong>".$ssid."</strong>'"; |
|
148 | 148 | } |
149 | 149 | $ssidlist = substr($ssidlist, 2); |
150 | 150 | $h .= sprintf(ngettext("We will always configure this SSID for WPA2/AES: %s.", "We will always configure these SSIDs for WPA2/AES: %s.", count(\config\ConfAssistant::CONSORTIUM['ssid'])), $ssidlist); |
151 | - $h .= "<br/>" . sprintf(_("It is also possible to define custom additional SSIDs with the option '%s' below."), $this->displayName("media:SSID")); |
|
151 | + $h .= "<br/>".sprintf(_("It is also possible to define custom additional SSIDs with the option '%s' below."), $this->displayName("media:SSID")); |
|
152 | 152 | } else { |
153 | - $h .= _("Please configure which SSIDs should be configured in the installers."); |
|
153 | + $h .= _("Please configure which SSIDs should be configured in the installers."); |
|
154 | 154 | } |
155 | - $h .= " " . _("By default, we will only configure the SSIDs with WPA2/AES encryption. By using the '(with WPA/TKIP)' option you can specify that we should include legacy support for WPA/TKIP where possible."); |
|
155 | + $h .= " "._("By default, we will only configure the SSIDs with WPA2/AES encryption. By using the '(with WPA/TKIP)' option you can specify that we should include legacy support for WPA/TKIP where possible."); |
|
156 | 156 | $h .= "</li>"; |
157 | 157 | |
158 | 158 | $h .= "<li>"; |
159 | - $h .= "<strong>" . ( count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0 ? _("Additional Hotspot 2.0 / Passpoint Consortia:") : _("Hotspot 2.0 / Passpoint Consortia:")) . " </strong>"; |
|
159 | + $h .= "<strong>".(count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0 ? _("Additional Hotspot 2.0 / Passpoint Consortia:") : _("Hotspot 2.0 / Passpoint Consortia:"))." </strong>"; |
|
160 | 160 | if (count(\config\ConfAssistant::CONSORTIUM['interworking-consortium-oi']) > 0) { |
161 | 161 | $consortiumlist = ""; |
162 | 162 | foreach (\config\ConfAssistant::CONSORTIUM['interworking-consortium-oi'] as $oi) { |
163 | - $consortiumlist .= ", '<strong>" . $oi . "</strong>'"; |
|
163 | + $consortiumlist .= ", '<strong>".$oi."</strong>'"; |
|
164 | 164 | } |
165 | 165 | $consortiumlist = substr($consortiumlist, 2); |
166 | 166 | $h .= sprintf(ngettext("We will always configure this Consortium OI: %s.", "We will always configure these Consortium OIs: %s.", count(\config\ConfAssistant::CONSORTIUM['interworking-consortium-oi'])), $consortiumlist); |
167 | 167 | |
168 | - $h .= "<br/>" . sprintf(_("It is also possible to define custom additional OIs with the option '%s' below."), $this->displayName("media:consortium_OI")); |
|
168 | + $h .= "<br/>".sprintf(_("It is also possible to define custom additional OIs with the option '%s' below."), $this->displayName("media:consortium_OI")); |
|
169 | 169 | } else { |
170 | 170 | $h .= _("Please configure which Consortium OIs should be configured in the installers."); |
171 | 171 | } |
172 | 172 | $h .= "</li>"; |
173 | - $h .= "<li><strong>" . _("Support for wired IEEE 802.1X:") . " </strong>" |
|
174 | - . _("If you want to configure your users' devices with IEEE 802.1X support for wired ethernet, please check the corresponding box. Note that this makes the installation process a bit more difficult on some platforms (Windows: needs administrator privileges; Apple: attempting to install a profile with wired support on a device without an active wired ethernet card will fail).") . |
|
173 | + $h .= "<li><strong>"._("Support for wired IEEE 802.1X:")." </strong>" |
|
174 | + . _("If you want to configure your users' devices with IEEE 802.1X support for wired ethernet, please check the corresponding box. Note that this makes the installation process a bit more difficult on some platforms (Windows: needs administrator privileges; Apple: attempting to install a profile with wired support on a device without an active wired ethernet card will fail)."). |
|
175 | 175 | "</li>"; |
176 | - $h .= "<li><strong>" . _("Removal of bootstrap/onboarding SSIDs:") . " </strong>" |
|
176 | + $h .= "<li><strong>"._("Removal of bootstrap/onboarding SSIDs:")." </strong>" |
|
177 | 177 | . _("If you use a captive portal to distribute configurations, you may want to unconfigure/disable that SSID after the bootstrap process. With this option, the SSID will either be removed, or be defined as 'Only connect manually'.") |
178 | 178 | . "</li>"; |
179 | 179 | $h .= "</ul>"; |
180 | 180 | $this->helpMessage['media'] = $h; |
181 | 181 | |
182 | 182 | // IDP GENERAL |
183 | - $h = "<p>" . |
|
184 | - _("Some properties are valid across all deployment profiles. This is the place where you can describe those properties in a fine-grained way. The solicited information is used as follows:") . "</p>". |
|
183 | + $h = "<p>". |
|
184 | + _("Some properties are valid across all deployment profiles. This is the place where you can describe those properties in a fine-grained way. The solicited information is used as follows:")."</p>". |
|
185 | 185 | "<ul>". |
186 | - "<li>"._("<strong>Logo</strong>: When you submit a logo, we will embed this logo into all installers where a custom logo is possible. We accept any image format, but for best results, we suggest SVG. If you don't upload a logo, we will use the generic logo instead (see top-right corner of this page).") . "</li>". |
|
186 | + "<li>"._("<strong>Logo</strong>: When you submit a logo, we will embed this logo into all installers where a custom logo is possible. We accept any image format, but for best results, we suggest SVG. If you don't upload a logo, we will use the generic logo instead (see top-right corner of this page).")."</li>". |
|
187 | 187 | "<li>".sprintf(_("<strong>%s</strong>: The organisation may have names in multiple languages. It is recommended to always populate at least the 'default/other' language, as it is used as a fallback if the system does not have a name in the exact language the user requests a download in."), $this->displayName("general:instname"))."</li>". |
188 | 188 | "<li>".sprintf(_("<strong>%s</strong>: This acronym will be used as an element of the instller file name instead of one automatically created from first letters of every worg in the institution name. You may add acronyms for multiple lunguages (but only one per language). The acronym will also be used as a keyword for the organisation search on the user's downloads page."), $this->displayName("general:instshortname"))."</li>". |
189 | 189 | "<li>".sprintf(_("<strong>%s</strong>: You may add several versoions of the organisation name or acronyms which will be used as additional keywords exclusively for the organisation search on the user's downloads page."), $this->displayName("general:instaltname"))."</li>". |
@@ -191,13 +191,13 @@ discard block |
||
191 | 191 | $this->helpMessage['idp_general'] = $h; |
192 | 192 | |
193 | 193 | // PROFILE GENERAL |
194 | - $h = "<p>" . _("First of all we need a name for the profile. This will be displayed to end users, so you may want to choose a descriptive name like 'Professors', 'Students of the Faculty of Bioscience', etc.") . "</p>". |
|
195 | - "<p>" . _("Optionally, you can provide a longer descriptive text about who this profile is for. If you specify it, it will be displayed on the download page after the user has selected the profile name in the list.") . "</p>". |
|
196 | - "<p>" . _("You can also tell us your RADIUS realm. "); |
|
194 | + $h = "<p>"._("First of all we need a name for the profile. This will be displayed to end users, so you may want to choose a descriptive name like 'Professors', 'Students of the Faculty of Bioscience', etc.")."</p>". |
|
195 | + "<p>"._("Optionally, you can provide a longer descriptive text about who this profile is for. If you specify it, it will be displayed on the download page after the user has selected the profile name in the list.")."</p>". |
|
196 | + "<p>"._("You can also tell us your RADIUS realm. "); |
|
197 | 197 | if (\config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS'] !== NULL) { |
198 | 198 | $h .= sprintf(_("This is useful if you want to use the sanity check module later, which tests reachability of your realm in the %s infrastructure. "), \config\ConfAssistant::CONSORTIUM['display_name']); |
199 | 199 | } |
200 | - $h .= _("It is required to enter the realm name if you want to support anonymous outer identities (see below).") . "</p>"; |
|
200 | + $h .= _("It is required to enter the realm name if you want to support anonymous outer identities (see below).")."</p>"; |
|
201 | 201 | $this->helpMessage['profile'] = $h; |
202 | 202 | |
203 | 203 | // REALM |
@@ -207,24 +207,24 @@ discard block |
||
207 | 207 | $this->helpMessage['realm'] = $h; |
208 | 208 | |
209 | 209 | // REDIRECT |
210 | - $h ="<p>"._("The CAT has a download area for end users. There, they will, for example, learn about the support pointers you entered earlier. The CAT can also immediately offer the installers for the profile for download. If you don't want that, you can instead enter a web site location where you want your users to be redirected to. You, as the administrator, can still download the profiles to place them on that page (see the 'Compatibility Matrix' button on the dashboard).") . "</p>"; |
|
210 | + $h = "<p>"._("The CAT has a download area for end users. There, they will, for example, learn about the support pointers you entered earlier. The CAT can also immediately offer the installers for the profile for download. If you don't want that, you can instead enter a web site location where you want your users to be redirected to. You, as the administrator, can still download the profiles to place them on that page (see the 'Compatibility Matrix' button on the dashboard).")."</p>"; |
|
211 | 211 | $this->helpMessage['redirect'] = $h; |
212 | 212 | |
213 | 213 | // EAP |
214 | - $h = "<p>"._("Now, we need to know which EAP types your IdP supports. If you support multiple EAP types, you can assign every type a priority (1=highest). This tool will always generate an automatic installer for the EAP type with the highest priority; only if the user's device can't use that EAP type, we will use an EAP type further down in the list.") . "</p>"; |
|
214 | + $h = "<p>"._("Now, we need to know which EAP types your IdP supports. If you support multiple EAP types, you can assign every type a priority (1=highest). This tool will always generate an automatic installer for the EAP type with the highest priority; only if the user's device can't use that EAP type, we will use an EAP type further down in the list.")."</p>"; |
|
215 | 215 | $this->helpMessage['eap_support'] = $h; |
216 | 216 | |
217 | 217 | // LOCATIOM |
218 | - $h = "<p>" . |
|
219 | - _("The user download interface (see <a href='../'>here</a>), uses geolocation to suggest possibly matching IdPs to the user. The more precise you define the location here, the easier your users will find you.") . |
|
218 | + $h = "<p>". |
|
219 | + _("The user download interface (see <a href='../'>here</a>), uses geolocation to suggest possibly matching IdPs to the user. The more precise you define the location here, the easier your users will find you."). |
|
220 | 220 | "</p> |
221 | 221 | <ul>" . |
222 | 222 | _("<li>Drag the marker in the map to your place, or</li> |
223 | 223 | <li>enter your street address in the field below for lookup, or</li> |
224 | -<li>use the 'Locate Me!' button</li>") . |
|
224 | +<li>use the 'Locate Me!' button</li>"). |
|
225 | 225 | "</ul> |
226 | 226 | <strong>" . |
227 | - _("We will use the coordinates as indicated by the marker for geolocation.") . |
|
227 | + _("We will use the coordinates as indicated by the marker for geolocation."). |
|
228 | 228 | "</strong>"; |
229 | 229 | $this->helpMessage['location'] = $h; |
230 | 230 | } |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | 'display' => sprintf(_("Mint %s with CA on creation"), $this->nomenclatureIdP), |
150 | 150 | 'help' => _("Set of default CAs to add to new IdPs on signup")], |
151 | 151 | "fed:openroaming" => [ |
152 | - 'display' => sprintf(_("OpenRoaming: Allow %s Opt-In"),$this->nomenclatureParticipant), |
|
152 | + 'display' => sprintf(_("OpenRoaming: Allow %s Opt-In"), $this->nomenclatureParticipant), |
|
153 | 153 | 'help' => _("Allow IdP to set OpenRoaming support for its users.")], |
154 | 154 | "fed:openroaming_customtarget" => ['display' => _("OpenRoaming: Custom NAPTR Target"), 'help' => ""], |
155 | 155 | "fed:autoregister-synced" => [ |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | ]; |
175 | 175 | |
176 | 176 | if (!isset($displayNames[$input])) { // this is an error! throw an Exception |
177 | - throw new \Exception("The translation of an option name was requested, but the option is not known to the system: " . htmlentities($input)); |
|
177 | + throw new \Exception("The translation of an option name was requested, but the option is not known to the system: ".htmlentities($input)); |
|
178 | 178 | } |
179 | 179 | \core\common\Entity::outOfThePotatoes(); |
180 | 180 | // 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 |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | |
201 | 201 | foreach ($optionlist as $option) { |
202 | 202 | $type = $optioninfo->optionType($option['name']); |
203 | - if (preg_match('/^' . $class . '/', $option['name']) && $option['level'] == "$level") { |
|
203 | + if (preg_match('/^'.$class.'/', $option['name']) && $option['level'] == "$level") { |
|
204 | 204 | // all non-multilang attribs get this assignment ... |
205 | 205 | $language = ""; |
206 | 206 | $content = $option['value']; |
@@ -218,19 +218,19 @@ discard block |
||
218 | 218 | $locationMarkers[] = $coords; |
219 | 219 | break; |
220 | 220 | case "file": |
221 | - $retval .= "<tr><td>" . $this->displayName($option['name']) . "</td><td>$language</td><td>"; |
|
221 | + $retval .= "<tr><td>".$this->displayName($option['name'])."</td><td>$language</td><td>"; |
|
222 | 222 | switch ($option['name']) { |
223 | 223 | case "general:logo_file": |
224 | 224 | case "fed:logo_file": |
225 | - $retval .= $this->previewImageinHTML('ROWID-' . $option['level'] . '-' . $option['row_id']); |
|
225 | + $retval .= $this->previewImageinHTML('ROWID-'.$option['level'].'-'.$option['row_id']); |
|
226 | 226 | break; |
227 | 227 | case "eap:ca_file": |
228 | 228 | // fall-through intended: display both the same way |
229 | 229 | case "fed:minted_ca_file": |
230 | - $retval .= $this->previewCAinHTML('ROWID-' . $option['level'] . '-' . $option['row_id']); |
|
230 | + $retval .= $this->previewCAinHTML('ROWID-'.$option['level'].'-'.$option['row_id']); |
|
231 | 231 | break; |
232 | 232 | case "support:info_file": |
233 | - $retval .= $this->previewInfoFileinHTML('ROWID-' . $option['level'] . '-' . $option['row_id']); |
|
233 | + $retval .= $this->previewInfoFileinHTML('ROWID-'.$option['level'].'-'.$option['row_id']); |
|
234 | 234 | break; |
235 | 235 | default: |
236 | 236 | } |
@@ -240,10 +240,10 @@ discard block |
||
240 | 240 | // do not display the option at all; it gets auto-set by the ProfileSilverbullet constructor and doesn't have to be seen |
241 | 241 | break; |
242 | 242 | } |
243 | - $retval .= "<tr><td>" . $this->displayName($option['name']) . "</td><td>$language</td><td><strong>" . ($content == "on" ? _("on") : _("off") ) . "</strong></td></tr>"; |
|
243 | + $retval .= "<tr><td>".$this->displayName($option['name'])."</td><td>$language</td><td><strong>".($content == "on" ? _("on") : _("off"))."</strong></td></tr>"; |
|
244 | 244 | break; |
245 | 245 | default: |
246 | - $retval .= "<tr><td>" . $this->displayName($option['name']) . "</td><td>$language</td><td><strong>$content</strong></td></tr>"; |
|
246 | + $retval .= "<tr><td>".$this->displayName($option['name'])."</td><td>$language</td><td><strong>$content</strong></td></tr>"; |
|
247 | 247 | } |
248 | 248 | } |
249 | 249 | } |
@@ -252,11 +252,11 @@ discard block |
||
252 | 252 | $locationCount = 0; |
253 | 253 | foreach ($locationMarkers as $g) { |
254 | 254 | $locationCount++; |
255 | - $marker .= '<marker name="' . $locationCount . '" lat="' . $g['lat'] . '" lng="' . $g['lon'] . '" />'; |
|
255 | + $marker .= '<marker name="'.$locationCount.'" lat="'.$g['lat'].'" lng="'.$g['lon'].'" />'; |
|
256 | 256 | } |
257 | 257 | $marker .= '<\/markers>'; // some validator says this should be escaped |
258 | 258 | $jMarker = json_encode($locationMarkers); |
259 | - $retval .= '<tr><td><script>markers=\'' . $marker . '\'; jmarkers = \'' . $jMarker . '\';</script></td><td></td><td></td></tr>'; |
|
259 | + $retval .= '<tr><td><script>markers=\''.$marker.'\'; jmarkers = \''.$jMarker.'\';</script></td><td></td><td></td></tr>'; |
|
260 | 260 | } |
261 | 261 | \core\common\Entity::outOfThePotatoes(); |
262 | 262 | return $retval; |
@@ -272,11 +272,11 @@ discard block |
||
272 | 272 | \core\common\Entity::intoThePotatoes(); |
273 | 273 | $idpoptions = $myInst->getAttributes(); |
274 | 274 | $retval = "<div class='infobox'> |
275 | - <h2>" . sprintf(_("General %s details"), $this->nomenclatureParticipant) . "</h2> |
|
275 | + <h2>" . sprintf(_("General %s details"), $this->nomenclatureParticipant)."</h2> |
|
276 | 276 | <table> |
277 | 277 | <tr> |
278 | 278 | <td> |
279 | - " . _("Country:") . " |
|
279 | + " . _("Country:")." |
|
280 | 280 | </td> |
281 | 281 | <td> |
282 | 282 | </td> |
@@ -286,16 +286,16 @@ discard block |
||
286 | 286 | $retval .= $myFed->name; |
287 | 287 | $retval .= "</strong> |
288 | 288 | </td> |
289 | - </tr>" . $this->infoblock($idpoptions, "general", "IdP") . " |
|
289 | + </tr>" . $this->infoblock($idpoptions, "general", "IdP")." |
|
290 | 290 | </table> |
291 | 291 | </div>"; |
292 | 292 | |
293 | 293 | $blocks = [["support", _("Global Helpdesk Details")], ["media", _("Media Properties")]]; |
294 | 294 | foreach ($blocks as $block) { |
295 | 295 | $retval .= "<div class='infobox'> |
296 | - <h2>" . $block[1] . "</h2> |
|
296 | + <h2>" . $block[1]."</h2> |
|
297 | 297 | <table>" . |
298 | - $this->infoblock($idpoptions, $block[0], "IdP") . |
|
298 | + $this->infoblock($idpoptions, $block[0], "IdP"). |
|
299 | 299 | "</table> |
300 | 300 | </div>"; |
301 | 301 | } |
@@ -310,12 +310,12 @@ discard block |
||
310 | 310 | */ |
311 | 311 | private function displaySize(int $number) { |
312 | 312 | if ($number > 1024 * 1024) { |
313 | - return round($number / 1024 / 1024, 2) . " MiB"; |
|
313 | + return round($number / 1024 / 1024, 2)." MiB"; |
|
314 | 314 | } |
315 | 315 | if ($number > 1024) { |
316 | - return round($number / 1024, 2) . " KiB"; |
|
316 | + return round($number / 1024, 2)." KiB"; |
|
317 | 317 | } |
318 | - return $number . " B"; |
|
318 | + return $number." B"; |
|
319 | 319 | } |
320 | 320 | |
321 | 321 | /** |
@@ -370,7 +370,7 @@ discard block |
||
370 | 370 | $caExpiryTrashhold = \config\ConfAssistant::CERT_WARNINGS['expiry_warning']; |
371 | 371 | $rawResult = UIElements::getBlobFromDB($ref['table'], $ref['rowindex'], FALSE); |
372 | 372 | if (is_bool($rawResult)) { // we didn't actually get a CA! |
373 | - $retval = "<div class='ca-summary'>" . _("There was an error while retrieving the certificate from the database!") . "</div>"; |
|
373 | + $retval = "<div class='ca-summary'>"._("There was an error while retrieving the certificate from the database!")."</div>"; |
|
374 | 374 | \core\common\Entity::outOfThePotatoes(); |
375 | 375 | return $retval; |
376 | 376 | } |
@@ -386,8 +386,8 @@ discard block |
||
386 | 386 | |
387 | 387 | $details['name'] = preg_replace('/(.)\/(.)/', "$1<br/>$2", $details['name']); |
388 | 388 | $details['name'] = preg_replace('/\//', "", $details['name']); |
389 | - $certstatus = ( $details['root'] == 1 ? "R" : "I"); |
|
390 | - $certTooltip = ( $details['root'] == 1 ? _("Root CA") : _("Intermediate CA")); |
|
389 | + $certstatus = ($details['root'] == 1 ? "R" : "I"); |
|
390 | + $certTooltip = ($details['root'] == 1 ? _("Root CA") : _("Intermediate CA")); |
|
391 | 391 | $innerbgColor = "#0000ff"; |
392 | 392 | $leftBorderColor = "#00ff00"; |
393 | 393 | $message = ""; |
@@ -395,35 +395,35 @@ discard block |
||
395 | 395 | $leftBorderColor = "red"; |
396 | 396 | $message = _("This is a <strong>SERVER</strong> certificate!"); |
397 | 397 | if (\config\ConfAssistant::CERT_GUIDELINES !== '') { |
398 | - $message .= "<br/><a target='_blank' href='".\config\ConfAssistant::CERT_GUIDELINES."'>". _("more info")."</a>"; |
|
398 | + $message .= "<br/><a target='_blank' href='".\config\ConfAssistant::CERT_GUIDELINES."'>"._("more info")."</a>"; |
|
399 | 399 | } |
400 | 400 | $message .= "<br/>"; |
401 | - $retval = "<div class='ca-summary' style='border-left-color: $leftBorderColor'><div style='position:absolute; right: -15px; width:20px; height:20px; background-color:$innerbgColor; border-radius:10px; text-align: center;'><div style='padding-top:3px; font-weight:bold; color:#ffffff;'>S</div></div>" . $message . $details['name'] . "</div>"; |
|
401 | + $retval = "<div class='ca-summary' style='border-left-color: $leftBorderColor'><div style='position:absolute; right: -15px; width:20px; height:20px; background-color:$innerbgColor; border-radius:10px; text-align: center;'><div style='padding-top:3px; font-weight:bold; color:#ffffff;'>S</div></div>".$message.$details['name']."</div>"; |
|
402 | 402 | \core\common\Entity::outOfThePotatoes(); |
403 | 403 | return $retval; |
404 | 404 | } |
405 | 405 | $now = time(); |
406 | 406 | if ($now + \config\ConfAssistant::CERT_WARNINGS['expiry_critical'] > $details['full_details']['validTo_time_t']) { |
407 | 407 | $leftBorderColor = "red"; |
408 | - $message = _("Certificate expired!") . "<br>"; |
|
409 | - } elseif($now + \config\ConfAssistant::CERT_WARNINGS['expiry_warning'] > $details['full_details']['validTo_time_t'] - $caExpiryTrashhold) { |
|
408 | + $message = _("Certificate expired!")."<br>"; |
|
409 | + } elseif ($now + \config\ConfAssistant::CERT_WARNINGS['expiry_warning'] > $details['full_details']['validTo_time_t'] - $caExpiryTrashhold) { |
|
410 | 410 | if ($leftBorderColor == "#00ff00") { |
411 | 411 | $leftBorderColor = "yellow"; |
412 | 412 | } |
413 | - $message = _("Certificate close to expiry!") . "<br/>"; |
|
413 | + $message = _("Certificate close to expiry!")."<br/>"; |
|
414 | 414 | } |
415 | 415 | |
416 | 416 | if ($details['root'] == 1 && $details['basicconstraints_set'] == 0) { |
417 | 417 | if ($leftBorderColor == "#00ff00") { |
418 | 418 | $leftBorderColor = "yellow"; |
419 | 419 | } |
420 | - $message .= "<div style='max-width: 25em'><strong>" . _("Improper root certificate, required critical CA extension missing, will not reliably install!") . "</strong>"; |
|
420 | + $message .= "<div style='max-width: 25em'><strong>"._("Improper root certificate, required critical CA extension missing, will not reliably install!")."</strong>"; |
|
421 | 421 | if (\config\ConfAssistant::CERT_GUIDELINES !== '') { |
422 | - $message .= "<br/><a target='_blank' href='".\config\ConfAssistant::CERT_GUIDELINES."'>". _("more info")."</a>"; |
|
422 | + $message .= "<br/><a target='_blank' href='".\config\ConfAssistant::CERT_GUIDELINES."'>"._("more info")."</a>"; |
|
423 | 423 | } |
424 | 424 | $message .= "</div><br/>"; |
425 | 425 | } |
426 | - $retval = "<div class='ca-summary' style='border-left-color: $leftBorderColor'><div style='position:absolute; right: -15px; width:20px; height:20px; background-color:$innerbgColor; border-radius:10px; text-align: center;'><div title='$certTooltip' style='padding-top:3px; font-weight:bold; color:#ffffff;'>$certstatus</div></div>" . $message . $details['name'] . "<br>" . $this->displayName('eap:ca_vailduntil') . " " . gmdate('Y-m-d H:i:s', $details['full_details']['validTo_time_t']) . " UTC</div>"; |
|
426 | + $retval = "<div class='ca-summary' style='border-left-color: $leftBorderColor'><div style='position:absolute; right: -15px; width:20px; height:20px; background-color:$innerbgColor; border-radius:10px; text-align: center;'><div title='$certTooltip' style='padding-top:3px; font-weight:bold; color:#ffffff;'>$certstatus</div></div>".$message.$details['name']."<br>".$this->displayName('eap:ca_vailduntil')." ".gmdate('Y-m-d H:i:s', $details['full_details']['validTo_time_t'])." UTC</div>"; |
|
427 | 427 | \core\common\Entity::outOfThePotatoes(); |
428 | 428 | return $retval; |
429 | 429 | } |
@@ -436,7 +436,7 @@ discard block |
||
436 | 436 | */ |
437 | 437 | public function previewImageinHTML($imageReference) { |
438 | 438 | \core\common\Entity::intoThePotatoes(); |
439 | - $retval = "<img style='max-width:150px' src='inc/filepreview.php?id=" . $imageReference . "' alt='" . _("Preview of logo file") . "'/>"; |
|
439 | + $retval = "<img style='max-width:150px' src='inc/filepreview.php?id=".$imageReference."' alt='"._("Preview of logo file")."'/>"; |
|
440 | 440 | \core\common\Entity::outOfThePotatoes(); |
441 | 441 | return $retval; |
442 | 442 | } |
@@ -453,13 +453,13 @@ discard block |
||
453 | 453 | $ref = $validator->databaseReference($fileReference); |
454 | 454 | $fileBlob = UIElements::getBlobFromDB($ref['table'], $ref['rowindex'], FALSE); |
455 | 455 | if (is_bool($fileBlob)) { // we didn't actually get a file! |
456 | - $retval = "<div class='ca-summary'>" . _("There was an error while retrieving the file from the database!") . "</div>"; |
|
456 | + $retval = "<div class='ca-summary'>"._("There was an error while retrieving the file from the database!")."</div>"; |
|
457 | 457 | \core\common\Entity::outOfThePotatoes(); |
458 | 458 | return $retval; |
459 | 459 | } |
460 | 460 | $decodedFileBlob = base64_decode($fileBlob); |
461 | 461 | $fileinfo = new \finfo(); |
462 | - $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>"; |
|
462 | + $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>"; |
|
463 | 463 | \core\common\Entity::outOfThePotatoes(); |
464 | 464 | return $retval; |
465 | 465 | } |
@@ -616,8 +616,8 @@ discard block |
||
616 | 616 | return ""; |
617 | 617 | } |
618 | 618 | |
619 | - $loggerInstance->debug(4, "Consortium logo is at: " . ROOT . "/web/resources/images/consortium_logo_large.png"); |
|
620 | - $logogd = imagecreatefrompng(ROOT . "/web/resources/images/consortium_logo_large.png"); |
|
619 | + $loggerInstance->debug(4, "Consortium logo is at: ".ROOT."/web/resources/images/consortium_logo_large.png"); |
|
620 | + $logogd = imagecreatefrompng(ROOT."/web/resources/images/consortium_logo_large.png"); |
|
621 | 621 | if ($logogd === FALSE) { // consortium logo is bogus; don't do anything |
622 | 622 | return ""; |
623 | 623 | } |
@@ -643,7 +643,7 @@ discard block |
||
643 | 643 | imagecolorallocate($whiteimage, 255, 255, 255); |
644 | 644 | // also make sure the initial placement is a multitude of 12; otherwise "two half" symbols might be affected |
645 | 645 | $targetplacementx = (int) ($symbolsize * round(($sizeinput[0] / 2 - ($targetwidth - $symbolsize + 1) / 2) / $symbolsize)); |
646 | - $targetplacementy = (int) ($symbolsize * round(($sizeinput[1] / 2 - ($targetheight - $symbolsize + 1 ) / 2) / $symbolsize)); |
|
646 | + $targetplacementy = (int) ($symbolsize * round(($sizeinput[1] / 2 - ($targetheight - $symbolsize + 1) / 2) / $symbolsize)); |
|
647 | 647 | imagecopyresized($inputgd, $whiteimage, $targetplacementx - $symbolsize, $targetplacementy - $symbolsize, 0, 0, $targetwidth + 2 * $symbolsize, $targetheight + 2 * $symbolsize, $targetwidth + 2 * $symbolsize, $targetheight + 2 * $symbolsize); |
648 | 648 | imagecopyresized($inputgd, $logogd, $targetplacementx, $targetplacementy, 0, 0, $targetwidth, $targetheight, $sizelogo[0], $sizelogo[1]); |
649 | 649 | ob_start(); |
@@ -693,9 +693,9 @@ discard block |
||
693 | 693 | $message = "Your configuration appears to be fine."; |
694 | 694 | break; |
695 | 695 | default: |
696 | - throw new Exception("The result code level " . $test->test_result['global'] . " is not defined!"); |
|
696 | + throw new Exception("The result code level ".$test->test_result['global']." is not defined!"); |
|
697 | 697 | } |
698 | - $out .= $this->boxFlexible($test->test_result['global'], "<br><strong>Test Summary</strong><br>" . $message . "<br>See below for details<br><hr>"); |
|
698 | + $out .= $this->boxFlexible($test->test_result['global'], "<br><strong>Test Summary</strong><br>".$message."<br>See below for details<br><hr>"); |
|
699 | 699 | foreach ($test->out as $testValue) { |
700 | 700 | foreach ($testValue as $o) { |
701 | 701 | $out .= $this->boxFlexible($o['level'], $o['message']); |