@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | |
84 | 84 | // use HTML5 geolocation |
85 | 85 | function locateMe() { |
86 | - $('#address').val(\"" . _("locating") . "\"); |
|
86 | + $('#address').val(\"" . _("locating")."\"); |
|
87 | 87 | navigator.geolocation.getCurrentPosition(locate_success,locate_fail,{maximumAge:3600000, timeout:5000}); |
88 | 88 | } |
89 | 89 | |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | view.fit(extent, {padding: [10, 0, 10, 0]}); |
206 | 206 | } else { |
207 | 207 | view.setCenter([0,0]); |
208 | - locate_country('" . $cat->knownFederations[strtoupper($this->fedName)]['name'] . "'); // use the federation code to locate the country |
|
208 | + locate_country('" . $cat->knownFederations[strtoupper($this->fedName)]['name']."'); // use the federation code to locate the country |
|
209 | 209 | map.setView(view); |
210 | 210 | } |
211 | 211 | view.setMaxZoom(20); |
@@ -227,14 +227,14 @@ discard block |
||
227 | 227 | function getAddressLocation() { |
228 | 228 | var city = $('#address').val(); |
229 | 229 | if(city == '') { |
230 | - alert(\"" . _("nothing entered in the address field") . "\"); |
|
230 | + alert(\"" . _("nothing entered in the address field")."\"); |
|
231 | 231 | return false; |
232 | 232 | } |
233 | 233 | city = city.replace(/\s*,\s*/g,',+'); |
234 | 234 | city = city.replace(/ +/,'+'); |
235 | 235 | $.get(addressService+'?format=json&addressdetails=0&q='+city, '', function(data) { |
236 | 236 | if (data[0] === undefined) { |
237 | - alert('" . _("Address not found, perhaps try another form, like putting the street number to the front.") . "'); |
|
237 | + alert('" . _("Address not found, perhaps try another form, like putting the street number to the front.")."'); |
|
238 | 238 | return; |
239 | 239 | } |
240 | 240 | showTmpPointer(data[0].lon, data[0].lat); |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | if ($this->readOnly) { |
286 | 286 | return "<div id='map' class='locationmap'></div><script>generateMap('map')</script>"; |
287 | 287 | } else { |
288 | - return $this->htmlPreEdit($wizard, $additional) . $this->findLocationHtml() . "<span id='location-prompt'>You can drag the pointer to the final location before you save the results.</span><div id='map' class='locationmap'></div><script>generateMap('map')</script>" . $this->htmlPostEdit(FALSE); |
|
288 | + return $this->htmlPreEdit($wizard, $additional).$this->findLocationHtml()."<span id='location-prompt'>You can drag the pointer to the final location before you save the results.</span><div id='map' class='locationmap'></div><script>generateMap('map')</script>".$this->htmlPostEdit(FALSE); |
|
289 | 289 | } |
290 | 290 | } |
291 | 291 | |
@@ -310,7 +310,7 @@ discard block |
||
310 | 310 | // we don't need this parameter in this subclass |
311 | 311 | unset($coords); |
312 | 312 | \core\common\Entity::intoThePotatoes(); |
313 | - $retval = "<button id='location_b_" . $number . "' class='location_button'>" . _("Click to see location") . " $number</button>"; |
|
313 | + $retval = "<button id='location_b_".$number."' class='location_button'>"._("Click to see location")." $number</button>"; |
|
314 | 314 | \core\common\Entity::outOfThePotatoes(); |
315 | 315 | return $retval; |
316 | 316 | } |
@@ -322,7 +322,7 @@ discard block |
||
322 | 322 | */ |
323 | 323 | private function findLocationHtml() { |
324 | 324 | \core\common\Entity::intoThePotatoes(); |
325 | - $retval = "<p>" . _("Address:") . " <input name='address' id='address' /><button type='button' onclick='getAddressLocation()'>" . _("Find address") . "</button> <button type='button' onclick='locateMe()'>" . _("Locate Me!") . "</button></p>"; |
|
325 | + $retval = "<p>"._("Address:")." <input name='address' id='address' /><button type='button' onclick='getAddressLocation()'>"._("Find address")."</button> <button type='button' onclick='locateMe()'>"._("Locate Me!")."</button></p>"; |
|
326 | 326 | \core\common\Entity::outOfThePotatoes(); |
327 | 327 | return $retval; |
328 | 328 | } |
@@ -47,9 +47,9 @@ discard block |
||
47 | 47 | $Gui->loggerInstance->debug(4, $operatingSystem); |
48 | 48 | $uiElements = new web\lib\admin\UIElements(); |
49 | 49 | if ($operatingSystem) { |
50 | - print "recognisedOS = '" . $operatingSystem['device'] . "';\n"; |
|
50 | + print "recognisedOS = '".$operatingSystem['device']."';\n"; |
|
51 | 51 | } |
52 | -require dirname(__DIR__) . '/user/js/cat_js.php'; |
|
52 | +require dirname(__DIR__).'/user/js/cat_js.php'; |
|
53 | 53 | ?> |
54 | 54 | var lang = "<?php echo($Gui->languageInstance->getLang()) ?>"; |
55 | 55 | </script> |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | <?php |
80 | 80 | switch ($statusInfo['errorcode']) { |
81 | 81 | case "GENERATOR_CONSUMED": |
82 | - echo $uiElements->boxError(_("You attempted to download an installer that was already downloaded before. Please request a new token from your administrator instead."), _("Attempt to reuse download link"), TRUE) . "<p>"; |
|
82 | + echo $uiElements->boxError(_("You attempted to download an installer that was already downloaded before. Please request a new token from your administrator instead."), _("Attempt to reuse download link"), TRUE)."<p>"; |
|
83 | 83 | break; |
84 | 84 | case NULL: |
85 | 85 | default: |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | echo " "; |
103 | 103 | echo sprintf(ngettext("<strong>%d</strong> of your credentials is not valid any more.", "<strong>%d</strong> of your credentials are not valid any more.", $noGoodCerts), $noGoodCerts); |
104 | 104 | } |
105 | - echo " <span id='detailtext'>" . _("I want to see the details.") . "</span>"; |
|
105 | + echo " <span id='detailtext'>"._("I want to see the details.")."</span>"; |
|
106 | 106 | echo "<table id='cert_details'></table>"; |
107 | 107 | } |
108 | 108 | } |
@@ -111,60 +111,60 @@ discard block |
||
111 | 111 | case \core\SilverbulletInvitation::SB_TOKENSTATUS_VALID: // treat both cases as equal |
112 | 112 | case \core\SilverbulletInvitation::SB_TOKENSTATUS_PARTIALLY_REDEEMED: |
113 | 113 | if ($statusInfo['invitation_object']->activationsTotal > 1) { // only show this extra info in the non-trivial case. |
114 | - echo "<h3>" . sprintf(_("Your invitation token is valid for %d more device activations (%d have already been used)."), $statusInfo['invitation_object']->activationsRemaining, $statusInfo['invitation_object']->activationsTotal - $statusInfo['invitation_object']->activationsRemaining) . "</h3>"; |
|
114 | + echo "<h3>".sprintf(_("Your invitation token is valid for %d more device activations (%d have already been used)."), $statusInfo['invitation_object']->activationsRemaining, $statusInfo['invitation_object']->activationsTotal - $statusInfo['invitation_object']->activationsRemaining)."</h3>"; |
|
115 | 115 | } |
116 | 116 | if (!$statusInfo["OS"]) { |
117 | - echo "<p>" . _("Unfortunately, we are unable to determine your device's operating system. If you have made modifications on your device which prevent it from being recognised (e.g. custom 'User Agent' settings), please undo such modifications. You can come back to this page again; the invitation link has not been used up yet.") . "</p>"; |
|
117 | + echo "<p>"._("Unfortunately, we are unable to determine your device's operating system. If you have made modifications on your device which prevent it from being recognised (e.g. custom 'User Agent' settings), please undo such modifications. You can come back to this page again; the invitation link has not been used up yet.")."</p>"; |
|
118 | 118 | break; |
119 | 119 | } |
120 | 120 | |
121 | 121 | $dev = new \core\DeviceFactory($statusInfo['OS']['device']); |
122 | 122 | $dev->device->calculatePreferredEapType([new \core\common\EAP(\core\common\EAP::EAPTYPE_SILVERBULLET)]); |
123 | 123 | if ($dev->device->selectedEap == []) { |
124 | - echo "<p>" . sprintf(_("Unfortunately, the operating system your device uses (%s) is currently not supported for hosted end-user accounts. You can visit this page with a supported operating system later; the invitation link has not been used up yet."), $statusInfo['OS']['display']) . "</p>"; |
|
124 | + echo "<p>".sprintf(_("Unfortunately, the operating system your device uses (%s) is currently not supported for hosted end-user accounts. You can visit this page with a supported operating system later; the invitation link has not been used up yet."), $statusInfo['OS']['display'])."</p>"; |
|
125 | 125 | break; |
126 | 126 | } |
127 | - $message = $dev->device->options['message'] ?? '' ; |
|
127 | + $message = $dev->device->options['message'] ?? ''; |
|
128 | 128 | |
129 | 129 | $sbMessage = $dev->device->options['sb_message'] ?? ''; |
130 | 130 | if ($message != '' && $sbMessage != '') { |
131 | - $message = $message . "<p>" . $sbMessage; |
|
131 | + $message = $message."<p>".$sbMessage; |
|
132 | 132 | } else { |
133 | - $message = $message . $sbMessage; |
|
133 | + $message = $message.$sbMessage; |
|
134 | 134 | } |
135 | 135 | |
136 | - echo "<div id='sb_download_message'><p>" . sprintf(_("You can now download a personalised %s installation program."), \config\ConfAssistant::CONSORTIUM['display_name']); |
|
136 | + echo "<div id='sb_download_message'><p>".sprintf(_("You can now download a personalised %s installation program."), \config\ConfAssistant::CONSORTIUM['display_name']); |
|
137 | 137 | // echo sprintf(_("The installation program is <span class='emph'>strictly personal</span>, to be used <span class='emph'>only on this device (%s)</span>, and it is <span class='emph'>not permitted to share</span> this information with anyone."), $statusInfo['OS']['display']); |
138 | 138 | echo sprintf(_("The installation program is <span class='emph'>strictly personal</span>, to be used <span class='emph'>only on this device (%s)</span>, and it is <span class='emph'>not permitted to share</span> this information with anyone."), $statusInfo['OS']['display']); |
139 | - echo "<p style='color:red;'>" . sprintf(_("When the system detects abuse such as sharing login data with others, all access rights for you will be revoked and you may be sanctioned by your local %s administrator."), \config\ConfAssistant::CONSORTIUM['display_name']) . "</p>"; |
|
140 | - echo "<p>" . _("During the installation process, you will be asked for the following import PIN. This only happens once during the installation. You do not have to write down this PIN.") . "</p></div>"; |
|
139 | + echo "<p style='color:red;'>".sprintf(_("When the system detects abuse such as sharing login data with others, all access rights for you will be revoked and you may be sanctioned by your local %s administrator."), \config\ConfAssistant::CONSORTIUM['display_name'])."</p>"; |
|
140 | + echo "<p>"._("During the installation process, you will be asked for the following import PIN. This only happens once during the installation. You do not have to write down this PIN.")."</p></div>"; |
|
141 | 141 | |
142 | 142 | $importPassword = \core\common\Entity::randomString(4, "0123456789"); |
143 | 143 | $profile = new \core\ProfileSilverbullet($statusInfo['profile']->identifier, NULL); |
144 | 144 | |
145 | - echo "<h2>" . sprintf(_("Import PIN: %s"), $importPassword) . "</h2>"; |
|
145 | + echo "<h2>".sprintf(_("Import PIN: %s"), $importPassword)."</h2>"; |
|
146 | 146 | $_SESSION['individualtoken'] = $cleanToken; |
147 | 147 | $_SESSION['importpassword'] = $importPassword; |
148 | - echo "<input type='hidden' name='device' value='" . $statusInfo['OS']['device'] . "'/>"; |
|
148 | + echo "<input type='hidden' name='device' value='".$statusInfo['OS']['device']."'/>"; |
|
149 | 149 | echo "<input type='hidden' name='generatedfor' value='silverbullet'/>"; |
150 | - echo "<button class='large_button' id='user_button_sb' style='height:80px;'><span id='user_buttonnnn'>" . sprintf(_("Click here to download your %s installer!"), \config\ConfAssistant::CONSORTIUM['display_name']) . "</span></button>"; |
|
150 | + echo "<button class='large_button' id='user_button_sb' style='height:80px;'><span id='user_buttonnnn'>".sprintf(_("Click here to download your %s installer!"), \config\ConfAssistant::CONSORTIUM['display_name'])."</span></button>"; |
|
151 | 151 | echo "<div class='device_info' id='info_g_sb'></div>"; |
152 | 152 | break; |
153 | 153 | case \core\SilverbulletInvitation::SB_TOKENSTATUS_EXPIRED: |
154 | 154 | echo "<h2>Invitation link expired</h2>"; |
155 | - echo "<p>" . sprintf(_("Unfortunately, the invitation link you just used is too old. The %s sign-up invitation was valid until %s. You cannot use this link any more. Please ask your administrator to issue you a new invitation link."), \config\ConfAssistant::CONSORTIUM['display_name'], $statusInfo['invitation_object']->expiry) . "</p>"; |
|
155 | + echo "<p>".sprintf(_("Unfortunately, the invitation link you just used is too old. The %s sign-up invitation was valid until %s. You cannot use this link any more. Please ask your administrator to issue you a new invitation link."), \config\ConfAssistant::CONSORTIUM['display_name'], $statusInfo['invitation_object']->expiry)."</p>"; |
|
156 | 156 | echo "<p>Below is all the information about your account's other login details, if any.</p>"; |
157 | 157 | // do NOT break, display full account info instead (this was a previously valid token after all) |
158 | 158 | case \core\SilverbulletInvitation::SB_TOKENSTATUS_REDEEMED: |
159 | 159 | // nothing to say really. User got the breakdown of certs above, and this link doesn't give him any new ones. |
160 | 160 | break; |
161 | 161 | case \core\SilverbulletInvitation::SB_TOKENSTATUS_INVALID: |
162 | - echo "<h2>" . _("Account information not found") . "</h2>"; |
|
163 | - echo "<p>" . sprintf(_("The invitation link you followed does not map to any invitation we have on file.") . "</p><p>" . _("You should use the exact link you got during sign-up to come here. Alternatively, if you have a valid %s credential already, you can visit this page and Accept the question about logging in with a client certificate (select a certificate with a name ending in '…%s')."),\config\ConfAssistant::CONSORTIUM['display_name'], \config\ConfAssistant::SILVERBULLET['realm_suffix']); |
|
162 | + echo "<h2>"._("Account information not found")."</h2>"; |
|
163 | + echo "<p>".sprintf(_("The invitation link you followed does not map to any invitation we have on file.")."</p><p>"._("You should use the exact link you got during sign-up to come here. Alternatively, if you have a valid %s credential already, you can visit this page and Accept the question about logging in with a client certificate (select a certificate with a name ending in '…%s')."), \config\ConfAssistant::CONSORTIUM['display_name'], \config\ConfAssistant::SILVERBULLET['realm_suffix']); |
|
164 | 164 | } |
165 | 165 | if (isset($statusInfo['profile_id']) && isset($statusInfo['idp_id'])) { |
166 | - echo "<input type='hidden' name='profile' id='profile_id' value='" . $statusInfo['profile_id'] . "'/>"; |
|
167 | - echo "<input type='hidden' id='inst_id' name='idp' value='" . $statusInfo['idp_id'] . "'/>"; |
|
166 | + echo "<input type='hidden' name='profile' id='profile_id' value='".$statusInfo['profile_id']."'/>"; |
|
167 | + echo "<input type='hidden' id='inst_id' name='idp' value='".$statusInfo['idp_id']."'/>"; |
|
168 | 168 | } |
169 | 169 | ?> |
170 | 170 | </div> |
@@ -184,18 +184,18 @@ discard block |
||
184 | 184 | $attributes = $statusInfo['attributes']; |
185 | 185 | $supportInfo = ''; |
186 | 186 | if (!empty($attributes['local_url'])) { |
187 | - $supportInfo .= '<tr><td>' . ("WWW:") . '</td><td><a href="' . $attributes['local_url'] . '" target="_blank">' . $attributes['local_url'] . '</a></td></tr>'; |
|
187 | + $supportInfo .= '<tr><td>'.("WWW:").'</td><td><a href="'.$attributes['local_url'].'" target="_blank">'.$attributes['local_url'].'</a></td></tr>'; |
|
188 | 188 | } |
189 | 189 | if (!empty($attributes['local_email'])) { |
190 | - $supportInfo .= '<tr><td>' . ("email:") . '</td><td><a href="' . $attributes['local_email'] . '" target="_blank">' . $attributes['local_email'] . '</a></td></tr>'; |
|
190 | + $supportInfo .= '<tr><td>'.("email:").'</td><td><a href="'.$attributes['local_email'].'" target="_blank">'.$attributes['local_email'].'</a></td></tr>'; |
|
191 | 191 | } |
192 | 192 | if (!empty($attributes['local_phone'])) { |
193 | - $supportInfo .= '<tr><td>' . ("tel:") . '</td><td><a href="' . $attributes['local_phone'] . '" target="_blank">' . $attributes['local_phone'] . '</a></td></tr>'; |
|
193 | + $supportInfo .= '<tr><td>'.("tel:").'</td><td><a href="'.$attributes['local_phone'].'" target="_blank">'.$attributes['local_phone'].'</a></td></tr>'; |
|
194 | 194 | } |
195 | 195 | if ($supportInfo != '') { |
196 | - $supportInfo = "<table><tr><th colspan='2'>" . _("If you encounter problems, then you can obtain direct assistance from your organisation at:") . "</th></tr>$supportInfo</table>"; |
|
196 | + $supportInfo = "<table><tr><th colspan='2'>"._("If you encounter problems, then you can obtain direct assistance from your organisation at:")."</th></tr>$supportInfo</table>"; |
|
197 | 197 | } else { |
198 | - $supportInfo = "<table><tr><th colspan='2'>" . _("If you encounter problems you should ask those who gave you your account for help.") . "</th></tr></table>"; |
|
198 | + $supportInfo = "<table><tr><th colspan='2'>"._("If you encounter problems you should ask those who gave you your account for help.")."</th></tr></table>"; |
|
199 | 199 | } |
200 | 200 | ?> |
201 | 201 | <script> |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | var logo = <?php echo $statusInfo['idp_logo']; ?>; |
205 | 205 | var idpId = <?php echo $statusInfo['idp_id']; ?>; |
206 | 206 | <?php |
207 | - if($message != '') { |
|
207 | + if ($message != '') { |
|
208 | 208 | echo "message = \"$message\";\n"; |
209 | 209 | } |
210 | 210 | ?> |
@@ -9,7 +9,7 @@ |
||
9 | 9 | * ****************************************************************************** |
10 | 10 | */ |
11 | 11 | |
12 | -require_once dirname(dirname(dirname(dirname(__FILE__)))) . "/config/_config.php"; |
|
12 | +require_once dirname(dirname(dirname(dirname(__FILE__))))."/config/_config.php"; |
|
13 | 13 | $auth = new \web\lib\admin\Authentication(); |
14 | 14 | $auth->authenticate(); |
15 | 15 | $languageInstance = new \core\common\Language(); |
@@ -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(); |
@@ -92,11 +92,11 @@ discard block |
||
92 | 92 | ?> |
93 | 93 | |
94 | 94 | <select name="INST-list" id="INST-list"> |
95 | - <option value=""><?php echo _('---PLEASE CHOOSE---');?></option> |
|
95 | + <option value=""><?php echo _('---PLEASE CHOOSE---'); ?></option> |
|
96 | 96 | <?php |
97 | 97 | $instdata = array(); |
98 | 98 | foreach ($extInsts as $iid => $oneInst) { |
99 | - print '<option value="' . $iid . '">' . $oneInst['name'] . '</option>'; |
|
99 | + print '<option value="'.$iid.'">'.$oneInst['name'].'</option>'; |
|
100 | 100 | $instdata[$iid] = array(); |
101 | 101 | $instdata[$iid]['name'] = $oneInst['name']; |
102 | 102 | $instdata[$iid]['type'] = _('no data'); |
@@ -110,22 +110,22 @@ discard block |
||
110 | 110 | $contactdata = ''; |
111 | 111 | foreach ($oneInst['contacts'] as $oneContact) { |
112 | 112 | if ($contactdata != '') { |
113 | - $contactdata = $contactdata . '<br>'; |
|
113 | + $contactdata = $contactdata.'<br>'; |
|
114 | 114 | } |
115 | 115 | if ($oneContact['name']) { |
116 | - $contactdata = $contactdata . $oneContact['name']; |
|
116 | + $contactdata = $contactdata.$oneContact['name']; |
|
117 | 117 | } |
118 | 118 | if ($contactdata != '') { |
119 | - $contactdata = $contactdata . '<br>'; |
|
119 | + $contactdata = $contactdata.'<br>'; |
|
120 | 120 | } |
121 | 121 | if ($oneContact['mail']) { |
122 | - $contactdata = $contactdata . $oneContact['mail']; |
|
122 | + $contactdata = $contactdata.$oneContact['mail']; |
|
123 | 123 | } |
124 | 124 | if ($contactdata != '') { |
125 | - $contactdata = $contactdata . '<br>'; |
|
125 | + $contactdata = $contactdata.'<br>'; |
|
126 | 126 | } |
127 | 127 | if ($oneContact['phone']) { |
128 | - $contactdata = $contactdata . $oneContact['phone']; |
|
128 | + $contactdata = $contactdata.$oneContact['phone']; |
|
129 | 129 | } |
130 | 130 | } |
131 | 131 | if ($contactdata == '') { |
@@ -144,11 +144,11 @@ discard block |
||
144 | 144 | var instts = []; |
145 | 145 | <?php |
146 | 146 | foreach (array_keys($instdata) as $iid) { |
147 | - echo "instservers['" . $iid . "']='" . $instdata[$iid]['servers']. "';\n"; |
|
148 | - echo "instname['" . $iid . "']='" . $instdata[$iid]['name']. "';\n"; |
|
149 | - echo "insttype['" . $iid . "']='" . $instdata[$iid]['type']. "';\n"; |
|
150 | - echo "instcontact['" . $iid . "']='" . $instdata[$iid]['contacts']. "';\n"; |
|
151 | - echo "instts['" . $iid . "']='" . $instdata[$iid]['ts']. "';\n"; |
|
147 | + echo "instservers['".$iid."']='".$instdata[$iid]['servers']."';\n"; |
|
148 | + echo "instname['".$iid."']='".$instdata[$iid]['name']."';\n"; |
|
149 | + echo "insttype['".$iid."']='".$instdata[$iid]['type']."';\n"; |
|
150 | + echo "instcontact['".$iid."']='".$instdata[$iid]['contacts']."';\n"; |
|
151 | + echo "instts['".$iid."']='".$instdata[$iid]['ts']."';\n"; |
|
152 | 152 | } |
153 | 153 | ?> |
154 | 154 | $(document).ready(function(){ |
@@ -170,18 +170,18 @@ discard block |
||
170 | 170 | <div id="instdata_area"> |
171 | 171 | <table> |
172 | 172 | <tr><th align="left" width="350"> |
173 | - <?php echo _('Name');?> |
|
173 | + <?php echo _('Name'); ?> |
|
174 | 174 | </th><th align="left" width="100"> |
175 | - <?php echo _('Type');?> |
|
175 | + <?php echo _('Type'); ?> |
|
176 | 176 | </th> |
177 | 177 | <th align="left" width="200"> |
178 | - <?php echo _('Servers');?> |
|
178 | + <?php echo _('Servers'); ?> |
|
179 | 179 | </th> |
180 | 180 | <th align="left" width="200"> |
181 | - <?php echo _('Contact data');?> |
|
181 | + <?php echo _('Contact data'); ?> |
|
182 | 182 | </th> |
183 | 183 | <th align="left" width="100"> |
184 | - <?php echo _('Timestamp');?> |
|
184 | + <?php echo _('Timestamp'); ?> |
|
185 | 185 | </th> |
186 | 186 | </tr> |
187 | 187 | <tr id="toshow"></tr> |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | */ |
27 | 27 | ?> |
28 | 28 | <?php |
29 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
29 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
30 | 30 | |
31 | 31 | $auth = new \web\lib\admin\Authentication(); |
32 | 32 | $deco = new \web\lib\admin\PageDecoration(); |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | $feds = $user->getAttributes("user:fedadmin"); |
71 | 71 | foreach ($feds as $oneFed) { |
72 | 72 | $theFed = new \core\Federation($oneFed['value']); |
73 | - printf("<h2>" . _("Certificate Information for %s %s")."</h2>", $uiElements->nomenclatureFed, $theFed->name); |
|
73 | + printf("<h2>"._("Certificate Information for %s %s")."</h2>", $uiElements->nomenclatureFed, $theFed->name); |
|
74 | 74 | foreach ($theFed->listTlsCertificates() as $oneCert) { |
75 | 75 | if ($oneCert['STATUS'] == "REQUESTED") { |
76 | 76 | $theFed->updateCertificateStatus($oneCert['REQSERIAL']); |
@@ -81,13 +81,13 @@ discard block |
||
81 | 81 | foreach ($theFed->listTlsCertificates() as $oneCert) { // fetch list a second time, in case we got a cert |
82 | 82 | $status = $oneCert['STATUS']; |
83 | 83 | echo "<tr>"; |
84 | - echo "<td>" . $oneCert['REQSERIAL'] . "</td><td>" . $oneCert['DN'] . "</td><td>" . $status . "</td><td>" . $oneCert['EXPIRY'] . "</td>"; |
|
84 | + echo "<td>".$oneCert['REQSERIAL']."</td><td>".$oneCert['DN']."</td><td>".$status."</td><td>".$oneCert['EXPIRY']."</td>"; |
|
85 | 85 | if ($status == "ISSUED") { |
86 | 86 | ?> |
87 | 87 | <td> |
88 | 88 | <form action='inc/showCert.inc.php' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8' method="POST"> |
89 | - <input type="hidden" name="certdata" value="<?php echo $oneCert['CERT'];?>"/> |
|
90 | - <button type="submit"><?php echo _("Display");?></button> |
|
89 | + <input type="hidden" name="certdata" value="<?php echo $oneCert['CERT']; ?>"/> |
|
90 | + <button type="submit"><?php echo _("Display"); ?></button> |
|
91 | 91 | </form> |
92 | 92 | <td> |
93 | 93 | <?php |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | * ****************************************************************************** |
10 | 10 | */ |
11 | 11 | |
12 | -require_once dirname(dirname(dirname(dirname(__FILE__)))) . "/config/_config.php"; |
|
12 | +require_once dirname(dirname(dirname(dirname(__FILE__))))."/config/_config.php"; |
|
13 | 13 | $auth = new \web\lib\admin\Authentication(); |
14 | 14 | $auth->authenticate(); |
15 | 15 | $languageInstance = new \core\common\Language(); |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | if ($editMode == 'fullaccess') { |
20 | 20 | $deployment = $validator->existingDeploymentManaged($_GET['deployment_id'], $inst); |
21 | 21 | $format = ''; |
22 | - if (isset($_GET['as']) && $_GET['as']=='csv') { |
|
22 | + if (isset($_GET['as']) && $_GET['as'] == 'csv') { |
|
23 | 23 | $format = 'csv'; |
24 | 24 | } |
25 | 25 | if (!isset($_POST['stats'])) { |
@@ -67,19 +67,19 @@ discard block |
||
67 | 67 | echo _("Protocol is a protocol used between a client and RADIUS server, for TLS it is a /-separated tuple TLS/TLS-Client-Cert-Serial"); |
68 | 68 | ?></p> |
69 | 69 | <table class='authrecord'> |
70 | - <caption><?php echo $tablecaption;?></caption> |
|
70 | + <caption><?php echo $tablecaption; ?></caption> |
|
71 | 71 | <tr> |
72 | - <th scope="col"><strong><?php echo _("Timestamp (UTC)");?></strong></th> |
|
73 | - <th scope="col"><strong><?php echo _("Outer-Identity");?></strong></th> |
|
74 | - <th scope="col"><strong><?php echo _("Result");?></strong></th> |
|
75 | - <th scope="col"><strong><?php echo _("MAC Address");?></strong></th> |
|
76 | - <th scope="col"><strong><?php echo _("Chargeable-User-Identity");?></strong></th> |
|
77 | - <th scope="col"><strong><?php echo _("AP Identifier");?></strong></th> |
|
78 | - <th scope="col"><strong><?php echo _("Protocol");?></strong></th> |
|
72 | + <th scope="col"><strong><?php echo _("Timestamp (UTC)"); ?></strong></th> |
|
73 | + <th scope="col"><strong><?php echo _("Outer-Identity"); ?></strong></th> |
|
74 | + <th scope="col"><strong><?php echo _("Result"); ?></strong></th> |
|
75 | + <th scope="col"><strong><?php echo _("MAC Address"); ?></strong></th> |
|
76 | + <th scope="col"><strong><?php echo _("Chargeable-User-Identity"); ?></strong></th> |
|
77 | + <th scope="col"><strong><?php echo _("AP Identifier"); ?></strong></th> |
|
78 | + <th scope="col"><strong><?php echo _("Protocol"); ?></strong></th> |
|
79 | 79 | </tr> |
80 | 80 | <?php |
81 | 81 | foreach ($userAuthData as $oneRecord) { |
82 | - echo "<tr class='".($oneRecord['result'] == "OK" ? "auth-success" : "auth-fail" )."'>" |
|
82 | + echo "<tr class='".($oneRecord['result'] == "OK" ? "auth-success" : "auth-fail")."'>" |
|
83 | 83 | . "<td>".$oneRecord['activity_time']."</td>" |
84 | 84 | // $oneRecord['CN'] is a simple string, not an array, so disable Scrutinizer type check here |
85 | 85 | . "<td>".$oneRecord['outer_user']."</td>" |
@@ -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/> |
@@ -107,85 +107,85 @@ discard block |
||
107 | 107 | foreach ($optionsList as $option) { |
108 | 108 | $this->optionsHelp[$option] = $this->displayName($option, true); |
109 | 109 | } |
110 | - array_multisort(array_column($this->optionsHelp,'display'), SORT_ASC, $this->optionsHelp); |
|
110 | + array_multisort(array_column($this->optionsHelp, 'display'), SORT_ASC, $this->optionsHelp); |
|
111 | 111 | } |
112 | 112 | |
113 | 113 | public function setMessages() { |
114 | 114 | // FED general |
115 | - $h = "<p><h3>" . _("Here you set federation-level options.") . "</h3><p>"; |
|
116 | - $h .= "<i>" . _("The following options are available:") . "</i><p>"; |
|
115 | + $h = "<p><h3>"._("Here you set federation-level options.")."</h3><p>"; |
|
116 | + $h .= "<i>"._("The following options are available:")."</i><p>"; |
|
117 | 117 | if (isset($this->optionsHelp)) { |
118 | 118 | $h .= "<dl>"; |
119 | 119 | foreach ($this->optionsHelp as $o) { |
120 | - $h .= "<dt>". $o['display'] . "</dt>"; |
|
121 | - $h .= "<dd>" . $o['help'] . "</dd>"; |
|
120 | + $h .= "<dt>".$o['display']."</dt>"; |
|
121 | + $h .= "<dd>".$o['help']."</dd>"; |
|
122 | 122 | } |
123 | 123 | $h .= "</dl>"; |
124 | 124 | } |
125 | 125 | $this->helpMessage['fed_general'] = $h; |
126 | 126 | // SUPPORT |
127 | - $h = "<p>" . _("This section can be used to upload specific Terms of Use for your users and to display details of how your users can reach your local helpdesk.") . "</p>"; |
|
127 | + $h = "<p>"._("This section can be used to upload specific Terms of Use for your users and to display details of how your users can reach your local helpdesk.")."</p>"; |
|
128 | 128 | if (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_RADIUS'] == "LOCAL") { |
129 | - $h .= "<p>" . |
|
130 | - sprintf(_("Do you provide helpdesk services for your users? If so, it would be nice if you would tell us the pointers to this helpdesk."), $this->nomenclatureParticipant) . "</p>" . |
|
131 | - "<p>" . |
|
132 | - _("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>"; |
|
129 | + $h .= "<p>". |
|
130 | + sprintf(_("Do you provide helpdesk services for your users? If so, it would be nice if you would tell us the pointers to this helpdesk."), $this->nomenclatureParticipant)."</p>". |
|
131 | + "<p>". |
|
132 | + _("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>"; |
|
133 | 133 | if (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_SILVERBULLET'] == "LOCAL") { |
134 | - $h .= "<p>" . sprintf(_("For %s deployments, providing at least a local e-mail contact is required."), \config\ConfAssistant::SILVERBULLET['product_name']) . " " . _("This is the contact point for your organisation. It may be displayed publicly.") . "</p>"; |
|
134 | + $h .= "<p>".sprintf(_("For %s deployments, providing at least a local e-mail contact is required."), \config\ConfAssistant::SILVERBULLET['product_name'])." "._("This is the contact point for your organisation. It may be displayed publicly.")."</p>"; |
|
135 | 135 | } |
136 | 136 | } elseif (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_SILVERBULLET'] == "LOCAL") { |
137 | - $h .= "<p>" . _("Providing at least a local support e-mail contact is required.") . " " . _("This is the contact point for your end users' level 1 support.") . "</p>"; |
|
137 | + $h .= "<p>"._("Providing at least a local support e-mail contact is required.")." "._("This is the contact point for your end users' level 1 support.")."</p>"; |
|
138 | 138 | } |
139 | 139 | $this->helpMessage['support'] = $h; |
140 | 140 | |
141 | 141 | // MEDIA |
142 | - $h = "<p>" . |
|
143 | - sprintf(_("In this section, you define on which media %s should be configured on user devices."), \config\ConfAssistant::CONSORTIUM['display_name']) . "</p><ul>"; |
|
142 | + $h = "<p>". |
|
143 | + sprintf(_("In this section, you define on which media %s should be configured on user devices."), \config\ConfAssistant::CONSORTIUM['display_name'])."</p><ul>"; |
|
144 | 144 | $h .= "<li>"; |
145 | - $h .= "<strong>" . ( count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0 ? _("Additional SSIDs:") : _("SSIDs:")) . " </strong>"; |
|
145 | + $h .= "<strong>".(count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0 ? _("Additional SSIDs:") : _("SSIDs:"))." </strong>"; |
|
146 | 146 | if (count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0) { |
147 | 147 | $ssidlist = ""; |
148 | 148 | foreach (\config\ConfAssistant::CONSORTIUM['ssid'] as $ssid) { |
149 | - $ssidlist .= ", '<strong>" . $ssid . "</strong>'"; |
|
149 | + $ssidlist .= ", '<strong>".$ssid."</strong>'"; |
|
150 | 150 | } |
151 | 151 | $ssidlist = substr($ssidlist, 2); |
152 | 152 | $h .= sprintf(ngettext("We will always configure this SSID for WPA2/AES: %s.", "We will always configure these SSIDs for WPA2/AES: %s.", count(\config\ConfAssistant::CONSORTIUM['ssid'])), $ssidlist); |
153 | - $h .= "<br/>" . sprintf(_("It is also possible to define custom additional SSIDs with the option '%s' below."), $this->displayName("media:SSID")); |
|
153 | + $h .= "<br/>".sprintf(_("It is also possible to define custom additional SSIDs with the option '%s' below."), $this->displayName("media:SSID")); |
|
154 | 154 | } else { |
155 | - $h .= _("Please configure which SSIDs should be configured in the installers."); |
|
155 | + $h .= _("Please configure which SSIDs should be configured in the installers."); |
|
156 | 156 | } |
157 | - $h .= " " . _("By default, we will only configure the SSIDs with WPA2/AES encryption. By using the '(with WPA/TKIP)' option you can specify that we should include legacy support for WPA/TKIP where possible."); |
|
157 | + $h .= " "._("By default, we will only configure the SSIDs with WPA2/AES encryption. By using the '(with WPA/TKIP)' option you can specify that we should include legacy support for WPA/TKIP where possible."); |
|
158 | 158 | $h .= "</li>"; |
159 | 159 | |
160 | 160 | $h .= "<li>"; |
161 | - $h .= "<strong>" . ( count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0 ? _("Additional Hotspot 2.0 / Passpoint Consortia:") : _("Hotspot 2.0 / Passpoint Consortia:")) . " </strong>"; |
|
161 | + $h .= "<strong>".(count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0 ? _("Additional Hotspot 2.0 / Passpoint Consortia:") : _("Hotspot 2.0 / Passpoint Consortia:"))." </strong>"; |
|
162 | 162 | if (count(\config\ConfAssistant::CONSORTIUM['interworking-consortium-oi']) > 0) { |
163 | 163 | $consortiumlist = ""; |
164 | 164 | foreach (\config\ConfAssistant::CONSORTIUM['interworking-consortium-oi'] as $oi) { |
165 | - $consortiumlist .= ", '<strong>" . $oi . "</strong>'"; |
|
165 | + $consortiumlist .= ", '<strong>".$oi."</strong>'"; |
|
166 | 166 | } |
167 | 167 | $consortiumlist = substr($consortiumlist, 2); |
168 | 168 | $h .= sprintf(ngettext("We will always configure this Consortium OI: %s.", "We will always configure these Consortium OIs: %s.", count(\config\ConfAssistant::CONSORTIUM['interworking-consortium-oi'])), $consortiumlist); |
169 | 169 | |
170 | - $h .= "<br/>" . sprintf(_("It is also possible to define custom additional OIs with the option '%s' below."), $this->displayName("media:consortium_OI")); |
|
170 | + $h .= "<br/>".sprintf(_("It is also possible to define custom additional OIs with the option '%s' below."), $this->displayName("media:consortium_OI")); |
|
171 | 171 | } else { |
172 | 172 | $h .= _("Please configure which Consortium OIs should be configured in the installers."); |
173 | 173 | } |
174 | 174 | $h .= "</li>"; |
175 | - $h .= "<li><strong>" . _("Support for wired IEEE 802.1X:") . " </strong>" |
|
176 | - . _("If you want to configure your users' devices with IEEE 802.1X support for wired ethernet, please check the corresponding box. Note that this makes the installation process a bit more difficult on some platforms (Windows: needs administrator privileges; Apple: attempting to install a profile with wired support on a device without an active wired ethernet card will fail).") . |
|
175 | + $h .= "<li><strong>"._("Support for wired IEEE 802.1X:")." </strong>" |
|
176 | + . _("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)."). |
|
177 | 177 | "</li>"; |
178 | - $h .= "<li><strong>" . _("Removal of bootstrap/onboarding SSIDs:") . " </strong>" |
|
178 | + $h .= "<li><strong>"._("Removal of bootstrap/onboarding SSIDs:")." </strong>" |
|
179 | 179 | . _("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'.") |
180 | 180 | . "</li>"; |
181 | 181 | $h .= "</ul>"; |
182 | 182 | $this->helpMessage['media'] = $h; |
183 | 183 | |
184 | 184 | // IDP GENERAL |
185 | - $h = "<p>" . |
|
186 | - _("Some properties are valid across all deployment profiles. This is the place where you can describe those properties in a fine-grained way. The solicited information is used as follows:") . "</p>". |
|
185 | + $h = "<p>". |
|
186 | + _("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>". |
|
187 | 187 | "<ul>". |
188 | - "<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>". |
|
188 | + "<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>". |
|
189 | 189 | "<li>".sprintf(_("<strong>%s</strong>: The organisation may have names in multiple languages. It is recommended to always populate at least the 'default/other' language, as it is used as a fallback if the system does not have a name in the exact language the user requests a download in."), $this->displayName("general:instname"))."</li>". |
190 | 190 | "<li>".sprintf(_("<strong>%s</strong>: This acronym will be used as an element of the installer file name instead of one automatically created from first letters of every word in the institution name. You may add acronyms for multiple languages (but only one per language). The acronym will also be used as a keyword for the organisation search on the user's downloads page."), $this->displayName("general:instshortname"))."</li>". |
191 | 191 | "<li>".sprintf(_("<strong>%s</strong>: You may add several versions of the organisation name or acronyms which will be used as additional keywords exclusively for the organisation search on the user's downloads page."), $this->displayName("general:instaltname"))."</li>". |
@@ -193,13 +193,13 @@ discard block |
||
193 | 193 | $this->helpMessage['idp_general'] = $h; |
194 | 194 | |
195 | 195 | // PROFILE GENERAL |
196 | - $h = "<p>" . _("First of all we need a name for the profile. This will be displayed to end users, so you may want to choose a descriptive name like 'Professors', 'Students of the Faculty of Bioscience', etc.") . "</p>". |
|
197 | - "<p>" . _("Optionally, you can provide a longer descriptive text about who this profile is for. If you specify it, it will be displayed on the download page after the user has selected the profile name in the list.") . "</p>". |
|
198 | - "<p>" . _("You can also tell us your RADIUS realm. "); |
|
196 | + $h = "<p>"._("First of all we need a name for the profile. This will be displayed to end users, so you may want to choose a descriptive name like 'Professors', 'Students of the Faculty of Bioscience', etc.")."</p>". |
|
197 | + "<p>"._("Optionally, you can provide a longer descriptive text about who this profile is for. If you specify it, it will be displayed on the download page after the user has selected the profile name in the list.")."</p>". |
|
198 | + "<p>"._("You can also tell us your RADIUS realm. "); |
|
199 | 199 | if (\config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS'] !== NULL) { |
200 | 200 | $h .= sprintf(_("This is useful if you want to use the sanity check module later, which tests reachability of your realm in the %s infrastructure. "), \config\ConfAssistant::CONSORTIUM['display_name']); |
201 | 201 | } |
202 | - $h .= _("It is required to enter the realm name if you want to support anonymous outer identities (see below).") . "</p>"; |
|
202 | + $h .= _("It is required to enter the realm name if you want to support anonymous outer identities (see below).")."</p>"; |
|
203 | 203 | $this->helpMessage['profile'] = $h; |
204 | 204 | |
205 | 205 | // REALM |
@@ -209,24 +209,24 @@ discard block |
||
209 | 209 | $this->helpMessage['realm'] = $h; |
210 | 210 | |
211 | 211 | // REDIRECT |
212 | - $h ="<p>"._("The CAT has a download area for end users. There, they will, for example, learn about the support pointers you entered earlier. The CAT can also immediately offer the installers for the profile for download. If you don't want that, you can instead enter a web site location where you want your users to be redirected to. You, as the administrator, can still download the profiles to place them on that page (see the 'Compatibility Matrix' button on the dashboard).") . "</p>"; |
|
212 | + $h = "<p>"._("The CAT has a download area for end users. There, they will, for example, learn about the support pointers you entered earlier. The CAT can also immediately offer the installers for the profile for download. If you don't want that, you can instead enter a web site location where you want your users to be redirected to. You, as the administrator, can still download the profiles to place them on that page (see the 'Compatibility Matrix' button on the dashboard).")."</p>"; |
|
213 | 213 | $this->helpMessage['redirect'] = $h; |
214 | 214 | |
215 | 215 | // EAP |
216 | - $h = "<p>"._("Now, we need to know which EAP types your IdP supports. If you support multiple EAP types, you can assign every type a priority (1=highest). This tool will always generate an automatic installer for the EAP type with the highest priority; only if the user's device can't use that EAP type, we will use an EAP type further down in the list.") . "</p>"; |
|
216 | + $h = "<p>"._("Now, we need to know which EAP types your IdP supports. If you support multiple EAP types, you can assign every type a priority (1=highest). This tool will always generate an automatic installer for the EAP type with the highest priority; only if the user's device can't use that EAP type, we will use an EAP type further down in the list.")."</p>"; |
|
217 | 217 | $this->helpMessage['eap_support'] = $h; |
218 | 218 | |
219 | 219 | // LOCATIOM |
220 | - $h = "<p>" . |
|
221 | - _("The user download interface (see <a href='../'>here</a>), uses geolocation to suggest possibly matching IdPs to the user. The more precise you define the location here, the easier your users will find you.") . |
|
220 | + $h = "<p>". |
|
221 | + _("The user download interface (see <a href='../'>here</a>), uses geolocation to suggest possibly matching IdPs to the user. The more precise you define the location here, the easier your users will find you."). |
|
222 | 222 | "</p> |
223 | 223 | <ul>" . |
224 | 224 | _("<li>Drag the marker in the map to your place, or</li> |
225 | 225 | <li>enter your street address in the field below for lookup, or</li> |
226 | -<li>use the 'Locate Me!' button</li>") . |
|
226 | +<li>use the 'Locate Me!' button</li>"). |
|
227 | 227 | "</ul> |
228 | 228 | <strong>" . |
229 | - _("We will use the coordinates as indicated by the marker for geolocation.") . |
|
229 | + _("We will use the coordinates as indicated by the marker for geolocation."). |
|
230 | 230 | "</strong>"; |
231 | 231 | $this->helpMessage['location'] = $h; |
232 | 232 | } |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | |
96 | 96 | <?php |
97 | 97 | function copyIcon($target) { |
98 | - return '<img class="copy_link" id="'.$target.'" src="../resources/images/icons/Tabler/copy.svg" title="'. _("Copy to clipboard").'" >'; |
|
98 | + return '<img class="copy_link" id="'.$target.'" src="../resources/images/icons/Tabler/copy.svg" title="'._("Copy to clipboard").'" >'; |
|
99 | 99 | } |
100 | 100 | |
101 | 101 | /** |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | * @param \core\DeploymentManaged $deploymentObject the deployment to work with |
105 | 105 | * @throws Exception |
106 | 106 | */ |
107 | -function displayDeploymentPropertyWidget(&$deploymentObject, $errormsg=[]) { |
|
107 | +function displayDeploymentPropertyWidget(&$deploymentObject, $errormsg = []) { |
|
108 | 108 | // RADIUS status icons |
109 | 109 | $depId = $deploymentObject->identifier; |
110 | 110 | $radiusMessages = [ |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | $radius_status = array(); |
115 | 115 | $radius_status[0] = $deploymentObject->radius_status_1; |
116 | 116 | $radius_status[1] = $deploymentObject->radius_status_2; |
117 | - $cacert = file_get_contents(ROOT . "/config/ManagedSPCerts/eduroamSP-CA.pem"); |
|
117 | + $cacert = file_get_contents(ROOT."/config/ManagedSPCerts/eduroamSP-CA.pem"); |
|
118 | 118 | $retry = $deploymentObject->checkRADIUSHostandConfigDaemon(); |
119 | 119 | $isradiusready = radius_ready($deploymentObject); |
120 | 120 | if (is_array($retry)) { |
@@ -126,11 +126,11 @@ discard block |
||
126 | 126 | } |
127 | 127 | ?> |
128 | 128 | <div style='display: table-row_id;'> |
129 | - <div class='profilebox' id="profilebox_<?php echo $depId;?>" style='display: table-cell;'> |
|
129 | + <div class='profilebox' id="profilebox_<?php echo $depId; ?>" style='display: table-cell;'> |
|
130 | 130 | <h2><?php |
131 | 131 | switch ($deploymentObject->consortium) { |
132 | 132 | case "eduroam": |
133 | - $displayname = config\ConfAssistant::CONSORTIUM['name'] . " " . core\DeploymentManaged::PRODUCTNAME. ": SP$depId-".$deploymentObject->institution; |
|
133 | + $displayname = config\ConfAssistant::CONSORTIUM['name']." ".core\DeploymentManaged::PRODUCTNAME.": SP$depId-".$deploymentObject->institution; |
|
134 | 134 | break; |
135 | 135 | case "OpenRoaming": |
136 | 136 | $displayname = "OpenRoaming ANP"; |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | default: |
139 | 139 | throw new Exception("We are supposed to operate on a roaming consortium we don't know."); |
140 | 140 | } |
141 | - echo $displayname . " (<span style='color:" . ( $deploymentObject->status == \core\AbstractDeployment::INACTIVE ? "red;'>" . _("inactive") : "green;'>" . _("active") ) . "</span>)"; |
|
141 | + echo $displayname." (<span style='color:".($deploymentObject->status == \core\AbstractDeployment::INACTIVE ? "red;'>"._("inactive") : "green;'>"._("active"))."</span>)"; |
|
142 | 142 | ?></h2> |
143 | 143 | <table class="deployments"> |
144 | 144 | <caption><?php echo _("Deployment Details"); ?></caption> |
@@ -171,9 +171,9 @@ discard block |
||
171 | 171 | <td> |
172 | 172 | <?php |
173 | 173 | if ($deploymentObject->status) { |
174 | - echo "<img src='" . $radiusMessages[$deploymentObject->radius_status_1]['icon'] . |
|
175 | - "' alt='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] . |
|
176 | - "' title='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] . "' class='cat-icon'>"; |
|
174 | + echo "<img src='".$radiusMessages[$deploymentObject->radius_status_1]['icon']. |
|
175 | + "' alt='".$radiusMessages[$deploymentObject->radius_status_1]['text']. |
|
176 | + "' title='".$radiusMessages[$deploymentObject->radius_status_1]['text']."' class='cat-icon'>"; |
|
177 | 177 | } |
178 | 178 | ?> |
179 | 179 | </td> |
@@ -203,9 +203,9 @@ discard block |
||
203 | 203 | <td> |
204 | 204 | <?php |
205 | 205 | if ($deploymentObject->status && $deploymentObject->radius_status_2) { |
206 | - echo "<img src='" . $radiusMessages[$deploymentObject->radius_status_2]['icon'] . |
|
207 | - "' alt='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] . |
|
208 | - "' title='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] . "' class='cat-icon'>"; |
|
206 | + echo "<img src='".$radiusMessages[$deploymentObject->radius_status_2]['icon']. |
|
207 | + "' alt='".$radiusMessages[$deploymentObject->radius_status_2]['text']. |
|
208 | + "' title='".$radiusMessages[$deploymentObject->radius_status_2]['text']."' class='cat-icon'>"; |
|
209 | 209 | } |
210 | 210 | ?> |
211 | 211 | </td> |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | <tr style="vertical-align:bottom"> |
214 | 214 | <td><?php echo _("RADIUS shared secret for both servers"); ?></td> |
215 | 215 | <td> |
216 | - <span id="shared_data_<?php echo $deploymentObject->identifier;?>"><?php echo $deploymentObject->secret;?></span> |
|
216 | + <span id="shared_data_<?php echo $deploymentObject->identifier; ?>"><?php echo $deploymentObject->secret; ?></span> |
|
217 | 217 | <?php echo copyIcon("shared_icon_".$deploymentObject->identifier) ?> |
218 | 218 | </td> |
219 | 219 | <td></td> |
@@ -249,9 +249,9 @@ discard block |
||
249 | 249 | <td> |
250 | 250 | <?php |
251 | 251 | if ($deploymentObject->status) { |
252 | - echo "<img src='" . $radiusMessages[$deploymentObject->radius_status_1]['icon'] . |
|
253 | - "' alt='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] . |
|
254 | - "' title='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] . "' class='cat-icon'>"; |
|
252 | + echo "<img src='".$radiusMessages[$deploymentObject->radius_status_1]['icon']. |
|
253 | + "' alt='".$radiusMessages[$deploymentObject->radius_status_1]['text']. |
|
254 | + "' title='".$radiusMessages[$deploymentObject->radius_status_1]['text']."' class='cat-icon'>"; |
|
255 | 255 | } |
256 | 256 | ?> |
257 | 257 | </td> |
@@ -281,9 +281,9 @@ discard block |
||
281 | 281 | <td> |
282 | 282 | <?php |
283 | 283 | if ($deploymentObject->status && $deploymentObject->radius_status_2) { |
284 | - echo "<img src='" . $radiusMessages[$deploymentObject->radius_status_2]['icon'] . |
|
285 | - "' alt='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] . |
|
286 | - "' title='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] . "' class='cat-icon'>"; |
|
284 | + echo "<img src='".$radiusMessages[$deploymentObject->radius_status_2]['icon']. |
|
285 | + "' alt='".$radiusMessages[$deploymentObject->radius_status_2]['text']. |
|
286 | + "' title='".$radiusMessages[$deploymentObject->radius_status_2]['text']."' class='cat-icon'>"; |
|
287 | 287 | } |
288 | 288 | ?> |
289 | 289 | </td> |
@@ -299,27 +299,27 @@ discard block |
||
299 | 299 | <td> |
300 | 300 | <?php |
301 | 301 | if ($deploymentObject->radsec_priv == '') { |
302 | - echo _('The client certificate was created using an uploaded CSR, the private key is not available') . '<br><br>'; |
|
302 | + echo _('The client certificate was created using an uploaded CSR, the private key is not available').'<br><br>'; |
|
303 | 303 | } |
304 | - echo _('Subject:') . ' ' . $data['name'] . '<br>'; |
|
305 | - echo _('Serial number:') . ' ' . $data['serialNumberHex'] . '<br>'; |
|
306 | - $dleft = floor(($data['validTo_time_t']-time())/(24*60*60)); |
|
304 | + echo _('Subject:').' '.$data['name'].'<br>'; |
|
305 | + echo _('Serial number:').' '.$data['serialNumberHex'].'<br>'; |
|
306 | + $dleft = floor(($data['validTo_time_t'] - time()) / (24 * 60 * 60)); |
|
307 | 307 | if ($dleft < 30) { |
308 | 308 | echo '<font color="red">'; |
309 | 309 | } |
310 | - echo _('Not valid after:') . ' '. date_create_from_format('ymdGis', substr($data['validTo'], 0, -1))->format('Y-m-d H:i:s') . ' UTC'; |
|
310 | + echo _('Not valid after:').' '.date_create_from_format('ymdGis', substr($data['validTo'], 0, -1))->format('Y-m-d H:i:s').' UTC'; |
|
311 | 311 | if ($dleft > 2) { |
312 | - echo '<br>' . _('Number of days to expiry:') . ' ' . $dleft; |
|
312 | + echo '<br>'._('Number of days to expiry:').' '.$dleft; |
|
313 | 313 | } else { |
314 | - echo '<br>' . _('If you are using RADIUS over TLS you should urgently renew your credentials') . '!'; |
|
314 | + echo '<br>'._('If you are using RADIUS over TLS you should urgently renew your credentials').'!'; |
|
315 | 315 | } |
316 | 316 | if ($dleft < 30) { echo '</font>'; } |
317 | 317 | ?></td> |
318 | 318 | </tr><tr><td></td> |
319 | 319 | |
320 | 320 | <td> |
321 | - <span style="display: none;" id="cert_data_<?php echo $depId;?>"><?php echo $deploymentObject->radsec_cert;?></span> |
|
322 | - <span style="display: none;" id="ca_cert_data_<?php echo $depId;?>"><?php echo $cacert;?></span> |
|
321 | + <span style="display: none;" id="cert_data_<?php echo $depId; ?>"><?php echo $deploymentObject->radsec_cert; ?></span> |
|
322 | + <span style="display: none;" id="ca_cert_data_<?php echo $depId; ?>"><?php echo $cacert; ?></span> |
|
323 | 323 | <?php if ($deploymentObject->radsec_priv != '') { |
324 | 324 | echo _("private key").copyIcon("priv_key_icon_$depId")." "; |
325 | 325 | echo '<span style="display: none;" id="priv_key_data_'.$depId.'">'.$deploymentObject->radsec_priv.'</span>'; |
@@ -330,7 +330,7 @@ discard block |
||
330 | 330 | echo _("CA certificate").copyIcon("ca_cert_icon_$depId"); |
331 | 331 | ?> |
332 | 332 | <br/> |
333 | - <button name="sendzip" onclick="location.href='inc/sendZip.inc.php?inst_id=<?php echo $deploymentObject->institution;?>&dep_id=<?php echo $depId?>'" type="button"><?php echo _('download ZIP-file with full data');?></button> |
|
333 | + <button name="sendzip" onclick="location.href='inc/sendZip.inc.php?inst_id=<?php echo $deploymentObject->institution; ?>&dep_id=<?php echo $depId?>'" type="button"><?php echo _('download ZIP-file with full data'); ?></button> |
|
334 | 334 | |
335 | 335 | </td> |
336 | 336 | <td></td> |
@@ -341,10 +341,10 @@ discard block |
||
341 | 341 | <?php |
342 | 342 | if ($deploymentObject->radsec_cert != NULL) { |
343 | 343 | echo "<i>"; |
344 | - echo _('If your certificate is close to expiry or you need to create new RADIUS over TLS credentials') . '<br>' . |
|
345 | - _('click on "Renew RADIUS over TLS credentials" button') . '<br>'; |
|
344 | + echo _('If your certificate is close to expiry or you need to create new RADIUS over TLS credentials').'<br>'. |
|
345 | + _('click on "Renew RADIUS over TLS credentials" button').'<br>'; |
|
346 | 346 | |
347 | - echo '<br/>' . _('You can upload your own CSR to replace default TLS credentials.') . '<br>' . |
|
347 | + echo '<br/>'._('You can upload your own CSR to replace default TLS credentials.').'<br>'. |
|
348 | 348 | _('Click on "Upload CSR to sign my own TLS credentials"'); |
349 | 349 | echo "</i>"; |
350 | 350 | } |
@@ -379,7 +379,7 @@ discard block |
||
379 | 379 | |
380 | 380 | ?> |
381 | 381 | <tr></tr> |
382 | - <tr><th colspan="2"><?php echo _('Additional deployment settings');?></th></tr> |
|
382 | + <tr><th colspan="2"><?php echo _('Additional deployment settings'); ?></th></tr> |
|
383 | 383 | <tr> |
384 | 384 | <td> |
385 | 385 | <?php |
@@ -459,12 +459,12 @@ discard block |
||
459 | 459 | if (array_key_exists('FAILURE', $res) && $res['FAILURE'] > 0) { |
460 | 460 | echo '<br>'; |
461 | 461 | if ($res['FAILURE'] == 2) { |
462 | - echo ' <span style="color: red;">' . _("Activation failure.") . '</span>'; |
|
462 | + echo ' <span style="color: red;">'._("Activation failure.").'</span>'; |
|
463 | 463 | } else { |
464 | 464 | if (isset($_GET['res'][1]) && $_GET['res']['1'] == 'FAILURE') { |
465 | - echo ' <span style="color: red;">' . _("Activation failure for your primary RADIUS server.") . '</span>'; |
|
465 | + echo ' <span style="color: red;">'._("Activation failure for your primary RADIUS server.").'</span>'; |
|
466 | 466 | } else { |
467 | - echo ' <span style="color: red;">' . _("Activation failure for your backup RADIUS server.") . '</span>'; |
|
467 | + echo ' <span style="color: red;">'._("Activation failure for your backup RADIUS server.").'</span>'; |
|
468 | 468 | } |
469 | 469 | } |
470 | 470 | } |
@@ -491,12 +491,12 @@ discard block |
||
491 | 491 | if (array_key_exists('FAILURE', $res) && $res['FAILURE'] > 0) { |
492 | 492 | echo '<br>'; |
493 | 493 | if ($res['FAILURE'] == 2) { |
494 | - echo ' <span style="color: red;">' . _("Failure during deactivation, your request is queued for handling") . '</span>'; |
|
494 | + echo ' <span style="color: red;">'._("Failure during deactivation, your request is queued for handling").'</span>'; |
|
495 | 495 | } else { |
496 | 496 | if (isset($_GET['res'][1]) && $_GET['res']['1'] == 'FAILURE') { |
497 | - echo ' <span style="color: red;">' . _("Deactivation failure for your primary RADIUS server, your request is queued.") . '</span>'; |
|
497 | + echo ' <span style="color: red;">'._("Deactivation failure for your primary RADIUS server, your request is queued.").'</span>'; |
|
498 | 498 | } else { |
499 | - echo ' <span style="color: red;">' . _("Deactivation failure for your backup RADIUS server, your request is queued.") . '</span>'; |
|
499 | + echo ' <span style="color: red;">'._("Deactivation failure for your backup RADIUS server, your request is queued.").'</span>'; |
|
500 | 500 | } |
501 | 501 | } |
502 | 502 | } |
@@ -544,7 +544,7 @@ discard block |
||
544 | 544 | </div> |
545 | 545 | <?php |
546 | 546 | if (!$isradiusready) { |
547 | - echo '<p>'. _("We are not able to handle a new configuration request requiring contact with RADIUS servers now.") . '<br>' . _("Check later."); |
|
547 | + echo '<p>'._("We are not able to handle a new configuration request requiring contact with RADIUS servers now.").'<br>'._("Check later."); |
|
548 | 548 | |
549 | 549 | } |
550 | 550 | if (count($errormsg) > 0 && array_key_exists($deploymentObject->identifier, $errormsg)) { |
@@ -560,38 +560,38 @@ discard block |
||
560 | 560 | </div> |
561 | 561 | <div style='width:20px;'></div> <!-- QR code space, reserved --> |
562 | 562 | <div style='display: table-cell; min-width:200px;'> |
563 | - <?php $tablecaption = _("Hotspot Usage Statistics");?> |
|
563 | + <?php $tablecaption = _("Hotspot Usage Statistics"); ?> |
|
564 | 564 | <h1><?php echo $tablecaption; ?></h1> |
565 | - <h2><?php echo _("5 most recent authentications");?></h2> |
|
566 | - <p><?php echo _("<b>AP Identifier</b> is a /-separated tuple of NAS-Identifier/NAS-IP-Address/NAS-IPv6-Address/Called-Station-Id") .'<br>'; |
|
565 | + <h2><?php echo _("5 most recent authentications"); ?></h2> |
|
566 | + <p><?php echo _("<b>AP Identifier</b> is a /-separated tuple of NAS-Identifier/NAS-IP-Address/NAS-IPv6-Address/Called-Station-Id").'<br>'; |
|
567 | 567 | echo _("<b>Protocol</b> is a protocol used between a client and RADIUS server, for TLS it is a /-separated tuple TLS/<i>TLS-Client-Cert-Serial</i>"); ?></p> |
568 | 568 | <table class='authrecord'> |
569 | - <caption><?php echo $tablecaption;?></caption> |
|
569 | + <caption><?php echo $tablecaption; ?></caption> |
|
570 | 570 | <tr style='text-align: left;'> |
571 | - <th scope="col"><strong><?php echo _("Timestamp (UTC)");?></strong></th> |
|
572 | - <th scope="col"><strong><?php echo _("Outer-Identity");?></strong></th> |
|
573 | - <th scope="col"><strong><?php echo _("Result");?></strong></th> |
|
574 | - <th scope="col"><strong><?php echo _("MAC Address");?></strong></th> |
|
575 | - <th scope="col"><strong><?php echo _("Chargeable-User-Identity");?></strong></th> |
|
576 | - <th scope="col"><strong><?php echo _("AP Identifier");?></strong></th> |
|
577 | - <th scope="col"><strong><?php echo _("Protocol");?></strong></th> |
|
571 | + <th scope="col"><strong><?php echo _("Timestamp (UTC)"); ?></strong></th> |
|
572 | + <th scope="col"><strong><?php echo _("Outer-Identity"); ?></strong></th> |
|
573 | + <th scope="col"><strong><?php echo _("Result"); ?></strong></th> |
|
574 | + <th scope="col"><strong><?php echo _("MAC Address"); ?></strong></th> |
|
575 | + <th scope="col"><strong><?php echo _("Chargeable-User-Identity"); ?></strong></th> |
|
576 | + <th scope="col"><strong><?php echo _("AP Identifier"); ?></strong></th> |
|
577 | + <th scope="col"><strong><?php echo _("Protocol"); ?></strong></th> |
|
578 | 578 | </tr> |
579 | 579 | <?php |
580 | - $userAuthData = $deploymentObject->retrieveStatistics(0,5); |
|
580 | + $userAuthData = $deploymentObject->retrieveStatistics(0, 5); |
|
581 | 581 | $i = 0; |
582 | 582 | foreach ($userAuthData as $oneRecord) { |
583 | - echo "<tr class='".($oneRecord['result'] == "OK" ? "auth-success" : "auth-fail" )."'>" |
|
583 | + echo "<tr class='".($oneRecord['result'] == "OK" ? "auth-success" : "auth-fail")."'>" |
|
584 | 584 | . "<td>".$oneRecord['activity_time']."</td>" |
585 | 585 | . "<td>".$oneRecord['outer_user']."</td>" |
586 | 586 | . "<td>".($oneRecord['result'] == "OK" ? _("Success") : _("Failure"))."</td>" |
587 | 587 | . "<td>".$oneRecord['mac']."</td>" |
588 | 588 | . "<td>".substr($oneRecord['cui'], 0, 18) |
589 | - . ($oneRecord['cui']=='' ? "" : "... " . copyIcon("cui_icon_".$deploymentObject->identifier."_$i") |
|
589 | + . ($oneRecord['cui'] == '' ? "" : "... ".copyIcon("cui_icon_".$deploymentObject->identifier."_$i") |
|
590 | 590 | . "<span style='display: none;' id='cui_data_".$deploymentObject->identifier."_$i'>".$oneRecord['cui'].'</span>')."</td>" |
591 | 591 | . "<td>".$oneRecord['ap_id']."</td>" |
592 | 592 | . "<td>".$oneRecord['prot']."</td>" |
593 | 593 | . "</tr>"; |
594 | - if ($oneRecord['cui']!='') { |
|
594 | + if ($oneRecord['cui'] != '') { |
|
595 | 595 | $i++; |
596 | 596 | } |
597 | 597 | } |
@@ -613,11 +613,11 @@ discard block |
||
613 | 613 | echo _('Get statistics as CSV file:').' '; |
614 | 614 | $query = 'inc/deploymentStats.inc.php?inst_id='.$deploymentObject->institution."&deployment_id=$depId&as=csv&backlog="; |
615 | 615 | ?> |
616 | - <button name="sendcsv" type="button" onclick="location.href='<?php echo $query;?>WEEK';"><?php echo _('Last week');?> |
|
616 | + <button name="sendcsv" type="button" onclick="location.href='<?php echo $query; ?>WEEK';"><?php echo _('Last week'); ?> |
|
617 | 617 | </button> |
618 | - <button name="sendcsv" type="button" onclick="location.href='<?php echo $query;?>MONTH';"><?php echo _('Last 30 days');?> |
|
618 | + <button name="sendcsv" type="button" onclick="location.href='<?php echo $query; ?>MONTH';"><?php echo _('Last 30 days'); ?> |
|
619 | 619 | </button> |
620 | - <button name="sendcsv" type="button" onclick="location.href='<?php echo $query;?>FULL';"><?php echo _('Last 6 months');?> |
|
620 | + <button name="sendcsv" type="button" onclick="location.href='<?php echo $query; ?>FULL';"><?php echo _('Last 6 months'); ?> |
|
621 | 621 | </button> |
622 | 622 | </div><!-- statistics space --> |
623 | 623 | <div style='height:5px'></div> |
@@ -626,14 +626,14 @@ discard block |
||
626 | 626 | <h2><?php echo _('To get detailed logs from RADIUS sites click a button below.'); |
627 | 627 | $query = 'inc/deploymentLogs.inc.php?inst_id='.$deploymentObject->institution."&deployment_id=$depId&backlog="; |
628 | 628 | ?></h2> |
629 | - <?php echo _('You will receive zip file with logs from both RADIUS servers: primary (folder named radius-1) and secondary (folder named radius-2).') . '<br>' . |
|
630 | - _('If no logs are available an empty zip file is provided.');?> |
|
629 | + <?php echo _('You will receive zip file with logs from both RADIUS servers: primary (folder named radius-1) and secondary (folder named radius-2).').'<br>'. |
|
630 | + _('If no logs are available an empty zip file is provided.'); ?> |
|
631 | 631 | <div style='height:3px'></div> |
632 | - <button name="logs" type="button" onclick="location.href='<?php echo $query;?>1';"><?php echo _('Today');?> |
|
632 | + <button name="logs" type="button" onclick="location.href='<?php echo $query; ?>1';"><?php echo _('Today'); ?> |
|
633 | 633 | </button> |
634 | - <button name="logs" type="button" onclick="location.href='<?php echo $query;?>2';"><?php echo _('Last 2 days');?> |
|
634 | + <button name="logs" type="button" onclick="location.href='<?php echo $query; ?>2';"><?php echo _('Last 2 days'); ?> |
|
635 | 635 | </button> |
636 | - <button name="logs" type="button" onclick="location.href='<?php echo $query;?>7';"><?php echo _('Last 7 days');?> |
|
636 | + <button name="logs" type="button" onclick="location.href='<?php echo $query; ?>7';"><?php echo _('Last 7 days'); ?> |
|
637 | 637 | </button> |
638 | 638 | </div> |
639 | 639 | </div> |
@@ -681,7 +681,7 @@ discard block |
||
681 | 681 | <div> |
682 | 682 | <input type="hidden" name="consortium" value="eduroam"/> |
683 | 683 | <button type='submit' <?php echo ($hasMail > 0 ? "" : "disabled"); ?> name='profile_action' value='new'> |
684 | - <?php echo sprintf(_("Add %s deployment ..."), \config\ConfAssistant::CONSORTIUM['name'] . " " . \core\DeploymentManaged::PRODUCTNAME); ?> |
|
684 | + <?php echo sprintf(_("Add %s deployment ..."), \config\ConfAssistant::CONSORTIUM['name']." ".\core\DeploymentManaged::PRODUCTNAME); ?> |
|
685 | 685 | </button> |
686 | 686 | <span style='color: red;'> |
687 | 687 | <?php if ($hasMail == 0) { |