@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | * <base_url>/copyright.php after deploying the software |
20 | 20 | */ |
21 | 21 | |
22 | -require_once dirname(dirname(__DIR__)) . "/config/_config.php"; |
|
22 | +require_once dirname(dirname(__DIR__))."/config/_config.php"; |
|
23 | 23 | |
24 | 24 | $deco = new \web\lib\admin\PageDecoration(); |
25 | 25 | $validator = new \web\lib\common\InputValidation(); |
@@ -44,9 +44,9 @@ discard block |
||
44 | 44 | |
45 | 45 | $preflist = $my_profile->getEapMethodsinOrderOfPreference(); |
46 | 46 | ?> |
47 | - <h1><?php $tablecaption = sprintf(_("Device compatiblity matrix for %s of %s "), $profile_name, $inst_name); echo $tablecaption;?></h1> |
|
47 | + <h1><?php $tablecaption = sprintf(_("Device compatiblity matrix for %s of %s "), $profile_name, $inst_name); echo $tablecaption; ?></h1> |
|
48 | 48 | <table class="compatmatrix"> |
49 | - <caption><?php echo $tablecaption;?></caption> |
|
49 | + <caption><?php echo $tablecaption; ?></caption> |
|
50 | 50 | <tr> |
51 | 51 | <th scope='col'></th> |
52 | 52 | <th scope='col'><?php echo _("Device"); ?></th> |
@@ -54,10 +54,10 @@ discard block |
||
54 | 54 | <?php |
55 | 55 | foreach ($preflist as $method) { |
56 | 56 | $escapedMethod = $method->getIntegerRep(); |
57 | - echo "<th scope='col' style='min-width:200px'>" . $method->getPrintableRep() . "<br/> |
|
57 | + echo "<th scope='col' style='min-width:200px'>".$method->getPrintableRep()."<br/> |
|
58 | 58 | <form method='post' action='inc/toggleRedirect.inc.php?inst_id=$my_inst->identifier&profile_id=$my_profile->identifier' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'> |
59 | 59 | <input type='hidden' name='eaptype' value='$escapedMethod'> |
60 | - <button class='redirect' type='submit'>" . _("EAP-Type-specific options...") . "</button> |
|
60 | + <button class='redirect' type='submit'>"._("EAP-Type-specific options...")."</button> |
|
61 | 61 | </form></th>"; |
62 | 62 | } |
63 | 63 | ?> |
@@ -73,10 +73,10 @@ discard block |
||
73 | 73 | foreach (\devices\Devices::listDevices() as $index => $description) { |
74 | 74 | |
75 | 75 | echo "<tr>"; |
76 | - echo "<td align='center'><img src='../resources/images/vendorlogo/" . $description['group'] . ".png' alt='logo'></td><td>" . $description['display'] . "<br/> |
|
76 | + echo "<td align='center'><img src='../resources/images/vendorlogo/".$description['group'].".png' alt='logo'></td><td>".$description['display']."<br/> |
|
77 | 77 | <form method='post' action='inc/toggleRedirect.inc.php?inst_id=$my_inst->identifier&profile_id=$my_profile->identifier' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'> |
78 | 78 | <input type='hidden' name='device' value='$index'> |
79 | - <button class='redirect' type='submit'>" . _("Device-specific options...") . "</button> |
|
79 | + <button class='redirect' type='submit'>"._("Device-specific options...")."</button> |
|
80 | 80 | </form> |
81 | 81 | </td>"; |
82 | 82 | $factory = new \core\DeviceFactory($index); |
@@ -85,16 +85,16 @@ discard block |
||
85 | 85 | $footnotesForDevEapCombo = []; |
86 | 86 | $display_footnote = FALSE; |
87 | 87 | $langObject = new \core\common\Language(); |
88 | - $downloadform = "<form action='" . rtrim(dirname(dirname($_SERVER['SCRIPT_NAME'])), '/') . "/user/API.php?action=downloadInstaller&profile=$my_profile->identifier&lang=" . $langObject->getLang() . "' method='post' accept-charset='UTF-8'> |
|
88 | + $downloadform = "<form action='".rtrim(dirname(dirname($_SERVER['SCRIPT_NAME'])), '/')."/user/API.php?action=downloadInstaller&profile=$my_profile->identifier&lang=".$langObject->getLang()."' method='post' accept-charset='UTF-8'> |
|
89 | 89 | <input type='hidden' name='device' value='$index'/> |
90 | 90 | <input type='hidden' name='generatedfor' value='admin'/> |
91 | - <button class='download'>" . sprintf(_("%s<br/>Installer"), config\ConfAssistant::CONSORTIUM['display_name']) . "</button> |
|
91 | + <button class='download'>".sprintf(_("%s<br/>Installer"), config\ConfAssistant::CONSORTIUM['display_name'])."</button> |
|
92 | 92 | "; |
93 | 93 | if (sizeof($my_profile->getAttributes("media:openroaming")) > 0 && $factory->device->options['hs20'] == 1) { |
94 | - $downloadform .= "<form action='" . rtrim(dirname(dirname($_SERVER['SCRIPT_NAME'])), '/') . "/user/API.php?action=downloadInstaller&profile=$my_profile->identifier&openroaming=1&lang=" . $langObject->getLang() . "' method='post' accept-charset='UTF-8'> |
|
94 | + $downloadform .= "<form action='".rtrim(dirname(dirname($_SERVER['SCRIPT_NAME'])), '/')."/user/API.php?action=downloadInstaller&profile=$my_profile->identifier&openroaming=1&lang=".$langObject->getLang()."' method='post' accept-charset='UTF-8'> |
|
95 | 95 | <input type='hidden' name='device' value='$index'/> |
96 | 96 | <input type='hidden' name='generatedfor' value='admin'/> |
97 | - <button class='download'>" . sprintf(_("%s + OpenRoaming<br/>Installer"), config\ConfAssistant::CONSORTIUM['display_name']) . "</button> |
|
97 | + <button class='download'>".sprintf(_("%s + OpenRoaming<br/>Installer"), config\ConfAssistant::CONSORTIUM['display_name'])."</button> |
|
98 | 98 | "; |
99 | 99 | } |
100 | 100 | |
@@ -159,8 +159,8 @@ discard block |
||
159 | 159 | </table> |
160 | 160 | <p><strong><?php $tablecaption2 = _("Legend:"); echo $tablecaption2; ?></strong></p> |
161 | 161 | <table class="compatmatrix"> |
162 | - <caption><?php echo $tablecaption2;?></caption> |
|
163 | - <tr><th scope="col"><?php echo _("Colour");?></th><th scope='col'><?php echo _("Meaning");?></th></tr> |
|
162 | + <caption><?php echo $tablecaption2; ?></caption> |
|
163 | + <tr><th scope="col"><?php echo _("Colour"); ?></th><th scope='col'><?php echo _("Meaning"); ?></th></tr> |
|
164 | 164 | <tr><td class="compat_redirected"> </td> <td><?php echo _("redirection is set"); ?></td></tr> |
165 | 165 | <tr><td class="compat_default"> </td> <td><?php echo _("will be offered on download site"); ?></td></tr> |
166 | 166 | <tr><td class="compat_secondary"> </td> <td><?php echo _("configured, but not preferred EAP type"); ?></td></tr> |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | </table> |
170 | 170 | <?php |
171 | 171 | if (count($distinctFootnotes)) { |
172 | - echo "<p><strong>" . _("Footnotes:") . "</strong></p><table>"; |
|
172 | + echo "<p><strong>"._("Footnotes:")."</strong></p><table>"; |
|
173 | 173 | foreach ($distinctFootnotes as $number => $text) { |
174 | 174 | echo "<tr><td>($number) - </td><td>$text</td></tr>"; |
175 | 175 | } |
@@ -166,27 +166,27 @@ discard block |
||
166 | 166 | { |
167 | 167 | // it could match CN or sAN:DNS, we don't care which |
168 | 168 | if (isset($this->TLS_CA_checks_result[$host]['certdata']['subject'])) { |
169 | - $this->loggerInstance->debug(4, "Checking expected server name " . $this->expectedName . " against Subject: "); |
|
169 | + $this->loggerInstance->debug(4, "Checking expected server name ".$this->expectedName." against Subject: "); |
|
170 | 170 | $this->loggerInstance->debug(4, $this->TLS_CA_checks_result[$host]['certdata']['subject']); |
171 | 171 | // we are checking against accidental misconfig, not attacks, so loosely checking against end of string is appropriate |
172 | - if (preg_match("/CN=" . $this->expectedName . "/", $this->TLS_CA_checks_result[$host]['certdata']['subject']) === 1) { |
|
172 | + if (preg_match("/CN=".$this->expectedName."/", $this->TLS_CA_checks_result[$host]['certdata']['subject']) === 1) { |
|
173 | 173 | return TRUE; |
174 | 174 | } |
175 | 175 | } |
176 | 176 | if (isset($this->TLS_CA_checks_result[$host]['certdata']['extensions']['subjectaltname'])) { |
177 | - $this->loggerInstance->debug(4, "Checking expected server name " . $this->expectedName . " against sANs: "); |
|
177 | + $this->loggerInstance->debug(4, "Checking expected server name ".$this->expectedName." against sANs: "); |
|
178 | 178 | $this->loggerInstance->debug(4, $this->TLS_CA_checks_result[$host]['certdata']['extensions']['subjectaltname']); |
179 | 179 | $testNames = $this->TLS_CA_checks_result[$host]['certdata']['extensions']['subjectaltname']; |
180 | 180 | if (!is_array($testNames)) { |
181 | 181 | $testNames = [$testNames]; |
182 | 182 | } |
183 | 183 | foreach ($testNames as $oneName) { |
184 | - if (preg_match("/" . $this->expectedName . "/", $oneName) === 1) { |
|
184 | + if (preg_match("/".$this->expectedName."/", $oneName) === 1) { |
|
185 | 185 | return TRUE; |
186 | 186 | } |
187 | 187 | } |
188 | 188 | } |
189 | - $this->loggerInstance->debug(3, "Tried to check expected server name " . $this->expectedName . " but neither CN nor sANs matched."); |
|
189 | + $this->loggerInstance->debug(3, "Tried to check expected server name ".$this->expectedName." but neither CN nor sANs matched."); |
|
190 | 190 | |
191 | 191 | $this->TLS_CA_checks_result[$host]['cert_oddity'] = RADIUSTests::CERTPROB_DYN_SERVER_NAME_MISMATCH; |
192 | 192 | return FALSE; |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | $this->TLS_clients_checks_result[$host]['ca'][$type]['certificate'][$k]['status'] = $cert['status']; |
217 | 217 | $this->TLS_clients_checks_result[$host]['ca'][$type]['certificate'][$k]['message'] = $this->TLS_certkeys[$cert['status']]; |
218 | 218 | $this->TLS_clients_checks_result[$host]['ca'][$type]['certificate'][$k]['expected'] = $cert['expected']; |
219 | - $add = ' -cert ' . ROOT . '/config/cli-certs/' . $cert['public'] . ' -key ' . ROOT . '/config/cli-certs/' . $cert['private']; |
|
219 | + $add = ' -cert '.ROOT.'/config/cli-certs/'.$cert['public'].' -key '.ROOT.'/config/cli-certs/'.$cert['private']; |
|
220 | 220 | if (!isset($this->TLS_clients_checks_result[$host]['ca'][$type]['certificate'][$k])) { |
221 | 221 | $this->TLS_clients_checks_result[$host]['ca'][$type]['certificate'][$k] = []; |
222 | 222 | } |
@@ -261,11 +261,11 @@ discard block |
||
261 | 261 | // but code analysers want this more explicit, so here is this extra |
262 | 262 | // call to escapeshellarg() |
263 | 263 | $escapedHost = escapeshellarg($host); |
264 | - $this->loggerInstance->debug(4, \config\Master::PATHS['openssl'] . " s_client -connect " . $escapedHost . " -tls1 -CApath " . ROOT . "/config/ca-certs/$this->consortium/ $arg 2>&1\n"); |
|
264 | + $this->loggerInstance->debug(4, \config\Master::PATHS['openssl']." s_client -connect ".$escapedHost." -tls1 -CApath ".ROOT."/config/ca-certs/$this->consortium/ $arg 2>&1\n"); |
|
265 | 265 | $time_start = microtime(true); |
266 | 266 | $opensslbabble = []; |
267 | 267 | $result = 999; // likely to become zero by openssl; don't want to initialise to zero, could cover up exec failures |
268 | - exec(\config\Master::PATHS['openssl'] . " s_client -connect " . $escapedHost . " -no_ssl3 -CApath " . ROOT . "/config/ca-certs/$this->consortium/ $arg 2>&1", $opensslbabble, $result); |
|
268 | + exec(\config\Master::PATHS['openssl']." s_client -connect ".$escapedHost." -no_ssl3 -CApath ".ROOT."/config/ca-certs/$this->consortium/ $arg 2>&1", $opensslbabble, $result); |
|
269 | 269 | $time_stop = microtime(true); |
270 | 270 | $testresults['time_millisec'] = floor(($time_stop - $time_start) * 1000); |
271 | 271 | $testresults['returncode'] = $result; |
@@ -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(); |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | } |
44 | 44 | $profileToBeDel = $validator->existingProfile($_GET['profile_id'], $my_inst->identifier); |
45 | 45 | $profileToBeDel->destroy(); |
46 | - $loggerInstance->writeAudit($_SESSION['user'], "DEL", "Profile " . $profileToBeDel->identifier); |
|
46 | + $loggerInstance->writeAudit($_SESSION['user'], "DEL", "Profile ".$profileToBeDel->identifier); |
|
47 | 47 | header("Location: overview_org.php?inst_id=$my_inst->identifier"); |
48 | 48 | exit; |
49 | 49 | case web\lib\common\FormElements::BUTTON_SAVE: |
@@ -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) { |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | $uiElements = new web\lib\admin\UIElements(); |
122 | 122 | // set realm info, if submitted |
123 | 123 | if ($realm !== FALSE) { |
124 | - $profile->setRealm($anonLocal . "@" . $realm); |
|
124 | + $profile->setRealm($anonLocal."@".$realm); |
|
125 | 125 | echo $uiElements->boxOkay(sprintf(_("Realm: <strong>%s</strong>"), $realm)); |
126 | 126 | } else { |
127 | 127 | $profile->setRealm(""); |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | echo $uiElements->boxError(_("Realm check username cannot be configured: realm is missing!")); |
148 | 148 | } else { |
149 | 149 | $profile->setRealmcheckUser(true, $checkuser_name); |
150 | - echo $uiElements->boxOkay(sprintf(_("Special username for realm check is <strong>%s</strong>, the value is <strong>%s</strong>"), _("ON"), $checkuser_name . "@" . $realm)); |
|
150 | + echo $uiElements->boxOkay(sprintf(_("Special username for realm check is <strong>%s</strong>, the value is <strong>%s</strong>"), _("ON"), $checkuser_name."@".$realm)); |
|
151 | 151 | } |
152 | 152 | } else { |
153 | 153 | $profile->setRealmCheckUser(false); |
@@ -159,12 +159,12 @@ discard block |
||
159 | 159 | $extratext = ""; |
160 | 160 | if (!empty($realm)) { |
161 | 161 | if ($hint !== FALSE) { |
162 | - $extratext = " " . sprintf(_("The realm portion MUST be exactly '...@%s'."), $realm); |
|
162 | + $extratext = " ".sprintf(_("The realm portion MUST be exactly '...@%s'."), $realm); |
|
163 | 163 | } else { |
164 | - $extratext = " " . sprintf(_("The realm portion MUST end with '%s' but sub-realms of it are allowed (i.e. 'user@%s' and 'user@<...>.%s' are both acceptable)."), $realm, $realm, $realm); |
|
164 | + $extratext = " ".sprintf(_("The realm portion MUST end with '%s' but sub-realms of it are allowed (i.e. 'user@%s' and 'user@<...>.%s' are both acceptable)."), $realm, $realm, $realm); |
|
165 | 165 | } |
166 | 166 | } |
167 | - echo $uiElements->boxOkay(_("Where possible, supplicants will verify that username inputs contain a syntactically correct realm.") . $extratext); |
|
167 | + echo $uiElements->boxOkay(_("Where possible, supplicants will verify that username inputs contain a syntactically correct realm.").$extratext); |
|
168 | 168 | } else { |
169 | 169 | $profile->setInputVerificationPreference(false, false); |
170 | 170 | } |
@@ -196,30 +196,30 @@ discard block |
||
196 | 196 | echo $uiElements->boxOkay(_("Redirection is <strong>OFF</strong>")); |
197 | 197 | } |
198 | 198 | |
199 | - $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile " . $profile->identifier . " - attributes changed"); |
|
199 | + $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile ".$profile->identifier." - attributes changed"); |
|
200 | 200 | // reload the profile to ingest new CA and server names if any; before checking EAP completeness |
201 | 201 | $reloadedProfileNr1 = \core\ProfileFactory::instantiate($profile->identifier); |
202 | 202 | foreach (\core\common\EAP::listKnownEAPTypes() as $a) { |
203 | 203 | if ($a->getIntegerRep() == \core\common\EAP::INTEGER_SILVERBULLET) { // do not allow adding silverbullet via the backdoor |
204 | 204 | continue; |
205 | 205 | } |
206 | - if (isset($_POST[$a->getPrintableRep()]) && isset($_POST[$a->getPrintableRep() . "-priority"]) && is_numeric($_POST[$a->getPrintableRep() . "-priority"])) { |
|
207 | - $priority = (int) $_POST[$a->getPrintableRep() . "-priority"]; |
|
206 | + if (isset($_POST[$a->getPrintableRep()]) && isset($_POST[$a->getPrintableRep()."-priority"]) && is_numeric($_POST[$a->getPrintableRep()."-priority"])) { |
|
207 | + $priority = (int) $_POST[$a->getPrintableRep()."-priority"]; |
|
208 | 208 | // add EAP type to profile as requested, but ... |
209 | 209 | $reloadedProfileNr1->addSupportedEapMethod($a, $priority); |
210 | - $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile " . $reloadedProfileNr1->identifier . " - supported EAP types changed"); |
|
210 | + $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile ".$reloadedProfileNr1->identifier." - supported EAP types changed"); |
|
211 | 211 | // see if we can enable the EAP type, or if info is missing |
212 | 212 | $eapcompleteness = $reloadedProfileNr1->isEapTypeDefinitionComplete($a); |
213 | 213 | if ($eapcompleteness === true) { |
214 | - echo $uiElements->boxOkay(_("Supported EAP Type: ") . "<strong>" . $a->getPrintableRep() . "</strong>"); |
|
214 | + echo $uiElements->boxOkay(_("Supported EAP Type: ")."<strong>".$a->getPrintableRep()."</strong>"); |
|
215 | 215 | } else { |
216 | 216 | $warntext = ""; |
217 | 217 | if (is_array($eapcompleteness)) { |
218 | 218 | foreach ($eapcompleteness as $item) { |
219 | - $warntext .= "<strong>" . $uiElements->displayName($item) . "</strong> "; |
|
219 | + $warntext .= "<strong>".$uiElements->displayName($item)."</strong> "; |
|
220 | 220 | } |
221 | 221 | } |
222 | - echo $uiElements->boxWarning(sprintf(_("Supported EAP Type: <strong>%s</strong> is missing required information %s !"), $a->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.")); |
|
222 | + echo $uiElements->boxWarning(sprintf(_("Supported EAP Type: <strong>%s</strong> is missing required information %s !"), $a->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.")); |
|
223 | 223 | } |
224 | 224 | } |
225 | 225 | } |
@@ -230,23 +230,23 @@ discard block |
||
230 | 230 | if (count($significantChanges) > 0) { |
231 | 231 | $myInstOriginal = new \core\IdP($profile->institution); |
232 | 232 | // send a notification/alert mail to someone we know is in charge |
233 | - $text = _("To whom it may concern,") . "\n\n"; |
|
233 | + $text = _("To whom it may concern,")."\n\n"; |
|
234 | 234 | /// were made to the *Identity Provider* *LU* / integer number of IdP / (previously known as) Name |
235 | - $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"; |
|
235 | + $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"; |
|
236 | 236 | if (isset($significantChanges[\core\AbstractProfile::CA_CLASH_ADDED])) { |
237 | - $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"; |
|
238 | - $text .= $significantChanges[\core\AbstractProfile::CA_CLASH_ADDED] . "\n\n"; |
|
237 | + $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"; |
|
238 | + $text .= $significantChanges[\core\AbstractProfile::CA_CLASH_ADDED]."\n\n"; |
|
239 | 239 | } |
240 | 240 | if (isset($significantChanges[\core\AbstractProfile::CA_ADDED])) { |
241 | - $text .= _("A new trusted root CA was added. The details are below:") . "\n\n"; |
|
242 | - $text .= $significantChanges[\core\AbstractProfile::CA_ADDED] . "\n\n"; |
|
241 | + $text .= _("A new trusted root CA was added. The details are below:")."\n\n"; |
|
242 | + $text .= $significantChanges[\core\AbstractProfile::CA_ADDED]."\n\n"; |
|
243 | 243 | } |
244 | 244 | if (isset($significantChanges[\core\AbstractProfile::SERVERNAME_ADDED])) { |
245 | - $text .= _("A new acceptable server name for the authentication server was added. The details are below:") . "\n\n"; |
|
246 | - $text .= $significantChanges[\core\AbstractProfile::SERVERNAME_ADDED] . "\n\n"; |
|
245 | + $text .= _("A new acceptable server name for the authentication server was added. The details are below:")."\n\n"; |
|
246 | + $text .= $significantChanges[\core\AbstractProfile::SERVERNAME_ADDED]."\n\n"; |
|
247 | 247 | } |
248 | - $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"; |
|
249 | - $text .= _("Greetings, ") . "\n\n" . \config\Master::APPEARANCE['productname_long']; |
|
248 | + $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"; |
|
249 | + $text .= _("Greetings, ")."\n\n".\config\Master::APPEARANCE['productname_long']; |
|
250 | 250 | // (currently, send hard-wired to NRO - future: for linked insts, check eduroam DBv2 and send to registered admins directly) |
251 | 251 | $fed = new core\Federation($myInstOriginal->federation); |
252 | 252 | foreach ($fed->listFederationAdmins() as $id) { |
@@ -303,14 +303,14 @@ discard block |
||
303 | 303 | $oneHostOkay = FALSE; |
304 | 304 | $testCandidates = []; |
305 | 305 | foreach ($dnsChecks->NAPTR_hostname_records as $oneServer) { |
306 | - $testCandidates[$oneServer['hostname']][] = ($oneServer['family'] == "IPv4" ? $oneServer['IP'] : "[" . $oneServer['IP'] . "]") . ":" . $oneServer['port']; |
|
306 | + $testCandidates[$oneServer['hostname']][] = ($oneServer['family'] == "IPv4" ? $oneServer['IP'] : "[".$oneServer['IP']."]").":".$oneServer['port']; |
|
307 | 307 | } |
308 | 308 | foreach ($testCandidates as $oneHost => $listOfIPs) { |
309 | 309 | $connectionTests = new core\diag\RFC6614Tests(array_values($listOfIPs), $oneHost, "openroaming"); |
310 | 310 | // for now (no OpenRoaming client certs available) only run server-side tests |
311 | 311 | foreach ($listOfIPs as $oneIP) { |
312 | 312 | $connectionResult = $connectionTests->cApathCheck($oneIP); |
313 | - if ($connectionResult != core\diag\AbstractTest::RETVAL_OK || ( isset($connectionTests->TLS_CA_checks_result['cert_oddity']) && count($connectionTests->TLS_CA_checks_result['cert_oddity']) > 0)) { |
|
313 | + if ($connectionResult != core\diag\AbstractTest::RETVAL_OK || (isset($connectionTests->TLS_CA_checks_result['cert_oddity']) && count($connectionTests->TLS_CA_checks_result['cert_oddity']) > 0)) { |
|
314 | 314 | $allHostsOkay = FALSE; |
315 | 315 | } else { |
316 | 316 | $oneHostOkay = TRUE; |
@@ -345,7 +345,7 @@ discard block |
||
345 | 345 | <?php |
346 | 346 | if (count($reloadedProfileNr2->getEapMethodsinOrderOfPreference(1)) > 0) { |
347 | 347 | echo "<form method='post' action='overview_installers.php?inst_id=$my_inst->identifier&profile_id=$reloadedProfileNr2->identifier' accept-charset='UTF-8'> |
348 | - <button type='submit'>" . _("Continue to Installer Fine-Tuning and Download") . "</button> |
|
348 | + <button type='submit'>"._("Continue to Installer Fine-Tuning and Download")."</button> |
|
349 | 349 | </form>"; |
350 | 350 | } |
351 | 351 | echo $deco->footer(); |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | $this->installerPath = $cache['path']; |
87 | 87 | if ($this->installerPath !== NULL && $token === NULL && $password === NULL) { |
88 | 88 | $this->loggerInstance->debug(4, "Using cached installer for: $device\n"); |
89 | - $installerProperties['link'] = "user/API.php?action=downloadInstaller&lang=" . $this->languageInstance->getLang() . "&profile=$profileId&device=$device&generatedfor=$generatedFor&openroaming=$openRoaming"; |
|
89 | + $installerProperties['link'] = "user/API.php?action=downloadInstaller&lang=".$this->languageInstance->getLang()."&profile=$profileId&device=$device&generatedfor=$generatedFor&openroaming=$openRoaming"; |
|
90 | 90 | $installerProperties['mime'] = $cache['mime']; |
91 | 91 | } else { |
92 | 92 | $myInstaller = $this->generateNewInstaller($device, $profile, $generatedFor, $openRoaming, $token, $password); |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | $this->loggerInstance->debug(5, "generateNewInstaller() - Device setup done"); |
180 | 180 | $installer = $dev->writeInstaller(); |
181 | 181 | $this->loggerInstance->debug(5, "generateNewInstaller() - writeInstaller complete"); |
182 | - $iPath = $dev->FPATH . '/tmp/' . $installer; |
|
182 | + $iPath = $dev->FPATH.'/tmp/'.$installer; |
|
183 | 183 | if ($iPath && is_file($iPath)) { |
184 | 184 | if (isset($dev->options['mime'])) { |
185 | 185 | $out['mime'] = $dev->options['mime']; |
@@ -187,17 +187,17 @@ discard block |
||
187 | 187 | $info = new \finfo(); |
188 | 188 | $out['mime'] = $info->file($iPath, FILEINFO_MIME_TYPE); |
189 | 189 | } |
190 | - $this->installerPath = $dev->FPATH . '/' . $installer; |
|
190 | + $this->installerPath = $dev->FPATH.'/'.$installer; |
|
191 | 191 | rename($iPath, $this->installerPath); |
192 | 192 | $integerEap = (new \core\common\EAP($dev->selectedEap))->getIntegerRep(); |
193 | 193 | $profile->updateCache($device, $this->installerPath, $out['mime'], $integerEap); |
194 | 194 | if (\config\Master::DEBUG_LEVEL < 4) { |
195 | - \core\common\Entity::rrmdir($dev->FPATH . '/tmp'); |
|
195 | + \core\common\Entity::rrmdir($dev->FPATH.'/tmp'); |
|
196 | 196 | } |
197 | - $this->loggerInstance->debug(4, "Generated installer: " . $this->installerPath . ": for: $device, EAP:" . $integerEap . ", openRoaming: $openRoaming\n"); |
|
198 | - $out['link'] = "user/API.php?action=downloadInstaller&lang=" . $this->languageInstance->getLang() . "&profile=" . $profile->identifier . "&device=$device&generatedfor=$generatedFor&openroaming=$openRoaming"; |
|
197 | + $this->loggerInstance->debug(4, "Generated installer: ".$this->installerPath.": for: $device, EAP:".$integerEap.", openRoaming: $openRoaming\n"); |
|
198 | + $out['link'] = "user/API.php?action=downloadInstaller&lang=".$this->languageInstance->getLang()."&profile=".$profile->identifier."&device=$device&generatedfor=$generatedFor&openroaming=$openRoaming"; |
|
199 | 199 | } else { |
200 | - $this->loggerInstance->debug(2, "Installer generation failed for: " . $profile->identifier . ":$device:" . $this->languageInstance->getLang() . "openRoaming: $openRoaming\n"); |
|
200 | + $this->loggerInstance->debug(2, "Installer generation failed for: ".$profile->identifier.":$device:".$this->languageInstance->getLang()."openRoaming: $openRoaming\n"); |
|
201 | 201 | $out['link'] = 0; |
202 | 202 | } |
203 | 203 | } |
@@ -321,13 +321,13 @@ discard block |
||
321 | 321 | $file = $this->installerPath; |
322 | 322 | $filetype = $output['mime']; |
323 | 323 | $this->loggerInstance->debug(4, "installer MIME type:$filetype\n"); |
324 | - header("Content-type: " . $filetype); |
|
324 | + header("Content-type: ".$filetype); |
|
325 | 325 | if ($filetype !== "application/x-wifi-config") { // for those installers to work on Android, Content-Disposition MUST NOT be set |
326 | - header('Content-Disposition: inline; filename="' . basename($file) . '"'); |
|
326 | + header('Content-Disposition: inline; filename="'.basename($file).'"'); |
|
327 | 327 | } else { |
328 | 328 | header('Content-Transfer-Encoding: base64'); |
329 | 329 | } |
330 | - header('Content-Length: ' . filesize($file)); |
|
330 | + header('Content-Length: '.filesize($file)); |
|
331 | 331 | ob_clean(); |
332 | 332 | flush(); |
333 | 333 | readfile($file); |
@@ -349,7 +349,7 @@ discard block |
||
349 | 349 | $filetype = $info->buffer($inputImage, FILEINFO_MIME_TYPE); |
350 | 350 | $offset = 60 * 60 * 24 * 30; |
351 | 351 | // gmdate cannot fail here - time() is its default argument (and integer), and we are adding an integer to it |
352 | - $expiresString = "Expires: " . /** @scrutinizer ignore-type */ gmdate("D, d M Y H:i:s", time() + $offset) . " GMT"; |
|
352 | + $expiresString = "Expires: "./** @scrutinizer ignore-type */ gmdate("D, d M Y H:i:s", time() + $offset)." GMT"; |
|
353 | 353 | $blob = $inputImage; |
354 | 354 | |
355 | 355 | if ($resize === TRUE) { |
@@ -405,7 +405,7 @@ discard block |
||
405 | 405 | $filetype = 'image/png'; // default, only one code path where it can become different |
406 | 406 | list($width, $height, $resize) = $this->testForResize($widthIn, $heightIn); |
407 | 407 | if ($resize) { |
408 | - $logoFile = ROOT . '/web/downloads/logos/' . $identifier . '_' . $width . '_' . $height . '.png'; |
|
408 | + $logoFile = ROOT.'/web/downloads/logos/'.$identifier.'_'.$width.'_'.$height.'.png'; |
|
409 | 409 | } |
410 | 410 | if (is_file($logoFile)) { // $logoFile could be an empty string but then we will get a FALSE |
411 | 411 | $this->loggerInstance->debug(4, "Using cached logo $logoFile for: $identifier\n"); |
@@ -517,7 +517,7 @@ discard block |
||
517 | 517 | if (!isset($device['match'])) { |
518 | 518 | continue; |
519 | 519 | } |
520 | - if (preg_match('/' . $device['match'] . '/', $browser)) { |
|
520 | + if (preg_match('/'.$device['match'].'/', $browser)) { |
|
521 | 521 | return $this->returnDevice($devId, $device); |
522 | 522 | } |
523 | 523 | } |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | const DOWNLOAD_REDIRECT_CONTINUE = 1054; |
52 | 52 | const SB_GO_AWAY = 1060; |
53 | 53 | const SB_FRONTPAGE_BIGDOWNLOADBUTTON = 1061; |
54 | -const SB_FRONTPAGE_ROLLER_CUSTOMBUILT= 1062; |
|
54 | +const SB_FRONTPAGE_ROLLER_CUSTOMBUILT = 1062; |
|
55 | 55 | |
56 | 56 | |
57 | 57 | /** |
@@ -103,13 +103,13 @@ discard block |
||
103 | 103 | ]; |
104 | 104 | $this->templates[WELCOME_ABOARD_TERMS] = ""; |
105 | 105 | foreach ($this->templates[NETWORK_TERMS_AND_PRIV] as $consortium => $terms) { |
106 | - $this->templates[WELCOME_ABOARD_TERMS] .= sprintf("<p>" . _("Please remember that when connecting to %s hotspots, the following <a href='%s'>Terms and Conditions</a> and <a href='%s'>Privacy Notice</a> apply.") . "</p>", $consortium, $terms['TOU_LINK'], $terms['PRIV_LINK']); |
|
106 | + $this->templates[WELCOME_ABOARD_TERMS] .= sprintf("<p>"._("Please remember that when connecting to %s hotspots, the following <a href='%s'>Terms and Conditions</a> and <a href='%s'>Privacy Notice</a> apply.")."</p>", $consortium, $terms['TOU_LINK'], $terms['PRIV_LINK']); |
|
107 | 107 | } |
108 | 108 | // $this->templates[WELCOME_ABOARD_TERMS] .= "<p>"._("I agree to be bound by these Terms and Conditions.")."</p>"; |
109 | 109 | $this->templates[WELCOME_ABOARD_BACKTODOWNLOADS] = _("Back to downloads"); |
110 | 110 | $this->templates[EDUROAM_WELCOME_ADVERTISING] = sprintf(_("we would like to warmly welcome you among the several million users of %s! From now on, you will be able to use internet access resources on thousands of universities, research centres and other places all over the globe. All of this completely free of charge!"), \config\ConfAssistant::CONSORTIUM['display_name']); |
111 | 111 | $this->templates[HEADING_TOPLEVEL_GREET] = sprintf(_("Welcome to %s"), \config\Master::APPEARANCE['productname']); |
112 | - $this->templates[HEADING_TOPLEVEL_PURPOSE] = sprintf(_("Connect your device to %s"),\config\ConfAssistant::CONSORTIUM['display_name']); |
|
112 | + $this->templates[HEADING_TOPLEVEL_PURPOSE] = sprintf(_("Connect your device to %s"), \config\ConfAssistant::CONSORTIUM['display_name']); |
|
113 | 113 | $this->templates[FRONTPAGE_ROLLER_EASY] = sprintf(_("%s installation made easy:"), \config\ConfAssistant::CONSORTIUM['display_name']); |
114 | 114 | $this->templates[FRONTPAGE_ROLLER_CUSTOMBUILT] = _("Custom built for your organisation"); |
115 | 115 | $this->templates[FRONTPAGE_BIGDOWNLOADBUTTON] = sprintf(_("Click here to download your %s installer"), \config\ConfAssistant::CONSORTIUM['display_name'], \config\ConfAssistant::CONSORTIUM['display_name']); |
@@ -44,8 +44,8 @@ discard block |
||
44 | 44 | $operatingSystem = $Gui->detectOS(); |
45 | 45 | $Gui->loggerInstance->debug(4, $operatingSystem); |
46 | 46 | if ($operatingSystem) { |
47 | - print "recognisedOS = '".$operatingSystem['device'] . "';\n"; |
|
48 | - print "recognisedOShs20 = '".$operatingSystem['hs20'] . "';\n"; |
|
47 | + print "recognisedOS = '".$operatingSystem['device']."';\n"; |
|
48 | + print "recognisedOShs20 = '".$operatingSystem['hs20']."';\n"; |
|
49 | 49 | $vendorlogo = $Gui->skinObject->findResourceUrl("IMAGES", "vendorlogo/"); |
50 | 50 | if ($vendorlogo !== FALSE) { |
51 | 51 | print "vendorlogo = '$vendorlogo';\n"; |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | } |
55 | 55 | } |
56 | 56 | |
57 | -print 'downloadMessage = "'.$Gui->textTemplates->templates[\web\lib\user\DOWNLOAD_MESSAGE] . '";'; |
|
57 | +print 'downloadMessage = "'.$Gui->textTemplates->templates[\web\lib\user\DOWNLOAD_MESSAGE].'";'; |
|
58 | 58 | //TODO modify this based on OS detection |
59 | 59 | $userAgent = $_SERVER['HTTP_USER_AGENT'] ?? ""; |
60 | 60 | if (preg_match('/Android/', $userAgent)) { |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | <?php echo $divs->divHeading($visibility); ?> |
84 | 84 | <div id="main_page"> |
85 | 85 | <div id="loading_ico"> |
86 | - <?php echo _("Authenticating") . "..." ?><br><img src="<?php echo $Gui->skinObject->findResourceUrl("IMAGES", "icons/loading51.gif"); ?>" alt="Authenticating ..."/> |
|
86 | + <?php echo _("Authenticating")."..." ?><br><img src="<?php echo $Gui->skinObject->findResourceUrl("IMAGES", "icons/loading51.gif"); ?>" alt="Authenticating ..."/> |
|
87 | 87 | </div> |
88 | 88 | <div id="info_overlay"> <!-- device info --> |
89 | 89 | <div id="info_window"></div> |
@@ -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 | $deco = new \web\lib\admin\PageDecoration(); |
25 | 25 | $uiElements = new web\lib\admin\UIElements(); |
@@ -50,16 +50,16 @@ discard block |
||
50 | 50 | <div class="infobox"> |
51 | 51 | <h2><?php $tablecaption = _("Your Personal Information"); echo $tablecaption; ?></h2> |
52 | 52 | <table> |
53 | - <caption><?php echo $tablecaption;?></caption> |
|
53 | + <caption><?php echo $tablecaption; ?></caption> |
|
54 | 54 | <tr> |
55 | - <th class="wai-invisible" scope="col"><?php echo _("Property Type");?></th> |
|
56 | - <th class="wai-invisible" scope="col"><?php echo _("Language if applicable");?></th> |
|
57 | - <th class="wai-invisible" scope="col"><?php echo _("Property Value");?></th> |
|
55 | + <th class="wai-invisible" scope="col"><?php echo _("Property Type"); ?></th> |
|
56 | + <th class="wai-invisible" scope="col"><?php echo _("Language if applicable"); ?></th> |
|
57 | + <th class="wai-invisible" scope="col"><?php echo _("Property Value"); ?></th> |
|
58 | 58 | </tr> |
59 | 59 | <?php echo $uiElements->infoblock($user->getAttributes(), "user", "User"); ?> |
60 | 60 | <tr> |
61 | 61 | <td> |
62 | - <?php echo "" . _("Unique Identifier") ?> |
|
62 | + <?php echo ""._("Unique Identifier") ?> |
|
63 | 63 | </td> |
64 | 64 | <td> |
65 | 65 | </td> |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | $mgmt = new \core\UserManagement(); |
75 | 75 | |
76 | 76 | if (!$user->isFederationAdmin()) { |
77 | - echo "<p>" . sprintf(_("You are not a %s manager."), $uiElements->nomenclatureFed) . "</p>"; |
|
77 | + echo "<p>".sprintf(_("You are not a %s manager."), $uiElements->nomenclatureFed)."</p>"; |
|
78 | 78 | echo $deco->footer(); |
79 | 79 | exit(0); |
80 | 80 | } |
@@ -88,16 +88,16 @@ discard block |
||
88 | 88 | <?php $tablecaption2 = sprintf(_("%s Properties: %s"), $uiElements->nomenclatureFed, $thefed->name); echo $tablecaption2; ?> |
89 | 89 | </h2> |
90 | 90 | <table> |
91 | - <caption><?php echo $tablecaption2;?></caption> |
|
91 | + <caption><?php echo $tablecaption2; ?></caption> |
|
92 | 92 | <tr> |
93 | - <th class="wai-invisible" scope="col"><?php echo _("Property Type");?></th> |
|
94 | - <th class="wai-invisible" scope="col"><?php echo _("Language if applicable");?></th> |
|
95 | - <th class="wai-invisible" scope="col"><?php echo _("Property Value");?></th> |
|
93 | + <th class="wai-invisible" scope="col"><?php echo _("Property Type"); ?></th> |
|
94 | + <th class="wai-invisible" scope="col"><?php echo _("Language if applicable"); ?></th> |
|
95 | + <th class="wai-invisible" scope="col"><?php echo _("Property Value"); ?></th> |
|
96 | 96 | </tr> |
97 | 97 | <!-- fed properties --> |
98 | 98 | <tr> |
99 | 99 | <td> |
100 | - <?php echo "" . _("Country") ?> |
|
100 | + <?php echo ""._("Country") ?> |
|
101 | 101 | </td> |
102 | 102 | <td> |
103 | 103 | </td> |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | default: |
179 | 179 | throw new Exception("Error: unknown encryption status of invitation!?!"); |
180 | 180 | } |
181 | - echo $uiElements->boxRemark(ngettext("The invitation email was sent successfully.", "All invitation emails were sent successfully.", $counter) . " " . $cryptText, _("Sent successfully.")); |
|
181 | + echo $uiElements->boxRemark(ngettext("The invitation email was sent successfully.", "All invitation emails were sent successfully.", $counter)." ".$cryptText, _("Sent successfully.")); |
|
182 | 182 | break; |
183 | 183 | case "FAILURE": |
184 | 184 | echo $uiElements->boxError(_("No invitation email could be sent!"), _("Sending failure!")); |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | default: |
199 | 199 | throw new Exception("Error: unknown encryption status of invitation!?!"); |
200 | 200 | } |
201 | - echo $uiElements->boxWarning(sprintf(_("Some invitation emails were sent successfully (%s in total), the others failed."), $counter) . " " . $cryptText, _("Partial success.")); |
|
201 | + echo $uiElements->boxWarning(sprintf(_("Some invitation emails were sent successfully (%s in total), the others failed."), $counter)." ".$cryptText, _("Partial success.")); |
|
202 | 202 | break; |
203 | 203 | case "INVALIDSYNTAX": |
204 | 204 | echo $uiElements->boxError(_("The invitation email address was malformed, no invitation was sent!"), _("The invitation email address was malformed, no invitation was sent!")); |
@@ -214,27 +214,27 @@ discard block |
||
214 | 214 | } else { |
215 | 215 | $link = 'http://'; |
216 | 216 | } |
217 | - $link .= $_SERVER['SERVER_NAME'] . $_SERVER['SCRIPT_NAME']; |
|
217 | + $link .= $_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME']; |
|
218 | 218 | $link = htmlspecialchars($link); |
219 | 219 | if (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_RADIUS'] == 'LOCAL' && \config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS'] == 'LOCAL') { |
220 | 220 | echo "<table><tr> |
221 | - <td>" . sprintf(_("Diagnose reachability and connection parameters of any %s %s"), \config\ConfAssistant::CONSORTIUM['display_name'], $uiElements->nomenclatureInst) . "</td> |
|
221 | + <td>" . sprintf(_("Diagnose reachability and connection parameters of any %s %s"), \config\ConfAssistant::CONSORTIUM['display_name'], $uiElements->nomenclatureInst)."</td> |
|
222 | 222 | <td><form method='post' action='../diag/action_realmcheck.php' accept-charset='UTF-8'> |
223 | 223 | <input type='hidden' name='comefrom' id='comefrom' value='$link'/> |
224 | - <button id='realmcheck' style='cursor:pointer;' type='submit'>" . _("Go!") . "</button> |
|
224 | + <button id='realmcheck' style='cursor:pointer;' type='submit'>"._("Go!")."</button> |
|
225 | 225 | </form> |
226 | 226 | </td> |
227 | 227 | </tr> |
228 | 228 | </table>"; |
229 | 229 | } |
230 | 230 | if (\config\ConfAssistant::CONSORTIUM['name'] == 'eduroam') { |
231 | - $helptext = "<h3>" . sprintf(_("Need help? Refer to the <a href='%s'>%s manual</a>"), "https://wiki.geant.org/x/qJg7Bw", $uiElements->nomenclatureFed) . "</h3>"; |
|
231 | + $helptext = "<h3>".sprintf(_("Need help? Refer to the <a href='%s'>%s manual</a>"), "https://wiki.geant.org/x/qJg7Bw", $uiElements->nomenclatureFed)."</h3>"; |
|
232 | 232 | } else { |
233 | 233 | $helptext = ""; |
234 | 234 | } |
235 | 235 | ?> |
236 | 236 | <table class='user_overview' style='border:0px;'> |
237 | - <caption><?php echo _("Participant Details");?></caption> |
|
237 | + <caption><?php echo _("Participant Details"); ?></caption> |
|
238 | 238 | <tr> |
239 | 239 | <th scope='col'><?php echo _("Configured / Visible / OpenRoaming"); ?></th> |
240 | 240 | <th scope='col'><?php echo sprintf(_("%s Name"), $uiElements->nomenclatureInst); ?></th> |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | $pending_invites = $mgmt->listPendingInvitations(); |
244 | 244 | |
245 | 245 | if (\config\Master::DB['enforce-external-sync']) { |
246 | - echo "<th scope='col'>" . sprintf(_("%s Database Sync Status"), \config\ConfAssistant::CONSORTIUM['display_name']) . "</th>"; |
|
246 | + echo "<th scope='col'>".sprintf(_("%s Database Sync Status"), \config\ConfAssistant::CONSORTIUM['display_name'])."</th>"; |
|
247 | 247 | } |
248 | 248 | ?> |
249 | 249 | <th scope='col'> |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | foreach ($feds as $onefed) { |
259 | 259 | $thefed = new \core\Federation(strtoupper($onefed['value'])); |
260 | 260 | /// nomenclature for 'federation', federation name, nomenclature for 'inst' |
261 | - echo "<tr><td colspan='8'><strong>" . sprintf(_("The following %s are in your %s %s:"), $uiElements->nomenclatureInst, $uiElements->nomenclatureFed, '<span style="color:green">' . $thefed->name . '</span>') . "</strong></td></tr>"; |
|
261 | + echo "<tr><td colspan='8'><strong>".sprintf(_("The following %s are in your %s %s:"), $uiElements->nomenclatureInst, $uiElements->nomenclatureFed, '<span style="color:green">'.$thefed->name.'</span>')."</strong></td></tr>"; |
|
262 | 262 | |
263 | 263 | // extract only pending invitations for *this* fed |
264 | 264 | $display_pendings = FALSE; |
@@ -283,9 +283,9 @@ discard block |
||
283 | 283 | // deployment status; need to dive into profiles for this |
284 | 284 | // show happy eyeballs if at least one profile is configured/showtime |
285 | 285 | echo "<td>"; |
286 | - echo ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_CONFIGURED ? "C" : "-" ) |
|
286 | + echo ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_CONFIGURED ? "C" : "-") |
|
287 | 287 | . " " |
288 | - . ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_SHOWTIME ? "V" : "-" ) |
|
288 | + . ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_SHOWTIME ? "V" : "-") |
|
289 | 289 | . " " |
290 | 290 | . "<span style='color:"; |
291 | 291 | switch ($idp_instance->maxOpenRoamingStatus()) { |
@@ -320,23 +320,23 @@ discard block |
||
320 | 320 | } |
321 | 321 | } |
322 | 322 | echo "<td style='vertical-align:top;'> |
323 | - <input type='hidden' name='inst' value='" . $index . "'>" . $idp_instance->name . (empty($listOfSilverbulletRealms) ? "" : "<ul><li>" ) . implode("</li><li>", $listOfSilverbulletRealms) . (empty($listOfSilverbulletRealms) ? "" : "</li><ul>" ) . " |
|
323 | + <input type='hidden' name='inst' value='" . $index."'>".$idp_instance->name.(empty($listOfSilverbulletRealms) ? "" : "<ul><li>").implode("</li><li>", $listOfSilverbulletRealms).(empty($listOfSilverbulletRealms) ? "" : "</li><ul>")." |
|
324 | 324 | </td>"; |
325 | 325 | // external DB sync, if configured as being necessary |
326 | 326 | if (\config\Master::DB['enforce-external-sync']) { |
327 | 327 | echo "<td style='display: ruby;'>"; |
328 | 328 | if ($readonly === FALSE) { |
329 | - echo "<form method='post' action='inc/manageDBLink.inc.php?inst_id=" . $idp_instance->identifier . "' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'> |
|
330 | - <button type='submit'>" . _("Manage DB Link") . "</button></form> "; |
|
329 | + echo "<form method='post' action='inc/manageDBLink.inc.php?inst_id=".$idp_instance->identifier."' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'> |
|
330 | + <button type='submit'>" . _("Manage DB Link")."</button></form> "; |
|
331 | 331 | } |
332 | 332 | switch ($idp_instance->getExternalDBSyncState()) { |
333 | 333 | case \core\IdP::EXTERNAL_DB_SYNCSTATE_NOTSUBJECTTOSYNCING: |
334 | 334 | break; |
335 | 335 | case \core\IdP::EXTERNAL_DB_SYNCSTATE_SYNCED: |
336 | - echo "<div class='acceptable'>" . _("Linked") . "</div>"; |
|
336 | + echo "<div class='acceptable'>"._("Linked")."</div>"; |
|
337 | 337 | break; |
338 | 338 | case \core\IdP::EXTERNAL_DB_SYNCSTATE_NOT_SYNCED: |
339 | - echo "<div class='notacceptable'>" . _("NOT linked") . "</div>"; |
|
339 | + echo "<div class='notacceptable'>"._("NOT linked")."</div>"; |
|
340 | 340 | |
341 | 341 | |
342 | 342 | break; |
@@ -349,9 +349,9 @@ discard block |
||
349 | 349 | echo "<td style='vertical-align: top;'>"; |
350 | 350 | if ($readonly === FALSE) { |
351 | 351 | echo "<div style='white-space: nowrap;'> |
352 | - <form method='post' action='inc/manageAdmins.inc.php?inst_id=" . $index . "' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'> |
|
352 | + <form method='post' action='inc/manageAdmins.inc.php?inst_id=" . $index."' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'> |
|
353 | 353 | <button type='submit'>" . |
354 | - _("Add/Remove Administrators") . " |
|
354 | + _("Add/Remove Administrators")." |
|
355 | 355 | </button> |
356 | 356 | </form> |
357 | 357 | </div>"; |
@@ -364,7 +364,7 @@ discard block |
||
364 | 364 | echo "<tr> |
365 | 365 | <td colspan='2'> |
366 | 366 | <strong>" . |
367 | - sprintf(_("Pending invitations in the %s:"), $uiElements->nomenclatureFed) . " |
|
367 | + sprintf(_("Pending invitations in the %s:"), $uiElements->nomenclatureFed)." |
|
368 | 368 | </strong> |
369 | 369 | </td> |
370 | 370 | </tr>"; |
@@ -372,16 +372,16 @@ discard block |
||
372 | 372 | if (strtoupper($oneinvite['country']) == strtoupper($thefed->tld)) { |
373 | 373 | echo "<tr> |
374 | 374 | <td>" . |
375 | - $oneinvite['name'] . " |
|
375 | + $oneinvite['name']." |
|
376 | 376 | </td> |
377 | 377 | <td>" . |
378 | - $oneinvite['mail'] . " |
|
378 | + $oneinvite['mail']." |
|
379 | 379 | </td> |
380 | 380 | <td colspan=2>"; |
381 | 381 | if ($readonly === FALSE) { |
382 | 382 | echo "<form method='post' action='overview_federation.php' accept-charset='UTF-8'> |
383 | - <input type='hidden' name='invitation_id' value='" . $oneinvite['token'] . "'/> |
|
384 | - <button class='delete' type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_DELETE . "'>" . _("Revoke Invitation") . "</button> " |
|
383 | + <input type='hidden' name='invitation_id' value='" . $oneinvite['token']."'/> |
|
384 | + <button class='delete' type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_DELETE."'>"._("Revoke Invitation")."</button> " |
|
385 | 385 | . sprintf(_("(expires %s)"), $oneinvite['expiry']) |
386 | 386 | . "</form>"; |
387 | 387 | } |
@@ -115,12 +115,12 @@ discard block |
||
115 | 115 | $this->name = $this->languageInstance->getLocalisedValue($this->getAttributes('general:instname')); |
116 | 116 | $eligibility = $this->eligibility(); |
117 | 117 | if (in_array(IdP::ELIGIBILITY_IDP, $eligibility) && in_array(IdP::ELIGIBILITY_SP, $eligibility)) { |
118 | - $eligType = IdP::TYPE_IDPSP . ""; |
|
118 | + $eligType = IdP::TYPE_IDPSP.""; |
|
119 | 119 | $this->type = $eligType; |
120 | 120 | } elseif (in_array(IdP::ELIGIBILITY_IDP, $eligibility)) { |
121 | - $eligType = IdP::TYPE_IDP . ""; |
|
121 | + $eligType = IdP::TYPE_IDP.""; |
|
122 | 122 | } else { |
123 | - $eligType = IdP::TYPE_SP . ""; |
|
123 | + $eligType = IdP::TYPE_SP.""; |
|
124 | 124 | } |
125 | 125 | $this->type = $eligType; |
126 | 126 | $this->loggerInstance->debug(3, "--- END Constructing new IdP object ... ---\n"); |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | */ |
135 | 135 | public function listProfiles(bool $activeOnly = FALSE) |
136 | 136 | { |
137 | - $query = "SELECT profile_id FROM profile WHERE inst_id = $this->identifier" . ($activeOnly ? " AND showtime = 1" : ""); |
|
137 | + $query = "SELECT profile_id FROM profile WHERE inst_id = $this->identifier".($activeOnly ? " AND showtime = 1" : ""); |
|
138 | 138 | $allProfiles = $this->databaseHandle->exec($query); |
139 | 139 | $returnarray = []; |
140 | 140 | // SELECT -> resource, not boolean |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | $returnarray[] = $oneProfile; |
145 | 145 | } |
146 | 146 | |
147 | - $this->loggerInstance->debug(4, "listProfiles: " . /** @scrutinizer ignore-type */ print_r($returnarray, true)); |
|
147 | + $this->loggerInstance->debug(4, "listProfiles: "./** @scrutinizer ignore-type */ print_r($returnarray, true)); |
|
148 | 148 | return $returnarray; |
149 | 149 | } |
150 | 150 | |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | */ |
157 | 157 | public function listDeployments(bool $activeOnly = FALSE) |
158 | 158 | { |
159 | - $query = "SELECT deployment_id FROM deployment WHERE inst_id = $this->identifier" . ($activeOnly ? " AND status = " . AbstractDeployment::ACTIVE : ""); |
|
159 | + $query = "SELECT deployment_id FROM deployment WHERE inst_id = $this->identifier".($activeOnly ? " AND status = ".AbstractDeployment::ACTIVE : ""); |
|
160 | 160 | $allDeployments = $this->databaseHandle->exec($query); |
161 | 161 | $returnarray = []; |
162 | 162 | // SELECT -> resource, not boolean |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | $returnarray[] = new DeploymentManaged($this, $deploymentQuery->deployment_id); |
165 | 165 | } |
166 | 166 | |
167 | - $this->loggerInstance->debug(4, "listDeployments: " . /** @scrutinizer ignore-type */ print_r($returnarray, true)); |
|
167 | + $this->loggerInstance->debug(4, "listDeployments: "./** @scrutinizer ignore-type */ print_r($returnarray, true)); |
|
168 | 168 | return $returnarray; |
169 | 169 | } |
170 | 170 | |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | $allProfiles = $this->databaseHandle->exec("SELECT MIN(openroaming) AS maxlevel FROM profile WHERE inst_id = $this->identifier"); |
198 | 198 | // SELECT yields a resource, not a boolean |
199 | 199 | while ($res = mysqli_fetch_object(/** @scrutinizer ignore-type */ $allProfiles)) { |
200 | - return (is_numeric($res->maxlevel) ? (int)$res->maxlevel : AbstractProfile::OVERALL_OPENROAMING_LEVEL_NO ); // insts without profiles should get a "NO" |
|
200 | + return (is_numeric($res->maxlevel) ? (int) $res->maxlevel : AbstractProfile::OVERALL_OPENROAMING_LEVEL_NO); // insts without profiles should get a "NO" |
|
201 | 201 | } |
202 | 202 | return AbstractProfile::OVERALL_OPENROAMING_LEVEL_NO; |
203 | 203 | } |
@@ -331,7 +331,7 @@ discard block |
||
331 | 331 | case AbstractProfile::PROFILETYPE_SILVERBULLET: |
332 | 332 | $theProfile = new ProfileSilverbullet($identifier, $this); |
333 | 333 | $theProfile->addSupportedEapMethod(new \core\common\EAP(\core\common\EAP::EAPTYPE_SILVERBULLET), 1); |
334 | - $theProfile->setRealm($this->identifier . "-" . $theProfile->identifier . "." . strtolower($this->federation) . strtolower(\config\ConfAssistant::SILVERBULLET['realm_suffix'])); |
|
334 | + $theProfile->setRealm($this->identifier."-".$theProfile->identifier.".".strtolower($this->federation).strtolower(\config\ConfAssistant::SILVERBULLET['realm_suffix'])); |
|
335 | 335 | return $theProfile; |
336 | 336 | default: |
337 | 337 | throw new Exception("This type of profile is unknown and can not be added."); |
@@ -473,7 +473,7 @@ discard block |
||
473 | 473 | public function getExternalDBId() |
474 | 474 | { |
475 | 475 | if (\config\ConfAssistant::CONSORTIUM['name'] == "eduroam" && isset(\config\ConfAssistant::CONSORTIUM['deployment-voodoo']) && \config\ConfAssistant::CONSORTIUM['deployment-voodoo'] == "Operations Team") { // SW: APPROVED |
476 | - $idQuery = $this->databaseHandle->exec("SELECT external_db_id FROM institution WHERE inst_id = $this->identifier AND external_db_syncstate = " . self::EXTERNAL_DB_SYNCSTATE_SYNCED); |
|
476 | + $idQuery = $this->databaseHandle->exec("SELECT external_db_id FROM institution WHERE inst_id = $this->identifier AND external_db_syncstate = ".self::EXTERNAL_DB_SYNCSTATE_SYNCED); |
|
477 | 477 | // SELECT -> it's a resource, not a boolean |
478 | 478 | if (mysqli_num_rows(/** @scrutinizer ignore-type */ $idQuery) == 0) { |
479 | 479 | return FALSE; |
@@ -539,16 +539,16 @@ discard block |
||
539 | 539 | } |
540 | 540 | foreach ($baseline as $lang => $value) { |
541 | 541 | if (!key_exists($lang, $newvalues)) { |
542 | - $retval[IdP::INSTNAME_CHANGED] .= "#[Language " . strtoupper($lang) . "] DELETED"; |
|
542 | + $retval[IdP::INSTNAME_CHANGED] .= "#[Language ".strtoupper($lang)."] DELETED"; |
|
543 | 543 | } else { |
544 | 544 | if ($value != $newvalues[$lang]) { |
545 | - $retval[IdP::INSTNAME_CHANGED] .= "#[Language " . strtoupper($lang) . "] CHANGED from '" . $baseline[$lang] . "' to '" . $newvalues[$lang] . "'"; |
|
545 | + $retval[IdP::INSTNAME_CHANGED] .= "#[Language ".strtoupper($lang)."] CHANGED from '".$baseline[$lang]."' to '".$newvalues[$lang]."'"; |
|
546 | 546 | } |
547 | 547 | } |
548 | 548 | } |
549 | 549 | foreach ($newvalues as $lang => $value) { |
550 | 550 | if (!key_exists($lang, $baseline)) { |
551 | - $retval[IdP::INSTNAME_CHANGED] .= "#[Language " . strtoupper($lang) . "] ADDED as '" . $value . "'"; |
|
551 | + $retval[IdP::INSTNAME_CHANGED] .= "#[Language ".strtoupper($lang)."] ADDED as '".$value."'"; |
|
552 | 552 | } |
553 | 553 | } |
554 | 554 | return $retval; |