@@ -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(); |
@@ -38,8 +38,8 @@ discard block |
||
38 | 38 | $invitationObject = new core\SilverbulletInvitation($validator->token(filter_input(INPUT_POST, 'token'))); |
39 | 39 | header("Content-Type:text/html;charset=utf-8"); |
40 | 40 | ?> |
41 | -<h1 style='text-align:center;'><?php echo _("Invitation Token QR Code");?></h1> |
|
42 | -<img alt='<?php echo _("Invitation Token QR Code");?>' style='float:none' src='data:image/png;base64,<?php |
|
41 | +<h1 style='text-align:center;'><?php echo _("Invitation Token QR Code"); ?></h1> |
|
42 | +<img alt='<?php echo _("Invitation Token QR Code"); ?>' style='float:none' src='data:image/png;base64,<?php |
|
43 | 43 | $size = 10; |
44 | 44 | $qrCode = new \chillerlan\QRCode\QRCode(new \chillerlan\QRCode\QROptions([ |
45 | 45 | 'outputType' => \chillerlan\QRCode\QRCode::OUTPUT_IMAGE_PNG, |
@@ -51,5 +51,5 @@ discard block |
||
51 | 51 | if (empty($rawQr)) { |
52 | 52 | throw new Exception("Something went seriously wrong during QR code generation!"); |
53 | 53 | } |
54 | -echo base64_encode($uiElements->pngInjectConsortiumLogo($rawQr, $size));?>'/> |
|
55 | -<p>(<a href='<?php echo $invitationObject->link();?>'><?php echo $invitationObject->link();?>)</a></p> |
|
54 | +echo base64_encode($uiElements->pngInjectConsortiumLogo($rawQr, $size)); ?>'/> |
|
55 | +<p>(<a href='<?php echo $invitationObject->link(); ?>'><?php echo $invitationObject->link(); ?>)</a></p> |
@@ -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 | $deco = new \web\lib\admin\PageDecoration(); |
32 | 32 | $validator = new \web\lib\common\InputValidation(); |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | } else { |
39 | 39 | $link = 'http://'; |
40 | 40 | } |
41 | -$link .= $_SERVER['SERVER_NAME'] . $_SERVER['SCRIPT_NAME']; |
|
41 | +$link .= $_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME']; |
|
42 | 42 | $link = htmlspecialchars($link); |
43 | 43 | |
44 | 44 | echo $deco->defaultPagePrelude(sprintf(_("%s: %s Dashboard"), \config\Master::APPEARANCE['productname'], $uiElements->nomenclatureInst)); |
@@ -87,10 +87,10 @@ discard block |
||
87 | 87 | $readonly = \config\Master::DB['INST']['readonly']; |
88 | 88 | $profiles_for_this_idp = $my_inst->listProfiles(); |
89 | 89 | if (count($profiles_for_this_idp) == 0) { // no profiles yet. |
90 | - echo "<h2>" . sprintf(_("There are not yet any profiles for your %s."), $uiElements->nomenclatureInst) . "</h2>"; |
|
90 | + echo "<h2>".sprintf(_("There are not yet any profiles for your %s."), $uiElements->nomenclatureInst)."</h2>"; |
|
91 | 91 | } |
92 | 92 | if (count($profiles_for_this_idp) > 0) { // no profiles yet. |
93 | - echo "<h2>" . sprintf(_("Profiles for this %s"), $uiElements->nomenclatureInst) . "</h2>"; |
|
93 | + echo "<h2>".sprintf(_("Profiles for this %s"), $uiElements->nomenclatureInst)."</h2>"; |
|
94 | 94 | } |
95 | 95 | // if there is one profile and it is of type Silver Bullet, display a very |
96 | 96 | // simple widget with just a "Manage" button |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | echo _("Information needed!"); |
117 | 117 | echo "<ul style='margin:1px'>"; |
118 | 118 | foreach ($completeness as $missing_attrib) { |
119 | - echo "<li>" . $uiElements->displayName($missing_attrib) . "</li>"; |
|
119 | + echo "<li>".$uiElements->displayName($missing_attrib)."</li>"; |
|
120 | 120 | } |
121 | 121 | echo "</ul>"; |
122 | 122 | echo "</div>"; |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | if ($readonly === FALSE) { |
131 | 131 | ?> |
132 | 132 | <form action='edit_silverbullet.php?inst_id=<?php echo $my_inst->identifier; ?>&profile_id=<?php echo $profile_list->identifier; ?>' method='POST'> |
133 | - <button <?php echo ( is_array($completeness) ? "disabled" : "" ); ?> type='submit' name='sb_action' value='sb_edit'><?php echo _("Manage User Base"); ?></button> |
|
133 | + <button <?php echo (is_array($completeness) ? "disabled" : ""); ?> type='submit' name='sb_action' value='sb_edit'><?php echo _("Manage User Base"); ?></button> |
|
134 | 134 | </form> |
135 | 135 | <?php |
136 | 136 | } |
@@ -139,12 +139,12 @@ discard block |
||
139 | 139 | |
140 | 140 | <div style='width:20px;'></div> |
141 | 141 | <div style='display: table-cell; min-width:200px;'> |
142 | - <p><strong><?php $tablecaption = _("User Downloads"); echo $tablecaption;?></strong></p> |
|
142 | + <p><strong><?php $tablecaption = _("User Downloads"); echo $tablecaption; ?></strong></p> |
|
143 | 143 | <table> |
144 | - <caption><?php echo $tablecaption;?></caption> |
|
144 | + <caption><?php echo $tablecaption; ?></caption> |
|
145 | 145 | <tr> |
146 | - <th scope='col'><?php echo _("Device");?></th> |
|
147 | - <th scope='col'><?php echo _("Count");?></th> |
|
146 | + <th scope='col'><?php echo _("Device"); ?></th> |
|
147 | + <th scope='col'><?php echo _("Count"); ?></th> |
|
148 | 148 | </tr> |
149 | 149 | <?php |
150 | 150 | $stats = $profile_list->getUserDownloadStats(); |
@@ -169,21 +169,21 @@ discard block |
||
169 | 169 | $has_overrides = TRUE; |
170 | 170 | } |
171 | 171 | } |
172 | - $buffer_eaptypediv = "<div style='margin-bottom:40px; float:left;'>" . _("<strong>EAP Types</strong> (in order of preference):") . "<br/>"; |
|
172 | + $buffer_eaptypediv = "<div style='margin-bottom:40px; float:left;'>"._("<strong>EAP Types</strong> (in order of preference):")."<br/>"; |
|
173 | 173 | $typelist = $profile_list->getEapMethodsinOrderOfPreference(); |
174 | 174 | $allcomplete = TRUE; |
175 | 175 | foreach ($typelist as $eaptype) { |
176 | 176 | $buffer_eaptypediv .= $eaptype->getPrintableRep(); |
177 | 177 | $completeness = $profile_list->isEapTypeDefinitionComplete($eaptype); |
178 | 178 | if ($completeness === true) { |
179 | - $buffer_eaptypediv .= " <div class='acceptable'>" . _("OK") . "</div>"; |
|
179 | + $buffer_eaptypediv .= " <div class='acceptable'>"._("OK")."</div>"; |
|
180 | 180 | } else { |
181 | 181 | $buffer_eaptypediv .= " <div class='notacceptable'>"; |
182 | 182 | $buffer_eaptypediv .= _("Information needed!"); |
183 | 183 | if (is_array($completeness)) { |
184 | 184 | $buffer_eaptypediv .= "<ul style='margin:1px'>"; |
185 | 185 | foreach ($completeness as $missing_attrib) { |
186 | - $buffer_eaptypediv .= "<li>" . $uiElements->displayName($missing_attrib) . "</li>"; |
|
186 | + $buffer_eaptypediv .= "<li>".$uiElements->displayName($missing_attrib)."</li>"; |
|
187 | 187 | } |
188 | 188 | $buffer_eaptypediv .= "</ul>"; |
189 | 189 | } |
@@ -195,12 +195,12 @@ discard block |
||
195 | 195 | foreach ($attribs as $attrib) { |
196 | 196 | if ($attrib['level'] == \core\Options::LEVEL_METHOD && !preg_match("/^internal:/", $attrib['name']) && !$justOnce) { |
197 | 197 | $justOnce = TRUE; |
198 | - $buffer_eaptypediv .= "<img src='../resources/images/icons/Letter-E-blue-icon.png' alt='" . _("Options on EAP Method/Device level are in effect.") . "'>"; |
|
198 | + $buffer_eaptypediv .= "<img src='../resources/images/icons/Letter-E-blue-icon.png' alt='"._("Options on EAP Method/Device level are in effect.")."'>"; |
|
199 | 199 | } |
200 | 200 | } |
201 | 201 | $buffer_eaptypediv .= "<br/>"; |
202 | 202 | } |
203 | - $buffer_headline = "<div style='padding-bottom:20px;'><h2 style='overflow:auto; display:inline; padding-bottom: 10px;'>" . sprintf(_("Profile: %s"), $profile_name) . "</h2>"; |
|
203 | + $buffer_headline = "<div style='padding-bottom:20px;'><h2 style='overflow:auto; display:inline; padding-bottom: 10px;'>".sprintf(_("Profile: %s"), $profile_name)."</h2>"; |
|
204 | 204 | |
205 | 205 | $buffer_headline .= "<span style='float:right;'>"; |
206 | 206 | $readiness = $profile_list->readinessLevel(); |
@@ -232,18 +232,18 @@ discard block |
||
232 | 232 | if (\config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS'] == "LOCAL") { |
233 | 233 | $diagUrl = "../diag/"; |
234 | 234 | } else { |
235 | - $diagUrl = \config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS'] . "/diag/"; |
|
235 | + $diagUrl = \config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS']."/diag/"; |
|
236 | 236 | } |
237 | - echo "<form action='" . $diagUrl . "action_realmcheck.php?inst_id=$my_inst->identifier&profile_id=$profile_list->identifier' method='post' accept-charset='UTF-8'> |
|
237 | + echo "<form action='".$diagUrl."action_realmcheck.php?inst_id=$my_inst->identifier&profile_id=$profile_list->identifier' method='post' accept-charset='UTF-8'> |
|
238 | 238 | <input type='hidden' name='comefrom' id='comefrom-$profilecount' value='$link'/> |
239 | - <button type='submit' name='profile_action' value='check' " . ($has_realm ? "" : "disabled='disabled' title='" . _("The realm can only be checked if you configure the realm!") . "'") . "> |
|
240 | - " . _("Check realm reachability") . " |
|
239 | + <button type='submit' name='profile_action' value='check' ".($has_realm ? "" : "disabled='disabled' title='"._("The realm can only be checked if you configure the realm!")."'")."> |
|
240 | + " . _("Check realm reachability")." |
|
241 | 241 | </button> |
242 | 242 | </form>"; |
243 | 243 | } |
244 | 244 | echo "<form action='overview_installers.php?inst_id=$my_inst->identifier&profile_id=$profile_list->identifier' method='post' accept-charset='UTF-8'> |
245 | - <button type='submit' name='profile_action' value='check' " . ($has_eaptypes ? "" : "disabled='disabled' title='" . _("You have not fully configured any supported EAP types!") . "'") . "> |
|
246 | - " . _("Installer Fine-Tuning and Download") . " |
|
245 | + <button type='submit' name='profile_action' value='check' ".($has_eaptypes ? "" : "disabled='disabled' title='"._("You have not fully configured any supported EAP types!")."'")."> |
|
246 | + " . _("Installer Fine-Tuning and Download")." |
|
247 | 247 | </button> |
248 | 248 | </form> |
249 | 249 | </div>"; |
@@ -252,11 +252,11 @@ discard block |
||
252 | 252 | echo " <div class='buttongroupprofilebox' style='clear:both;'> |
253 | 253 | <form action='edit_profile.php?inst_id=$my_inst->identifier&profile_id=$profile_list->identifier' method='post' accept-charset='UTF-8'> |
254 | 254 | <hr/> |
255 | - <button type='submit' name='profile_action' value='edit'>" . _("Edit") . "</button> |
|
255 | + <button type='submit' name='profile_action' value='edit'>"._("Edit")."</button> |
|
256 | 256 | </form> |
257 | 257 | <form action='edit_profile_result.php?inst_id=$my_inst->identifier&profile_id=$profile_list->identifier' method='post' accept-charset='UTF-8'> |
258 | - <button class='delete' type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_DELETE . "' onclick=\"return confirm('" . sprintf(_("Do you really want to delete the profile %s?"), $profile_name) . "')\"> |
|
259 | - " . _("Delete") . " |
|
258 | + <button class='delete' type='submit' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_DELETE."' onclick=\"return confirm('".sprintf(_("Do you really want to delete the profile %s?"), $profile_name)."')\"> |
|
259 | + " . _("Delete")." |
|
260 | 260 | </button> |
261 | 261 | </form> |
262 | 262 | </div>"; |
@@ -265,10 +265,10 @@ discard block |
||
265 | 265 | // dummy width to keep a little distance |
266 | 266 | echo "<div style='width:20px;'></div>"; |
267 | 267 | if ($readiness == core\AbstractProfile::READINESS_LEVEL_SHOWTIME) { |
268 | - $idpLevelUrl = ( isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on" ? 'https://' : 'http://') . $_SERVER['SERVER_NAME'] . dirname(dirname($_SERVER['SCRIPT_NAME'])) . "?idp=" . $my_inst->identifier; |
|
269 | - echo "<div style='display: table-cell; text-align:center;'><p><strong>" . _("User Download Link") . "</strong></p>"; |
|
270 | - $displayurl = $idpLevelUrl . "&profile=" . $profile_list->identifier; |
|
271 | - $QRurl = $idpLevelUrl . "&profile=" . $profile_list->identifier; |
|
268 | + $idpLevelUrl = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on" ? 'https://' : 'http://').$_SERVER['SERVER_NAME'].dirname(dirname($_SERVER['SCRIPT_NAME']))."?idp=".$my_inst->identifier; |
|
269 | + echo "<div style='display: table-cell; text-align:center;'><p><strong>"._("User Download Link")."</strong></p>"; |
|
270 | + $displayurl = $idpLevelUrl."&profile=".$profile_list->identifier; |
|
271 | + $QRurl = $idpLevelUrl."&profile=".$profile_list->identifier; |
|
272 | 272 | $qrCode = new \chillerlan\QRCode\QRCode(new \chillerlan\QRCode\QROptions([ |
273 | 273 | 'outputType' => \chillerlan\QRCode\QRCode::OUTPUT_IMAGE_PNG, |
274 | 274 | 'eccLevel' => \chillerlan\QRCode\QRCode::ECC_H, |
@@ -280,16 +280,16 @@ discard block |
||
280 | 280 | if (empty($rawQr)) { |
281 | 281 | throw new Exception("Something went seriously wrong during QR code generation!"); |
282 | 282 | } |
283 | - $uri = "data:image/png;base64," . base64_encode($uiElements->pngInjectConsortiumLogo($rawQr, web\lib\admin\UIElements::QRCODE_PIXELS_PER_SYMBOL)); |
|
283 | + $uri = "data:image/png;base64,".base64_encode($uiElements->pngInjectConsortiumLogo($rawQr, web\lib\admin\UIElements::QRCODE_PIXELS_PER_SYMBOL)); |
|
284 | 284 | $size = getimagesize($uri); |
285 | - echo "<img width='" . ($size[0] / 4) . "' height='" . ($size[1] / 4) . "' src='$uri' alt='QR-code'/>"; |
|
285 | + echo "<img width='".($size[0] / 4)."' height='".($size[1] / 4)."' src='$uri' alt='QR-code'/>"; |
|
286 | 286 | |
287 | 287 | //echo "<nobr>$displayurl</nobr></a>"; |
288 | 288 | echo "<p>$displayurl</p></a>"; |
289 | 289 | echo "</div>"; |
290 | 290 | // dummy width to keep a little distance |
291 | 291 | echo "<div style='width:20px;'></div>"; |
292 | - echo "<div style='display: table-cell; min-width:200px;'><p><strong>" . _("User Downloads") . "</strong></p><table>"; |
|
292 | + echo "<div style='display: table-cell; min-width:200px;'><p><strong>"._("User Downloads")."</strong></p><table>"; |
|
293 | 293 | $stats = $profile_list->getUserDownloadStats(); |
294 | 294 | foreach ($stats as $dev => $count) { |
295 | 295 | echo "<tr><td><strong>$dev</strong></td><td>$count</td></tr>"; |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | * <base_url>/copyright.php after deploying the software |
20 | 20 | */ |
21 | 21 | |
22 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
22 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
23 | 23 | |
24 | 24 | $auth = new \web\lib\admin\Authentication(); |
25 | 25 | $deco = new \web\lib\admin\PageDecoration(); |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | echo $deco->pageheader(sprintf(_("%s: Edit Profile - Result"), \config\Master::APPEARANCE['productname']), "ADMIN-IDP"); |
53 | 53 | } else { |
54 | 54 | $profile = $my_inst->newProfile(core\AbstractProfile::PROFILETYPE_RADIUS); |
55 | - $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP " . $my_inst->identifier . " - Profile created"); |
|
55 | + $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP ".$my_inst->identifier." - Profile created"); |
|
56 | 56 | echo $deco->pageheader(sprintf(_("%s: Profile wizard (step 3 completed)"), \config\Master::APPEARANCE['productname']), "ADMIN-IDP"); |
57 | 57 | } |
58 | 58 | if (!$profile instanceof \core\ProfileRADIUS) { |
@@ -109,16 +109,16 @@ discard block |
||
109 | 109 | ?> |
110 | 110 | <h1><?php $tablecaption = _("Submitted attributes for this profile"); echo $tablecaption; ?></h1> |
111 | 111 | <table> |
112 | - <caption><?php echo $tablecaption;?></caption> |
|
112 | + <caption><?php echo $tablecaption; ?></caption> |
|
113 | 113 | <tr> |
114 | - <th class="wai-invisible" scope="col"><?php echo _("Overall Result");?></th> |
|
115 | - <th class="wai-invisible" scope="col"><?php echo _("Details");?></th> |
|
114 | + <th class="wai-invisible" scope="col"><?php echo _("Overall Result"); ?></th> |
|
115 | + <th class="wai-invisible" scope="col"><?php echo _("Details"); ?></th> |
|
116 | 116 | </tr> |
117 | 117 | <?php |
118 | 118 | $uiElements = new web\lib\admin\UIElements(); |
119 | 119 | // set realm info, if submitted |
120 | 120 | if ($realm !== FALSE) { |
121 | - $profile->setRealm($anonLocal . "@" . $realm); |
|
121 | + $profile->setRealm($anonLocal."@".$realm); |
|
122 | 122 | echo $uiElements->boxOkay(sprintf(_("Realm: <strong>%s</strong>"), $realm)); |
123 | 123 | } else { |
124 | 124 | $profile->setRealm(""); |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | echo $uiElements->boxError(_("Realm check username cannot be configured: realm is missing!")); |
142 | 142 | } else { |
143 | 143 | $profile->setRealmcheckUser(true, $checkuser_name); |
144 | - echo $uiElements->boxOkay(sprintf(_("Special username for realm check is <strong>%s</strong>, the value is <strong>%s</strong>"), _("ON"), $checkuser_name . "@" . $realm)); |
|
144 | + echo $uiElements->boxOkay(sprintf(_("Special username for realm check is <strong>%s</strong>, the value is <strong>%s</strong>"), _("ON"), $checkuser_name."@".$realm)); |
|
145 | 145 | } |
146 | 146 | } else { |
147 | 147 | $profile->setRealmCheckUser(false); |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | } else { |
155 | 155 | $profile->setInputVerificationPreference($verify, $hint); |
156 | 156 | if ($hint !== FALSE) { |
157 | - $extratext = " " . sprintf(_("and the input field will be prefilled with '<strong>@%s</strong>'."), $realm); |
|
157 | + $extratext = " ".sprintf(_("and the input field will be prefilled with '<strong>@%s</strong>'."), $realm); |
|
158 | 158 | } else { |
159 | 159 | $extratext = "."; |
160 | 160 | } |
@@ -191,17 +191,17 @@ discard block |
||
191 | 191 | echo $uiElements->boxOkay(_("Redirection is <strong>OFF</strong>")); |
192 | 192 | } |
193 | 193 | |
194 | - $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile " . $profile->identifier . " - attributes changed"); |
|
194 | + $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile ".$profile->identifier." - attributes changed"); |
|
195 | 195 | |
196 | 196 | foreach (\core\common\EAP::listKnownEAPTypes() as $a) { |
197 | 197 | if ($a->getIntegerRep() == \core\common\EAP::INTEGER_SILVERBULLET) { // do not allow adding silverbullet via the backdoor |
198 | 198 | continue; |
199 | 199 | } |
200 | - if (isset($_POST[$a->getPrintableRep()]) && isset($_POST[$a->getPrintableRep() . "-priority"]) && is_numeric($_POST[$a->getPrintableRep() . "-priority"])) { |
|
201 | - $priority = (int) $_POST[$a->getPrintableRep() . "-priority"]; |
|
200 | + if (isset($_POST[$a->getPrintableRep()]) && isset($_POST[$a->getPrintableRep()."-priority"]) && is_numeric($_POST[$a->getPrintableRep()."-priority"])) { |
|
201 | + $priority = (int) $_POST[$a->getPrintableRep()."-priority"]; |
|
202 | 202 | // add EAP type to profile as requested, but ... |
203 | 203 | $profile->addSupportedEapMethod($a, $priority); |
204 | - $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile " . $profile->identifier . " - supported EAP types changed"); |
|
204 | + $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile ".$profile->identifier." - supported EAP types changed"); |
|
205 | 205 | } |
206 | 206 | } |
207 | 207 | // re-instantiate $profile, we need to do completion checks and need fresh data for isEapTypeDefinitionComplete() |
@@ -210,23 +210,23 @@ discard block |
||
210 | 210 | if (count($significantChanges) > 0) { |
211 | 211 | $myInstOriginal = new \core\IdP($profile->institution); |
212 | 212 | // send a notification/alert mail to someone we know is in charge |
213 | - $text = _("To whom it may concern,") . "\n\n"; |
|
213 | + $text = _("To whom it may concern,")."\n\n"; |
|
214 | 214 | /// were made to the *Identity Provider* *LU* / integer number of IdP / (previously known as) Name |
215 | - $text .= sprintf(_("significant changes were made to a RADIUS deployment profile of the %s %s / %s / '%s'."), $ui->nomenclatureInst, strtoupper($myInstOriginal->federation), $myInstOriginal->identifier, $myInstOriginal->name) . "\n\n"; |
|
215 | + $text .= sprintf(_("significant changes were made to a RADIUS deployment profile of the %s %s / %s / '%s'."), $ui->nomenclatureInst, strtoupper($myInstOriginal->federation), $myInstOriginal->identifier, $myInstOriginal->name)."\n\n"; |
|
216 | 216 | if (isset($significantChanges[\core\AbstractProfile::CA_CLASH_ADDED])) { |
217 | - $text .= _("WARNING! A new trusted root CA was added, and it has the exact same name as a previously existing root CA. This may (but does not necessarily) mean that this is an attempt to insert an unauthorised trust root by disguising as the genuine one. The details are below:") . "\n\n"; |
|
218 | - $text .= $significantChanges[\core\AbstractProfile::CA_CLASH_ADDED] . "\n\n"; |
|
217 | + $text .= _("WARNING! A new trusted root CA was added, and it has the exact same name as a previously existing root CA. This may (but does not necessarily) mean that this is an attempt to insert an unauthorised trust root by disguising as the genuine one. The details are below:")."\n\n"; |
|
218 | + $text .= $significantChanges[\core\AbstractProfile::CA_CLASH_ADDED]."\n\n"; |
|
219 | 219 | } |
220 | 220 | if (isset($significantChanges[\core\AbstractProfile::CA_ADDED])) { |
221 | 221 | $text .= _("A new trusted root CA was added. The details are below:\n\n"); |
222 | - $text .= $significantChanges[\core\AbstractProfile::CA_ADDED] . "\n\n"; |
|
222 | + $text .= $significantChanges[\core\AbstractProfile::CA_ADDED]."\n\n"; |
|
223 | 223 | } |
224 | 224 | if (isset($significantChanges[\core\AbstractProfile::SERVERNAME_ADDED])) { |
225 | - $text .= _("A new acceptable server name for the authentication server was added. The details are below:") . "\n\n"; |
|
226 | - $text .= $significantChanges[\core\AbstractProfile::SERVERNAME_ADDED] . "\n\n"; |
|
225 | + $text .= _("A new acceptable server name for the authentication server was added. The details are below:")."\n\n"; |
|
226 | + $text .= $significantChanges[\core\AbstractProfile::SERVERNAME_ADDED]."\n\n"; |
|
227 | 227 | } |
228 | - $text .= _("This mail is merely a cross-check because these changes can be security-relevant. If the change was expected, you do not need to take any action.") . "\n\n"; |
|
229 | - $text .= _("Greetings, ") . "\n\n" . \config\Master::APPEARANCE['productname_long']; |
|
228 | + $text .= _("This mail is merely a cross-check because these changes can be security-relevant. If the change was expected, you do not need to take any action.")."\n\n"; |
|
229 | + $text .= _("Greetings, ")."\n\n".\config\Master::APPEARANCE['productname_long']; |
|
230 | 230 | // (currently, send hard-wired to NRO - future: for linked insts, check eduroam DBv2 and send to registered admins directly) |
231 | 231 | $fed = new core\Federation($myInstOriginal->federation); |
232 | 232 | foreach ($fed->listFederationAdmins() as $id) { |
@@ -238,7 +238,7 @@ discard block |
||
238 | 238 | // see if we can enable the EAP type, or if info is missing |
239 | 239 | $eapcompleteness = $reloadedProfile->isEapTypeDefinitionComplete($oneEap); |
240 | 240 | if ($eapcompleteness === true) { |
241 | - echo $uiElements->boxOkay(_("Supported EAP Type: ") . "<strong>" . $oneEap->getPrintableRep() . "</strong>"); |
|
241 | + echo $uiElements->boxOkay(_("Supported EAP Type: ")."<strong>".$oneEap->getPrintableRep()."</strong>"); |
|
242 | 242 | } else { |
243 | 243 | |
244 | 244 | if (is_array($eapcompleteness)) { |
@@ -247,11 +247,11 @@ discard block |
||
247 | 247 | $warntext = "<strong>"; |
248 | 248 | foreach ($eapcompleteness as $item) { |
249 | 249 | $iterator = $iterator + 1; |
250 | - $warntext .= $uiElements->displayName($item) . "</strong>".($iterator < $number ? ", " : "")."<strong>"; |
|
250 | + $warntext .= $uiElements->displayName($item)."</strong>".($iterator < $number ? ", " : "")."<strong>"; |
|
251 | 251 | } |
252 | 252 | $warntext .= "</strong>"; |
253 | 253 | } |
254 | - echo $uiElements->boxWarning(sprintf(_("Supported EAP Type <strong>%s</strong> is missing required information: %s !"), $oneEap->getPrintableRep(), $warntext) . "<br/>" . _("The EAP type was added to the profile, but you need to complete the missing information before we can produce installers for you.")); |
|
254 | + echo $uiElements->boxWarning(sprintf(_("Supported EAP Type <strong>%s</strong> is missing required information: %s !"), $oneEap->getPrintableRep(), $warntext)."<br/>"._("The EAP type was added to the profile, but you need to complete the missing information before we can produce installers for you.")); |
|
255 | 255 | } |
256 | 256 | } |
257 | 257 | $reloadedProfile->prepShowtime(); |
@@ -264,7 +264,7 @@ discard block |
||
264 | 264 | <?php |
265 | 265 | if (count($reloadedProfile->getEapMethodsinOrderOfPreference(1)) > 0) { |
266 | 266 | echo "<form method='post' action='overview_installers.php?inst_id=$my_inst->identifier&profile_id=$reloadedProfile->identifier' accept-charset='UTF-8'> |
267 | - <button type='submit'>" . _("Continue to Installer Fine-Tuning and Download") . "</button> |
|
267 | + <button type='submit'>"._("Continue to Installer Fine-Tuning and Download")."</button> |
|
268 | 268 | </form>"; |
269 | 269 | } |
270 | 270 | echo $deco->footer(); |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | */ |
21 | 21 | |
22 | 22 | $cat = new \web\lib\user\Gui(); |
23 | -$idpId = filter_input(INPUT_GET, 'idp', FILTER_VALIDATE_INT) ?? filter_input(INPUT_POST, 'idp', FILTER_VALIDATE_INT)?? 0; |
|
23 | +$idpId = filter_input(INPUT_GET, 'idp', FILTER_VALIDATE_INT) ?? filter_input(INPUT_POST, 'idp', FILTER_VALIDATE_INT) ?? 0; |
|
24 | 24 | $profileId = filter_input(INPUT_GET, 'profile', FILTER_VALIDATE_INT) ?? filter_input(INPUT_POST, 'profile', FILTER_VALIDATE_INT) ?? 0; |
25 | 25 | $skinObject = $Gui->skinObject; |
26 | 26 | ?> |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | otherdata = j.otherdata; |
84 | 84 | if(! result) { |
85 | 85 | alert("<?php $cat->javaScriptEscapedEcho(_("no matching data found"))?>"); |
86 | - document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']), '/') . '/' ?>'; |
|
86 | + document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']), '/').'/' ?>'; |
|
87 | 87 | } |
88 | 88 | j = j.data; |
89 | 89 | n = j.length; |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | result = j1.status; |
221 | 221 | if(! result) { |
222 | 222 | alert("<?php $cat->javaScriptEscapedEcho(_("no matching data found")) ?>"); |
223 | - document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']), '/') . '/' ?>'; |
|
223 | + document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']), '/').'/' ?>'; |
|
224 | 224 | } |
225 | 225 | j = j1.data; |
226 | 226 | if(j.description !== undefined && j.description) { |
@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | $("#profile_desc").hide(); |
232 | 232 | $("#profile_desc").text(''); |
233 | 233 | } |
234 | - updateTxt = '<span class="user_info"><?php $cat->javaScriptEscapedEcho(_("This entry was last updated at:"));?>'+' '+j.last_changed+'</span><br/>'; |
|
234 | + updateTxt = '<span class="user_info"><?php $cat->javaScriptEscapedEcho(_("This entry was last updated at:")); ?>'+' '+j.last_changed+'</span><br/>'; |
|
235 | 235 | if(j.local_url !== undefined && j.local_url) |
236 | 236 | txt = txt+'<span class="user_info"><?php $cat->javaScriptEscapedEcho(_("WWW:")); ?> <a href="'+j.local_url+'" target="_blank">'+j.local_url+'</a></span><br/>'; |
237 | 237 | if(j.local_email !== undefined && j.local_email) |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | <head> |
25 | 25 | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no"> |
26 | 26 | <link rel="stylesheet" media="screen" type="text/css" href="<?php echo $Gui->skinObject->findResourceUrl("CSS", "cat-user.css"); ?>" /> |
27 | -<title><?php echo config\Master::APPEARANCE['productname'];?> Copyright and Licensing</title> |
|
27 | +<title><?php echo config\Master::APPEARANCE['productname']; ?> Copyright and Licensing</title> |
|
28 | 28 | </head> |
29 | 29 | <body> |
30 | 30 | <div id="wrap"> |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | <div id="user_page" style="display:block"> |
36 | 36 | <?php echo $divs->divPagetitle(config\Master::APPEARANCE['productname']." Copyright and Licensing", ""); ?> |
37 | 37 | <div style="padding:20px"> |
38 | - <?php require dirname(dirname(__DIR__)) . "/copyright.inc.php"; ?> |
|
38 | + <?php require dirname(dirname(__DIR__))."/copyright.inc.php"; ?> |
|
39 | 39 | </div> |
40 | 40 | </div> |
41 | 41 | </div> |
@@ -16,12 +16,12 @@ |
||
16 | 16 | * License: see the web/copyright.inc.php file in the file structure or |
17 | 17 | * <base_url>/copyright.php after deploying the software |
18 | 18 | */?> |
19 | -<h1>Example Skin (Pick-Up and Status page for <?php echo \core\ProfileSilverbullet::PRODUCTNAME;?>)</h1> |
|
20 | -<img alt='Consortium logo' src="<?php echo $Gui->skinObject->findresourceUrl("IMAGES","consortium_logo.png");?>"/> |
|
19 | +<h1>Example Skin (Pick-Up and Status page for <?php echo \core\ProfileSilverbullet::PRODUCTNAME; ?>)</h1> |
|
20 | +<img alt='Consortium logo' src="<?php echo $Gui->skinObject->findresourceUrl("IMAGES", "consortium_logo.png"); ?>"/> |
|
21 | 21 | <p>This skin is much more sober and less bloated than the default one. As it happens, it also doesn't do anything.</p> |
22 | 22 | <p>But at least it goes to show that it's possible to include custom images/CSS/external software using findResourceUrl(..., $filename): |
23 | -<img alt='Custom image' src="<?php echo $Gui->skinObject->findresourceUrl("IMAGES","custom.png");?>"/> |
|
24 | -<p>For <?php echo \core\ProfileSilverbullet::PRODUCTNAME;?>, this page can make use of the request status info we have collected prior to invocation of the skinned page:</p> |
|
23 | +<img alt='Custom image' src="<?php echo $Gui->skinObject->findresourceUrl("IMAGES", "custom.png"); ?>"/> |
|
24 | +<p>For <?php echo \core\ProfileSilverbullet::PRODUCTNAME; ?>, this page can make use of the request status info we have collected prior to invocation of the skinned page:</p> |
|
25 | 25 | <pre> |
26 | - <?php print_r($statusInfo);?> |
|
26 | + <?php print_r($statusInfo); ?> |
|
27 | 27 | </pre> |
@@ -20,7 +20,7 @@ |
||
20 | 20 | */ |
21 | 21 | ?> |
22 | 22 | <h1>Example Skin (main user frontpage)</h1> |
23 | -<img alt='Consortium logo' src="<?php echo $Gui->skinObject->findresourceUrl("IMAGES","consortium_logo.png");?>"/> |
|
23 | +<img alt='Consortium logo' src="<?php echo $Gui->skinObject->findresourceUrl("IMAGES", "consortium_logo.png"); ?>"/> |
|
24 | 24 | <p>This skin is much more sober and less bloated than the default one. As it happens, it also doesn't do anything.</p> |
25 | 25 | <p>But at least it goes to show that it's possible to include custom images/CSS/external software using findResourceUrl(..., $filename): |
26 | -<img alt='Custom image' src="<?php echo $Gui->skinObject->findresourceUrl("IMAGES","custom.png");?>"/> |
|
26 | +<img alt='Custom image' src="<?php echo $Gui->skinObject->findresourceUrl("IMAGES", "custom.png"); ?>"/> |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | * @package UserGUI |
28 | 28 | * |
29 | 29 | */ |
30 | -require dirname(dirname(__FILE__)) . "/config/_config.php"; |
|
30 | +require dirname(dirname(__FILE__))."/config/_config.php"; |
|
31 | 31 | $loggerInstance = new \core\common\Logging(); |
32 | 32 | $langObject = new \core\common\Language(); |
33 | 33 | $cat = new \core\CAT(); |
@@ -51,9 +51,9 @@ discard block |
||
51 | 51 | <body style='background: #fff url(resources/images/bg_grey_tile.png) repeat-x;'> |
52 | 52 | <img src="<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']), '/') ?>/resources/images/consortium_logo.png" style="padding-right:20px; padding-top:20px; float:right" alt="logo" /> |
53 | 53 | |
54 | - <div id="motd"><?php print ( isset(\config\Master::APPEARANCE['MOTD']) ? \config\Master::APPEARANCE['MOTD'] : ' '); ?></div> |
|
54 | + <div id="motd"><?php print (isset(\config\Master::APPEARANCE['MOTD']) ? \config\Master::APPEARANCE['MOTD'] : ' '); ?></div> |
|
55 | 55 | |
56 | - <h1><a href="<?php echo dirname($_SERVER['SCRIPT_NAME']) . '?lang=' . $langObject->getLang(); ?>"><?php echo \config\Master::APPEARANCE['productname']; ?></a></h1> |
|
56 | + <h1><a href="<?php echo dirname($_SERVER['SCRIPT_NAME']).'?lang='.$langObject->getLang(); ?>"><?php echo \config\Master::APPEARANCE['productname']; ?></a></h1> |
|
57 | 57 | <div id="tou"> |
58 | 58 | <?php |
59 | 59 | require "user/tou.php"; |
@@ -61,11 +61,11 @@ discard block |
||
61 | 61 | </div> |
62 | 62 | <div> |
63 | 63 | <table style='width:100%'> |
64 | - <caption><?php echo "Legalese";?></caption> |
|
64 | + <caption><?php echo "Legalese"; ?></caption> |
|
65 | 65 | <tr> |
66 | - <th class='wai-invisible' scope='col'><?php echo "Copyright";?></th> |
|
67 | - <th class='wai-invisible' scope='col'><?php echo "Privacy Notice";?></th> |
|
68 | - <th class='wai-invisible' scope='col'><?php echo "Attribution";?></th> |
|
66 | + <th class='wai-invisible' scope='col'><?php echo "Copyright"; ?></th> |
|
67 | + <th class='wai-invisible' scope='col'><?php echo "Privacy Notice"; ?></th> |
|
68 | + <th class='wai-invisible' scope='col'><?php echo "Attribution"; ?></th> |
|
69 | 69 | </tr> |
70 | 70 | <tr> |
71 | 71 | <td style='padding-left:20px; padding-right:20px; text-align:left; vertical-align:top;'> |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | </td> |
74 | 74 | <?php |
75 | 75 | if (!empty(\config\Master::APPEARANCE['privacy_notice_url'])) { |
76 | - $retval .= "<td><a href='".\config\Master::APPEARANCE['privacy_notice_url']."'>" . sprintf(_("%s Privacy Notice"),\config\ConfAssistant::CONSORTIUM['name']) . "</a></td>"; |
|
76 | + $retval .= "<td><a href='".\config\Master::APPEARANCE['privacy_notice_url']."'>".sprintf(_("%s Privacy Notice"), \config\ConfAssistant::CONSORTIUM['name'])."</a></td>"; |
|
77 | 77 | } |
78 | 78 | ?> |
79 | 79 | <td style='padding-left:80px; padding-right:20px; text-align:right; vertical-align:top;'> |