@@ -170,12 +170,12 @@ |
||
170 | 170 | 'db' => 'radacct', |
171 | 171 | 'user' => 'someuser', |
172 | 172 | 'pass' => 'somepass', |
173 | - 'readonly' => TRUE,], |
|
173 | + 'readonly' => TRUE, ], |
|
174 | 174 | 'RADIUS_2' => [ |
175 | 175 | 'host' => 'auth-2.hosted.eduroam.org', |
176 | 176 | 'db' => 'radacct', |
177 | 177 | 'user' => 'someuser', |
178 | 178 | 'pass' => 'somepass', |
179 | - 'readonly' => TRUE,], |
|
179 | + 'readonly' => TRUE, ], |
|
180 | 180 | ]; |
181 | 181 | } |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | $serverCandidates[IdPlist::geoDistance($adminLocation, ['lat' => $iterator->location_lat, 'lon' => $iterator->location_lon])] = $iterator->server_id; |
255 | 255 | } |
256 | 256 | if ($clients > $maxSupportedClients * 0.9) { |
257 | - $this->loggerInstance->debug(1, "A RADIUS server for Managed SP (" . $iterator->server_id . ") is serving at more than 90% capacity!"); |
|
257 | + $this->loggerInstance->debug(1, "A RADIUS server for Managed SP (".$iterator->server_id.") is serving at more than 90% capacity!"); |
|
258 | 258 | } |
259 | 259 | } |
260 | 260 | if (count($serverCandidates) == 0 && $federation != "DEFAULT") { |
@@ -263,7 +263,7 @@ discard block |
||
263 | 263 | return $this->findGoodServerLocation($adminLocation, "DEFAULT", $blacklistedServers); |
264 | 264 | } |
265 | 265 | if (count($serverCandidates) == 0) { |
266 | - throw new Exception("No available server found for new SP! $federation " . print_r($serverCandidates, true)); |
|
266 | + throw new Exception("No available server found for new SP! $federation ".print_r($serverCandidates, true)); |
|
267 | 267 | } |
268 | 268 | // put the nearest server on top of the list |
269 | 269 | ksort($serverCandidates); |
@@ -291,7 +291,7 @@ discard block |
||
291 | 291 | $foundFreePort1 = 0; |
292 | 292 | while ($foundFreePort1 == 0) { |
293 | 293 | $portCandidate = random_int(1200, 65535); |
294 | - $check = $this->databaseHandle->exec("SELECT port_instance_1 FROM deployment WHERE radius_instance_1 = '" . $ourserver . "' AND port_instance_1 = $portCandidate"); |
|
294 | + $check = $this->databaseHandle->exec("SELECT port_instance_1 FROM deployment WHERE radius_instance_1 = '".$ourserver."' AND port_instance_1 = $portCandidate"); |
|
295 | 295 | if (mysqli_num_rows(/** @scrutinizer ignore-type */ $check) == 0) { |
296 | 296 | $foundFreePort1 = $portCandidate; |
297 | 297 | } |
@@ -300,14 +300,14 @@ discard block |
||
300 | 300 | $foundFreePort2 = 0; |
301 | 301 | while ($foundFreePort2 == 0) { |
302 | 302 | $portCandidate = random_int(1200, 65535); |
303 | - $check = $this->databaseHandle->exec("SELECT port_instance_2 FROM deployment WHERE radius_instance_2 = '" . $ourSecondServer . "' AND port_instance_2 = $portCandidate"); |
|
303 | + $check = $this->databaseHandle->exec("SELECT port_instance_2 FROM deployment WHERE radius_instance_2 = '".$ourSecondServer."' AND port_instance_2 = $portCandidate"); |
|
304 | 304 | if (mysqli_num_rows(/** @scrutinizer ignore-type */ $check) == 0) { |
305 | 305 | $foundFreePort2 = $portCandidate; |
306 | 306 | } |
307 | 307 | } |
308 | 308 | // and make up a shared secret that is halfways readable |
309 | 309 | $futureSecret = $this->randomString(16, "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"); |
310 | - $this->databaseHandle->exec("UPDATE deployment SET radius_instance_1 = '" . $ourserver . "', radius_instance_2 = '" . $ourSecondServer . "', port_instance_1 = $foundFreePort1, port_instance_2 = $foundFreePort2, secret = '$futureSecret' WHERE deployment_id = $this->identifier"); |
|
310 | + $this->databaseHandle->exec("UPDATE deployment SET radius_instance_1 = '".$ourserver."', radius_instance_2 = '".$ourSecondServer."', port_instance_1 = $foundFreePort1, port_instance_2 = $foundFreePort2, secret = '$futureSecret' WHERE deployment_id = $this->identifier"); |
|
311 | 311 | return ["port_instance_1" => $foundFreePort1, "port_instance_2" => $foundFreePort2, "secret" => $futureSecret, "radius_instance_1" => $ourserver, "radius_instance_2" => $ourserver]; |
312 | 312 | } |
313 | 313 | |
@@ -354,7 +354,7 @@ discard block |
||
354 | 354 | */ |
355 | 355 | public function deactivate() |
356 | 356 | { |
357 | - $this->databaseHandle->exec("UPDATE deployment SET status = " . DeploymentManaged::INACTIVE . " WHERE deployment_id = $this->identifier"); |
|
357 | + $this->databaseHandle->exec("UPDATE deployment SET status = ".DeploymentManaged::INACTIVE." WHERE deployment_id = $this->identifier"); |
|
358 | 358 | } |
359 | 359 | |
360 | 360 | /** |
@@ -365,7 +365,7 @@ discard block |
||
365 | 365 | */ |
366 | 366 | public function activate() |
367 | 367 | { |
368 | - $this->databaseHandle->exec("UPDATE deployment SET status = " . DeploymentManaged::ACTIVE . " WHERE deployment_id = $this->identifier"); |
|
368 | + $this->databaseHandle->exec("UPDATE deployment SET status = ".DeploymentManaged::ACTIVE." WHERE deployment_id = $this->identifier"); |
|
369 | 369 | } |
370 | 370 | |
371 | 371 | /** |
@@ -377,7 +377,7 @@ discard block |
||
377 | 377 | { |
378 | 378 | $customAttrib = $this->getAttributes("managedsp:operatorname"); |
379 | 379 | if (count($customAttrib) == 0) { |
380 | - return "1sp." . $this->identifier . "-" . $this->institution . \config\ConfAssistant::SILVERBULLET['realm_suffix']; |
|
380 | + return "1sp.".$this->identifier."-".$this->institution.\config\ConfAssistant::SILVERBULLET['realm_suffix']; |
|
381 | 381 | } |
382 | 382 | return $customAttrib[0]["value"]; |
383 | 383 | } |
@@ -393,13 +393,13 @@ discard block |
||
393 | 393 | { |
394 | 394 | |
395 | 395 | $hostname = "radius_hostname_$idx"; |
396 | - $ch = curl_init("http://" . $this->$hostname); |
|
396 | + $ch = curl_init("http://".$this->$hostname); |
|
397 | 397 | if ($ch === FALSE) { |
398 | 398 | $res = 'FAILURE'; |
399 | 399 | } else { |
400 | 400 | curl_setopt($ch, CURLOPT_POST, 1); |
401 | 401 | curl_setopt($ch, CURLOPT_POSTFIELDS, $post); |
402 | - $this->loggerInstance->debug(1, "Posting to http://" . $this->$hostname . ": $post\n"); |
|
402 | + $this->loggerInstance->debug(1, "Posting to http://".$this->$hostname.": $post\n"); |
|
403 | 403 | curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); |
404 | 404 | curl_setopt($ch, CURLOPT_HEADER, 0); |
405 | 405 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
@@ -408,13 +408,13 @@ discard block |
||
408 | 408 | $this->loggerInstance->debug(1, "curl_exec failure"); |
409 | 409 | $res = 'FAILURE'; |
410 | 410 | } else { |
411 | - $res = (string)$exec; // it is always a string due to RETURNTRANSFER but let's make Scrutinizer which thinks this could be TRUE as well |
|
411 | + $res = (string) $exec; // it is always a string due to RETURNTRANSFER but let's make Scrutinizer which thinks this could be TRUE as well |
|
412 | 412 | } |
413 | 413 | $this->loggerInstance->debug(1, "Response from FR configurator: $res\n"); |
414 | 414 | $this->loggerInstance->debug(1, $this); |
415 | 415 | } |
416 | 416 | $this->loggerInstance->debug(1, "Database update"); |
417 | - $this->databaseHandle->exec("UPDATE deployment SET radius_status_$idx = " . ($res == 'OK' ? \core\AbstractDeployment::RADIUS_OK : \core\AbstractDeployment::RADIUS_FAILURE) . " WHERE deployment_id = $this->identifier"); |
|
417 | + $this->databaseHandle->exec("UPDATE deployment SET radius_status_$idx = ".($res == 'OK' ? \core\AbstractDeployment::RADIUS_OK : \core\AbstractDeployment::RADIUS_FAILURE)." WHERE deployment_id = $this->identifier"); |
|
418 | 418 | return $res; |
419 | 419 | } |
420 | 420 | |
@@ -435,19 +435,19 @@ discard block |
||
435 | 435 | } else { |
436 | 436 | $txt = $remove ? _('Profile dectivation failed') : _('Profile activation/modification failed'); |
437 | 437 | } |
438 | - $txt = $txt . ' '; |
|
438 | + $txt = $txt.' '; |
|
439 | 439 | if (array_count_values($response)[$status] == 2) { |
440 | - $txt = $txt . _('on both RADIUS servers: primary and backup') . '.'; |
|
440 | + $txt = $txt._('on both RADIUS servers: primary and backup').'.'; |
|
441 | 441 | } else { |
442 | 442 | if ($response['res[1]'] == $status) { |
443 | - $txt = $txt . _('on primary RADIUS server') . '.'; |
|
443 | + $txt = $txt._('on primary RADIUS server').'.'; |
|
444 | 444 | } else { |
445 | - $txt = $txt . _('on backup RADIUS server') . '.'; |
|
445 | + $txt = $txt._('on backup RADIUS server').'.'; |
|
446 | 446 | } |
447 | 447 | } |
448 | 448 | $mail = \core\common\OutsideComm::mailHandle(); |
449 | 449 | $email = $this->getAttributes("support:email")[0]['value']; |
450 | - $mail->FromName = \config\Master::APPEARANCE['productname'] . " Notification System"; |
|
450 | + $mail->FromName = \config\Master::APPEARANCE['productname']." Notification System"; |
|
451 | 451 | $mail->addAddress($email); |
452 | 452 | if ($status == 'OK') { |
453 | 453 | $mail->Subject = _('RADIUS profile update problem fixed'); |
@@ -481,7 +481,7 @@ discard block |
||
481 | 481 | return NULL; |
482 | 482 | } |
483 | 483 | $timeout = 10; |
484 | - curl_setopt($ch, CURLOPT_URL, 'http://' . $host); |
|
484 | + curl_setopt($ch, CURLOPT_URL, 'http://'.$host); |
|
485 | 485 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
486 | 486 | curl_setopt($ch, CURLOPT_TIMEOUT, $timeout); |
487 | 487 | curl_exec($ch); |
@@ -572,32 +572,32 @@ discard block |
||
572 | 572 | { |
573 | 573 | $remove = ($this->status == \core\AbstractDeployment::INACTIVE) ? 0 : 1; |
574 | 574 | $toPost = ($onlyone ? array($onlyone => '') : array(1 => '', 2 => '')); |
575 | - $toPostTemplate = 'instid=' . $this->institution . '&deploymentid=' . $this->identifier . '&secret=' . $this->secret . '&country=' . $this->getAttributes("internal:country")[0]['value'] . '&'; |
|
575 | + $toPostTemplate = 'instid='.$this->institution.'&deploymentid='.$this->identifier.'&secret='.$this->secret.'&country='.$this->getAttributes("internal:country")[0]['value'].'&'; |
|
576 | 576 | if ($remove) { |
577 | - $toPostTemplate = $toPostTemplate . 'remove=1&'; |
|
577 | + $toPostTemplate = $toPostTemplate.'remove=1&'; |
|
578 | 578 | } else { |
579 | 579 | if ($this->getAttributes("managedsp:operatorname")[0]['value'] ?? NULL) { |
580 | - $toPostTemplate = $toPostTemplate . 'operatorname=' . $this->getAttributes("managedsp:operatorname")[0]['value'] . '&'; |
|
580 | + $toPostTemplate = $toPostTemplate.'operatorname='.$this->getAttributes("managedsp:operatorname")[0]['value'].'&'; |
|
581 | 581 | } |
582 | 582 | if ($this->getAttributes("managedsp:vlan")[0]['value'] ?? NULL) { |
583 | 583 | $allRealms = $this->getAllRealms(); |
584 | 584 | if (!empty($allRealms)) { |
585 | - $toPostTemplate = $toPostTemplate . 'vlan=' . $this->getAttributes("managedsp:vlan")[0]['value'] . '&'; |
|
586 | - $toPostTemplate = $toPostTemplate . 'realmforvlan[]=' . implode('&realmforvlan[]=', $allRealms) . '&'; |
|
585 | + $toPostTemplate = $toPostTemplate.'vlan='.$this->getAttributes("managedsp:vlan")[0]['value'].'&'; |
|
586 | + $toPostTemplate = $toPostTemplate.'realmforvlan[]='.implode('&realmforvlan[]=', $allRealms).'&'; |
|
587 | 587 | } |
588 | 588 | } |
589 | 589 | } |
590 | 590 | foreach (array_keys($toPost) as $key) { |
591 | - $elem = 'port' . $key; |
|
592 | - $toPost[$key] = $toPostTemplate . 'port=' . $this->$elem; |
|
591 | + $elem = 'port'.$key; |
|
592 | + $toPost[$key] = $toPostTemplate.'port='.$this->$elem; |
|
593 | 593 | } |
594 | 594 | $response = array(); |
595 | 595 | foreach ($toPost as $key => $value) { |
596 | - $this->loggerInstance->debug(1, 'toPost ' . $toPost[$key] . "\n"); |
|
597 | - $response['res[' . $key . ']'] = $this->sendToRADIUS($key, $toPost[$key]); |
|
596 | + $this->loggerInstance->debug(1, 'toPost '.$toPost[$key]."\n"); |
|
597 | + $response['res['.$key.']'] = $this->sendToRADIUS($key, $toPost[$key]); |
|
598 | 598 | } |
599 | 599 | if ($onlyone) { |
600 | - $response['res[' . ($onlyone == 1) ? 2 : 1 . ']'] = \core\AbstractDeployment::RADIUS_OK; |
|
600 | + $response['res['.($onlyone == 1) ? 2 : 1.']'] = \core\AbstractDeployment::RADIUS_OK; |
|
601 | 601 | } |
602 | 602 | foreach (array('OK', 'FAILURE') as $status) { |
603 | 603 | if ((($status == 'OK' && $notify) || ($status == 'FAILURE')) && in_array($status, $response)) { |
@@ -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 | $DN[] = "CN=comes.from.eduroam.db"; |
91 | 91 | $policies[] = "eduroam IdP"; |
92 | 92 | $policies[] = "eduroam SP"; |
@@ -104,11 +104,11 @@ discard block |
||
104 | 104 | default: |
105 | 105 | throw new Exception("Sorry: Unknown level of issuance requested."); |
106 | 106 | } |
107 | - echo "<p>" . _("Requesting a certificate with the following properties"); |
|
107 | + echo "<p>"._("Requesting a certificate with the following properties"); |
|
108 | 108 | echo "<ul>"; |
109 | - echo "<li>" . _("Policy OIDs: ") . implode(", ", $policies) . "</li>"; |
|
110 | - echo "<li>" . _("Distinguished Name: ") . implode(", ", $DN) . "</li>"; |
|
111 | - echo "<li>" . _("Requester Contact Details: will come from eduroam DB (using stub 'Someone, <[email protected]>').") . "</li>"; |
|
109 | + echo "<li>"._("Policy OIDs: ").implode(", ", $policies)."</li>"; |
|
110 | + echo "<li>"._("Distinguished Name: ").implode(", ", $DN)."</li>"; |
|
111 | + echo "<li>"._("Requester Contact Details: will come from eduroam DB (using stub 'Someone, <[email protected]>').")."</li>"; |
|
112 | 112 | echo "</ul></p>"; |
113 | 113 | /* $ossl = proc_open("openssl req -subj '/".implode("/", $DN)."'", [ 0 => ["pipe", "r"], 1 => ["pipe", "w"], 2 => [ "file", "/tmp/voodoo-error", "a"] ], $pipes); |
114 | 114 | if (is_resource($ossl)) { |
@@ -121,13 +121,13 @@ discard block |
||
121 | 121 | throw new Exception("Calling openssl in a fancy way did not work."); |
122 | 122 | } |
123 | 123 | echo "<p>"._("This is the new CSR (return code was $retval)")."<pre>$newCsr</pre></p>"; */ |
124 | - $newCsrWithMeta = ["CSR" => /* $newCsr */ $_POST['CSR'], "USERNAME" => "Someone", "USERMAIL" => "[email protected]", "SUBJECT" => implode(",", $DN) ,"FED" => $country]; |
|
124 | + $newCsrWithMeta = ["CSR" => /* $newCsr */ $_POST['CSR'], "USERNAME" => "Someone", "USERMAIL" => "[email protected]", "SUBJECT" => implode(",", $DN), "FED" => $country]; |
|
125 | 125 | // our certs can be good for max 5 years |
126 | 126 | $fed->requestCertificate($newCsrWithMeta, 1825); |
127 | 127 | echo "<p>"._("The certificate was requested.")."</p>"; |
128 | 128 | ?> |
129 | 129 | <form action="overview_certificates.php" method="GET"> |
130 | - <button type="submit"><?php echo _("Back to Certificate Overview");?></button> |
|
130 | + <button type="submit"><?php echo _("Back to Certificate Overview"); ?></button> |
|
131 | 131 | </form> |
132 | 132 | <?php |
133 | 133 | echo $deco->footer(); |
@@ -136,14 +136,14 @@ discard block |
||
136 | 136 | |
137 | 137 | // if we did not get a SAVE button, display UI for a fresh request instead |
138 | 138 | ?> |
139 | - <h2><?php echo _("1. Certificate Holder Details");?></h2> |
|
139 | + <h2><?php echo _("1. Certificate Holder Details"); ?></h2> |
|
140 | 140 | <form action="action_req_certificate.php" method="POST"> |
141 | 141 | <input type="radio" name="LEVEL" id="NRO" value="NRO" checked><?php printf(_("Certificate for %s role"), $uiElements->nomenclatureFed); ?></input> |
142 | 142 | <?php |
143 | 143 | if (count($feds) == 1) { |
144 | 144 | $fedObject = new \core\Federation($feds[0]['value']); |
145 | - echo " <strong>" . $cat->knownFederations[$fedObject->tld] . "</strong>"; |
|
146 | - echo '<input type="hidden" name="NRO-list" id="NRO-list" value="' . $fedObject->tld . '"/>'; |
|
145 | + echo " <strong>".$cat->knownFederations[$fedObject->tld]."</strong>"; |
|
146 | + echo '<input type="hidden" name="NRO-list" id="NRO-list" value="'.$fedObject->tld.'"/>'; |
|
147 | 147 | } else { |
148 | 148 | ?> |
149 | 149 | <select name="NRO-list" id="NRO-list"> |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | <?php |
152 | 152 | foreach ($feds as $oneFed) { |
153 | 153 | $fedObject = new \core\Federation($oneFed['value']); |
154 | - echo '<option value="' . strtoupper($fedObject->tld) . '">' . $cat->knownFederations[$fedObject->tld] . "</option>"; |
|
154 | + echo '<option value="'.strtoupper($fedObject->tld).'">'.$cat->knownFederations[$fedObject->tld]."</option>"; |
|
155 | 155 | } |
156 | 156 | ?> |
157 | 157 | </select> |
@@ -171,15 +171,15 @@ discard block |
||
171 | 171 | } |
172 | 172 | } |
173 | 173 | foreach ($allIdPs as $id => $name) { |
174 | - echo '<option value="' . $id . '">' . $name . "</option>"; |
|
174 | + echo '<option value="'.$id.'">'.$name."</option>"; |
|
175 | 175 | } |
176 | 176 | ?> |
177 | 177 | </select> |
178 | 178 | <br/> |
179 | - <h2><?php echo _("2. CSR generation");?></h2> |
|
180 | - <p><?php echo _("One way to generate an acceptable certificate request is via this openssl one-liner:");?></p> |
|
179 | + <h2><?php echo _("2. CSR generation"); ?></h2> |
|
180 | + <p><?php echo _("One way to generate an acceptable certificate request is via this openssl one-liner:"); ?></p> |
|
181 | 181 | <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> |
182 | - <h2><?php echo _("3. Submission");?></h2> |
|
182 | + <h2><?php echo _("3. Submission"); ?></h2> |
|
183 | 183 | <?php echo _("Please paste your CSR here:"); ?><br/><textarea name="CSR" id="CSR" rows="20" cols="85"/></textarea><br/> |
184 | 184 | <button type="submit" name="requestcert" id="requestcert" value="<?php echo \web\lib\common\FormElements::BUTTON_SAVE ?>"><?php echo _("Send request"); ?></button> |
185 | 185 | </form> |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | |
107 | 107 | $this->loggerInstance->debug(5, "translateFile($source_name, $output_name, $encoding)\n"); |
108 | 108 | ob_start(); |
109 | - $this->loggerInstance->debug(5, $this->module_path . '/Files/' . $this->device_id . '/' . $source_name . "\n"); |
|
109 | + $this->loggerInstance->debug(5, $this->module_path.'/Files/'.$this->device_id.'/'.$source_name."\n"); |
|
110 | 110 | $source = $this->findSourceFile($source_name); |
111 | 111 | |
112 | 112 | if ($source !== FALSE) { // if there is no file found, don't attempt to include an uninitialised variable |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | } |
115 | 115 | $output = ob_get_clean(); |
116 | 116 | if ($encoding != "NONE") { |
117 | - $outputClean = iconv('UTF-8', $encoding . '//TRANSLIT', $output); |
|
117 | + $outputClean = iconv('UTF-8', $encoding.'//TRANSLIT', $output); |
|
118 | 118 | if ($outputClean) { |
119 | 119 | $output = $outputClean; |
120 | 120 | } |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | $encoding = "NONE"; |
159 | 159 | } |
160 | 160 | if ($encoding != "NONE") { |
161 | - $output_c = iconv('UTF-8', $encoding . '//TRANSLIT', $source_string); |
|
161 | + $output_c = iconv('UTF-8', $encoding.'//TRANSLIT', $source_string); |
|
162 | 162 | } else { |
163 | 163 | $output_c = $source_string; |
164 | 164 | } |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | if (isset(WindowsCommon::LANGS[$this->languageInstance->getLang()])) { |
236 | 236 | $language = WindowsCommon::LANGS[$this->languageInstance->getLang()]; |
237 | 237 | $this->lang = $language['nsis']; |
238 | - $this->codePage = 'cp' . $language['cp']; |
|
238 | + $this->codePage = 'cp'.$language['cp']; |
|
239 | 239 | } else { |
240 | 240 | $this->lang = 'English'; |
241 | 241 | $this->codePage = 'cp1252'; |
@@ -257,8 +257,8 @@ discard block |
||
257 | 257 | $out .= sprintf(_("%s installer will be in the form of an EXE file. It will configure %s on your device, by creating wireless network profiles.<p>When you click the download button, the installer will be saved by your browser. Copy it to the machine you want to configure and execute."), \config\ConfAssistant::CONSORTIUM['display_name'], \config\ConfAssistant::CONSORTIUM['display_name']); |
258 | 258 | $out .= "<p>"; |
259 | 259 | if ($ssidCount > $configCount) { |
260 | - $out .= sprintf(ngettext("In addition to <strong>%s</strong> the installer will also configure access to:", "In addition to <strong>%s</strong> the installer will also configure access to the following networks:", $ssidCount - $configCount), implode(', ', $configList)) . " "; |
|
261 | - $out .= '<strong>' . join('</strong>, <strong>', array_diff(array_keys($ssids), $configList)) . '</strong>'; |
|
260 | + $out .= sprintf(ngettext("In addition to <strong>%s</strong> the installer will also configure access to:", "In addition to <strong>%s</strong> the installer will also configure access to the following networks:", $ssidCount - $configCount), implode(', ', $configList))." "; |
|
261 | + $out .= '<strong>'.join('</strong>, <strong>', array_diff(array_keys($ssids), $configList)).'</strong>'; |
|
262 | 262 | $out .= "<p>"; |
263 | 263 | } |
264 | 264 | // TODO - change this below |
@@ -274,8 +274,8 @@ discard block |
||
274 | 274 | $out .= _("When you are connecting to the network for the first time, Windows will pop up a login box, where you should enter your user name and password. This information will be saved so that you will reconnect to the network automatically each time you are in the range."); |
275 | 275 | if ($ssidCount > 1) { |
276 | 276 | $out .= "<p>"; |
277 | - $out .= _("You will be required to enter the same credentials for each of the configured networks:") . " "; |
|
278 | - $out .= '<strong>' . join('</strong>, <strong>', array_keys($ssids)) . '</strong>'; |
|
277 | + $out .= _("You will be required to enter the same credentials for each of the configured networks:")." "; |
|
278 | + $out .= '<strong>'.join('</strong>, <strong>', array_keys($ssids)).'</strong>'; |
|
279 | 279 | } |
280 | 280 | } |
281 | 281 | return $out; |
@@ -380,13 +380,13 @@ discard block |
||
380 | 380 | */ |
381 | 381 | protected function signInstaller() |
382 | 382 | { |
383 | - $fileName = $this->installerBasename . '.exe'; |
|
383 | + $fileName = $this->installerBasename.'.exe'; |
|
384 | 384 | if (!$this->sign) { |
385 | 385 | rename("installer.exe", $fileName); |
386 | 386 | return $fileName; |
387 | 387 | } |
388 | 388 | // are actually signing |
389 | - $outputFromSigning = system($this->sign . " installer.exe '$fileName' > /dev/null"); |
|
389 | + $outputFromSigning = system($this->sign." installer.exe '$fileName' > /dev/null"); |
|
390 | 390 | if ($outputFromSigning === FALSE) { |
391 | 391 | $this->loggerInstance->debug(2, "Signing the WindowsCommon installer $fileName FAILED!\n"); |
392 | 392 | } |
@@ -400,15 +400,15 @@ discard block |
||
400 | 400 | */ |
401 | 401 | protected function compileNSIS() { |
402 | 402 | if (\config\ConfAssistant::NSIS_VERSION >= 3) { |
403 | - $makensis = \config\ConfAssistant::PATHS['makensis'] . " -INPUTCHARSET UTF8"; |
|
403 | + $makensis = \config\ConfAssistant::PATHS['makensis']." -INPUTCHARSET UTF8"; |
|
404 | 404 | } else { |
405 | 405 | $makensis = \config\ConfAssistant::PATHS['makensis']; |
406 | 406 | } |
407 | 407 | $lcAll = getenv("LC_ALL"); |
408 | 408 | putenv("LC_ALL=en_US.UTF-8"); |
409 | - $command = $makensis . ' -V4 cat.NSI > nsis.log 2>&1'; |
|
409 | + $command = $makensis.' -V4 cat.NSI > nsis.log 2>&1'; |
|
410 | 410 | system($command); |
411 | - putenv("LC_ALL=" . $lcAll); |
|
411 | + putenv("LC_ALL=".$lcAll); |
|
412 | 412 | $this->loggerInstance->debug(4, "compileNSIS:$command\n"); |
413 | 413 | } |
414 | 414 | |
@@ -425,10 +425,10 @@ discard block |
||
425 | 425 | 'email' => 'SUPPORT', |
426 | 426 | 'url' => 'URL', |
427 | 427 | ]; |
428 | - $s = "support_" . $type . "_substitute"; |
|
428 | + $s = "support_".$type."_substitute"; |
|
429 | 429 | $substitute = $this->translateString($this->$s, $this->codePage); |
430 | - $returnValue = !empty($attr['support:' . $type][0]) ? $attr['support:' . $type][0] : $substitute; |
|
431 | - return '!define ' . $supportString[$type] . ' "' . $returnValue . '"' . "\n"; |
|
430 | + $returnValue = !empty($attr['support:'.$type][0]) ? $attr['support:'.$type][0] : $substitute; |
|
431 | + return '!define '.$supportString[$type].' "'.$returnValue.'"'."\n"; |
|
432 | 432 | } |
433 | 433 | |
434 | 434 | /** |
@@ -438,20 +438,20 @@ discard block |
||
438 | 438 | * @return string |
439 | 439 | */ |
440 | 440 | protected function writeNsisDefines($attr) { |
441 | - $fcontents = "\n" . '!define NSIS_MAJOR_VERSION ' . \config\ConfAssistant::NSIS_VERSION; |
|
441 | + $fcontents = "\n".'!define NSIS_MAJOR_VERSION '.\config\ConfAssistant::NSIS_VERSION; |
|
442 | 442 | if ($attr['internal:profile_count'][0] > 1) { |
443 | - $fcontents .= "\n" . '!define USER_GROUP "' . $this->translateString(str_replace('"', '$\\"', $attr['profile:name'][0]), $this->codePage) . '" |
|
443 | + $fcontents .= "\n".'!define USER_GROUP "'.$this->translateString(str_replace('"', '$\\"', $attr['profile:name'][0]), $this->codePage).'" |
|
444 | 444 | '; |
445 | 445 | } |
446 | - $fcontents .= ' |
|
447 | -Caption "' . $this->translateString(sprintf(WindowsCommon::sprintNsis(_("%s installer for %s")), \config\ConfAssistant::CONSORTIUM['display_name'], $attr['general:instname'][0]), $this->codePage) . '" |
|
448 | -!define APPLICATION "' . $this->translateString(sprintf(WindowsCommon::sprintNsis(_("%s installer for %s")), \config\ConfAssistant::CONSORTIUM['display_name'], $attr['general:instname'][0]), $this->codePage) . '" |
|
449 | -!define VERSION "' . \core\CAT::VERSION_MAJOR . '.' . \core\CAT::VERSION_MINOR . '" |
|
446 | + $fcontents .= ' |
|
447 | +Caption "' . $this->translateString(sprintf(WindowsCommon::sprintNsis(_("%s installer for %s")), \config\ConfAssistant::CONSORTIUM['display_name'], $attr['general:instname'][0]), $this->codePage).'" |
|
448 | +!define APPLICATION "' . $this->translateString(sprintf(WindowsCommon::sprintNsis(_("%s installer for %s")), \config\ConfAssistant::CONSORTIUM['display_name'], $attr['general:instname'][0]), $this->codePage).'" |
|
449 | +!define VERSION "' . \core\CAT::VERSION_MAJOR.'.'.\core\CAT::VERSION_MINOR.'" |
|
450 | 450 | !define INSTALLER_NAME "installer.exe" |
451 | -!define LANG "' . $this->lang . '" |
|
452 | -!define LOCALE "' . preg_replace('/\..*$/', '', \config\Master::LANGUAGES[$this->languageInstance->getLang()]['locale']) . '" |
|
451 | +!define LANG "' . $this->lang.'" |
|
452 | +!define LOCALE "' . preg_replace('/\..*$/', '', \config\Master::LANGUAGES[$this->languageInstance->getLang()]['locale']).'" |
|
453 | 453 | ;-------------------------------- |
454 | -!define ORGANISATION "' . $this->translateString($attr['general:instname'][0], $this->codePage) . '" |
|
454 | +!define ORGANISATION "' . $this->translateString($attr['general:instname'][0], $this->codePage).'" |
|
455 | 455 | '; |
456 | 456 | $fcontents .= $this->getSupport($attr, 'email'); |
457 | 457 | $fcontents .= $this->getSupport($attr, 'url'); |
@@ -459,18 +459,18 @@ discard block |
||
459 | 459 | $fcontents .= '!define WIRED |
460 | 460 | '; |
461 | 461 | } |
462 | - $fcontents .= '!define PROVIDERID "urn:UUID:' . $this->deviceUUID . '" |
|
462 | + $fcontents .= '!define PROVIDERID "urn:UUID:'.$this->deviceUUID.'" |
|
463 | 463 | '; |
464 | 464 | if (!empty($attr['internal:realm'][0])) { |
465 | - $fcontents .= '!define REALM "' . $attr['internal:realm'][0] . '" |
|
465 | + $fcontents .= '!define REALM "'.$attr['internal:realm'][0].'" |
|
466 | 466 | '; |
467 | 467 | } |
468 | 468 | if (!empty($attr['internal:hint_userinput_suffix'][0]) && $attr['internal:hint_userinput_suffix'][0] == 1) { |
469 | - $fcontents .= '!define HINT_USER_INPUT "' . $attr['internal:hint_userinput_suffix'][0] . '" |
|
469 | + $fcontents .= '!define HINT_USER_INPUT "'.$attr['internal:hint_userinput_suffix'][0].'" |
|
470 | 470 | '; |
471 | 471 | } |
472 | 472 | if (!empty($attr['internal:verify_userinput_suffix'][0]) && $attr['internal:verify_userinput_suffix'][0] == 1) { |
473 | - $fcontents .= '!define VERIFY_USER_REALM_INPUT "' . $attr['internal:verify_userinput_suffix'][0] . '" |
|
473 | + $fcontents .= '!define VERIFY_USER_REALM_INPUT "'.$attr['internal:verify_userinput_suffix'][0].'" |
|
474 | 474 | '; |
475 | 475 | } |
476 | 476 | $fcontents .= $this->msInfoFile($attr); |
@@ -491,7 +491,7 @@ discard block |
||
491 | 491 | $out .= '!define EXTERNAL_INFO "'; |
492 | 492 | // $this->loggerInstance->debug(4,"Info file type ".$attr['support:info_file'][0]['mime']."\n"); |
493 | 493 | if ($attr['internal:info_file'][0]['mime'] == 'rtf') { |
494 | - $out = '!define LICENSE_FILE "' . $attr['internal:info_file'][0]['name']; |
|
494 | + $out = '!define LICENSE_FILE "'.$attr['internal:info_file'][0]['name']; |
|
495 | 495 | } elseif ($attr['internal:info_file'][0]['mime'] == 'txt') { |
496 | 496 | $infoFile = file_get_contents($attr['internal:info_file'][0]['name']); |
497 | 497 | if ($infoFile === FALSE) { |
@@ -500,14 +500,14 @@ discard block |
||
500 | 500 | if (\config\ConfAssistant::NSIS_VERSION >= 3) { |
501 | 501 | $infoFileConverted = $infoFile; |
502 | 502 | } else { |
503 | - $infoFileConverted = iconv('UTF-8', $this->codePage . '//TRANSLIT', $infoFile); |
|
503 | + $infoFileConverted = iconv('UTF-8', $this->codePage.'//TRANSLIT', $infoFile); |
|
504 | 504 | } |
505 | 505 | if ($infoFileConverted !== FALSE && strlen($infoFileConverted) > 0) { |
506 | 506 | file_put_contents('info_f.txt', $infoFileConverted); |
507 | 507 | $out = '!define LICENSE_FILE " info_f.txt'; |
508 | 508 | } |
509 | 509 | } else { |
510 | - $out = '!define EXTERNAL_INFO "' . $attr['internal:info_file'][0]['name']; |
|
510 | + $out = '!define EXTERNAL_INFO "'.$attr['internal:info_file'][0]['name']; |
|
511 | 511 | } |
512 | 512 | |
513 | 513 | $out .= "\"\n"; |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | 'db' => 'cat', |
216 | 216 | 'user' => 'kitty', |
217 | 217 | 'pass' => 'somepass', |
218 | - 'readonly' => FALSE,], |
|
218 | + 'readonly' => FALSE, ], |
|
219 | 219 | // this DB stores diagnostics data. The connection details can be |
220 | 220 | // identical to INST as there is no table overlap |
221 | 221 | 'DIAGNOSTICS' => [ |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | 'db' => 'cat', |
224 | 224 | 'user' => 'kitty', |
225 | 225 | 'pass' => 'somepass', |
226 | - 'readonly' => FALSE,], |
|
226 | + 'readonly' => FALSE, ], |
|
227 | 227 | // this slice of DB user is about the downloads table. The corresponding |
228 | 228 | // DB user should have write access to update statistics and the cache |
229 | 229 | // locations of installers. |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | 'db' => 'cat', |
234 | 234 | 'user' => 'kitty', |
235 | 235 | 'pass' => 'somepass', |
236 | - 'readonly' => FALSE,], |
|
236 | + 'readonly' => FALSE, ], |
|
237 | 237 | // this slice of DB use is about user management in the user_options |
238 | 238 | // table. Giving the corresponding user only read-only access means that |
239 | 239 | // all user properties have to "magically" occur in the table by OOB |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | 'db' => 'cat', |
245 | 245 | 'user' => 'kitty', |
246 | 246 | 'pass' => 'somepass', |
247 | - 'readonly' => FALSE,], |
|
247 | + 'readonly' => FALSE, ], |
|
248 | 248 | /* If you use this tool in conjunction with an external customer management database, you can configure that every |
249 | 249 | * institution entry in CAT MUST correspond to a customer entry in an external database. If you want this, set this |
250 | 250 | * config variable to TRUE. |
@@ -264,7 +264,7 @@ discard block |
||
264 | 264 | 'db' => 'customer_db', |
265 | 265 | 'user' => 'customerservice', |
266 | 266 | 'pass' => '2lame4u', |
267 | - 'readonly' => TRUE,], |
|
267 | + 'readonly' => TRUE, ], |
|
268 | 268 | 'enforce-external-sync' => TRUE, |
269 | 269 | ]; |
270 | 270 | /** |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | return $this->counter; |
132 | 132 | } |
133 | 133 | |
134 | - $cachedNumber = @file_get_contents(ROOT . "/var/tmp/cachedSPNumber.serialised"); |
|
134 | + $cachedNumber = @file_get_contents(ROOT."/var/tmp/cachedSPNumber.serialised"); |
|
135 | 135 | if ($cachedNumber !== FALSE) { |
136 | 136 | $numberData = unserialize($cachedNumber); |
137 | 137 | $now = new \DateTime(); |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | } else { // data in cache is too old or doesn't exist. We really need to ask the database |
145 | 145 | $list = $this->listAllServiceProviders(); |
146 | 146 | $this->counter = count($list); |
147 | - file_put_contents(ROOT . "/var/tmp/cachedSPNumber.serialised", serialize(["number" => $this->counter, "timestamp" => new \DateTime()])); |
|
147 | + file_put_contents(ROOT."/var/tmp/cachedSPNumber.serialised", serialize(["number" => $this->counter, "timestamp" => new \DateTime()])); |
|
148 | 148 | return $this->counter; |
149 | 149 | } |
150 | 150 | } |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | $returnarray = []; |
176 | 176 | $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 = ?"; |
177 | 177 | if ($eduroamDbType !== NULL) { |
178 | - $query .= " AND ( type = '" . ExternalEduroamDBData::TYPE_IDPSP . "' OR type = '" . $eduroamDbType . "')"; |
|
178 | + $query .= " AND ( type = '".ExternalEduroamDBData::TYPE_IDPSP."' OR type = '".$eduroamDbType."')"; |
|
179 | 179 | } |
180 | 180 | $externals = $this->db->exec($query, "s", $tld); |
181 | 181 | // was a SELECT query, so a resource and not a boolean |
@@ -45,11 +45,11 @@ discard block |
||
45 | 45 | ], |
46 | 46 | [ |
47 | 47 | 'title' => sprintf(_("Is it safe to use %s installers?"), \config\Master::APPEARANCE['productname']), |
48 | - 'text' => sprintf(_("%s installers configure security settings on your device, therefore you should be sure that you are using genuine ones."), \config\Master::APPEARANCE['productname']) . ' ' . ( isset(\config\ConfAssistant::CONSORTIUM['signer_name']) && \config\ConfAssistant::CONSORTIUM['signer_name'] != "" ? sprintf(_("This is why %s installers are digitally signed by %s. Watch out for a system message confirming this."), \config\Master::APPEARANCE['productname'], \config\ConfAssistant::CONSORTIUM['signer_name']) : ""), |
|
48 | + 'text' => sprintf(_("%s installers configure security settings on your device, therefore you should be sure that you are using genuine ones."), \config\Master::APPEARANCE['productname']).' '.(isset(\config\ConfAssistant::CONSORTIUM['signer_name']) && \config\ConfAssistant::CONSORTIUM['signer_name'] != "" ? sprintf(_("This is why %s installers are digitally signed by %s. Watch out for a system message confirming this."), \config\Master::APPEARANCE['productname'], \config\ConfAssistant::CONSORTIUM['signer_name']) : ""), |
|
49 | 49 | ], |
50 | 50 | [ |
51 | 51 | 'title' => _("Windows 'SmartScreen' or 'Internet Explorer' tell me that the file is not commonly downloaded and possibly harmful. Should I be concerned?"), |
52 | - 'text' => _("Contrary to what the name suggests, 'SmartScreen' isn't actually very smart. The warning merely means that the file has not yet been downloaded by enough users to make Microsoft consider it popular (which would strangely enough make it be considered 'safe'). This message alone is not a security problem.") . " " . (isset(\config\ConfAssistant::CONSORTIUM['signer_name']) && \config\ConfAssistant::CONSORTIUM['signer_name'] != "" ? sprintf(_("So long as the file is carrying a valid signature from %s, the download is safe."), \config\ConfAssistant::CONSORTIUM['signer_name']) . " " : "") . sprintf(_("Please see also Microsoft's FAQ regarding SmartScreen at %s."), "<a href='http://windows.microsoft.com/en-US/windows7/SmartScreen-Filter-frequently-asked-questions-IE9?SignedIn=1'>Microsoft FAQ</a>") |
|
52 | + 'text' => _("Contrary to what the name suggests, 'SmartScreen' isn't actually very smart. The warning merely means that the file has not yet been downloaded by enough users to make Microsoft consider it popular (which would strangely enough make it be considered 'safe'). This message alone is not a security problem.")." ".(isset(\config\ConfAssistant::CONSORTIUM['signer_name']) && \config\ConfAssistant::CONSORTIUM['signer_name'] != "" ? sprintf(_("So long as the file is carrying a valid signature from %s, the download is safe."), \config\ConfAssistant::CONSORTIUM['signer_name'])." " : "").sprintf(_("Please see also Microsoft's FAQ regarding SmartScreen at %s."), "<a href='http://windows.microsoft.com/en-US/windows7/SmartScreen-Filter-frequently-asked-questions-IE9?SignedIn=1'>Microsoft FAQ</a>") |
|
53 | 53 | ], |
54 | 54 | [ |
55 | 55 | 'title' => sprintf(_("I can see %s network and my device is configured but it does not connect, what can be the cause?"), \config\ConfAssistant::CONSORTIUM['display_name']), |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | $consortium = \config\ConfAssistant::CONSORTIUM['display_name']; |
69 | 69 | array_push($Faq, |
70 | 70 | [ |
71 | - 'id' => 'what_is_' . \config\ConfAssistant::CONSORTIUM['name'], |
|
71 | + 'id' => 'what_is_'.\config\ConfAssistant::CONSORTIUM['name'], |
|
72 | 72 | 'title' => sprintf(_("What is this %s thing anyway?"), $consortium), |
73 | 73 | 'text' => sprintf(_("%s is a global WiFi roaming consortium which gives members of education and research access to the internet <i>for free</i> on all %s hotspots on the planet. There are several million %s users already, enjoying free internet access on more than %d hotspots! Visit <a href='http://www.eduroam.org'>the %s homepage</a> or <a href='http://monitor.eduroam.org/map_service_loc.php'>the %s location map</a> for more details."), $consortium, $consortium, $consortium, $SPs, $consortium, $consortium) |
74 | 74 | ]); |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | * <base_url>/copyright.php after deploying the software |
20 | 20 | */ |
21 | 21 | |
22 | -require_once dirname(dirname(__DIR__)) . "/config/_config.php"; |
|
22 | +require_once dirname(dirname(__DIR__))."/config/_config.php"; |
|
23 | 23 | |
24 | 24 | $loggerInstance = new \core\common\Logging(); |
25 | 25 | |
@@ -65,13 +65,13 @@ discard block |
||
65 | 65 | $testsuite = new \core\diag\RADIUSTests($check_realm, $testedProfile->getRealmCheckOuterUsername(), $testedProfile->getEapMethodsinOrderOfPreference(1), $testedProfile->getCollapsedAttributes()['eap:server_name'], $testedProfile->getCollapsedAttributes()["eap:ca_file"]); |
66 | 66 | $rfc7585suite = new \core\diag\RFC7585Tests($check_realm); |
67 | 67 | } else { |
68 | - $error_message = _("You asked for a realm check, but we don't know the realm for this profile!") . "</p>"; |
|
68 | + $error_message = _("You asked for a realm check, but we don't know the realm for this profile!")."</p>"; |
|
69 | 69 | } |
70 | 70 | } else { // someone else's realm, and we don't know anything about it... only shallow checks |
71 | 71 | $check_realm = $validator->realm($realm ?? $_SESSION['check_realm'] ?? ""); |
72 | 72 | if ($check_realm !== FALSE) { |
73 | 73 | $_SESSION['check_realm'] = $check_realm; |
74 | - $testsuite = new \core\diag\RADIUSTests($check_realm, "@" . $check_realm); |
|
74 | + $testsuite = new \core\diag\RADIUSTests($check_realm, "@".$check_realm); |
|
75 | 75 | $rfc7585suite = new \core\diag\RFC7585Tests($check_realm); |
76 | 76 | } else { |
77 | 77 | $error_message = _("No valid realm name given, cannot execute any checks!"); |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | var listofcas = "<?php echo _("You should update your list of accredited CAs") ?>"; |
120 | 120 | var getitfrom = "<?php echo _("Get it from here.") ?>"; |
121 | 121 | var listsource = "<?php echo \config\Diagnostics::RADIUSTESTS['accreditedCAsURL'] ?>"; |
122 | - var moretext = "<?php echo _("more") . "»" ?>"; |
|
122 | + var moretext = "<?php echo _("more")."»" ?>"; |
|
123 | 123 | var lesstext = "<?php echo "«" ?>"; |
124 | 124 | var morealltext = "<?php echo _("Show detailed information for all tests") ?>"; |
125 | 125 | var unknownca_code = "<?php echo \core\diag\RADIUSTests::CERTPROB_UNKNOWN_CA ?>"; |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | } |
257 | 257 | } |
258 | 258 | cliinfo = cliinfo + '<li><table><tbody><tr><td class="icon_td"><img class="icon" src="' + icons[level] + '" style="width: 24px;"></td><td>' + state; |
259 | - cliinfo = cliinfo + ' <?php echo "(" . sprintf(_("elapsed time: %sms."), "'+data.ca[key].certificate[c].time_millisec+' ") . ")"; ?>' + add + '</td></tr>'; |
|
259 | + cliinfo = cliinfo + ' <?php echo "(".sprintf(_("elapsed time: %sms."), "'+data.ca[key].certificate[c].time_millisec+' ").")"; ?>' + add + '</td></tr>'; |
|
260 | 260 | cliinfo = cliinfo + '</tbody></table></ul></li>'; |
261 | 261 | if (data.ca[key].certificate[c].finalerror === 1) { |
262 | 262 | cliinfo = cliinfo + '<li>' + restskipped + '</li>'; |
@@ -426,8 +426,8 @@ discard block |
||
426 | 426 | <?php |
427 | 427 | foreach (\config\Diagnostics::RADIUSTESTS['UDP-hosts'] as $hostindex => $host) { |
428 | 428 | print " |
429 | -$(\"#live_src" . $hostindex . "_img\").attr('src',icon_loading); |
|
430 | -$(\"#live_src" . $hostindex . "_img\").show(); |
|
429 | +$(\"#live_src" . $hostindex."_img\").attr('src',icon_loading); |
|
430 | +$(\"#live_src" . $hostindex."_img\").show(); |
|
431 | 431 | $.ajax({ |
432 | 432 | url: 'radius_tests.php?src=0&hostindex=$hostindex&realm='+realm, |
433 | 433 | type: 'POST', |
@@ -457,15 +457,15 @@ discard block |
||
457 | 457 | <?php |
458 | 458 | foreach (\config\Diagnostics::RADIUSTESTS['UDP-hosts'] as $hostindex => $host) { |
459 | 459 | if ($testedProfile !== NULL) { |
460 | - $extraarg = "profile_id: " . $testedProfile->identifier . ", "; |
|
460 | + $extraarg = "profile_id: ".$testedProfile->identifier.", "; |
|
461 | 461 | } else { |
462 | 462 | $extraarg = ""; |
463 | 463 | } |
464 | 464 | print " |
465 | -$(\"#src" . $hostindex . "_img\").attr('src',icon_loading); |
|
465 | +$(\"#src" . $hostindex."_img\").attr('src',icon_loading); |
|
466 | 466 | $(\"#src$hostindex\").html(''); |
467 | 467 | running_ajax_stat++; |
468 | -$.get('radius_tests.php',{test_type: 'udp', $extraarg realm: realm, src: $hostindex, lang: '" . $gui->languageInstance->getLang() . "', hostindex: '$hostindex' }, udp, 'json'); |
|
468 | +$.get('radius_tests.php',{test_type: 'udp', $extraarg realm: realm, src: $hostindex, lang: '".$gui->languageInstance->getLang()."', hostindex: '$hostindex' }, udp, 'json'); |
|
469 | 469 | |
470 | 470 | "; |
471 | 471 | } |
@@ -492,7 +492,7 @@ discard block |
||
492 | 492 | if ($check_realm === FALSE) { |
493 | 493 | print "<p>$error_message</p>"; |
494 | 494 | } else { |
495 | - print "<h1>" . sprintf(_("Realm testing for: %s"), $check_realm) . "</h1>\n"; |
|
495 | + print "<h1>".sprintf(_("Realm testing for: %s"), $check_realm)."</h1>\n"; |
|
496 | 496 | ?> |
497 | 497 | <div id="debug_out" style="display: none"></div> |
498 | 498 | <div id="tabs" style="min-width: 600px; max-width:800px"> |
@@ -509,12 +509,12 @@ discard block |
||
509 | 509 | </legend> |
510 | 510 | <?php |
511 | 511 | // NAPTR existence check |
512 | - echo "<strong>" . _("DNS chekcs") . "</strong><div>"; |
|
512 | + echo "<strong>"._("DNS chekcs")."</strong><div>"; |
|
513 | 513 | $naptr = $rfc7585suite->relevantNAPTR(); |
514 | 514 | if ($naptr != \core\diag\RADIUSTests::RETVAL_NOTCONFIGURED) { |
515 | 515 | echo "<table>"; |
516 | 516 | // output in friendly words |
517 | - echo "<tr><td>" . _("Checking NAPTR existence:") . "</td><td>"; |
|
517 | + echo "<tr><td>"._("Checking NAPTR existence:")."</td><td>"; |
|
518 | 518 | switch ($naptr) { |
519 | 519 | case \core\diag\RFC7585Tests::RETVAL_NONAPTR: |
520 | 520 | echo _("This realm has no NAPTR records."); |
@@ -529,7 +529,7 @@ discard block |
||
529 | 529 | |
530 | 530 | // compliance checks for NAPTRs |
531 | 531 | if ($naptr > 0) { |
532 | - echo "<tr><td>" . _("Checking NAPTR compliance (flag = S and regex = {empty}):") . "</td><td>"; |
|
532 | + echo "<tr><td>"._("Checking NAPTR compliance (flag = S and regex = {empty}):")."</td><td>"; |
|
533 | 533 | $naptr_valid = $rfc7585suite->relevantNAPTRcompliance(); |
534 | 534 | switch ($naptr_valid) { |
535 | 535 | case \core\diag\RADIUSTests::RETVAL_OK: |
@@ -546,7 +546,7 @@ discard block |
||
546 | 546 | |
547 | 547 | if ($naptr > 0 && $naptr_valid == \core\diag\RADIUSTests::RETVAL_OK) { |
548 | 548 | $srv = $rfc7585suite->relevantNAPTRsrvResolution(); |
549 | - echo "<tr><td>" . _("Checking SRVs:") . "</td><td>"; |
|
549 | + echo "<tr><td>"._("Checking SRVs:")."</td><td>"; |
|
550 | 550 | switch ($srv) { |
551 | 551 | case \core\diag\RADIUSTests::RETVAL_SKIPPED: |
552 | 552 | echo _("This check was skipped."); |
@@ -562,7 +562,7 @@ discard block |
||
562 | 562 | // IP addresses for the hosts |
563 | 563 | if ($naptr > 0 && $naptr_valid == \core\diag\RADIUSTests::RETVAL_OK && $srv > 0) { |
564 | 564 | $hosts = $rfc7585suite->relevantNAPTRhostnameResolution(); |
565 | - echo "<tr><td>" . _("Checking IP address resolution:") . "</td><td>"; |
|
565 | + echo "<tr><td>"._("Checking IP address resolution:")."</td><td>"; |
|
566 | 566 | switch ($srv) { |
567 | 567 | case \core\diag\RADIUSTests::RETVAL_SKIPPED: |
568 | 568 | echo _("This check was skipped."); |
@@ -578,12 +578,12 @@ discard block |
||
578 | 578 | |
579 | 579 | echo "</table><br/><br/>"; |
580 | 580 | if (count($testsuite->listerrors()) == 0) { |
581 | - echo sprintf(_("Realm is <strong>%s</strong> "), _(($naptr > 0 ? "DYNAMIC" : "STATIC"))) . _("with no DNS errors encountered. Congratulations!"); |
|
581 | + echo sprintf(_("Realm is <strong>%s</strong> "), _(($naptr > 0 ? "DYNAMIC" : "STATIC")))._("with no DNS errors encountered. Congratulations!"); |
|
582 | 582 | } else { |
583 | - echo sprintf(_("Realm is <strong>%s</strong> "), _(($naptr > 0 ? "DYNAMIC" : "STATIC"))) . _("but there were DNS errors! Check them!") . " " . _("You should re-run the tests after fixing the errors; more errors might be uncovered at that point. The exact error causes are listed below."); |
|
583 | + echo sprintf(_("Realm is <strong>%s</strong> "), _(($naptr > 0 ? "DYNAMIC" : "STATIC")))._("but there were DNS errors! Check them!")." "._("You should re-run the tests after fixing the errors; more errors might be uncovered at that point. The exact error causes are listed below."); |
|
584 | 584 | echo "<div class='notacceptable'><table>"; |
585 | 585 | foreach ($testsuite->listerrors() as $details) { |
586 | - echo "<tr><td>" . $details['TYPE'] . "</td><td>" . $details['TARGET'] . "</td></tr>"; |
|
586 | + echo "<tr><td>".$details['TYPE']."</td><td>".$details['TARGET']."</td></tr>"; |
|
587 | 587 | } |
588 | 588 | echo "</table></div>"; |
589 | 589 | } |
@@ -599,26 +599,26 @@ discard block |
||
599 | 599 | $("#dynamic_tests").show(); |
600 | 600 | '; |
601 | 601 | foreach ($rfc7585suite->NAPTR_hostname_records as $hostindex => $addr) { |
602 | - $host = ($addr['family'] == "IPv6" ? "[" : "") . $addr['IP'] . ($addr['family'] == "IPv6" ? "]" : "") . ":" . $addr['port']; |
|
602 | + $host = ($addr['family'] == "IPv6" ? "[" : "").$addr['IP'].($addr['family'] == "IPv6" ? "]" : "").":".$addr['port']; |
|
603 | 603 | $expectedName = $addr['hostname']; |
604 | 604 | print " |
605 | 605 | running_ajax_dyn++; |
606 | - $.ajax({url:'radius_tests.php', data:{test_type: 'capath', realm: realm, src: '$host', lang: '" . $gui->languageInstance->getLang() . "', hostindex: '$hostindex', expectedname: '$expectedName' }, error: eee, success: capath, dataType: 'json'}); |
|
606 | + $.ajax({url:'radius_tests.php', data:{test_type: 'capath', realm: realm, src: '$host', lang: '".$gui->languageInstance->getLang()."', hostindex: '$hostindex', expectedname: '$expectedName' }, error: eee, success: capath, dataType: 'json'}); |
|
607 | 607 | running_ajax_dyn++; |
608 | - $.ajax({url:'radius_tests.php', data:{test_type: 'clients', realm: realm, src: '$host', lang: '" . $gui->languageInstance->getLang() . "', hostindex: '$hostindex' }, error: eee, success: clients, dataType: 'json'}); |
|
608 | + $.ajax({url:'radius_tests.php', data:{test_type: 'clients', realm: realm, src: '$host', lang: '".$gui->languageInstance->getLang()."', hostindex: '$hostindex' }, error: eee, success: clients, dataType: 'json'}); |
|
609 | 609 | "; |
610 | 610 | } |
611 | 611 | echo "} |
612 | 612 | </script><hr>"; |
613 | 613 | } else { |
614 | - echo "<tr><td>" . _("Dynamic discovery test is not configured") . "</td><td>"; |
|
614 | + echo "<tr><td>"._("Dynamic discovery test is not configured")."</td><td>"; |
|
615 | 615 | } |
616 | - echo "<strong>" . _("Static connectivity tests") . "</strong> |
|
616 | + echo "<strong>"._("Static connectivity tests")."</strong> |
|
617 | 617 | <table><tr> |
618 | 618 | <td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='main_static_ico' class='icon'></td><td id='main_static_result' style='display:none'> </td> |
619 | 619 | </tr></table>"; |
620 | 620 | if ($naptr > 0) { |
621 | - echo "<hr><strong>" . _("Dynamic connectivity tests") . "</strong> |
|
621 | + echo "<hr><strong>"._("Dynamic connectivity tests")."</strong> |
|
622 | 622 | <table><tr> |
623 | 623 | <td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='main_dynamic_ico' class='icon'></td><td id='main_dynamic_result' style='display:none'> </td> |
624 | 624 | </tr></table>"; |
@@ -638,12 +638,12 @@ discard block |
||
638 | 638 | print "<p>"; |
639 | 639 | foreach (\config\Diagnostics::RADIUSTESTS['UDP-hosts'] as $hostindex => $host) { |
640 | 640 | print "<hr>"; |
641 | - printf(_("Testing from: %s"), "<strong>" . \config\Diagnostics::RADIUSTESTS['UDP-hosts'][$hostindex]['display_name'] . "</strong>"); |
|
641 | + printf(_("Testing from: %s"), "<strong>".\config\Diagnostics::RADIUSTESTS['UDP-hosts'][$hostindex]['display_name']."</strong>"); |
|
642 | 642 | print "<table id='results$hostindex' style='width:100%' class='udp_results'> |
643 | 643 | <tr> |
644 | -<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='src" . $hostindex . "_img'></td> |
|
644 | +<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='src".$hostindex."_img'></td> |
|
645 | 645 | <td id='src$hostindex' colspan=2> |
646 | -" . _("testing...") . " |
|
646 | +"._("testing...")." |
|
647 | 647 | </td> |
648 | 648 | </tr> |
649 | 649 | </table>"; |
@@ -662,21 +662,21 @@ discard block |
||
662 | 662 | |
663 | 663 | <?php |
664 | 664 | echo "<div id='dynamic_tests'><fieldset class='option_container'> |
665 | - <legend><strong>" . _("DYNAMIC connectivity tests") . "</strong></legend>"; |
|
665 | + <legend><strong>" . _("DYNAMIC connectivity tests")."</strong></legend>"; |
|
666 | 666 | |
667 | 667 | $resultstoprint = []; |
668 | 668 | if (count($rfc7585suite->NAPTR_hostname_records) > 0) { |
669 | - $resultstoprint[] = '<div style="align:right; display: none;" id="dynamic_result_fail">' . _("Some errors were found during the tests, see below") . '</div><div style="align:right; display: none;" id="dynamic_result_pass">' . _("All tests passed, congratulations!") . '</div>'; |
|
670 | - $resultstoprint[] = '<div style="align:right;"><a href="" class="moreall">' . _('Show detailed information for all tests') . '</a></div>' . '<p><strong>' . _("Checking server handshake...") . "</strong><p>"; |
|
669 | + $resultstoprint[] = '<div style="align:right; display: none;" id="dynamic_result_fail">'._("Some errors were found during the tests, see below").'</div><div style="align:right; display: none;" id="dynamic_result_pass">'._("All tests passed, congratulations!").'</div>'; |
|
670 | + $resultstoprint[] = '<div style="align:right;"><a href="" class="moreall">'._('Show detailed information for all tests').'</a></div>'.'<p><strong>'._("Checking server handshake...")."</strong><p>"; |
|
671 | 671 | foreach ($rfc7585suite->NAPTR_hostname_records as $hostindex => $addr) { |
672 | - $bracketaddr = ($addr["family"] == "IPv6" ? "[" . $addr["IP"] . "]" : $addr["IP"]); |
|
673 | - $resultstoprint[] = '<p><strong>' . $bracketaddr . ' TCP/' . $addr['port'] . '</strong>'; |
|
672 | + $bracketaddr = ($addr["family"] == "IPv6" ? "[".$addr["IP"]."]" : $addr["IP"]); |
|
673 | + $resultstoprint[] = '<p><strong>'.$bracketaddr.' TCP/'.$addr['port'].'</strong>'; |
|
674 | 674 | $resultstoprint[] = '<ul style="list-style-type: none;" class="caresult"><li>'; |
675 | 675 | $resultstoprint[] = "<table id='caresults$hostindex' style='width:100%'> |
676 | 676 | <tr> |
677 | -<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='srcca" . $hostindex . "_img'></td> |
|
677 | +<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='srcca".$hostindex."_img'></td> |
|
678 | 678 | <td id='srcca$hostindex'> |
679 | -" . _("testing...") . " |
|
679 | +"._("testing...")." |
|
680 | 680 | </td> |
681 | 681 | </tr> |
682 | 682 | </table>"; |
@@ -684,12 +684,12 @@ discard block |
||
684 | 684 | } |
685 | 685 | $clientstest = []; |
686 | 686 | foreach ($rfc7585suite->NAPTR_hostname_records as $hostindex => $addr) { |
687 | - $clientstest[] = '<p><strong>' . $addr['IP'] . ' TCP/' . $addr['port'] . '</strong></p><ol>'; |
|
687 | + $clientstest[] = '<p><strong>'.$addr['IP'].' TCP/'.$addr['port'].'</strong></p><ol>'; |
|
688 | 688 | $clientstest[] = "<span id='clientresults$hostindex$clinx'><table style='width:100%'> |
689 | 689 | <tr> |
690 | -<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='srcclient" . $hostindex . "_img'></td> |
|
690 | +<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='srcclient".$hostindex."_img'></td> |
|
691 | 691 | <td id='srcclient$hostindex'> |
692 | -" . _("testing...") . " |
|
692 | +"._("testing...")." |
|
693 | 693 | </td> |
694 | 694 | </tr> |
695 | 695 | </table></span>"; |
@@ -697,7 +697,7 @@ discard block |
||
697 | 697 | } |
698 | 698 | echo '<div style="align:right;">'; |
699 | 699 | echo join('', $resultstoprint); |
700 | - echo '<span id="clientstest" style="display: none;"><p><hr><b>' . _('Checking if certificates from CAs are accepted...') . '</b><p>' . _('A few client certificates will be tested to check if servers are resistant to some certificate problems.') . '<p>'; |
|
700 | + echo '<span id="clientstest" style="display: none;"><p><hr><b>'._('Checking if certificates from CAs are accepted...').'</b><p>'._('A few client certificates will be tested to check if servers are resistant to some certificate problems.').'<p>'; |
|
701 | 701 | print join('', $clientstest); |
702 | 702 | echo '</span>'; |
703 | 703 | echo '</div>'; |
@@ -711,7 +711,7 @@ discard block |
||
711 | 711 | // check if truncates/dies on Operator-Name |
712 | 712 | if ($my_profile !== NULL) { |
713 | 713 | echo "<div id='tabs-4'><fieldset class='option_container'> |
714 | - <legend><strong>" . _("Live login test") . "</strong></legend>"; |
|
714 | + <legend><strong>" . _("Live login test")."</strong></legend>"; |
|
715 | 715 | $prof_compl = $my_profile->getEapMethodsinOrderOfPreference(1); |
716 | 716 | if (count($prof_compl) > 0) { |
717 | 717 | $passwordReqired = FALSE; |
@@ -724,34 +724,34 @@ discard block |
||
724 | 724 | $clientCertRequired = TRUE; |
725 | 725 | } |
726 | 726 | } |
727 | - echo "<div id='disposable_credential_container'><p>" . _("If you enter an existing login credential here, you can test the actual authentication from various checkpoints all over the world.") . "</p> |
|
728 | - <p>" . _("The test will use all EAP types you have set in your profile information to check whether the right CAs and server names are used, and of course whether the login with these credentials and the given EAP type actually worked. If you have set anonymous outer ID, the test will use that.") . "</p> |
|
729 | - <p>" . _("Note: the tool purposefully does not offer you to save these credentials, and they will never be saved in any way on the server side. Please use only <strong>temporary test accounts</strong> here; permanently valid test accounts in the wild are considered harmful!") . "</p></div> |
|
727 | + echo "<div id='disposable_credential_container'><p>"._("If you enter an existing login credential here, you can test the actual authentication from various checkpoints all over the world.")."</p> |
|
728 | + <p>" . _("The test will use all EAP types you have set in your profile information to check whether the right CAs and server names are used, and of course whether the login with these credentials and the given EAP type actually worked. If you have set anonymous outer ID, the test will use that.")."</p> |
|
729 | + <p>" . _("Note: the tool purposefully does not offer you to save these credentials, and they will never be saved in any way on the server side. Please use only <strong>temporary test accounts</strong> here; permanently valid test accounts in the wild are considered harmful!")."</p></div> |
|
730 | 730 | <form enctype='multipart/form-data' id='live_form' accept-charset='UTF-8'> |
731 | 731 | <input type='hidden' name='test_type' value='udp_login'> |
732 | - <input type='hidden' name='lang' value='" . $gui->languageInstance->getLang() . "'> |
|
733 | - <input type='hidden' name='profile_id' value='" . $my_profile->identifier . "'> |
|
732 | + <input type='hidden' name='lang' value='" . $gui->languageInstance->getLang()."'> |
|
733 | + <input type='hidden' name='profile_id' value='" . $my_profile->identifier."'> |
|
734 | 734 | <table id='live_tests'>"; |
735 | 735 | // if any password based EAP methods are available enable this section |
736 | 736 | if ($passwordReqired) { |
737 | - echo "<tr><td colspan='2'><strong>" . _("Password-based EAP types") . "</strong></td></tr> |
|
738 | - <tr><td>" . _("Real (inner) username:") . "</td><td><input type='text' id='username' class='mandatory' name='username'/></td></tr>"; |
|
739 | - echo "<tr><td>" . _("Anonymous outer ID (optional):") . "</td><td><input type='text' id='outer_username' name='outer_username'/></td></tr>"; |
|
740 | - echo "<tr><td>" . _("Password:") . "</td><td><input type='text' id='password' class='mandatory' name='password'/></td></tr>"; |
|
737 | + echo "<tr><td colspan='2'><strong>"._("Password-based EAP types")."</strong></td></tr> |
|
738 | + <tr><td>" . _("Real (inner) username:")."</td><td><input type='text' id='username' class='mandatory' name='username'/></td></tr>"; |
|
739 | + echo "<tr><td>"._("Anonymous outer ID (optional):")."</td><td><input type='text' id='outer_username' name='outer_username'/></td></tr>"; |
|
740 | + echo "<tr><td>"._("Password:")."</td><td><input type='text' id='password' class='mandatory' name='password'/></td></tr>"; |
|
741 | 741 | } |
742 | 742 | // ask for cert + privkey if TLS-based method is active |
743 | 743 | if ($clientCertRequired) { |
744 | - echo "<tr><td colspan='2'><strong>" . _("Certificate-based EAP types") . "</strong></td></tr> |
|
745 | - <tr><td>" . _("Certificate file (.p12 or .pfx):") . "</td><td><input type='file' id='cert' accept='application/x-pkcs12' name='cert'/></td></tr> |
|
746 | - <tr><td>" . _("Certificate password, if any:") . "</td><td><input type='text' id='privkey' name='privkey_pass'/></td></tr> |
|
747 | - <tr><td>" . _("Username, if different from certificate Subject:") . "</td><td><input type='text' id='tls_username' name='tls_username'/></td></tr>"; |
|
744 | + echo "<tr><td colspan='2'><strong>"._("Certificate-based EAP types")."</strong></td></tr> |
|
745 | + <tr><td>" . _("Certificate file (.p12 or .pfx):")."</td><td><input type='file' id='cert' accept='application/x-pkcs12' name='cert'/></td></tr> |
|
746 | + <tr><td>" . _("Certificate password, if any:")."</td><td><input type='text' id='privkey' name='privkey_pass'/></td></tr> |
|
747 | + <tr><td>" . _("Username, if different from certificate Subject:")."</td><td><input type='text' id='tls_username' name='tls_username'/></td></tr>"; |
|
748 | 748 | } |
749 | - echo "<tr><td colspan='2'><button id='submit_credentials'>" . _("Submit credentials") . "</button></td></tr></table></form>"; |
|
749 | + echo "<tr><td colspan='2'><button id='submit_credentials'>"._("Submit credentials")."</button></td></tr></table></form>"; |
|
750 | 750 | echo "<div id='live_login_results' style='display:none'>"; |
751 | 751 | foreach (\config\Diagnostics::RADIUSTESTS['UDP-hosts'] as $hostindex => $host) { |
752 | 752 | print "<hr>"; |
753 | - printf(_("Testing from: %s"), "<strong>" . \config\Diagnostics::RADIUSTESTS['UDP-hosts'][$hostindex]['display_name'] . "</strong>"); |
|
754 | - print "<span style='position:relative'><img src='../resources/images/icons/loading51.gif' id='live_src" . $hostindex . "_img' style='width:24px; position: absolute; left: 20px; bottom: 0px; '></span>"; |
|
753 | + printf(_("Testing from: %s"), "<strong>".\config\Diagnostics::RADIUSTESTS['UDP-hosts'][$hostindex]['display_name']."</strong>"); |
|
754 | + print "<span style='position:relative'><img src='../resources/images/icons/loading51.gif' id='live_src".$hostindex."_img' style='width:24px; position: absolute; left: 20px; bottom: 0px; '></span>"; |
|
755 | 755 | print "<div id='eap_test$hostindex' class='eap_test_results'></div>"; |
756 | 756 | } |
757 | 757 | echo "</div>"; |
@@ -766,9 +766,9 @@ discard block |
||
766 | 766 | } |
767 | 767 | |
768 | 768 | if (isset($_POST['comefrom'])) { |
769 | - $return = htmlspecialchars_decode($_POST['comefrom']) . "?inst_id=" . $my_inst->identifier; |
|
769 | + $return = htmlspecialchars_decode($_POST['comefrom'])."?inst_id=".$my_inst->identifier; |
|
770 | 770 | echo "<form method='post' action='$return' accept-charset='UTF-8'> |
771 | - <button type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_CLOSE . "'>" . sprintf(_("Return to %s administrator area"), core\common\Entity::$nomenclature_inst) . "</button>" |
|
771 | + <button type='submit' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_CLOSE."'>".sprintf(_("Return to %s administrator area"), core\common\Entity::$nomenclature_inst)."</button>" |
|
772 | 772 | . "</form>"; |
773 | 773 | } |
774 | 774 | if ($check_realm !== FALSE) { |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | * <base_url>/copyright.php after deploying the software |
20 | 20 | */ |
21 | 21 | |
22 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
22 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
23 | 23 | |
24 | 24 | $auth = new \web\lib\admin\Authentication(); |
25 | 25 | $deco = new \web\lib\admin\PageDecoration(); |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | $inst_name = $my_inst->name; |
40 | 40 | |
41 | 41 | if ($wizardStyle) { |
42 | - echo $deco->defaultPagePrelude(sprintf(_("%s: %s enrollment wizard (step 2)"), \config\Master::APPEARANCE['productname'], $uiElements->nomenclatureParticipant)); |
|
42 | + echo $deco->defaultPagePrelude(sprintf(_("%s: %s enrollment wizard (step 2)"), \config\Master::APPEARANCE['productname'], $uiElements->nomenclatureParticipant)); |
|
43 | 43 | } else { |
44 | 44 | echo $deco->defaultPagePrelude(sprintf(_("%s: Editing %s '%s'"), \config\Master::APPEARANCE['productname'], $uiElements->nomenclatureParticipant, $inst_name)); |
45 | 45 | } |
@@ -94,12 +94,12 @@ discard block |
||
94 | 94 | </table> |
95 | 95 | </div> |
96 | 96 | <?php |
97 | - echo "<form enctype='multipart/form-data' action='edit_participant_result.php?inst_id=$my_inst->identifier" . ($wizardStyle ? "&wizard=true" : "") . "' method='post' accept-charset='UTF-8'> |
|
98 | - <input type='hidden' name='MAX_FILE_SIZE' value='" . \config\Master::MAX_UPLOAD_SIZE . "'>"; |
|
97 | + echo "<form enctype='multipart/form-data' action='edit_participant_result.php?inst_id=$my_inst->identifier".($wizardStyle ? "&wizard=true" : "")."' method='post' accept-charset='UTF-8'> |
|
98 | + <input type='hidden' name='MAX_FILE_SIZE' value='" . \config\Master::MAX_UPLOAD_SIZE."'>"; |
|
99 | 99 | |
100 | 100 | if ($wizardStyle) { |
101 | - echo "<p>" . |
|
102 | - sprintf(_("Hello, newcomer. The %s is new to us. This wizard will ask you several questions about it, so that we can generate beautiful profiles for you in the end. All of the information below is optional, but it is important to fill out as many fields as possible for the benefit of your end users."), $uiElements->nomenclatureParticipant) . "</p>"; |
|
101 | + echo "<p>". |
|
102 | + sprintf(_("Hello, newcomer. The %s is new to us. This wizard will ask you several questions about it, so that we can generate beautiful profiles for you in the end. All of the information below is optional, but it is important to fill out as many fields as possible for the benefit of your end users."), $uiElements->nomenclatureParticipant)."</p>"; |
|
103 | 103 | } |
104 | 104 | $optionDisplay = new web\lib\admin\OptionDisplay($idpoptions, "IdP"); |
105 | 105 | ?> |
@@ -107,11 +107,11 @@ discard block |
||
107 | 107 | <legend><strong><?php echo _("General Information"); ?></strong></legend> |
108 | 108 | <?php |
109 | 109 | if ($wizardStyle) { |
110 | - echo "<p>" . |
|
111 | - _("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> |
|
110 | + echo "<p>". |
|
111 | + _("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> |
|
112 | 112 | <ul> |
113 | - <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> |
|
114 | - <li>" . sprintf(_("<strong>Name</strong>: The %s 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."),$uiElements->nomenclatureParticipant) . "</li>"; |
|
113 | + <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> |
|
114 | + <li>" . sprintf(_("<strong>Name</strong>: The %s 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."), $uiElements->nomenclatureParticipant)."</li>"; |
|
115 | 115 | echo "</ul>"; |
116 | 116 | } |
117 | 117 | echo $optionDisplay->prefilledOptionTable("general"); |
@@ -125,47 +125,47 @@ discard block |
||
125 | 125 | <legend><strong><?php echo _("Media Properties"); ?></strong></legend> |
126 | 126 | <?php |
127 | 127 | if ($wizardStyle) { |
128 | - echo "<p>" . |
|
129 | - sprintf(_("In this section, you define on which media %s should be configured on user devices."), \config\ConfAssistant::CONSORTIUM['display_name']) . "</p> |
|
128 | + echo "<p>". |
|
129 | + sprintf(_("In this section, you define on which media %s should be configured on user devices."), \config\ConfAssistant::CONSORTIUM['display_name'])."</p> |
|
130 | 130 | <ul>"; |
131 | 131 | echo "<li>"; |
132 | - echo "<strong>" . ( count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0 ? _("Additional SSIDs:") : _("SSIDs:")) . " </strong>"; |
|
132 | + echo "<strong>".(count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0 ? _("Additional SSIDs:") : _("SSIDs:"))." </strong>"; |
|
133 | 133 | if (count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0) { |
134 | 134 | $ssidlist = ""; |
135 | 135 | foreach (\config\ConfAssistant::CONSORTIUM['ssid'] as $ssid) { |
136 | - $ssidlist .= ", '<strong>" . $ssid . "</strong>'"; |
|
136 | + $ssidlist .= ", '<strong>".$ssid."</strong>'"; |
|
137 | 137 | } |
138 | 138 | $ssidlist = substr($ssidlist, 2); |
139 | 139 | echo 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); |
140 | 140 | if (\config\ConfAssistant::CONSORTIUM['tkipsupport']) { |
141 | - echo " " . _("They will also be configured for WPA/TKIP if the device supports multiple encryption types."); |
|
141 | + echo " "._("They will also be configured for WPA/TKIP if the device supports multiple encryption types."); |
|
142 | 142 | } |
143 | - echo "<br/>" . sprintf(_("It is also possible to define custom additional SSIDs with the option '%s' below."), $uiElements->displayName("media:SSID")); |
|
143 | + echo "<br/>".sprintf(_("It is also possible to define custom additional SSIDs with the option '%s' below."), $uiElements->displayName("media:SSID")); |
|
144 | 144 | } else { |
145 | 145 | echo _("Please configure which SSIDs should be configured in the installers."); |
146 | 146 | } |
147 | - echo " " . _("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."); |
|
147 | + echo " "._("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."); |
|
148 | 148 | echo "</li>"; |
149 | 149 | |
150 | 150 | echo "<li>"; |
151 | - echo "<strong>" . ( count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0 ? _("Additional Hotspot 2.0 / Passpoint Consortia:") : _("Hotspot 2.0 / Passpoint Consortia:")) . " </strong>"; |
|
151 | + echo "<strong>".(count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0 ? _("Additional Hotspot 2.0 / Passpoint Consortia:") : _("Hotspot 2.0 / Passpoint Consortia:"))." </strong>"; |
|
152 | 152 | if (count(\config\ConfAssistant::CONSORTIUM['interworking-consortium-oi']) > 0) { |
153 | 153 | $consortiumlist = ""; |
154 | 154 | foreach (\config\ConfAssistant::CONSORTIUM['interworking-consortium-oi'] as $oi) { |
155 | - $consortiumlist .= ", '<strong>" . $oi . "</strong>'"; |
|
155 | + $consortiumlist .= ", '<strong>".$oi."</strong>'"; |
|
156 | 156 | } |
157 | 157 | $consortiumlist = substr($consortiumlist, 2); |
158 | 158 | echo 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); |
159 | 159 | |
160 | - echo "<br/>" . sprintf(_("It is also possible to define custom additional OIs with the option '%s' below."), $uiElements->displayName("media:consortium_OI")); |
|
160 | + echo "<br/>".sprintf(_("It is also possible to define custom additional OIs with the option '%s' below."), $uiElements->displayName("media:consortium_OI")); |
|
161 | 161 | } else { |
162 | 162 | echo _("Please configure which Consortium OIs should be configured in the installers."); |
163 | 163 | } |
164 | 164 | echo "</li>"; |
165 | - echo "<li><strong>" . _("Support for wired IEEE 802.1X:") . " </strong>" |
|
166 | - . _("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).") . |
|
165 | + echo "<li><strong>"._("Support for wired IEEE 802.1X:")." </strong>" |
|
166 | + . _("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)."). |
|
167 | 167 | "</li>"; |
168 | - echo "<li><strong>" . _("Removal of bootstrap/onboarding SSIDs:") . " </strong>" |
|
168 | + echo "<li><strong>"._("Removal of bootstrap/onboarding SSIDs:")." </strong>" |
|
169 | 169 | . _("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'.") |
170 | 170 | . "</li>"; |
171 | 171 | echo "</ul>"; |
@@ -181,16 +181,16 @@ discard block |
||
181 | 181 | echo "<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>"; |
182 | 182 | |
183 | 183 | if (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_RADIUS'] == "LOCAL") { |
184 | - echo "<p>" . |
|
184 | + echo "<p>". |
|
185 | 185 | |
186 | - 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."),$uiElements->nomenclatureParticipant) . "</p>" . |
|
187 | - "<p>" . |
|
188 | - _("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>"; |
|
186 | + 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."), $uiElements->nomenclatureParticipant)."</p>". |
|
187 | + "<p>". |
|
188 | + _("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>"; |
|
189 | 189 | if (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_SILVERBULLET'] == "LOCAL") { |
190 | - echo "<p>" . sprintf(_("For %s deployments, providing at least a local e-mail contact is required."), core\ProfileSilverbullet::PRODUCTNAME) ." " . _("This is the contact point for your end users' level 1 support.") . "</p>"; |
|
190 | + echo "<p>".sprintf(_("For %s deployments, providing at least a local e-mail contact is required."), core\ProfileSilverbullet::PRODUCTNAME)." "._("This is the contact point for your end users' level 1 support.")."</p>"; |
|
191 | 191 | } |
192 | 192 | } elseif (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_SILVERBULLET'] == "LOCAL") { |
193 | - echo "<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>"; |
|
193 | + echo "<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>"; |
|
194 | 194 | } |
195 | 195 | |
196 | 196 | } |
@@ -200,8 +200,8 @@ discard block |
||
200 | 200 | <button type='button' class='newoption' onclick='getXML("support")'><?php echo _("Add new option"); ?></button></fieldset> |
201 | 201 | <?php |
202 | 202 | if ($wizardStyle) { |
203 | - echo "<p>" . sprintf(_("When you are sure that everything is correct, please click on %sContinue ...%s"), "<button type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_CONTINUE . "'>", "</button>") . "</p></form>"; |
|
203 | + echo "<p>".sprintf(_("When you are sure that everything is correct, please click on %sContinue ...%s"), "<button type='submit' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_CONTINUE."'>", "</button>")."</p></form>"; |
|
204 | 204 | } else { |
205 | - echo "<div><button type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_SAVE . "'>" . _("Save data") . "</button> <button type='button' class='delete' name='abortbutton' value='abort' onclick='javascript:window.location = \"overview_user.php\"'>" . _("Discard changes") . "</button></div></form>"; |
|
205 | + echo "<div><button type='submit' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_SAVE."'>"._("Save data")."</button> <button type='button' class='delete' name='abortbutton' value='abort' onclick='javascript:window.location = \"overview_user.php\"'>"._("Discard changes")."</button></div></form>"; |
|
206 | 206 | } |
207 | 207 | echo $deco->footer(); |