@@ -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 | $auth = new \web\lib\admin\Authentication(); |
31 | 31 | $deco = new \web\lib\admin\PageDecoration(); |
32 | 32 | $validator = new \web\lib\common\InputValidation(); |
@@ -94,10 +94,10 @@ discard block |
||
94 | 94 | $fed = $validator->existingFederation($_POST['NRO-list']); |
95 | 95 | $country = strtoupper($fed->tld); |
96 | 96 | $DN[] = "C=$country"; |
97 | - $DN[] = "O=NRO of " . $cat->knownFederations[strtoupper($fed->tld)]; |
|
97 | + $DN[] = "O=NRO of ".$cat->knownFederations[strtoupper($fed->tld)]; |
|
98 | 98 | $serverInfo = $externalDb->listExternalTlsServersFederation($fed->tld); |
99 | 99 | $serverList = explode(",", array_key_first($serverInfo)); |
100 | - $DN[] = "CN=" . $serverList[0]; |
|
100 | + $DN[] = "CN=".$serverList[0]; |
|
101 | 101 | $policies[] = "eduroam IdP"; |
102 | 102 | $policies[] = "eduroam SP"; |
103 | 103 | $firstName = $serverInfo[array_key_first($serverInfo)][0]["name"]; |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | } |
122 | 122 | $DN[] = "O=$ou"; |
123 | 123 | $serverList = explode(",", $serverInfo["servers"]); |
124 | - $DN[] = "CN=" . $serverList[0]; |
|
124 | + $DN[] = "CN=".$serverList[0]; |
|
125 | 125 | switch ($serverInfo["type"]) { |
126 | 126 | case core\IdP::TYPE_IDPSP: |
127 | 127 | $policies[] = "eduroam IdP"; |
@@ -141,12 +141,12 @@ discard block |
||
141 | 141 | default: |
142 | 142 | throw new Exception("Sorry: Unknown level of issuance requested."); |
143 | 143 | } |
144 | - echo "<p style='font-size: large'>" . _("Requesting a certificate with the following properties"); |
|
144 | + echo "<p style='font-size: large'>"._("Requesting a certificate with the following properties"); |
|
145 | 145 | echo "<ul>"; |
146 | - echo "<li>" . _("Policy OIDs: ") . implode(", ", $policies) . "</li>"; |
|
147 | - echo "<li>" . _("Distinguished Name: ") . implode(", ", $DN) . "</li>"; |
|
148 | - echo "<li>" . _("subjectAltName:DNS : ") . implode(", ", $serverList) . "</li>"; |
|
149 | - echo "<li>" . _("Requester Contact Details: ") . $firstName . " <" . $firstMail . ">" . "</li>"; |
|
146 | + echo "<li>"._("Policy OIDs: ").implode(", ", $policies)."</li>"; |
|
147 | + echo "<li>"._("Distinguished Name: ").implode(", ", $DN)."</li>"; |
|
148 | + echo "<li>"._("subjectAltName:DNS : ").implode(", ", $serverList)."</li>"; |
|
149 | + echo "<li>"._("Requester Contact Details: ").$firstName." <".$firstMail.">"."</li>"; |
|
150 | 150 | echo "</ul></p>"; |
151 | 151 | |
152 | 152 | $vettedCsr = $validator->string($_POST['CSR'], true); |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | "FED" => $country]; |
161 | 161 | // our certs can be good for max 5 years |
162 | 162 | $fed->requestCertificate($user->identifier, $newCsrWithMeta, 1825); |
163 | - echo "<p>" . _("The certificate was requested.") . "</p>"; |
|
163 | + echo "<p>"._("The certificate was requested.")."</p>"; |
|
164 | 164 | ?> |
165 | 165 | <form action="overview_certificates.php" method="GET"> |
166 | 166 | <button type="submit"><?php echo _("Back to Certificate Overview"); ?></button> |
@@ -178,23 +178,23 @@ discard block |
||
178 | 178 | switch (count($feds)) { |
179 | 179 | case 0: |
180 | 180 | echo "<div>"; |
181 | - 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.")); |
|
181 | + 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.")); |
|
182 | 182 | echo "</div>"; |
183 | 183 | break; |
184 | 184 | case 1: |
185 | - echo '<input type="radio" name="LEVEL" id="NRO" value="NRO" checked>' . sprintf(_("Certificate for %s") ." ", $uiElements->nomenclatureFed) . '</input>'; |
|
186 | - echo " <strong>" . $cat->knownFederations[$feds[0]->tld] . "</strong>"; |
|
187 | - echo '<input type="hidden" name="NRO-list" id="NRO-list" value="' . $feds[0]->tld . '"/>'; |
|
185 | + echo '<input type="radio" name="LEVEL" id="NRO" value="NRO" checked>'.sprintf(_("Certificate for %s")." ", $uiElements->nomenclatureFed).'</input>'; |
|
186 | + echo " <strong>".$cat->knownFederations[$feds[0]->tld]."</strong>"; |
|
187 | + echo '<input type="hidden" name="NRO-list" id="NRO-list" value="'.$feds[0]->tld.'"/>'; |
|
188 | 188 | break; |
189 | 189 | default: |
190 | - echo '<input type="radio" name="LEVEL" id="NRO" value="NRO" checked>' . sprintf(_("Certificate for %s") ." ", $uiElements->nomenclatureFed) . '</input>'; |
|
190 | + echo '<input type="radio" name="LEVEL" id="NRO" value="NRO" checked>'.sprintf(_("Certificate for %s")." ", $uiElements->nomenclatureFed).'</input>'; |
|
191 | 191 | ?> |
192 | 192 | <select name="NRO-list" id="NRO-list"> |
193 | 193 | <option value="notset"><?php echo _("---PPPLEASE CHOOSE---"); ?></option> |
194 | 194 | <?php |
195 | 195 | foreach ($feds as $oneFed) { |
196 | 196 | #echo '<option value="' . strtoupper($oneFed->tld) . '">' . $cat->knownFederations[$oneFed->tld] . "</option>"; |
197 | - echo '<option value="AAA' . strtoupper($oneFed->tld) . '">' . $oneIdP["names"][$langObject->getLang()] . "</option>"; |
|
197 | + echo '<option value="AAA'.strtoupper($oneFed->tld).'">'.$oneIdP["names"][$langObject->getLang()]."</option>"; |
|
198 | 198 | |
199 | 199 | } |
200 | 200 | ?> |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | $allIdPs = []; |
205 | 205 | foreach ($allAuthorizedFeds as $oneFed) { |
206 | 206 | foreach ($externalDb->listExternalTlsServersInstitution($oneFed['value']) as $id => $oneIdP) { |
207 | - $allIdPs[$id] = '[' . substr($id, 0, 2) . '] ' . $oneIdP["names"][$langObject->getLang()]; |
|
207 | + $allIdPs[$id] = '['.substr($id, 0, 2).'] '.$oneIdP["names"][$langObject->getLang()]; |
|
208 | 208 | } |
209 | 209 | } |
210 | 210 | if (count($allIdPs) > 0) { |
@@ -215,14 +215,14 @@ discard block |
||
215 | 215 | <option value="notset"><?php echo _("---PLEASE CHOOSE---"); ?></option> |
216 | 216 | <?php |
217 | 217 | foreach ($allIdPs as $id => $name) { |
218 | - echo '<option value="' . $id . '">' . $name . "</option>"; |
|
218 | + echo '<option value="'.$id.'">'.$name."</option>"; |
|
219 | 219 | } |
220 | 220 | ?> |
221 | 221 | </select> |
222 | 222 | <?php |
223 | 223 | } else { |
224 | 224 | echo "<div>"; |
225 | - 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); |
|
225 | + 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); |
|
226 | 226 | echo "</div>"; |
227 | 227 | } |
228 | 228 | ?> |