@@ -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 | $deco = new \web\lib\admin\PageDecoration(); |
25 | 25 | $validator = new \web\lib\common\InputValidation(); |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | $downloadBoxText = '<h2 id="download_box_text">MMM</h2>'._("Click the download button to download the installer or the clipboard copy icon to save the link."); |
116 | 116 | |
117 | 117 | $downloadBoxText .= "<p><button id='download_installer'>"._("Download").'</button>'; |
118 | - $downloadBoxText .= ' <img id="copy_link" src="../resources/images/icons/Tabler/copy.svg" title="'. _("Copy link to clipboard").'" >'; |
|
118 | + $downloadBoxText .= ' <img id="copy_link" src="../resources/images/icons/Tabler/copy.svg" title="'._("Copy link to clipboard").'" >'; |
|
119 | 119 | |
120 | 120 | ?> |
121 | 121 | <div id="download_box"><img id="download_box_close" src="../resources/images/icons/button_cancel.png" ALT="Close"/><div><?php echo $downloadBoxText; ?></div></div> |
@@ -143,10 +143,10 @@ discard block |
||
143 | 143 | <?php |
144 | 144 | foreach ($preflist as $method) { |
145 | 145 | $escapedMethod = $method->getIntegerRep(); |
146 | - echo "<th scope='col' style='min-width:200px'>" . $method->getPrintableRep() . "<br/> |
|
146 | + echo "<th scope='col' style='min-width:200px'>".$method->getPrintableRep()."<br/> |
|
147 | 147 | <form method='post' action='inc/toggleRedirect.inc.php?inst_id=$my_inst->identifier&profile_id=$my_profile->identifier' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'> |
148 | 148 | <input type='hidden' name='eaptype' value='$escapedMethod'> |
149 | - <button class='redirect' type='submit'>" . _("EAP-Type-specific options...") . "</button> |
|
149 | + <button class='redirect' type='submit'>"._("EAP-Type-specific options...")."</button> |
|
150 | 150 | </form></th>"; |
151 | 151 | } |
152 | 152 | ?> |
@@ -166,10 +166,10 @@ discard block |
||
166 | 166 | continue; |
167 | 167 | } |
168 | 168 | echo "<tr>"; |
169 | - echo "<td align='center'><img src='../resources/images/vendorlogo/" . $description['group'] . ".png' alt='logo'></td><td>" . $description['display'] . "<br/> |
|
169 | + echo "<td align='center'><img src='../resources/images/vendorlogo/".$description['group'].".png' alt='logo'></td><td>".$description['display']."<br/> |
|
170 | 170 | <form method='post' action='inc/toggleRedirect.inc.php?inst_id=$my_inst->identifier&profile_id=$my_profile->identifier' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'> |
171 | 171 | <input type='hidden' name='device' value='$index'> |
172 | - <button class='redirect' type='submit'>" . _("Device-specific options...") . "</button> |
|
172 | + <button class='redirect' type='submit'>"._("Device-specific options...")."</button> |
|
173 | 173 | </form> |
174 | 174 | </td>"; |
175 | 175 | $defaultisset = FALSE; |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | $display_footnote = FALSE; |
179 | 179 | $langObject = new \core\common\Language(); |
180 | 180 | $downloadform = "<span style='display:ruby;'>"; |
181 | - $formDiffs = ["" => sprintf(_("%s<br/>Installer"), config\ConfAssistant::CONSORTIUM['display_name'])]; /* eduroam */ |
|
181 | + $formDiffs = ["" => sprintf(_("%s<br/>Installer"), config\ConfAssistant::CONSORTIUM['display_name'])]; /* eduroam */ |
|
182 | 182 | if (sizeof($my_profile->getAttributes("media:openroaming")) > 0 && isset($factory->device->options['hs20']) && $factory->device->options['hs20'] == 1) { |
183 | 183 | $formDiffs["openroaming=1"] = sprintf(_("%s + OpenRoaming<br/>Installer"), config\ConfAssistant::CONSORTIUM['display_name']); /* eduroam + OpenRoaming */ |
184 | 184 | } |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | $proto = "https://"; |
188 | 188 | } |
189 | 189 | |
190 | - $formAction = $proto . $_SERVER['SERVER_NAME'] . \config\Master::PATHS['cat_base_url']. "user/API.php?action=downloadInstaller&profile=$my_profile->identifier&lang=" . $langObject->getLang() . "&device=$index"; |
|
190 | + $formAction = $proto.$_SERVER['SERVER_NAME'].\config\Master::PATHS['cat_base_url']."user/API.php?action=downloadInstaller&profile=$my_profile->identifier&lang=".$langObject->getLang()."&device=$index"; |
|
191 | 191 | |
192 | 192 | foreach ($formDiffs as $extraOption => $text) { |
193 | 193 | if ($extraOption !== "") { |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | $distinctFootnotes[$num_footnotes] = $oneFootnote; |
245 | 245 | } |
246 | 246 | $numberToDisplay = array_keys($distinctFootnotes, $oneFootnote); |
247 | - echo "(" . $numberToDisplay[0] . ")"; |
|
247 | + echo "(".$numberToDisplay[0].")"; |
|
248 | 248 | } |
249 | 249 | } |
250 | 250 | echo "</td>"; |
@@ -273,7 +273,7 @@ discard block |
||
273 | 273 | </table> |
274 | 274 | <?php |
275 | 275 | if (count($distinctFootnotes)) { |
276 | - echo "<p><strong>" . _("Footnotes:") . "</strong></p><table>"; |
|
276 | + echo "<p><strong>"._("Footnotes:")."</strong></p><table>"; |
|
277 | 277 | foreach ($distinctFootnotes as $number => $text) { |
278 | 278 | echo "<tr><td>($number) - </td><td>$text</td></tr>"; |
279 | 279 | } |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | */ |
29 | 29 | ?> |
30 | 30 | <?php |
31 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
31 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
32 | 32 | |
33 | 33 | function displaySilverbulletPropertyWidget(&$theProfile, $readonly, &$uiElements) { |
34 | 34 | ?> |
@@ -45,14 +45,14 @@ discard block |
||
45 | 45 | <ul style='margin:1px'> |
46 | 46 | <?php |
47 | 47 | foreach ($completeness as $missing_attrib) { |
48 | - echo "<li>" . $uiElements->displayName($missing_attrib) . "</li>"; |
|
48 | + echo "<li>".$uiElements->displayName($missing_attrib)."</li>"; |
|
49 | 49 | } |
50 | 50 | ?> |
51 | 51 | </ul> |
52 | 52 | </div> |
53 | 53 | <?php |
54 | 54 | } else { |
55 | - echo sprintf(_("You can create up to %d users."), $maxusers[0]['value']) . "<br/>" . sprintf(_("Their credentials will carry the name <strong>%s</strong>."), $theProfile->realm); |
|
55 | + echo sprintf(_("You can create up to %d users."), $maxusers[0]['value'])."<br/>".sprintf(_("Their credentials will carry the name <strong>%s</strong>."), $theProfile->realm); |
|
56 | 56 | } |
57 | 57 | ?> |
58 | 58 | <br/> |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | if ($readonly === FALSE) { |
62 | 62 | ?> |
63 | 63 | <form action='edit_silverbullet.php?inst_id=<?php echo $theProfile->institution; ?>&profile_id=<?php echo $theProfile->identifier; ?>' method='POST'> |
64 | - <button <?php echo ( is_array($completeness) ? "disabled" : "" ); ?> type='submit' name='sb_action' value='sb_edit'><?php echo _("Manage User Base"); ?></button> |
|
64 | + <button <?php echo (is_array($completeness) ? "disabled" : ""); ?> type='submit' name='sb_action' value='sb_edit'><?php echo _("Manage User Base"); ?></button> |
|
65 | 65 | </form> |
66 | 66 | <?php |
67 | 67 | } |
@@ -97,21 +97,21 @@ discard block |
||
97 | 97 | $has_overrides = TRUE; |
98 | 98 | } |
99 | 99 | } |
100 | - $buffer_eaptypediv = "<div style='margin-bottom:40px; float:left;'>" . _("<strong>EAP Types</strong> (in order of preference):") . "<br/>"; |
|
100 | + $buffer_eaptypediv = "<div style='margin-bottom:40px; float:left;'>"._("<strong>EAP Types</strong> (in order of preference):")."<br/>"; |
|
101 | 101 | $typelist = $theProfile->getEapMethodsinOrderOfPreference(); |
102 | 102 | $allcomplete = TRUE; |
103 | 103 | foreach ($typelist as $eaptype) { |
104 | 104 | $buffer_eaptypediv .= $eaptype->getPrintableRep(); |
105 | 105 | $completeness = $theProfile->isEapTypeDefinitionComplete($eaptype); |
106 | 106 | if ($completeness === true) { |
107 | - $buffer_eaptypediv .= " <div class='acceptable'>" . _("OK") . "</div>"; |
|
107 | + $buffer_eaptypediv .= " <div class='acceptable'>"._("OK")."</div>"; |
|
108 | 108 | } else { |
109 | 109 | $buffer_eaptypediv .= " <div class='notacceptable'>"; |
110 | 110 | $buffer_eaptypediv .= _("Information needed!"); |
111 | 111 | if (is_array($completeness)) { |
112 | 112 | $buffer_eaptypediv .= "<ul style='margin:1px'>"; |
113 | 113 | foreach ($completeness as $missing_attrib) { |
114 | - $buffer_eaptypediv .= "<li>" . $uiElements->displayName($missing_attrib) . "</li>"; |
|
114 | + $buffer_eaptypediv .= "<li>".$uiElements->displayName($missing_attrib)."</li>"; |
|
115 | 115 | } |
116 | 116 | $buffer_eaptypediv .= "</ul>"; |
117 | 117 | } |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | foreach ($attribs as $attrib) { |
124 | 124 | if ($attrib['level'] == \core\Options::LEVEL_METHOD && !preg_match("/^internal:/", $attrib['name']) && !$justOnce) { |
125 | 125 | $justOnce = TRUE; |
126 | - $buffer_eaptypediv .= "<img src='../resources/images/icons/Tabler/square-rounded-letter-e-blue.svg' alt='" . _("Options on EAP Method/Device level are in effect.") . "'>"; |
|
126 | + $buffer_eaptypediv .= "<img src='../resources/images/icons/Tabler/square-rounded-letter-e-blue.svg' alt='"._("Options on EAP Method/Device level are in effect.")."'>"; |
|
127 | 127 | } |
128 | 128 | } |
129 | 129 | $buffer_eaptypediv .= "<br/>"; |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | if ($theProfile->isRedirected()) { |
150 | 150 | $iconData = $uiElements->iconData('PROFILES_REDIRECTED'); |
151 | 151 | $iconData['text'] = _("Profile redirected"); |
152 | - $buffer_headline .= "<br/>" . $uiElements->catIcon(($iconData)); |
|
152 | + $buffer_headline .= "<br/>".$uiElements->catIcon(($iconData)); |
|
153 | 153 | |
154 | 154 | } |
155 | 155 | |
@@ -157,15 +157,15 @@ discard block |
||
157 | 157 | switch ($certStatus) { |
158 | 158 | case core\AbstractProfile::CERT_STATUS_OK: |
159 | 159 | $iconData = $uiElements->iconData('CERT_STATUS_OK'); |
160 | - $buffer_headline .= "<br/>" . $uiElements->catIcon(($iconData)); |
|
160 | + $buffer_headline .= "<br/>".$uiElements->catIcon(($iconData)); |
|
161 | 161 | break; |
162 | 162 | case core\AbstractProfile::CERT_STATUS_WARN: |
163 | 163 | $iconData = $uiElements->iconData('CERT_STATUS_WARN'); |
164 | - $buffer_headline .= "<br/>" . $uiElements->catIcon(($iconData)); |
|
164 | + $buffer_headline .= "<br/>".$uiElements->catIcon(($iconData)); |
|
165 | 165 | break; |
166 | 166 | case core\AbstractProfile::CERT_STATUS_ERROR: |
167 | 167 | $iconData = $uiElements->iconData('CERT_STATUS_ERROR'); |
168 | - $buffer_headline .= "<br/>" . $uiElements->catIcon(($iconData)); |
|
168 | + $buffer_headline .= "<br/>".$uiElements->catIcon(($iconData)); |
|
169 | 169 | break; |
170 | 170 | } |
171 | 171 | $buffer_headline .= "</div>"; |
@@ -191,11 +191,11 @@ discard block |
||
191 | 191 | if (\config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS'] == "LOCAL") { |
192 | 192 | $diagUrl = "../diag/"; |
193 | 193 | } else { |
194 | - $diagUrl = \config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS'] . "/diag/"; |
|
194 | + $diagUrl = \config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS']."/diag/"; |
|
195 | 195 | } |
196 | 196 | ?> |
197 | - <form action='<?php echo $diagUrl . "action_realmcheck.php?inst_id=" . $theProfile->institution . "&profile_id=" . $theProfile->identifier ?>' method='post' accept-charset='UTF-8'> |
|
198 | - <input type='hidden' name='comefrom' value='<?php echo htmlspecialchars($link . $_SERVER['SCRIPT_NAME']); ?>'/> |
|
197 | + <form action='<?php echo $diagUrl."action_realmcheck.php?inst_id=".$theProfile->institution."&profile_id=".$theProfile->identifier ?>' method='post' accept-charset='UTF-8'> |
|
198 | + <input type='hidden' name='comefrom' value='<?php echo htmlspecialchars($link.$_SERVER['SCRIPT_NAME']); ?>'/> |
|
199 | 199 | <button type='submit' name='profile_action' value='check' <?php echo ($has_realm ? "" : "disabled='disabled'"); ?> title='<?php echo _("The realm can only be checked if you configure the realm!"); ?>'> |
200 | 200 | <?php echo _("Check realm reachability"); ?> |
201 | 201 | </button> |
@@ -242,9 +242,9 @@ discard block |
||
242 | 242 | ?> |
243 | 243 | <div style='display: flex;'> |
244 | 244 | <?php |
245 | - $idpLevelUrl = $link . dirname(dirname($_SERVER['SCRIPT_NAME'])) . "?idp=" . $theProfile->institution; |
|
246 | - $displayurl = $idpLevelUrl . "&profile=" . $theProfile->identifier; |
|
247 | - $QRurl = $idpLevelUrl . "&profile=" . $theProfile->identifier; |
|
245 | + $idpLevelUrl = $link.dirname(dirname($_SERVER['SCRIPT_NAME']))."?idp=".$theProfile->institution; |
|
246 | + $displayurl = $idpLevelUrl."&profile=".$theProfile->identifier; |
|
247 | + $QRurl = $idpLevelUrl."&profile=".$theProfile->identifier; |
|
248 | 248 | $qrCode = new \chillerlan\QRCode\QRCode(new \chillerlan\QRCode\QROptions([ |
249 | 249 | 'outputType' => \chillerlan\QRCode\QRCode::OUTPUT_IMAGE_PNG, |
250 | 250 | 'eccLevel' => \chillerlan\QRCode\QRCode::ECC_H, |
@@ -256,9 +256,9 @@ discard block |
||
256 | 256 | if (empty($rawQr)) { |
257 | 257 | throw new Exception("Something went seriously wrong during QR code generation!"); |
258 | 258 | } |
259 | - $uri = "data:image/png;base64," . base64_encode($uiElements->pngInjectConsortiumLogo($rawQr, web\lib\admin\UIElements::QRCODE_PIXELS_PER_SYMBOL)); |
|
259 | + $uri = "data:image/png;base64,".base64_encode($uiElements->pngInjectConsortiumLogo($rawQr, web\lib\admin\UIElements::QRCODE_PIXELS_PER_SYMBOL)); |
|
260 | 260 | $size = getimagesize($uri); |
261 | - echo "<img width='" . ($size[0] / 4) . "' height='" . ($size[1] / 4) . "' src='$uri' alt='QR-code'/>"; |
|
261 | + echo "<img width='".($size[0] / 4)."' height='".($size[1] / 4)."' src='$uri' alt='QR-code'/>"; |
|
262 | 262 | |
263 | 263 | //echo "<nobr>$displayurl</nobr></a>"; |
264 | 264 | echo "<p>$displayurl</p></a>"; |
@@ -423,7 +423,7 @@ discard block |
||
423 | 423 | } |
424 | 424 | ?> |
425 | 425 | </h2> |
426 | - <?php if(count($profiles_for_this_idp) > 1 && $readonly === FALSE && $editMode === 'fullaccess') { ?> |
|
426 | + <?php if (count($profiles_for_this_idp) > 1 && $readonly === FALSE && $editMode === 'fullaccess') { ?> |
|
427 | 427 | <form method='post' action='sort_profiles.php?inst_id=<?php echo $my_inst->identifier; ?>' accept-charset='UTF-8'> |
428 | 428 | <div> |
429 | 429 | <button type='submit' name='profile_sorting'> |
@@ -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(); |
@@ -79,13 +79,13 @@ discard block |
||
79 | 79 | ?> |
80 | 80 | </h1> |
81 | 81 | <div class='infobox'> |
82 | - <h2><?php $tablecaption = sprintf(_("%s Properties"),$uiElements->nomenclatureFed); echo $tablecaption?></h2> |
|
82 | + <h2><?php $tablecaption = sprintf(_("%s Properties"), $uiElements->nomenclatureFed); echo $tablecaption?></h2> |
|
83 | 83 | <table> |
84 | - <caption><?php echo $tablecaption;?></caption> |
|
84 | + <caption><?php echo $tablecaption; ?></caption> |
|
85 | 85 | <tr> |
86 | - <th class="wai-invisible" scope="col"><?php echo _("Property Type");?></th> |
|
87 | - <th class="wai-invisible" scope="col"><?php echo _("Language if applicable");?></th> |
|
88 | - <th class="wai-invisible" scope="col"><?php echo _("Property Value");?></th> |
|
86 | + <th class="wai-invisible" scope="col"><?php echo _("Property Type"); ?></th> |
|
87 | + <th class="wai-invisible" scope="col"><?php echo _("Language if applicable"); ?></th> |
|
88 | + <th class="wai-invisible" scope="col"><?php echo _("Property Value"); ?></th> |
|
89 | 89 | </tr> |
90 | 90 | <tr> |
91 | 91 | <td><?php echo _("Country:"); ?></td> |
@@ -96,11 +96,11 @@ discard block |
||
96 | 96 | </table> |
97 | 97 | </div> |
98 | 98 | <?php |
99 | - echo "<form enctype='multipart/form-data' action='edit_federation_result.php?fed_id=$my_fed->tld" . "' method='post' accept-charset='UTF-8'> |
|
100 | - <input type='hidden' name='MAX_FILE_SIZE' value='" . \config\Master::MAX_UPLOAD_SIZE . "'>"; |
|
99 | + echo "<form enctype='multipart/form-data' action='edit_federation_result.php?fed_id=$my_fed->tld"."' method='post' accept-charset='UTF-8'> |
|
100 | + <input type='hidden' name='MAX_FILE_SIZE' value='" . \config\Master::MAX_UPLOAD_SIZE."'>"; |
|
101 | 101 | ?> |
102 | 102 | <fieldset class="option_container"> |
103 | - <legend><strong><?php echo sprintf(_("%s Properties"),$uiElements->nomenclatureFed); ?></strong></legend> |
|
103 | + <legend><strong><?php echo sprintf(_("%s Properties"), $uiElements->nomenclatureFed); ?></strong></legend> |
|
104 | 104 | <?php |
105 | 105 | $options = [ |
106 | 106 | 'level' => 'fed', |
@@ -115,10 +115,10 @@ discard block |
||
115 | 115 | <?php |
116 | 116 | echo "<div>"; |
117 | 117 | if ($editMode === 'fullaccess') { |
118 | - echo "<button type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_SAVE . "'>" . _("Save data") . "</button>"; |
|
118 | + echo "<button type='submit' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_SAVE."'>"._("Save data")."</button>"; |
|
119 | 119 | $discardLabel = _("Discard changes"); |
120 | 120 | } else { |
121 | 121 | $discardLabel = _("Return"); |
122 | 122 | } |
123 | - echo "<button type='button' class='delete' name='abortbutton' value='abort' onclick='javascript:window.location = \"overview_federation.php?fed_id=$fedPost\"'>" . $discardLabel . "</button></div></form>"; |
|
123 | + echo "<button type='button' class='delete' name='abortbutton' value='abort' onclick='javascript:window.location = \"overview_federation.php?fed_id=$fedPost\"'>".$discardLabel."</button></div></form>"; |
|
124 | 124 | echo $deco->footer(); |
@@ -20,11 +20,11 @@ discard block |
||
20 | 20 | * <base_url>/copyright.php after deploying the software |
21 | 21 | * */ |
22 | 22 | |
23 | - /** |
|
24 | - * This file is used to pack and send RADSEC credentials. |
|
25 | - * |
|
26 | - * @author Maja Gorecka-Wolniewicz <[email protected]> |
|
27 | - */ |
|
23 | + /** |
|
24 | + * This file is used to pack and send RADSEC credentials. |
|
25 | + * |
|
26 | + * @author Maja Gorecka-Wolniewicz <[email protected]> |
|
27 | + */ |
|
28 | 28 | ?> |
29 | 29 | <?php |
30 | 30 | |
@@ -36,26 +36,26 @@ discard block |
||
36 | 36 | if ($editMode == 'fullaccess') { |
37 | 37 | $hotspotProfiles = $my_inst->listDeployments(); |
38 | 38 | if (count($hotspotProfiles) > 0) { // no profiles yet. |
39 | - foreach ($hotspotProfiles as $counter => $deploymentObject) { |
|
40 | - if ($deploymentObject->institution == $_GET['inst_id'] && $deploymentObject->identifier == $_GET['dep_id']) { |
|
41 | - $cacert = file_get_contents(ROOT . "/config/ManagedSPCerts/eduroamSP-CA.pem"); |
|
42 | - $zip = new ZipArchive; |
|
43 | - $zip->open(ROOT . '/var/tmp/' . $deploymentObject->identifier.'.zip', ZipArchive::CREATE); |
|
44 | - if ($deploymentObject->radsec_priv != '') { |
|
39 | + foreach ($hotspotProfiles as $counter => $deploymentObject) { |
|
40 | + if ($deploymentObject->institution == $_GET['inst_id'] && $deploymentObject->identifier == $_GET['dep_id']) { |
|
41 | + $cacert = file_get_contents(ROOT . "/config/ManagedSPCerts/eduroamSP-CA.pem"); |
|
42 | + $zip = new ZipArchive; |
|
43 | + $zip->open(ROOT . '/var/tmp/' . $deploymentObject->identifier.'.zip', ZipArchive::CREATE); |
|
44 | + if ($deploymentObject->radsec_priv != '') { |
|
45 | 45 | $zip->addFromString('priv.key', $deploymentObject->radsec_priv); |
46 | - } |
|
47 | - $zip->addFromString('cert.pem', $deploymentObject->radsec_cert); |
|
48 | - $zip->addFromString('ca.pem', $cacert); |
|
49 | - $zip->close(); |
|
50 | - $data = file_get_contents(ROOT . '/var/tmp/' . $deploymentObject->identifier.'.zip'); |
|
51 | - unlink(ROOT . '/var/tmp/' . $deploymentObject->identifier.'.zip'); |
|
52 | - if ($data !== FALSE) { |
|
46 | + } |
|
47 | + $zip->addFromString('cert.pem', $deploymentObject->radsec_cert); |
|
48 | + $zip->addFromString('ca.pem', $cacert); |
|
49 | + $zip->close(); |
|
50 | + $data = file_get_contents(ROOT . '/var/tmp/' . $deploymentObject->identifier.'.zip'); |
|
51 | + unlink(ROOT . '/var/tmp/' . $deploymentObject->identifier.'.zip'); |
|
52 | + if ($data !== FALSE) { |
|
53 | 53 | header('Content-Type: application/zip'); |
54 | 54 | header("Content-Disposition: attachment; filename=\"full_".$deploymentObject->identifier.".zip\""); |
55 | 55 | header("Content-Transfer-Encoding: binary"); |
56 | 56 | echo $data; |
57 | - } |
|
58 | - } |
|
59 | - } |
|
57 | + } |
|
58 | + } |
|
59 | + } |
|
60 | 60 | } |
61 | 61 | } |
62 | 62 | \ No newline at end of file |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | ?> |
29 | 29 | <?php |
30 | 30 | |
31 | -require_once dirname(dirname(dirname(dirname(__FILE__)))) . "/config/_config.php"; |
|
31 | +require_once dirname(dirname(dirname(dirname(__FILE__))))."/config/_config.php"; |
|
32 | 32 | $auth = new \web\lib\admin\Authentication(); |
33 | 33 | $auth->authenticate(); |
34 | 34 | $validator = new \web\lib\common\InputValidation(); |
@@ -38,17 +38,17 @@ discard block |
||
38 | 38 | if (count($hotspotProfiles) > 0) { // no profiles yet. |
39 | 39 | foreach ($hotspotProfiles as $counter => $deploymentObject) { |
40 | 40 | if ($deploymentObject->institution == $_GET['inst_id'] && $deploymentObject->identifier == $_GET['dep_id']) { |
41 | - $cacert = file_get_contents(ROOT . "/config/ManagedSPCerts/eduroamSP-CA.pem"); |
|
41 | + $cacert = file_get_contents(ROOT."/config/ManagedSPCerts/eduroamSP-CA.pem"); |
|
42 | 42 | $zip = new ZipArchive; |
43 | - $zip->open(ROOT . '/var/tmp/' . $deploymentObject->identifier.'.zip', ZipArchive::CREATE); |
|
43 | + $zip->open(ROOT.'/var/tmp/'.$deploymentObject->identifier.'.zip', ZipArchive::CREATE); |
|
44 | 44 | if ($deploymentObject->radsec_priv != '') { |
45 | 45 | $zip->addFromString('priv.key', $deploymentObject->radsec_priv); |
46 | 46 | } |
47 | 47 | $zip->addFromString('cert.pem', $deploymentObject->radsec_cert); |
48 | 48 | $zip->addFromString('ca.pem', $cacert); |
49 | 49 | $zip->close(); |
50 | - $data = file_get_contents(ROOT . '/var/tmp/' . $deploymentObject->identifier.'.zip'); |
|
51 | - unlink(ROOT . '/var/tmp/' . $deploymentObject->identifier.'.zip'); |
|
50 | + $data = file_get_contents(ROOT.'/var/tmp/'.$deploymentObject->identifier.'.zip'); |
|
51 | + unlink(ROOT.'/var/tmp/'.$deploymentObject->identifier.'.zip'); |
|
52 | 52 | if ($data !== FALSE) { |
53 | 53 | header('Content-Type: application/zip'); |
54 | 54 | header("Content-Disposition: attachment; filename=\"full_".$deploymentObject->identifier.".zip\""); |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | */ |
21 | 21 | ?> |
22 | 22 | <?php |
23 | -require_once dirname(dirname(dirname(dirname(__FILE__)))) . "/config/_config.php"; |
|
23 | +require_once dirname(dirname(dirname(dirname(__FILE__))))."/config/_config.php"; |
|
24 | 24 | |
25 | 25 | $auth = new \web\lib\admin\Authentication(); |
26 | 26 | $uiElements = new \web\lib\admin\UIElements(); |
@@ -57,30 +57,30 @@ discard block |
||
57 | 57 | <?php |
58 | 58 | echo sprintf(_("On this page, you can add a new %s to your %s. Please fill out the form below to send out an email invitation to the new %s administrator."), $uiElements->nomenclatureParticipant, $uiElements->nomenclatureFed, $uiElements->nomenclatureParticipant); |
59 | 59 | if (\config\Master::DB['enforce-external-sync']) { |
60 | - echo "<p>" . sprintf(_("You can either register a known %s (as defined in the %s database) or create a totally new %s."), $uiElements->nomenclatureParticipant, \config\ConfAssistant::CONSORTIUM['display_name'], $uiElements->nomenclatureParticipant) . "</p>"; |
|
61 | - echo "<p>" . sprintf(_("The latter one is typically for an %s which is yet in a testing phase and therefore doesn't appear in the %s database yet."), $uiElements->nomenclatureParticipant, \config\ConfAssistant::CONSORTIUM['display_name']) . "</p>"; |
|
60 | + echo "<p>".sprintf(_("You can either register a known %s (as defined in the %s database) or create a totally new %s."), $uiElements->nomenclatureParticipant, \config\ConfAssistant::CONSORTIUM['display_name'], $uiElements->nomenclatureParticipant)."</p>"; |
|
61 | + echo "<p>".sprintf(_("The latter one is typically for an %s which is yet in a testing phase and therefore doesn't appear in the %s database yet."), $uiElements->nomenclatureParticipant, \config\ConfAssistant::CONSORTIUM['display_name'])."</p>"; |
|
62 | 62 | } |
63 | 63 | ?> |
64 | 64 | <hr/> |
65 | 65 | <img alt='Loading ...' src='../resources/images/icons/loading51.gif' id='spin' style='position:absolute;left: 50%; top: 50%; transform: translate(-100px, -50px); display:none;'> |
66 | 66 | <form name='sendinvite' action='inc/sendinvite.inc.php' method='post' accept-charset='UTF-8'> |
67 | 67 | <table> |
68 | - <caption><?php echo _("Invitation Details");?></caption> |
|
68 | + <caption><?php echo _("Invitation Details"); ?></caption> |
|
69 | 69 | <tr> |
70 | - <th class="wai-invisible" scope="col"><?php echo _("From database or ad-hoc?");?></th> |
|
71 | - <th class="wai-invisible" scope="col"><?php echo _("Name");?></th> |
|
72 | - <th class="wai-invisible" scope="col"><?php echo _("Type");?></th> |
|
73 | - <th class="wai-invisible" scope="col"><?php echo _("Country");?></th> |
|
70 | + <th class="wai-invisible" scope="col"><?php echo _("From database or ad-hoc?"); ?></th> |
|
71 | + <th class="wai-invisible" scope="col"><?php echo _("Name"); ?></th> |
|
72 | + <th class="wai-invisible" scope="col"><?php echo _("Type"); ?></th> |
|
73 | + <th class="wai-invisible" scope="col"><?php echo _("Country"); ?></th> |
|
74 | 74 | </tr> |
75 | 75 | <?php |
76 | 76 | if (\config\Master::DB['enforce-external-sync']) { |
77 | 77 | echo "<tr><td> |
78 | - <input type='radio' name='creation' value='existing'>" . sprintf(_("Existing %s:"), $uiElements->nomenclatureParticipant) . "</input> |
|
78 | + <input type='radio' name='creation' value='existing'>" . sprintf(_("Existing %s:"), $uiElements->nomenclatureParticipant)."</input> |
|
79 | 79 | </td>"; |
80 | 80 | |
81 | 81 | echo "<td colspan='3'> |
82 | 82 | <select id='externals' name='externals' onchange='document.sendinvite.creation[0].checked=true; document.sendinvite.mailaddr.value=this.options[this.selectedIndex].id;'> |
83 | - <option value='FREETEXT'>" . sprintf(_("--- select %s here ---"),$uiElements->nomenclatureParticipant) . "</option>"; |
|
83 | + <option value='FREETEXT'>" . sprintf(_("--- select %s here ---"), $uiElements->nomenclatureParticipant)."</option>"; |
|
84 | 84 | |
85 | 85 | foreach ($feds as $fed_value) { |
86 | 86 | $thefed = new \core\Federation(strtoupper($fed_value['value'])); |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | $entities = $thefed->listExternalEntities(TRUE, NULL); |
90 | 90 | |
91 | 91 | foreach ($entities as $v) { |
92 | - echo "<option id='" . $v['contactlist'] . "' value='" . $fed_value['value']. '-' . $v['ID'] . "'>[" . $fed_value['value'] . "] " . $v['name'] . "</option>"; |
|
92 | + echo "<option id='".$v['contactlist']."' value='".$fed_value['value'].'-'.$v['ID']."'>[".$fed_value['value']."] ".$v['name']."</option>"; |
|
93 | 93 | } |
94 | 94 | } |
95 | 95 | |
@@ -98,19 +98,19 @@ discard block |
||
98 | 98 | ?> |
99 | 99 | <tr> |
100 | 100 | <td> |
101 | - <input type='radio' name='creation' value='new'><?php echo sprintf(_("New %s"),$uiElements->nomenclatureParticipant); ?></input> |
|
101 | + <input type='radio' name='creation' value='new'><?php echo sprintf(_("New %s"), $uiElements->nomenclatureParticipant); ?></input> |
|
102 | 102 | </td> |
103 | 103 | <td> |
104 | 104 | <?php echo _("Name"); ?> <input type='text' size='30' id='name' name='name' onchange='document.sendinvite.creation[1].checked = true'/> |
105 | 105 | </td> |
106 | 106 | <td> |
107 | - <?php if(\config\Master::FUNCTIONALITY_FLAGS['SINGLE_SERVICE'] === 'MSP') { ?> |
|
107 | + <?php if (\config\Master::FUNCTIONALITY_FLAGS['SINGLE_SERVICE'] === 'MSP') { ?> |
|
108 | 108 | <input type='hidden' name='participant_type' value='SP'> |
109 | 109 | <?php } else { ?> |
110 | 110 | <select name="participant_type"> |
111 | - <option value="IdPSP" selected><?php printf(_("%s and %s"),$uiElements->nomenclatureIdP, $uiElements->nomenclatureHotspot)?></option> |
|
112 | - <option value="IdP"><?php printf(_("%s"),$uiElements->nomenclatureIdP)?></option> |
|
113 | - <option value="SP"><?php printf(_("%s"),$uiElements->nomenclatureHotspot)?></option> |
|
111 | + <option value="IdPSP" selected><?php printf(_("%s and %s"), $uiElements->nomenclatureIdP, $uiElements->nomenclatureHotspot)?></option> |
|
112 | + <option value="IdP"><?php printf(_("%s"), $uiElements->nomenclatureIdP)?></option> |
|
113 | + <option value="SP"><?php printf(_("%s"), $uiElements->nomenclatureHotspot)?></option> |
|
114 | 114 | </select> |
115 | 115 | <?php } ?> |
116 | 116 | </td> |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | */ |
21 | 21 | ?> |
22 | 22 | <?php |
23 | -require_once dirname(dirname(dirname(dirname(__FILE__)))) . "/config/_config.php"; |
|
23 | +require_once dirname(dirname(dirname(dirname(__FILE__))))."/config/_config.php"; |
|
24 | 24 | |
25 | 25 | $auth = new \web\lib\admin\Authentication(); |
26 | 26 | $languageInstance = new \core\common\Language(); |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | default: |
121 | 121 | throw new Exception("Error: unknown encryption status of invitation!?!"); |
122 | 122 | } |
123 | - echo $uiElements->boxRemark(ngettext("The invitation email was sent successfully.", "All invitation emails were sent successfully.", $counter) . " " . $cryptText, _("Sent successfully.")); |
|
123 | + echo $uiElements->boxRemark(ngettext("The invitation email was sent successfully.", "All invitation emails were sent successfully.", $counter)." ".$cryptText, _("Sent successfully.")); |
|
124 | 124 | break; |
125 | 125 | case "FAILURE": |
126 | 126 | echo $uiElements->boxError(_("No invitation email could be sent!"), _("Sending failure!")); |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | default: |
141 | 141 | throw new Exception("Error: unknown encryption status of invitation!?!"); |
142 | 142 | } |
143 | - echo $uiElements->boxWarning(sprintf(_("Some invitation emails were sent successfully (%s in total), the others failed."), $counter) . " " . $cryptText, _("Partial success.")); |
|
143 | + echo $uiElements->boxWarning(sprintf(_("Some invitation emails were sent successfully (%s in total), the others failed."), $counter)." ".$cryptText, _("Partial success.")); |
|
144 | 144 | break; |
145 | 145 | case "INVALIDSYNTAX": |
146 | 146 | echo $uiElements->boxError(_("The invitation email address was malformed, no invitation was sent!"), _("The invitation email address was malformed, no invitation was sent!")); |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | <?php echo $invite; ?> |
193 | 193 | </td> |
194 | 194 | <td> |
195 | - <form action='inc/manageAdmins.inc.php?inst_id=<?php echo $my_inst->identifier ?>' method='post' <?php echo ( $oneowner['ID'] != $_SESSION['user'] ? "onsubmit='popupRedirectWindow(this); return false;'" : "" ); ?> accept-charset='UTF-8'> |
|
195 | + <form action='inc/manageAdmins.inc.php?inst_id=<?php echo $my_inst->identifier ?>' method='post' <?php echo ($oneowner['ID'] != $_SESSION['user'] ? "onsubmit='popupRedirectWindow(this); return false;'" : ""); ?> accept-charset='UTF-8'> |
|
196 | 196 | <input type='hidden' name='admin_id' value='<?php echo $oneowner['ID']; ?>'></input> |
197 | 197 | <button type='submit' name='submitbutton' class='delete' value='<?php echo web\lib\common\FormElements::BUTTON_DELETE; ?>'><?php echo _("Delete Administrator") ?></button> |
198 | 198 | </form> |
@@ -216,10 +216,10 @@ discard block |
||
216 | 216 | $pending_invites = $mgmt->listPendingInvitations($my_inst->identifier); |
217 | 217 | $loggerInstance->debug(4, "Displaying pending invitations for $my_inst->identifier.\n"); |
218 | 218 | if (count($pending_invites) > 0) { |
219 | - echo "<strong>" . _("Pending invitations for this IdP") . "</strong>"; |
|
219 | + echo "<strong>"._("Pending invitations for this IdP")."</strong>"; |
|
220 | 220 | echo "<table>"; |
221 | 221 | foreach ($pending_invites as $invitee) { |
222 | - echo "<tr><td>" . $invitee['mail'] . "</td><td>" . sprintf(_("(expires %s)"), $invitee['expiry']) . "</td></tr>"; |
|
222 | + echo "<tr><td>".$invitee['mail']."</td><td>".sprintf(_("(expires %s)"), $invitee['expiry'])."</td></tr>"; |
|
223 | 223 | } |
224 | 224 | echo "</table>"; |
225 | 225 | } |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | |
242 | 242 | if (!$is_admin_himself) { |
243 | 243 | echo "<form action='inc/manageAdmins.inc.php?inst_id=$my_inst->identifier' method='post' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'> |
244 | - <button type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_TAKECONTROL . "'>" . sprintf(_("Take control of this %s"), $uiElements->nomenclatureParticipant) . "</button> |
|
244 | + <button type='submit' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_TAKECONTROL."'>".sprintf(_("Take control of this %s"), $uiElements->nomenclatureParticipant)."</button> |
|
245 | 245 | </form>"; |
246 | 246 | } |
247 | 247 | } |
@@ -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)); |
@@ -149,10 +149,10 @@ discard block |
||
149 | 149 | $dc[] = 'DC=' . $v; |
150 | 150 | } |
151 | 151 | if ($DN !== array_reverse($dc)) { |
152 | - $dc = array(); |
|
153 | - $_SESSION['CSR_ERRORS'] = 'WRONG_SUBJECT'; |
|
154 | - $_SESSION['FORM_SETTINGS'] = $settings; |
|
155 | - $_SESSION['csr_subject'] = $dn; |
|
152 | + $dc = array(); |
|
153 | + $_SESSION['CSR_ERRORS'] = 'WRONG_SUBJECT'; |
|
154 | + $_SESSION['FORM_SETTINGS'] = $settings; |
|
155 | + $_SESSION['csr_subject'] = $dn; |
|
156 | 156 | } |
157 | 157 | } else { |
158 | 158 | $_SESSION['CSR_ERRORS'] = 'WRONG_SUBJECT'; |
@@ -201,15 +201,15 @@ discard block |
||
201 | 201 | } else { |
202 | 202 | $ou = $serverInfo["names"][$langInstance->getLang()]; |
203 | 203 | } |
204 | - if (str_contains($ou, ',')) { |
|
205 | - $modou = 1; |
|
206 | - $ou = str_replace(",", "/,", $ou); |
|
207 | - } |
|
208 | - $ou = preg_replace('/\s+/', ' ', $ou); |
|
209 | - if (strlen($ou) >= 64) { |
|
210 | - $ou = substr($ou, 0, 64); |
|
211 | - $modou += 2; |
|
212 | - } |
|
204 | + if (str_contains($ou, ',')) { |
|
205 | + $modou = 1; |
|
206 | + $ou = str_replace(",", "/,", $ou); |
|
207 | + } |
|
208 | + $ou = preg_replace('/\s+/', ' ', $ou); |
|
209 | + if (strlen($ou) >= 64) { |
|
210 | + $ou = substr($ou, 0, 64); |
|
211 | + $modou += 2; |
|
212 | + } |
|
213 | 213 | $DN[] = "O=".iconv('UTF-8', 'ASCII//TRANSLIT', $ou); |
214 | 214 | $serverList = explode(",", $serverInfo["servers"]); |
215 | 215 | $DN[] = "CN=" . $serverList[0]; |
@@ -234,20 +234,20 @@ discard block |
||
234 | 234 | echo "<p style='font-size: large'>" . _("Requesting a certificate with the following properties"); |
235 | 235 | echo "<ul>"; |
236 | 236 | echo "<li>" . _("Policy OIDs: ") . implode(", ", $policies) . "</li>"; |
237 | - echo "<li>" . _("Distinguished Name: ") . implode(", ", $DN); |
|
238 | - if ($modou > 0) { |
|
239 | - echo " ("; |
|
237 | + echo "<li>" . _("Distinguished Name: ") . implode(", ", $DN); |
|
238 | + if ($modou > 0) { |
|
239 | + echo " ("; |
|
240 | 240 | echo _("Organization field adjusted"). ': '; |
241 | - $desc = array(); |
|
242 | - if ($modou >= 2) { |
|
243 | - $desc[] = _("truncated to 64 chars"); |
|
244 | - } |
|
245 | - if ($modou == 1 || $modou == 3) { |
|
246 | - $desc[] = _("commas escaped"); |
|
241 | + $desc = array(); |
|
242 | + if ($modou >= 2) { |
|
243 | + $desc[] = _("truncated to 64 chars"); |
|
244 | + } |
|
245 | + if ($modou == 1 || $modou == 3) { |
|
246 | + $desc[] = _("commas escaped"); |
|
247 | 247 | } |
248 | - echo implode(', ', $desc); |
|
249 | - echo ")"; |
|
250 | - } |
|
248 | + echo implode(', ', $desc); |
|
249 | + echo ")"; |
|
250 | + } |
|
251 | 251 | echo "</li>"; |
252 | 252 | echo "<li>" . _("subjectAltName:DNS : ") . implode(", ", $serverList) . "</li>"; |
253 | 253 | echo "<li>" . _("Requester Contact Details: ") . $firstName . " <" . $firstMail . ">" . "</li>"; |
@@ -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,7 +437,7 @@ 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 database') . '.'; |
|
440 | + echo _('you can check what information is in the database').'.'; |
|
441 | 441 | echo '</div>'; |
442 | 442 | if (count($feds) > 0 || count($allIdPs) > 0) {?> |
443 | 443 | <h2><?php echo _("2. CSR generation"); ?></h2> |
@@ -447,7 +447,7 @@ discard block |
||
447 | 447 | echo '<br>'; |
448 | 448 | echo _("One way to generate an acceptable certificate request is via this openssl one-liner:"); ?></p> |
449 | 449 | <?php |
450 | - 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 | + 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>"; |
|
451 | 451 | ?> |
452 | 452 | <h2><?php echo _("3. Submission"); ?></h2> |
453 | 453 | <?php echo _("Please paste your CSR here:"); ?><br><textarea name="CSR" id="CSR" rows="20" cols="85"/></textarea><br/> |
@@ -52,36 +52,36 @@ |
||
52 | 52 | } |
53 | 53 | |
54 | 54 | switch ($_GET['token']) { |
55 | - case "EDUGAIN-SELF-REGISTER": |
|
56 | - $token = "EDUGAIN-SELF-REGISTER"; |
|
57 | - $extIdUnfiltered = filter_input(INPUT_GET,'extid'); |
|
58 | - $extIdArray = explode('-', htmlspecialchars(strip_tags($extIdUnfiltered)), 2); |
|
59 | - $ROid = $extIdArray[0]; |
|
60 | - $extId = $extIdArray[1]; |
|
61 | - $fed = new \core\Federation(strtoupper(substr($ROid,0,2))); |
|
62 | - $newInstFlag = $fed->getAttributes('fed:autoregister-new-inst'); |
|
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!")); |
|
65 | - } |
|
66 | - // we must be sure that this person admins the ext institution and that it falls into the current federation |
|
67 | - if ($validator->existingExtInstitution($extId, $userEmail, $ROid) === 1) { |
|
55 | + case "EDUGAIN-SELF-REGISTER": |
|
56 | + $token = "EDUGAIN-SELF-REGISTER"; |
|
57 | + $extIdUnfiltered = filter_input(INPUT_GET,'extid'); |
|
58 | + $extIdArray = explode('-', htmlspecialchars(strip_tags($extIdUnfiltered)), 2); |
|
59 | + $ROid = $extIdArray[0]; |
|
60 | + $extId = $extIdArray[1]; |
|
61 | + $fed = new \core\Federation(strtoupper(substr($ROid,0,2))); |
|
62 | + $newInstFlag = $fed->getAttributes('fed:autoregister-new-inst'); |
|
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!")); |
|
65 | + } |
|
66 | + // we must be sure that this person admins the ext institution and that it falls into the current federation |
|
67 | + if ($validator->existingExtInstitution($extId, $userEmail, $ROid) === 1) { |
|
68 | + $checkval = \core\UserManagement::TOKENSTATUS_OK_NEW; |
|
69 | + } |
|
70 | + // and check that this institution does not match anuthing in CAT. |
|
71 | + $usermgmt = new \core\UserManagement(); |
|
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!")); |
|
74 | + } |
|
75 | + break; |
|
76 | + case "SELF-REGISTER": |
|
77 | + $token = "SELF-REGISTER"; |
|
68 | 78 | $checkval = \core\UserManagement::TOKENSTATUS_OK_NEW; |
69 | - } |
|
70 | - // and check that this institution does not match anuthing in CAT. |
|
71 | - $usermgmt = new \core\UserManagement(); |
|
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!")); |
|
74 | - } |
|
75 | - break; |
|
76 | - case "SELF-REGISTER": |
|
77 | - $token = "SELF-REGISTER"; |
|
78 | - $checkval = \core\UserManagement::TOKENSTATUS_OK_NEW; |
|
79 | - $federation = \config\ConfAssistant::CONSORTIUM['selfservice_registration']; |
|
80 | - break; |
|
81 | - default: |
|
82 | - $tokenUnfiltered = $validator->token(filter_input(INPUT_GET,'token')); |
|
83 | - $token = htmlspecialchars(strip_tags($tokenUnfiltered)); |
|
84 | - $checkval = $usermgmt->checkTokenValidity($token); |
|
79 | + $federation = \config\ConfAssistant::CONSORTIUM['selfservice_registration']; |
|
80 | + break; |
|
81 | + default: |
|
82 | + $tokenUnfiltered = $validator->token(filter_input(INPUT_GET,'token')); |
|
83 | + $token = htmlspecialchars(strip_tags($tokenUnfiltered)); |
|
84 | + $checkval = $usermgmt->checkTokenValidity($token); |
|
85 | 85 | } |
86 | 86 | |
87 | 87 | if ($checkval < 0) { |
@@ -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 |