@@ -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(""); |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | echo $uiElements->boxError(_("Realm check username cannot be configured: realm is missing!")); |
145 | 145 | } else { |
146 | 146 | $profile->setRealmcheckUser(true, $checkuser_name); |
147 | - echo $uiElements->boxOkay(sprintf(_("Special username for realm check is <strong>%s</strong>, the value is <strong>%s</strong>"), _("ON"), $checkuser_name . "@" . $realm)); |
|
147 | + echo $uiElements->boxOkay(sprintf(_("Special username for realm check is <strong>%s</strong>, the value is <strong>%s</strong>"), _("ON"), $checkuser_name."@".$realm)); |
|
148 | 148 | } |
149 | 149 | } else { |
150 | 150 | $profile->setRealmCheckUser(false); |
@@ -156,12 +156,12 @@ discard block |
||
156 | 156 | $extratext = ""; |
157 | 157 | if (!empty($realm)) { |
158 | 158 | if ($hint !== FALSE) { |
159 | - $extratext = " " . sprintf(_("The realm portion MUST be exactly '...@%s'."), $realm); |
|
159 | + $extratext = " ".sprintf(_("The realm portion MUST be exactly '...@%s'."), $realm); |
|
160 | 160 | } else { |
161 | - $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); |
|
161 | + $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); |
|
162 | 162 | } |
163 | 163 | } |
164 | - echo $uiElements->boxOkay(_("Where possible, supplicants will verify that username inputs contain a syntactically correct realm.") . $extratext); |
|
164 | + echo $uiElements->boxOkay(_("Where possible, supplicants will verify that username inputs contain a syntactically correct realm.").$extratext); |
|
165 | 165 | } else { |
166 | 166 | $profile->setInputVerificationPreference(false, false); |
167 | 167 | } |
@@ -193,30 +193,30 @@ discard block |
||
193 | 193 | echo $uiElements->boxOkay(_("Redirection is <strong>OFF</strong>")); |
194 | 194 | } |
195 | 195 | |
196 | - $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile " . $profile->identifier . " - attributes changed"); |
|
196 | + $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile ".$profile->identifier." - attributes changed"); |
|
197 | 197 | // reload the profile to ingest new CA and server names if any; before checking EAP completeness |
198 | 198 | $reloadedProfileNr1 = \core\ProfileFactory::instantiate($profile->identifier); |
199 | 199 | foreach (\core\common\EAP::listKnownEAPTypes() as $a) { |
200 | 200 | if ($a->getIntegerRep() == \core\common\EAP::INTEGER_SILVERBULLET) { // do not allow adding silverbullet via the backdoor |
201 | 201 | continue; |
202 | 202 | } |
203 | - if (isset($_POST[$a->getPrintableRep()]) && isset($_POST[$a->getPrintableRep() . "-priority"]) && is_numeric($_POST[$a->getPrintableRep() . "-priority"])) { |
|
204 | - $priority = (int) $_POST[$a->getPrintableRep() . "-priority"]; |
|
203 | + if (isset($_POST[$a->getPrintableRep()]) && isset($_POST[$a->getPrintableRep()."-priority"]) && is_numeric($_POST[$a->getPrintableRep()."-priority"])) { |
|
204 | + $priority = (int) $_POST[$a->getPrintableRep()."-priority"]; |
|
205 | 205 | // add EAP type to profile as requested, but ... |
206 | 206 | $reloadedProfileNr1->addSupportedEapMethod($a, $priority); |
207 | - $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile " . $reloadedProfileNr1->identifier . " - supported EAP types changed"); |
|
207 | + $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile ".$reloadedProfileNr1->identifier." - supported EAP types changed"); |
|
208 | 208 | // see if we can enable the EAP type, or if info is missing |
209 | 209 | $eapcompleteness = $reloadedProfileNr1->isEapTypeDefinitionComplete($a); |
210 | 210 | if ($eapcompleteness === true) { |
211 | - echo $uiElements->boxOkay(_("Supported EAP Type: ") . "<strong>" . $a->getPrintableRep() . "</strong>"); |
|
211 | + echo $uiElements->boxOkay(_("Supported EAP Type: ")."<strong>".$a->getPrintableRep()."</strong>"); |
|
212 | 212 | } else { |
213 | 213 | $warntext = ""; |
214 | 214 | if (is_array($eapcompleteness)) { |
215 | 215 | foreach ($eapcompleteness as $item) { |
216 | - $warntext .= "<strong>" . $uiElements->displayName($item) . "</strong> "; |
|
216 | + $warntext .= "<strong>".$uiElements->displayName($item)."</strong> "; |
|
217 | 217 | } |
218 | 218 | } |
219 | - 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.")); |
|
219 | + 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.")); |
|
220 | 220 | } |
221 | 221 | } |
222 | 222 | } |
@@ -227,23 +227,23 @@ discard block |
||
227 | 227 | if (count($significantChanges) > 0) { |
228 | 228 | $myInstOriginal = new \core\IdP($profile->institution); |
229 | 229 | // send a notification/alert mail to someone we know is in charge |
230 | - $text = _("To whom it may concern,") . "\n\n"; |
|
230 | + $text = _("To whom it may concern,")."\n\n"; |
|
231 | 231 | /// were made to the *Identity Provider* *LU* / integer number of IdP / (previously known as) Name |
232 | - $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"; |
|
232 | + $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"; |
|
233 | 233 | if (isset($significantChanges[\core\AbstractProfile::CA_CLASH_ADDED])) { |
234 | - $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"; |
|
235 | - $text .= $significantChanges[\core\AbstractProfile::CA_CLASH_ADDED] . "\n\n"; |
|
234 | + $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"; |
|
235 | + $text .= $significantChanges[\core\AbstractProfile::CA_CLASH_ADDED]."\n\n"; |
|
236 | 236 | } |
237 | 237 | if (isset($significantChanges[\core\AbstractProfile::CA_ADDED])) { |
238 | 238 | $text .= _("A new trusted root CA was added. The details are below:")."\n\n"; |
239 | - $text .= $significantChanges[\core\AbstractProfile::CA_ADDED] . "\n\n"; |
|
239 | + $text .= $significantChanges[\core\AbstractProfile::CA_ADDED]."\n\n"; |
|
240 | 240 | } |
241 | 241 | if (isset($significantChanges[\core\AbstractProfile::SERVERNAME_ADDED])) { |
242 | - $text .= _("A new acceptable server name for the authentication server was added. The details are below:") . "\n\n"; |
|
243 | - $text .= $significantChanges[\core\AbstractProfile::SERVERNAME_ADDED] . "\n\n"; |
|
242 | + $text .= _("A new acceptable server name for the authentication server was added. The details are below:")."\n\n"; |
|
243 | + $text .= $significantChanges[\core\AbstractProfile::SERVERNAME_ADDED]."\n\n"; |
|
244 | 244 | } |
245 | - $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"; |
|
246 | - $text .= _("Greetings, ") . "\n\n" . \config\Master::APPEARANCE['productname_long']; |
|
245 | + $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"; |
|
246 | + $text .= _("Greetings, ")."\n\n".\config\Master::APPEARANCE['productname_long']; |
|
247 | 247 | // (currently, send hard-wired to NRO - future: for linked insts, check eduroam DBv2 and send to registered admins directly) |
248 | 248 | $fed = new core\Federation($myInstOriginal->federation); |
249 | 249 | foreach ($fed->listFederationAdmins() as $id) { |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | <?php |
262 | 262 | if (count($reloadedProfileNr2->getEapMethodsinOrderOfPreference(1)) > 0) { |
263 | 263 | echo "<form method='post' action='overview_installers.php?inst_id=$my_inst->identifier&profile_id=$reloadedProfileNr2->identifier' accept-charset='UTF-8'> |
264 | - <button type='submit'>" . _("Continue to Installer Fine-Tuning and Download") . "</button> |
|
264 | + <button type='submit'>"._("Continue to Installer Fine-Tuning and Download")."</button> |
|
265 | 265 | </form>"; |
266 | 266 | } |
267 | 267 | echo $deco->footer(); |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | const DOWNLOAD_REDIRECT_CONTINUE = 1054; |
50 | 50 | const SB_GO_AWAY = 1060; |
51 | 51 | const SB_FRONTPAGE_BIGDOWNLOADBUTTON = 1061; |
52 | -const SB_FRONTPAGE_ROLLER_CUSTOMBUILT= 1062; |
|
52 | +const SB_FRONTPAGE_ROLLER_CUSTOMBUILT = 1062; |
|
53 | 53 | |
54 | 54 | |
55 | 55 | /** |
@@ -96,14 +96,14 @@ discard block |
||
96 | 96 | "PRIV" => "https://wballiance.com/openroaming/privacy-policy-2020/", |
97 | 97 | ] |
98 | 98 | ] as $consortium => $terms) { |
99 | - $this->templates[WELCOME_ABOARD_TERMS] .= sprintf("<p>" . _("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'], $terms['PRIV']); |
|
99 | + $this->templates[WELCOME_ABOARD_TERMS] .= sprintf("<p>"._("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'], $terms['PRIV']); |
|
100 | 100 | } |
101 | 101 | // this would actually be a checkbox which grays out the actual download button until ACKed |
102 | 102 | $this->templates[WELCOME_ABOARD_TERMS] .= "<p>"._("I agree to be bound by these Terms and Conditions.")."</p>"; |
103 | 103 | $this->templates[WELCOME_ABOARD_BACKTODOWNLOADS] = _("Back to downloads"); |
104 | 104 | $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']); |
105 | 105 | $this->templates[HEADING_TOPLEVEL_GREET] = sprintf(_("Welcome to %s"), \config\Master::APPEARANCE['productname']); |
106 | - $this->templates[HEADING_TOPLEVEL_PURPOSE] = sprintf(_("Connect your device to %s"),\config\ConfAssistant::CONSORTIUM['display_name']); |
|
106 | + $this->templates[HEADING_TOPLEVEL_PURPOSE] = sprintf(_("Connect your device to %s"), \config\ConfAssistant::CONSORTIUM['display_name']); |
|
107 | 107 | $this->templates[FRONTPAGE_ROLLER_EASY] = sprintf(_("%s installation made easy:"), \config\ConfAssistant::CONSORTIUM['display_name']); |
108 | 108 | $this->templates[FRONTPAGE_ROLLER_CUSTOMBUILT] = _("Custom built for your organisation"); |
109 | 109 | $this->templates[FRONTPAGE_BIGDOWNLOADBUTTON] = sprintf(_("Click here to download your %s installer"), \config\ConfAssistant::CONSORTIUM['display_name'], \config\ConfAssistant::CONSORTIUM['display_name']); |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | $find = array_keys($displayNames, $input, TRUE); |
146 | 146 | |
147 | 147 | if (count($find) == 0) { // this is an error! throw an Exception |
148 | - throw new \Exception("The translation of an option name was requested, but the option is not known to the system: " . htmlentities($input)); |
|
148 | + throw new \Exception("The translation of an option name was requested, but the option is not known to the system: ".htmlentities($input)); |
|
149 | 149 | } |
150 | 150 | \core\common\Entity::outOfThePotatoes(); |
151 | 151 | return $find[0]; |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | |
167 | 167 | foreach ($optionlist as $option) { |
168 | 168 | $type = $optioninfo->optionType($option['name']); |
169 | - if (preg_match('/^' . $class . '/', $option['name']) && $option['level'] == "$level") { |
|
169 | + if (preg_match('/^'.$class.'/', $option['name']) && $option['level'] == "$level") { |
|
170 | 170 | // all non-multilang attribs get this assignment ... |
171 | 171 | $language = ""; |
172 | 172 | $content = $option['value']; |
@@ -184,19 +184,19 @@ discard block |
||
184 | 184 | $locationMarkers[] = $coords; |
185 | 185 | break; |
186 | 186 | case "file": |
187 | - $retval .= "<tr><td>" . $this->displayName($option['name']) . "</td><td>$language</td><td>"; |
|
187 | + $retval .= "<tr><td>".$this->displayName($option['name'])."</td><td>$language</td><td>"; |
|
188 | 188 | switch ($option['name']) { |
189 | 189 | case "general:logo_file": |
190 | 190 | case "fed:logo_file": |
191 | - $retval .= $this->previewImageinHTML('ROWID-' . $option['level'] . '-' . $option['row']); |
|
191 | + $retval .= $this->previewImageinHTML('ROWID-'.$option['level'].'-'.$option['row']); |
|
192 | 192 | break; |
193 | 193 | case "eap:ca_file": |
194 | 194 | // fall-through intended: display both the same way |
195 | 195 | case "fed:minted_ca_file": |
196 | - $retval .= $this->previewCAinHTML('ROWID-' . $option['level'] . '-' . $option['row']); |
|
196 | + $retval .= $this->previewCAinHTML('ROWID-'.$option['level'].'-'.$option['row']); |
|
197 | 197 | break; |
198 | 198 | case "support:info_file": |
199 | - $retval .= $this->previewInfoFileinHTML('ROWID-' . $option['level'] . '-' . $option['row']); |
|
199 | + $retval .= $this->previewInfoFileinHTML('ROWID-'.$option['level'].'-'.$option['row']); |
|
200 | 200 | break; |
201 | 201 | default: |
202 | 202 | } |
@@ -206,10 +206,10 @@ discard block |
||
206 | 206 | // do not display the option at all; it gets auto-set by the ProfileSilverbullet constructor and doesn't have to be seen |
207 | 207 | break; |
208 | 208 | } |
209 | - $retval .= "<tr><td>" . $this->displayName($option['name']) . "</td><td>$language</td><td><strong>" . ($content == "on" ? _("on") : _("off") ) . "</strong></td></tr>"; |
|
209 | + $retval .= "<tr><td>".$this->displayName($option['name'])."</td><td>$language</td><td><strong>".($content == "on" ? _("on") : _("off"))."</strong></td></tr>"; |
|
210 | 210 | break; |
211 | 211 | default: |
212 | - $retval .= "<tr><td>" . $this->displayName($option['name']) . "</td><td>$language</td><td><strong>$content</strong></td></tr>"; |
|
212 | + $retval .= "<tr><td>".$this->displayName($option['name'])."</td><td>$language</td><td><strong>$content</strong></td></tr>"; |
|
213 | 213 | } |
214 | 214 | } |
215 | 215 | } |
@@ -218,11 +218,11 @@ discard block |
||
218 | 218 | $locationCount = 0; |
219 | 219 | foreach ($locationMarkers as $g) { |
220 | 220 | $locationCount++; |
221 | - $marker .= '<marker name="' . $locationCount . '" lat="' . $g['lat'] . '" lng="' . $g['lon'] . '" />'; |
|
221 | + $marker .= '<marker name="'.$locationCount.'" lat="'.$g['lat'].'" lng="'.$g['lon'].'" />'; |
|
222 | 222 | } |
223 | 223 | $marker .= '<\/markers>'; // some validator says this should be escaped |
224 | 224 | $jMarker = json_encode($locationMarkers); |
225 | - $retval .= '<tr><td><script>markers=\'' . $marker . '\'; jmarkers = \'' . $jMarker . '\';</script></td><td></td><td></td></tr>'; |
|
225 | + $retval .= '<tr><td><script>markers=\''.$marker.'\'; jmarkers = \''.$jMarker.'\';</script></td><td></td><td></td></tr>'; |
|
226 | 226 | } |
227 | 227 | \core\common\Entity::outOfThePotatoes(); |
228 | 228 | return $retval; |
@@ -238,11 +238,11 @@ discard block |
||
238 | 238 | \core\common\Entity::intoThePotatoes(); |
239 | 239 | $idpoptions = $myInst->getAttributes(); |
240 | 240 | $retval = "<div class='infobox'> |
241 | - <h2>" . sprintf(_("General %s details"), $this->nomenclatureInst) . "</h2> |
|
241 | + <h2>" . sprintf(_("General %s details"), $this->nomenclatureInst)."</h2> |
|
242 | 242 | <table> |
243 | 243 | <tr> |
244 | 244 | <td> |
245 | - " . _("Country:") . " |
|
245 | + " . _("Country:")." |
|
246 | 246 | </td> |
247 | 247 | <td> |
248 | 248 | </td> |
@@ -252,16 +252,16 @@ discard block |
||
252 | 252 | $retval .= $myFed->name; |
253 | 253 | $retval .= "</strong> |
254 | 254 | </td> |
255 | - </tr>" . $this->infoblock($idpoptions, "general", "IdP") . " |
|
255 | + </tr>" . $this->infoblock($idpoptions, "general", "IdP")." |
|
256 | 256 | </table> |
257 | 257 | </div>"; |
258 | 258 | |
259 | 259 | $blocks = [["support", _("Global Helpdesk Details")], ["media", _("Media Properties")]]; |
260 | 260 | foreach ($blocks as $block) { |
261 | 261 | $retval .= "<div class='infobox'> |
262 | - <h2>" . $block[1] . "</h2> |
|
262 | + <h2>" . $block[1]."</h2> |
|
263 | 263 | <table>" . |
264 | - $this->infoblock($idpoptions, $block[0], "IdP") . |
|
264 | + $this->infoblock($idpoptions, $block[0], "IdP"). |
|
265 | 265 | "</table> |
266 | 266 | </div>"; |
267 | 267 | } |
@@ -276,12 +276,12 @@ discard block |
||
276 | 276 | */ |
277 | 277 | private function displaySize(int $number) { |
278 | 278 | if ($number > 1024 * 1024) { |
279 | - return round($number / 1024 / 1024, 2) . " MiB"; |
|
279 | + return round($number / 1024 / 1024, 2)." MiB"; |
|
280 | 280 | } |
281 | 281 | if ($number > 1024) { |
282 | - return round($number / 1024, 2) . " KiB"; |
|
282 | + return round($number / 1024, 2)." KiB"; |
|
283 | 283 | } |
284 | - return $number . " B"; |
|
284 | + return $number." B"; |
|
285 | 285 | } |
286 | 286 | |
287 | 287 | /** |
@@ -335,7 +335,7 @@ discard block |
||
335 | 335 | $ref = $validator->databaseReference($cAReference); |
336 | 336 | $rawResult = UIElements::getBlobFromDB($ref['table'], $ref['rowindex'], FALSE); |
337 | 337 | if (is_bool($rawResult)) { // we didn't actually get a CA! |
338 | - $retval = "<div class='ca-summary'>" . _("There was an error while retrieving the certificate from the database!") . "</div>"; |
|
338 | + $retval = "<div class='ca-summary'>"._("There was an error while retrieving the certificate from the database!")."</div>"; |
|
339 | 339 | \core\common\Entity::outOfThePotatoes(); |
340 | 340 | return $retval; |
341 | 341 | } |
@@ -351,14 +351,14 @@ discard block |
||
351 | 351 | |
352 | 352 | $details['name'] = preg_replace('/(.)\/(.)/', "$1<br/>$2", $details['name']); |
353 | 353 | $details['name'] = preg_replace('/\//', "", $details['name']); |
354 | - $certstatus = ( $details['root'] == 1 ? "R" : "I"); |
|
355 | - $certTooltip = ( $details['root'] == 1 ? _("Root CA") : _("Intermediate CA")); |
|
354 | + $certstatus = ($details['root'] == 1 ? "R" : "I"); |
|
355 | + $certTooltip = ($details['root'] == 1 ? _("Root CA") : _("Intermediate CA")); |
|
356 | 356 | if ($details['ca'] == 0 && $details['root'] != 1) { |
357 | - $retval = "<div class='ca-summary' style='background-color:red'><div style='position:absolute; right: 0px; width:20px; height:20px; background-color:maroon; border-radius:10px; text-align: center;'><div style='padding-top:3px; font-weight:bold; color:#ffffff;'>S</div></div>" . _("This is a <strong>SERVER</strong> certificate!") . "<br/>" . $details['name'] . "</div>"; |
|
357 | + $retval = "<div class='ca-summary' style='background-color:red'><div style='position:absolute; right: 0px; width:20px; height:20px; background-color:maroon; border-radius:10px; text-align: center;'><div style='padding-top:3px; font-weight:bold; color:#ffffff;'>S</div></div>"._("This is a <strong>SERVER</strong> certificate!")."<br/>".$details['name']."</div>"; |
|
358 | 358 | \core\common\Entity::outOfThePotatoes(); |
359 | 359 | return $retval; |
360 | 360 | } |
361 | - $retval = "<div class='ca-summary' ><div style='position:absolute; right: 0px; width:20px; height:20px; background-color:#0000ff; border-radius:10px; text-align: center;'><div title='$certTooltip' style='padding-top:3px; font-weight:bold; color:#ffffff;'>$certstatus</div></div>" . $details['name'] . "</div>"; |
|
361 | + $retval = "<div class='ca-summary' ><div style='position:absolute; right: 0px; width:20px; height:20px; background-color:#0000ff; border-radius:10px; text-align: center;'><div title='$certTooltip' style='padding-top:3px; font-weight:bold; color:#ffffff;'>$certstatus</div></div>".$details['name']."</div>"; |
|
362 | 362 | \core\common\Entity::outOfThePotatoes(); |
363 | 363 | return $retval; |
364 | 364 | } |
@@ -371,7 +371,7 @@ discard block |
||
371 | 371 | */ |
372 | 372 | public function previewImageinHTML($imageReference) { |
373 | 373 | \core\common\Entity::intoThePotatoes(); |
374 | - $retval = "<img style='max-width:150px' src='inc/filepreview.php?id=" . $imageReference . "' alt='" . _("Preview of logo file") . "'/>"; |
|
374 | + $retval = "<img style='max-width:150px' src='inc/filepreview.php?id=".$imageReference."' alt='"._("Preview of logo file")."'/>"; |
|
375 | 375 | \core\common\Entity::outOfThePotatoes(); |
376 | 376 | return $retval; |
377 | 377 | } |
@@ -388,13 +388,13 @@ discard block |
||
388 | 388 | $ref = $validator->databaseReference($fileReference); |
389 | 389 | $fileBlob = UIElements::getBlobFromDB($ref['table'], $ref['rowindex'], FALSE); |
390 | 390 | if (is_bool($fileBlob)) { // we didn't actually get a file! |
391 | - $retval = "<div class='ca-summary'>" . _("There was an error while retrieving the file from the database!") . "</div>"; |
|
391 | + $retval = "<div class='ca-summary'>"._("There was an error while retrieving the file from the database!")."</div>"; |
|
392 | 392 | \core\common\Entity::outOfThePotatoes(); |
393 | 393 | return $retval; |
394 | 394 | } |
395 | 395 | $decodedFileBlob = base64_decode($fileBlob); |
396 | 396 | $fileinfo = new \finfo(); |
397 | - $retval = "<div class='ca-summary'>" . _("File exists") . " (" . $fileinfo->buffer($decodedFileBlob, FILEINFO_MIME_TYPE) . ", " . $this->displaySize(strlen($decodedFileBlob)) . ")<br/><a href='inc/filepreview.php?id=$fileReference'>" . _("Preview") . "</a></div>"; |
|
397 | + $retval = "<div class='ca-summary'>"._("File exists")." (".$fileinfo->buffer($decodedFileBlob, FILEINFO_MIME_TYPE).", ".$this->displaySize(strlen($decodedFileBlob)).")<br/><a href='inc/filepreview.php?id=$fileReference'>"._("Preview")."</a></div>"; |
|
398 | 398 | \core\common\Entity::outOfThePotatoes(); |
399 | 399 | return $retval; |
400 | 400 | } |
@@ -422,7 +422,7 @@ discard block |
||
422 | 422 | $retval .= "<tr><td>"; |
423 | 423 | } |
424 | 424 | $finalCaption = ($caption !== NULL ? $caption : $uiMessages[$level]['text']); |
425 | - $retval .= "<img class='icon' src='" . $uiMessages[$level]['icon'] . "' alt='" . $finalCaption . "' title='" . $finalCaption . "'/>"; |
|
425 | + $retval .= "<img class='icon' src='".$uiMessages[$level]['icon']."' alt='".$finalCaption."' title='".$finalCaption."'/>"; |
|
426 | 426 | if (!$omittabletags) { |
427 | 427 | $retval .= "</td><td>"; |
428 | 428 | } |
@@ -504,8 +504,8 @@ discard block |
||
504 | 504 | return ""; |
505 | 505 | } |
506 | 506 | |
507 | - $loggerInstance->debug(4, "Consortium logo is at: " . ROOT . "/web/resources/images/consortium_logo_large.png"); |
|
508 | - $logogd = imagecreatefrompng(ROOT . "/web/resources/images/consortium_logo_large.png"); |
|
507 | + $loggerInstance->debug(4, "Consortium logo is at: ".ROOT."/web/resources/images/consortium_logo_large.png"); |
|
508 | + $logogd = imagecreatefrompng(ROOT."/web/resources/images/consortium_logo_large.png"); |
|
509 | 509 | if ($logogd === FALSE) { // consortium logo is bogus; don't do anything |
510 | 510 | return ""; |
511 | 511 | } |
@@ -531,7 +531,7 @@ discard block |
||
531 | 531 | imagecolorallocate($whiteimage, 255, 255, 255); |
532 | 532 | // also make sure the initial placement is a multitude of 12; otherwise "two half" symbols might be affected |
533 | 533 | $targetplacementx = (int) ($symbolsize * round(($sizeinput[0] / 2 - ($targetwidth - $symbolsize + 1) / 2) / $symbolsize)); |
534 | - $targetplacementy = (int) ($symbolsize * round(($sizeinput[1] / 2 - ($targetheight - $symbolsize + 1 ) / 2) / $symbolsize)); |
|
534 | + $targetplacementy = (int) ($symbolsize * round(($sizeinput[1] / 2 - ($targetheight - $symbolsize + 1) / 2) / $symbolsize)); |
|
535 | 535 | imagecopyresized($inputgd, $whiteimage, $targetplacementx - $symbolsize, $targetplacementy - $symbolsize, 0, 0, $targetwidth + 2 * $symbolsize, $targetheight + 2 * $symbolsize, $targetwidth + 2 * $symbolsize, $targetheight + 2 * $symbolsize); |
536 | 536 | imagecopyresized($inputgd, $logogd, $targetplacementx, $targetplacementy, 0, 0, $targetwidth, $targetheight, $sizelogo[0], $sizelogo[1]); |
537 | 537 | ob_start(); |
@@ -581,9 +581,9 @@ discard block |
||
581 | 581 | $message = "Your configuration appears to be fine."; |
582 | 582 | break; |
583 | 583 | default: |
584 | - throw new Exception("The result code level " . $test->test_result['global'] . " is not defined!"); |
|
584 | + throw new Exception("The result code level ".$test->test_result['global']." is not defined!"); |
|
585 | 585 | } |
586 | - $out .= $this->boxFlexible($test->test_result['global'], "<br><strong>Test Summary</strong><br>" . $message . "<br>See below for details<br><hr>"); |
|
586 | + $out .= $this->boxFlexible($test->test_result['global'], "<br><strong>Test Summary</strong><br>".$message."<br>See below for details<br><hr>"); |
|
587 | 587 | foreach ($test->out as $testValue) { |
588 | 588 | foreach ($testValue as $o) { |
589 | 589 | $out .= $this->boxFlexible($o['level'], $o['message']); |
@@ -60,11 +60,11 @@ discard block |
||
60 | 60 | $location = $this->Gui->skinObject->findResourceUrl("IMAGES", "consortium_logo.png"); |
61 | 61 | if ($location !== FALSE) { |
62 | 62 | $retval .= "<div id='cat_logo'> |
63 | - <a href='" . \config\ConfAssistant::CONSORTIUM['homepage'] . "'><img id='logo_img' src='$location' alt='Consortium Logo'/></a> |
|
63 | + <a href='" . \config\ConfAssistant::CONSORTIUM['homepage']."'><img id='logo_img' src='$location' alt='Consortium Logo'/></a> |
|
64 | 64 | <span>Configuration Assistant Tool</span> |
65 | 65 | </div>"; |
66 | 66 | } |
67 | - $retval .= "<div id='motd'>" . (isset(\config\Master::APPEARANCE['MOTD']) ? \config\Master::APPEARANCE['MOTD'] : ' ') . "</div>"; |
|
67 | + $retval .= "<div id='motd'>".(isset(\config\Master::APPEARANCE['MOTD']) ? \config\Master::APPEARANCE['MOTD'] : ' ')."</div>"; |
|
68 | 68 | $loc2 = $this->Gui->skinObject->findResourceUrl("IMAGES", "icons/menu.png"); |
69 | 69 | if ($loc2 !== FALSE) { |
70 | 70 | $retval .= "<img id='hamburger' src='$loc2' alt='Menu'/>"; |
@@ -87,13 +87,13 @@ discard block |
||
87 | 87 | public function divUserWelcome() { |
88 | 88 | $retval = " |
89 | 89 | <div id='user_welcome'> <!-- this information is shown just before the download --> |
90 | - <strong>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_PAGEHEADING] . "</strong> |
|
90 | + <strong>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_PAGEHEADING]."</strong> |
|
91 | 91 | <p> |
92 | 92 | <span id='download_info'> |
93 | 93 | <!-- the empty href is dynamically exchanged with the actual path by jQuery at runtime --> |
94 | - " . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_DOWNLOAD] . " |
|
94 | + " . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_DOWNLOAD]." |
|
95 | 95 | </span> |
96 | - <p>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_HEADING] . " |
|
96 | + <p>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_HEADING]." |
|
97 | 97 | <br/> |
98 | 98 | <br/>"; |
99 | 99 | switch (\config\ConfAssistant::CONSORTIUM['name']) { |
@@ -104,12 +104,12 @@ discard block |
||
104 | 104 | } |
105 | 105 | $retval .= " |
106 | 106 | </p> |
107 | - <p>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_USAGE] . " |
|
108 | - <p>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_PROBLEMS] . " |
|
109 | - <p>" . (false ? $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_TERMS] : "") . " |
|
107 | + <p>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_USAGE]." |
|
108 | + <p>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_PROBLEMS]." |
|
109 | + <p>" . (false ? $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_TERMS] : "")." |
|
110 | 110 | </p> |
111 | 111 | <p> |
112 | - <a href='javascript:back_to_downloads()'><strong>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_BACKTODOWNLOADS] . "</strong></a> |
|
112 | + <a href='javascript:back_to_downloads()'><strong>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_BACKTODOWNLOADS]."</strong></a> |
|
113 | 113 | </p> |
114 | 114 | </div> <!-- id='user_welcomer_page' --> |
115 | 115 | "; |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | public function divSilverbullet() { |
125 | 125 | $retval = " |
126 | 126 | <div id='silverbullet'>" |
127 | - . $this->Gui->textTemplates->templates[user\SB_GO_AWAY] . |
|
127 | + . $this->Gui->textTemplates->templates[user\SB_GO_AWAY]. |
|
128 | 128 | "</div> |
129 | 129 | "; |
130 | 130 | return $retval; |
@@ -138,14 +138,14 @@ discard block |
||
138 | 138 | public function divTopWelcome() { |
139 | 139 | $retval = ''; |
140 | 140 | if (\config\ConfAssistant::CONSORTIUM['name'] == "eduroam" && isset(\config\ConfAssistant::CONSORTIUM['deployment-voodoo']) && \config\ConfAssistant::CONSORTIUM['deployment-voodoo'] == "Operations Team") { // SW: APPROVED |
141 | - $retval = "<br><div id='top_invite_ad'>" . $this->Gui->textTemplates->templates[user\FRONTPAGE_EDUROAM_AD] . "</div>"; |
|
141 | + $retval = "<br><div id='top_invite_ad'>".$this->Gui->textTemplates->templates[user\FRONTPAGE_EDUROAM_AD]."</div>"; |
|
142 | 142 | } |
143 | 143 | return " |
144 | 144 | <div id='welcome_top1'> |
145 | - " . $this->Gui->textTemplates->templates[user\HEADING_TOPLEVEL_GREET] . " |
|
145 | + " . $this->Gui->textTemplates->templates[user\HEADING_TOPLEVEL_GREET]." |
|
146 | 146 | </div> |
147 | 147 | <div id='top_invite'> |
148 | - " . $this->Gui->textTemplates->templates[user\HEADING_TOPLEVEL_PURPOSE] . $retval . " |
|
148 | + " . $this->Gui->textTemplates->templates[user\HEADING_TOPLEVEL_PURPOSE].$retval." |
|
149 | 149 | </div>"; |
150 | 150 | } |
151 | 151 | |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | $retval = " |
159 | 159 | <div id='roller'> |
160 | 160 | <div id='slides'> |
161 | - <span id='line1'>" . $this->Gui->textTemplates->templates[user\FRONTPAGE_ROLLER_EASY] . "</span> |
|
161 | + <span id='line1'>" . $this->Gui->textTemplates->templates[user\FRONTPAGE_ROLLER_EASY]."</span> |
|
162 | 162 | <span id='line2'></span> |
163 | 163 | <span id='line3'></span> |
164 | 164 | <span id='line4'>"; |
@@ -220,9 +220,9 @@ discard block |
||
220 | 220 | public function divProfiles() { |
221 | 221 | return " |
222 | 222 | <div id='profiles'> <!-- this is the profile selection filled during run time --> |
223 | - <div id='profiles_h' class='sub_h'>" . $this->Gui->textTemplates->templates[user\PROFILE_SELECTION] . " |
|
223 | + <div id='profiles_h' class='sub_h'>" . $this->Gui->textTemplates->templates[user\PROFILE_SELECTION]." |
|
224 | 224 | </div>" . |
225 | - "<select id='profile_list'></select><div id='profile_desc' class='profile_desc'></div>" . |
|
225 | + "<select id='profile_list'></select><div id='profile_desc' class='profile_desc'></div>". |
|
226 | 226 | "</div>"; |
227 | 227 | } |
228 | 228 | |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | public function divInstitution($selectButton = TRUE) { |
251 | 251 | $retval = "<div id='institution_name'> |
252 | 252 | <span id='inst_name_span'></span> <div id='inst_extra_text'></div><!-- this will be filled with the IdP name -->" . |
253 | - ($selectButton ? "<a id='select_another' class='signin' href=\"\">" . $this->Gui->textTemplates->templates[user\INSTITUTION_SELECTION] . "</a>" : "") . |
|
253 | + ($selectButton ? "<a id='select_another' class='signin' href=\"\">".$this->Gui->textTemplates->templates[user\INSTITUTION_SELECTION]."</a>" : ""). |
|
254 | 254 | "</div>"; |
255 | 255 | $retval .= $this->emptyImage('idp_logo', 'IdP Logo'); |
256 | 256 | return $retval; |
@@ -274,7 +274,7 @@ discard block |
||
274 | 274 | public function divOtherinstallers() { |
275 | 275 | $retval = " |
276 | 276 | <div class='sub_h'> |
277 | - <div id='other_installers'>" . $this->Gui->textTemplates->templates[user\DOWNLOAD_CHOOSE] . " |
|
277 | + <div id='other_installers'>" . $this->Gui->textTemplates->templates[user\DOWNLOAD_CHOOSE]." |
|
278 | 278 | <table id='device_list' style='padding:0px;'>"; |
279 | 279 | |
280 | 280 | foreach ($this->Gui->listDevices(isset($_REQUEST['hidden']) ? $_REQUEST['hidden'] : 0) as $group => $deviceGroup) { |
@@ -282,18 +282,18 @@ discard block |
||
282 | 282 | $deviceIndex = 0; |
283 | 283 | |
284 | 284 | $imgTag = ""; |
285 | - $imgLocation = $this->Gui->skinObject->findResourceUrl("IMAGES", "vendorlogo/" . $group . ".png"); |
|
285 | + $imgLocation = $this->Gui->skinObject->findResourceUrl("IMAGES", "vendorlogo/".$group.".png"); |
|
286 | 286 | if ($imgLocation !== FALSE) { |
287 | - $imgTag = '<img src="' . $imgLocation . '" alt="' . $group . ' Device" title="' . $group . ' Device">'; |
|
287 | + $imgTag = '<img src="'.$imgLocation.'" alt="'.$group.' Device" title="'.$group.' Device">'; |
|
288 | 288 | } |
289 | - $retval .= '<tbody><tr><td class="vendor" rowspan="' . $groupIndex . '">' . $imgTag . '</td>'; |
|
289 | + $retval .= '<tbody><tr><td class="vendor" rowspan="'.$groupIndex.'">'.$imgTag.'</td>'; |
|
290 | 290 | foreach ($deviceGroup as $d => $D) { |
291 | 291 | if ($deviceIndex) { |
292 | 292 | $retval .= '<tr>'; |
293 | 293 | } |
294 | - $retval .= "<td><button id='" . $d . "'>" . $D['display'] . "</button>" |
|
295 | - . "<div class='device_info' id='info_" . $d . "'></div></td>" |
|
296 | - . "<td><button class='more_info_b' id='info_b_" . $d . "'>i</button></td></tr>\n"; |
|
294 | + $retval .= "<td><button id='".$d."'>".$D['display']."</button>" |
|
295 | + . "<div class='device_info' id='info_".$d."'></div></td>" |
|
296 | + . "<td><button class='more_info_b' id='info_b_".$d."'>i</button></td></tr>\n"; |
|
297 | 297 | $deviceIndex++; |
298 | 298 | } |
299 | 299 | $retval .= "</tbody>"; |
@@ -313,15 +313,15 @@ discard block |
||
313 | 313 | * @return string |
314 | 314 | */ |
315 | 315 | public function divGuessOs($operatingSystem) { |
316 | - $vendorlogo = $this->Gui->skinObject->findResourceUrl("IMAGES", "vendorlogo/" . $operatingSystem['group'] . ".png"); |
|
316 | + $vendorlogo = $this->Gui->skinObject->findResourceUrl("IMAGES", "vendorlogo/".$operatingSystem['group'].".png"); |
|
317 | 317 | $vendorstyle = ""; |
318 | 318 | if ($vendorlogo !== FALSE) { |
319 | - $vendorstyle = "style='background-image:url(\"" . $vendorlogo . "\")'"; |
|
319 | + $vendorstyle = "style='background-image:url(\"".$vendorlogo."\")'"; |
|
320 | 320 | } |
321 | 321 | $deleteIcon = $this->Gui->skinObject->findResourceUrl("IMAGES", "icons/delete_32.png"); |
322 | 322 | $deleteImg = ""; |
323 | 323 | if ($deleteIcon !== FALSE) { |
324 | - $deleteImg = "<img id='cross_icon_" . $operatingSystem['device'] . "' src='$deleteIcon' >"; |
|
324 | + $deleteImg = "<img id='cross_icon_".$operatingSystem['device']."' src='$deleteIcon' >"; |
|
325 | 325 | } |
326 | 326 | return " |
327 | 327 | <div class='sub_h' id='guess_os'> |
@@ -329,23 +329,23 @@ discard block |
||
329 | 329 | <table id='browser'> |
330 | 330 | <tr> |
331 | 331 | <td> |
332 | - <button class='large_button guess_os' $vendorstyle id='g_" . $operatingSystem['device'] . "'> |
|
332 | + <button class='large_button guess_os' $vendorstyle id='g_".$operatingSystem['device']."'> |
|
333 | 333 | $deleteImg |
334 | - <div class='download_button_text_1' id='download_button_header_" . $operatingSystem['device'] . "'> " . $this->Gui->textTemplates->templates[user\DOWNLOAD_MESSAGE] . " |
|
334 | + <div class='download_button_text_1' id='download_button_header_".$operatingSystem['device']."'> ".$this->Gui->textTemplates->templates[user\DOWNLOAD_MESSAGE]." |
|
335 | 335 | </div> |
336 | 336 | <div class='download_button_text'>" . |
337 | - $operatingSystem['display'] . " |
|
337 | + $operatingSystem['display']." |
|
338 | 338 | </div> |
339 | 339 | </button> |
340 | - <div class='device_info' id='info_g_" . $operatingSystem['device'] . "'></div> |
|
340 | + <div class='device_info' id='info_g_" . $operatingSystem['device']."'></div> |
|
341 | 341 | </td> |
342 | 342 | <td style='vertical-align:top'> |
343 | - <button class='more_info_b large_button' id='g_info_b_" . $operatingSystem['device'] . "'>i</button> |
|
343 | + <button class='more_info_b large_button' id='g_info_b_" . $operatingSystem['device']."'>i</button> |
|
344 | 344 | </td> |
345 | 345 | </tr> |
346 | 346 | </table> <!-- id='browser' --> |
347 | 347 | <div class='sub_h'> |
348 | - <a href='javascript:other_installers()'>" . $this->Gui->textTemplates->templates[user\DOWNLOAD_CHOOSE] . "</a> |
|
348 | + <a href='javascript:other_installers()'>" . $this->Gui->textTemplates->templates[user\DOWNLOAD_CHOOSE]."</a> |
|
349 | 349 | </div> |
350 | 350 | </div> <!-- id='guess_os' -->"; |
351 | 351 | } |
@@ -366,7 +366,7 @@ discard block |
||
366 | 366 | </td>"; |
367 | 367 | |
368 | 368 | if (!empty(\config\Master::APPEARANCE['privacy_notice_url'])) { |
369 | - $retval .= "<td><a href='" . \config\Master::APPEARANCE['privacy_notice_url'] . "'>" . sprintf(_("%s Privacy Notice"), \config\ConfAssistant::CONSORTIUM['display_name']) . "</a></td>"; |
|
369 | + $retval .= "<td><a href='".\config\Master::APPEARANCE['privacy_notice_url']."'>".sprintf(_("%s Privacy Notice"), \config\ConfAssistant::CONSORTIUM['display_name'])."</a></td>"; |
|
370 | 370 | } |
371 | 371 | $retval .= "<td>"; |
372 | 372 | if (\config\ConfAssistant::CONSORTIUM['name'] == "eduroam" && isset(\config\ConfAssistant::CONSORTIUM['deployment-voodoo']) && \config\ConfAssistant::CONSORTIUM['deployment-voodoo'] == "Operations Team") { |
@@ -174,13 +174,13 @@ |
||
174 | 174 | 'db' => 'radacct', |
175 | 175 | 'user' => 'someuser', |
176 | 176 | 'pass' => 'somepass', |
177 | - 'readonly' => TRUE,], |
|
177 | + 'readonly' => TRUE, ], |
|
178 | 178 | 'RADIUS_2' => [ |
179 | 179 | 'host' => 'auth-2.hosted.eduroam.org', |
180 | 180 | 'db' => 'radacct', |
181 | 181 | 'user' => 'someuser', |
182 | 182 | 'pass' => 'somepass', |
183 | - 'readonly' => TRUE,], |
|
183 | + 'readonly' => TRUE, ], |
|
184 | 184 | ]; |
185 | 185 | |
186 | 186 | /** |
@@ -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 | if (\config\ConfAssistant::PRELOAD_IDPS) { |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | otherdata = j.otherdata; |
122 | 122 | if(! result) { |
123 | 123 | alert("<?php $cat->javaScriptEscapedEcho(_("no matching data found"))?>"); |
124 | - document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']), '/') . '/' ?>'; |
|
124 | + document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']), '/').'/' ?>'; |
|
125 | 125 | } |
126 | 126 | j = j.data; |
127 | 127 | n = j.length; |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | result = j1.status; |
259 | 259 | if(! result) { |
260 | 260 | alert("<?php $cat->javaScriptEscapedEcho(_("no matching data found")) ?>"); |
261 | - document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']), '/') . '/' ?>'; |
|
261 | + document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']), '/').'/' ?>'; |
|
262 | 262 | } |
263 | 263 | j = j1.data; |
264 | 264 | if(j.description !== undefined && j.description) { |
@@ -269,7 +269,7 @@ discard block |
||
269 | 269 | $("#profile_desc").hide(); |
270 | 270 | $("#profile_desc").text(''); |
271 | 271 | } |
272 | - updateTxt = '<span class="user_info"><?php $cat->javaScriptEscapedEcho(_("This entry was last updated at:"));?>'+' '+j.last_changed+'</span><br/>'; |
|
272 | + updateTxt = '<span class="user_info"><?php $cat->javaScriptEscapedEcho(_("This entry was last updated at:")); ?>'+' '+j.last_changed+'</span><br/>'; |
|
273 | 273 | if(j.local_url !== undefined && j.local_url) |
274 | 274 | txt = txt+'<span class="user_info"><?php $cat->javaScriptEscapedEcho(_("WWW:")); ?> <a href="'+j.local_url+'" target="_blank">'+j.local_url+'</a></span><br/>'; |
275 | 275 | if(j.local_email !== undefined && j.local_email) |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | * @return string HTML code <table> |
86 | 86 | */ |
87 | 87 | public function prefilledOptionTable(string $attributePrefix) { |
88 | - $retval = "<table id='expandable_$attributePrefix" . "_options'>"; |
|
88 | + $retval = "<table id='expandable_$attributePrefix"."_options'>"; |
|
89 | 89 | |
90 | 90 | $prepopulate = []; |
91 | 91 | foreach ($this->listOfOptions as $existingAttribute) { |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | $prepopulate[] = $existingAttribute; |
94 | 94 | } |
95 | 95 | } |
96 | - if (is_array($prepopulate) && ( count($prepopulate) > 0 || $attributePrefix == "device-specific" || $attributePrefix == "eap-specific" )) { // editing... fill with values |
|
96 | + if (is_array($prepopulate) && (count($prepopulate) > 0 || $attributePrefix == "device-specific" || $attributePrefix == "eap-specific")) { // editing... fill with values |
|
97 | 97 | $retval .= $this->addOptionEdit($attributePrefix, $prepopulate); |
98 | 98 | } else { |
99 | 99 | $retval .= $this->addOptionNew($attributePrefix); |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | $optiontypearray = $optioninfo->optionType($option['name']); |
126 | 126 | $loggerInstance = new \core\common\Logging(); |
127 | 127 | $loggerInstance->debug(5, "About to execute optiontext with PREFILL!\n"); |
128 | - $retval .= $this->optiontext([$option['name']], ($optiontypearray["type"] == "file" ? 'ROWID-' . $option['level'] . '-' . $option['row'] : $option['value']), $option['lang']); |
|
128 | + $retval .= $this->optiontext([$option['name']], ($optiontypearray["type"] == "file" ? 'ROWID-'.$option['level'].'-'.$option['row'] : $option['value']), $option['lang']); |
|
129 | 129 | } |
130 | 130 | } |
131 | 131 | return $retval; |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | $descriptions["media:force_proxy"] = sprintf(_("The format of this option is: IPv4|IPv6|hostname:port . Forcing your users through a content filter of your own is a significant invasion of user self-determination. It also has technical issues. Please throughly read the discussion at %s before specifying a proxy with this option. This feature is currently experimental and only has an effect in Apple installers."), "https://github.com/GEANT/CAT/issues/96"); |
195 | 195 | $descriptions["managedsp:realmforvlan"] = sprintf(_("If you are also using %s, then your own realm is automatically tagged with the VLAN you choose, there is no need to add it here manually."), \core\ProfileSilverbullet::PRODUCTNAME); |
196 | 196 | $descriptions["media:openroaming"] = |
197 | - sprintf(_("By opting in to OpenRoaming, you agree to be bound by the %s."),"eduroam Ecosystem Broker OpenRoaming Identity Provider Policy"). |
|
197 | + sprintf(_("By opting in to OpenRoaming, you agree to be bound by the %s."), "eduroam Ecosystem Broker OpenRoaming Identity Provider Policy"). |
|
198 | 198 | " ". |
199 | 199 | sprintf(_("Note that your requirement to inform users about the OpenRoaming End User Terms and Conditions is fulfilled when directing your end users to the %s download portal for installer download. Any other means of providing the installers needs to present this information via its own channel."), \config\Master::APPEARANCE['productname']). |
200 | 200 | " ". |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | if (!isset($descriptions[$input])) { |
206 | 206 | return ""; |
207 | 207 | } |
208 | - return "<span class='tooltip' id='S$rowid-tooltip-$input' style='display:" . ($isVisible ? "block" : "none") . "' onclick='alert(\"" . $descriptions[$input] . "\")'><img src='../resources/images/icons/question-mark-icon.png" . "'></span>"; |
|
208 | + return "<span class='tooltip' id='S$rowid-tooltip-$input' style='display:".($isVisible ? "block" : "none")."' onclick='alert(\"".$descriptions[$input]."\")'><img src='../resources/images/icons/question-mark-icon.png"."'></span>"; |
|
209 | 209 | } |
210 | 210 | |
211 | 211 | /** |
@@ -218,18 +218,18 @@ discard block |
||
218 | 218 | */ |
219 | 219 | private function selectElement($rowid, $list) { |
220 | 220 | $jsmagic = "onchange=' |
221 | - if (/#ML#/.test(document.getElementById(\"option-S" . $rowid . "-select\").value)) { |
|
221 | + if (/#ML#/.test(document.getElementById(\"option-S" . $rowid."-select\").value)) { |
|
222 | 222 | document.getElementById(\"S$rowid-input-langselect\").style.display = \"block\"; |
223 | 223 | } else { |
224 | 224 | document.getElementById(\"S$rowid-input-langselect\").style.display = \"none\"; |
225 | 225 | }"; |
226 | 226 | foreach (array_keys(OptionDisplay::HTML_DATATYPE_TEXTS) as $key) { |
227 | - $jsmagic .= "if (/#" . $key . "#/.test(document.getElementById(\"option-S" . $rowid . "-select\").value)) { |
|
228 | - document.getElementById(\"S$rowid-input-file\").style.display = \"" . ($key == \core\Options::TYPECODE_FILE ? "block" : "none") . "\"; |
|
229 | - document.getElementById(\"S$rowid-input-text\").style.display = \"" . ($key == \core\Options::TYPECODE_TEXT ? "block" : "none") . "\"; |
|
230 | - document.getElementById(\"S$rowid-input-string\").style.display = \"" . ($key == \core\Options::TYPECODE_STRING ? "block" : "none") . "\"; |
|
231 | - document.getElementById(\"S$rowid-input-boolean\").style.display = \"" . ($key == \core\Options::TYPECODE_BOOLEAN ? "block" : "none") . "\"; |
|
232 | - document.getElementById(\"S$rowid-input-integer\").style.display = \"" . ($key == \core\Options::TYPECODE_INTEGER ? "block" : "none") . "\"; |
|
227 | + $jsmagic .= "if (/#".$key."#/.test(document.getElementById(\"option-S".$rowid."-select\").value)) { |
|
228 | + document.getElementById(\"S$rowid-input-file\").style.display = \"".($key == \core\Options::TYPECODE_FILE ? "block" : "none")."\"; |
|
229 | + document.getElementById(\"S$rowid-input-text\").style.display = \"".($key == \core\Options::TYPECODE_TEXT ? "block" : "none")."\"; |
|
230 | + document.getElementById(\"S$rowid-input-string\").style.display = \"".($key == \core\Options::TYPECODE_STRING ? "block" : "none")."\"; |
|
231 | + document.getElementById(\"S$rowid-input-boolean\").style.display = \"".($key == \core\Options::TYPECODE_BOOLEAN ? "block" : "none")."\"; |
|
232 | + document.getElementById(\"S$rowid-input-integer\").style.display = \"".($key == \core\Options::TYPECODE_INTEGER ? "block" : "none")."\"; |
|
233 | 233 | } |
234 | 234 | "; |
235 | 235 | // hide all tooltips (each is a <span>, and there are no other <span>s) |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | $value = array_shift($list); |
261 | 261 | $listtype = $optioninfo->optionType($value); |
262 | 262 | $retval .= $uiElements->displayName($value); |
263 | - $retval .= "<input type='hidden' name='option[S$rowid]' value='$value#" . $listtype["type"] . "#" . $listtype["flag"] . "#'/>"; |
|
263 | + $retval .= "<input type='hidden' name='option[S$rowid]' value='$value#".$listtype["type"]."#".$listtype["flag"]."#'/>"; |
|
264 | 264 | $activelisttype = $listtype; |
265 | 265 | $tooltips = $this->tooltip($rowid, $value, TRUE); |
266 | 266 | break; |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | $retval .= "<select id='option-S$rowid-select' name='option[S$rowid]' $jsmagic>"; |
269 | 269 | foreach ($list as $value) { |
270 | 270 | $listtype = $optioninfo->optionType($value); |
271 | - $retval .= "<option id='option-S$rowid-v-$value' value='$value#" . $listtype["type"] . "#" . $listtype["flag"] . "#' "; |
|
271 | + $retval .= "<option id='option-S$rowid-v-$value' value='$value#".$listtype["type"]."#".$listtype["flag"]."#' "; |
|
272 | 272 | if ($iterator == $this->optionIterator) { |
273 | 273 | $retval .= "selected='selected'"; |
274 | 274 | $activelisttype = $listtype; |
@@ -276,7 +276,7 @@ discard block |
||
276 | 276 | } else { |
277 | 277 | $tooltips .= $this->tooltip($rowid, $value, FALSE); |
278 | 278 | } |
279 | - $retval .= ">" . $uiElements->displayName($value) . "</option>"; |
|
279 | + $retval .= ">".$uiElements->displayName($value)."</option>"; |
|
280 | 280 | $iterator++; |
281 | 281 | } |
282 | 282 | |
@@ -301,9 +301,9 @@ discard block |
||
301 | 301 | */ |
302 | 302 | private function selectLanguage($rowid, $makeVisible) { |
303 | 303 | \core\common\Entity::intoThePotatoes(); |
304 | - $retval = "<select style='display:" . ($makeVisible ? "block" : "none") . "' name='value[S$rowid-lang]' id='S" . $rowid . "-input-langselect'> |
|
305 | - <option value='' name='select_language' selected>" . _("select language") . "</option> |
|
306 | - <option value='C' name='all_languages'>" . _("default/other languages") . "</option>"; |
|
304 | + $retval = "<select style='display:".($makeVisible ? "block" : "none")."' name='value[S$rowid-lang]' id='S".$rowid."-input-langselect'> |
|
305 | + <option value='' name='select_language' selected>" . _("select language")."</option> |
|
306 | + <option value='C' name='all_languages'>" . _("default/other languages")."</option>"; |
|
307 | 307 | foreach (\config\Master::LANGUAGES as $langindex => $possibleLang) { |
308 | 308 | $thislang = $possibleLang['display']; |
309 | 309 | $retval .= "<option value='$langindex' name='$langindex'>$thislang</option>"; |
@@ -331,7 +331,7 @@ discard block |
||
331 | 331 | private function inputFields($rowid, $activetype) { |
332 | 332 | $retval = ""; |
333 | 333 | foreach (OptionDisplay::HTML_DATATYPE_TEXTS as $key => $type) { |
334 | - $retval .= "<" . $type['html'] . " style='display:" . ($activetype['type'] == $key ? "block" : "none") . "' name='value[S$rowid-$key]' id='S" . $rowid . "-input-" . $key . "'" . $type['tail'] . ">"; |
|
334 | + $retval .= "<".$type['html']." style='display:".($activetype['type'] == $key ? "block" : "none")."' name='value[S$rowid-$key]' id='S".$rowid."-input-".$key."'".$type['tail'].">"; |
|
335 | 335 | } |
336 | 336 | return $retval; |
337 | 337 | } |
@@ -346,11 +346,11 @@ discard block |
||
346 | 346 | private function noPrefillText(int $rowid, array $list) { |
347 | 347 | // first column: the <select> element with the names of options and their field-toggling JS magic |
348 | 348 | $selectorInfo = $this->selectElement($rowid, $list); |
349 | - $retval = "<td>" . $selectorInfo["TEXT"] . "</td>"; |
|
349 | + $retval = "<td>".$selectorInfo["TEXT"]."</td>"; |
|
350 | 350 | // second column: the <select> element for language selection - only visible if the active option is multi-lang |
351 | - $retval .= "<td>" . $this->selectLanguage($rowid, $selectorInfo['ACTIVE']['flag'] == "ML") . "</td>"; |
|
351 | + $retval .= "<td>".$this->selectLanguage($rowid, $selectorInfo['ACTIVE']['flag'] == "ML")."</td>"; |
|
352 | 352 | // third column: the actual input fields; the data type of the active option is visible, all others hidden |
353 | - $retval .= "<td>" . $this->inputFields($rowid, $selectorInfo['ACTIVE']) . "</td>"; |
|
353 | + $retval .= "<td>".$this->inputFields($rowid, $selectorInfo['ACTIVE'])."</td>"; |
|
354 | 354 | return $retval; |
355 | 355 | } |
356 | 356 | |
@@ -373,20 +373,20 @@ discard block |
||
373 | 373 | $retval .= "<td>"; |
374 | 374 | $uiElements = new UIElements(); |
375 | 375 | $listtype = $optioninfo->optionType($optionName); |
376 | - $retval .= "<span style='display:flex;'>" . $uiElements->displayName($optionName); |
|
377 | - $retval .= $this->tooltip($rowid, $optionName, TRUE) . "</span>"; |
|
378 | - $retval .= "<input type='hidden' id='option-S$rowid-select' name='option[S$rowid]' value='$optionName#" . $listtype["type"] . "#" . $listtype["flag"] . "#' ></td>"; |
|
376 | + $retval .= "<span style='display:flex;'>".$uiElements->displayName($optionName); |
|
377 | + $retval .= $this->tooltip($rowid, $optionName, TRUE)."</span>"; |
|
378 | + $retval .= "<input type='hidden' id='option-S$rowid-select' name='option[S$rowid]' value='$optionName#".$listtype["type"]."#".$listtype["flag"]."#' ></td>"; |
|
379 | 379 | |
380 | 380 | // language tag if any |
381 | 381 | $retval .= "<td>"; |
382 | 382 | if ($listtype["flag"] == "ML") { |
383 | 383 | |
384 | - $language = "(" . strtoupper($optionLang) . ")"; |
|
384 | + $language = "(".strtoupper($optionLang).")"; |
|
385 | 385 | if ($optionLang == 'C') { |
386 | 386 | $language = _("(default/other languages)"); |
387 | 387 | } |
388 | 388 | $retval .= $language; |
389 | - $retval .= "<input type='hidden' name='value[S$rowid-lang]' id='S" . $rowid . "-input-langselect' value='" . $optionLang . "' style='display:block'>"; |
|
389 | + $retval .= "<input type='hidden' name='value[S$rowid-lang]' id='S".$rowid."-input-langselect' value='".$optionLang."' style='display:block'>"; |
|
390 | 390 | } |
391 | 391 | $retval .= "</td>"; |
392 | 392 | // attribute content |
@@ -396,12 +396,12 @@ discard block |
||
396 | 396 | case \core\Options::TYPECODE_COORDINATES: |
397 | 397 | $this->allLocationCount = $this->allLocationCount + 1; |
398 | 398 | // display of the locations varies by map provider |
399 | - $classname = "\web\lib\admin\Map" . \config\ConfAssistant::MAPPROVIDER['PROVIDER']; |
|
399 | + $classname = "\web\lib\admin\Map".\config\ConfAssistant::MAPPROVIDER['PROVIDER']; |
|
400 | 400 | $link = $classname::optionListDisplayCode($optionValue, $this->allLocationCount); |
401 | - $retval .= "<input readonly style='display:none' type='text' name='value[S$rowid-" . \core\Options::TYPECODE_TEXT . "]' id='S$rowid-input-text' value='$optionValue'>$link"; |
|
401 | + $retval .= "<input readonly style='display:none' type='text' name='value[S$rowid-".\core\Options::TYPECODE_TEXT."]' id='S$rowid-input-text' value='$optionValue'>$link"; |
|
402 | 402 | break; |
403 | 403 | case \core\Options::TYPECODE_FILE: |
404 | - $retval .= "<input readonly type='text' name='value[S$rowid-" . \core\Options::TYPECODE_STRING . "]' id='S" . $rowid . "-input-string' style='display:none' value='" . urlencode($optionValue) . "'>"; |
|
404 | + $retval .= "<input readonly type='text' name='value[S$rowid-".\core\Options::TYPECODE_STRING."]' id='S".$rowid."-input-string' style='display:none' value='".urlencode($optionValue)."'>"; |
|
405 | 405 | $uiElements = new UIElements(); |
406 | 406 | switch ($optionName) { |
407 | 407 | case "eap:ca_file": |
@@ -431,7 +431,7 @@ discard block |
||
431 | 431 | if ($listtype['type'] == \core\Options::TYPECODE_BOOLEAN) {// only modify in this one case |
432 | 432 | $displayedVariant = ($optionValue == "on" ? _("on") : _("off")); |
433 | 433 | } |
434 | - $retval .= "<strong>$displayedVariant</strong><input type='hidden' name='value[S$rowid-" . $listtype['type'] . "]' id='S" . $rowid . "-input-" . $listtype["type"] . "' value=\"" . htmlspecialchars($optionValue) . "\" style='display:block'>"; |
|
434 | + $retval .= "<strong>$displayedVariant</strong><input type='hidden' name='value[S$rowid-".$listtype['type']."]' id='S".$rowid."-input-".$listtype["type"]."' value=\"".htmlspecialchars($optionValue)."\" style='display:block'>"; |
|
435 | 435 | break; |
436 | 436 | default: |
437 | 437 | // this should never happen! |
@@ -476,10 +476,10 @@ discard block |
||
476 | 476 | <td> |
477 | 477 | <button type='button' class='delete' onclick='"; |
478 | 478 | if ($prefillValue !== NULL && $item == "general:geo_coordinates") { |
479 | - $funcname = "Map" . \config\ConfAssistant::MAPPROVIDER['PROVIDER'] . 'DeleteCoord'; |
|
480 | - $retval .= 'if (typeof ' . $funcname . ' === "function") { ' . $funcname . '(' . $this->allLocationCount . '); } '; |
|
479 | + $funcname = "Map".\config\ConfAssistant::MAPPROVIDER['PROVIDER'].'DeleteCoord'; |
|
480 | + $retval .= 'if (typeof '.$funcname.' === "function") { '.$funcname.'('.$this->allLocationCount.'); } '; |
|
481 | 481 | } |
482 | - $retval .= 'deleteOption("option-S' . $rowid . '")'; |
|
482 | + $retval .= 'deleteOption("option-S'.$rowid.'")'; |
|
483 | 483 | $retval .= "'>-</button> |
484 | 484 | </td> |
485 | 485 | </tr>"; |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | $this->test_result = []; |
130 | 130 | $this->test_result['global'] = 0; |
131 | 131 | // parse the schema file to find out the number of expected rows... |
132 | - $schema = file(dirname(dirname(__FILE__)) . "/schema/schema.sql"); |
|
132 | + $schema = file(dirname(dirname(__FILE__))."/schema/schema.sql"); |
|
133 | 133 | $this->profileOptionCount = 0; |
134 | 134 | $passedTheWindmill = FALSE; |
135 | 135 | foreach ($schema as $schemaLine) { |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | { |
157 | 157 | $this->out[$test] = []; |
158 | 158 | $this->name = $test; |
159 | - $m_name = 'test' . $test; |
|
159 | + $m_name = 'test'.$test; |
|
160 | 160 | $this->test_result[$test] = 0; |
161 | 161 | if (!method_exists($this, $m_name)) { |
162 | 162 | $this->storeTestResult(\core\common\Entity::L_ERROR, "Configuration error, no test configured for <strong>$test</strong>."); |
@@ -269,9 +269,9 @@ discard block |
||
269 | 269 | private function testPhp() |
270 | 270 | { |
271 | 271 | if (version_compare(phpversion(), $this->needversionPHP, '>=')) { |
272 | - $this->storeTestResult(\core\common\Entity::L_OK, "<strong>PHP</strong> is sufficiently recent. You are running " . phpversion() . "."); |
|
272 | + $this->storeTestResult(\core\common\Entity::L_OK, "<strong>PHP</strong> is sufficiently recent. You are running ".phpversion()."."); |
|
273 | 273 | } else { |
274 | - $this->storeTestResult(\core\common\Entity::L_ERROR, "<strong>PHP</strong> is too old. We need at least $this->needversionPHP, but you only have " . phpversion() . "."); |
|
274 | + $this->storeTestResult(\core\common\Entity::L_ERROR, "<strong>PHP</strong> is too old. We need at least $this->needversionPHP, but you only have ".phpversion()."."); |
|
275 | 275 | } |
276 | 276 | } |
277 | 277 | |
@@ -284,12 +284,12 @@ discard block |
||
284 | 284 | */ |
285 | 285 | private function runConstantsTest($config) |
286 | 286 | { |
287 | - $templateConfig = file_get_contents(ROOT . "/config/$config-template.php"); |
|
288 | - $newTemplateConfig = preg_replace("/class *$config/", "class $config" . "_template", $templateConfig); |
|
289 | - file_put_contents(ROOT . "/var/tmp/$config-template.php", $newTemplateConfig); |
|
290 | - include(ROOT . "/var/tmp/$config-template.php"); |
|
291 | - unlink(ROOT . "/var/tmp/$config-template.php"); |
|
292 | - $rft = new \ReflectionClass("\config\\$config" . "_template"); |
|
287 | + $templateConfig = file_get_contents(ROOT."/config/$config-template.php"); |
|
288 | + $newTemplateConfig = preg_replace("/class *$config/", "class $config"."_template", $templateConfig); |
|
289 | + file_put_contents(ROOT."/var/tmp/$config-template.php", $newTemplateConfig); |
|
290 | + include(ROOT."/var/tmp/$config-template.php"); |
|
291 | + unlink(ROOT."/var/tmp/$config-template.php"); |
|
292 | + $rft = new \ReflectionClass("\config\\$config"."_template"); |
|
293 | 293 | $templateConstants = $rft->getConstants(); |
294 | 294 | $failResults = []; |
295 | 295 | foreach ($templateConstants as $constant => $value) { |
@@ -306,7 +306,7 @@ discard block |
||
306 | 306 | * Check if all required constants are set |
307 | 307 | */ |
308 | 308 | private function testConfigConstants() { |
309 | - set_error_handler(function ($severity, $message, $file, $line) { |
|
309 | + set_error_handler(function($severity, $message, $file, $line) { |
|
310 | 310 | throw new \ErrorException($message, $severity, $severity, $file, $line); |
311 | 311 | }); |
312 | 312 | |
@@ -317,7 +317,7 @@ discard block |
||
317 | 317 | $failCount = $failCount + count($failResults); |
318 | 318 | if (count($failResults) > 0) { |
319 | 319 | $this->storeTestResult(\core\common\Entity::L_ERROR, |
320 | - "<strong>The following constants are not set:</strong>" . implode(', ', $failResults)); |
|
320 | + "<strong>The following constants are not set:</strong>".implode(', ', $failResults)); |
|
321 | 321 | } |
322 | 322 | } |
323 | 323 | |
@@ -341,7 +341,7 @@ discard block |
||
341 | 341 | $this->storeTestResult(\core\common\Entity::L_OK, "<strong>cat_base_url</strong> set correctly"); |
342 | 342 | } else { |
343 | 343 | $rootFromScript = $m[1] === '' ? '/' : $m[1]; |
344 | - $this->storeTestResult(\core\common\Entity::L_ERROR, "<strong>cat_base_url</strong> is set to <strong>" . \config\Master::PATHS['cat_base_url'] . "</strong> and should be <strong>$rootFromScript</strong>"); |
|
344 | + $this->storeTestResult(\core\common\Entity::L_ERROR, "<strong>cat_base_url</strong> is set to <strong>".\config\Master::PATHS['cat_base_url']."</strong> and should be <strong>$rootFromScript</strong>"); |
|
345 | 345 | } |
346 | 346 | } |
347 | 347 | |
@@ -362,7 +362,7 @@ discard block |
||
362 | 362 | if (count($probeReturns) == 0) { |
363 | 363 | $this->storeTestResult(common\Entity::L_OK, "All configured RADIUS/UDP probes are reachable."); |
364 | 364 | } else { |
365 | - $this->storeTestResult(common\Entity::L_ERROR, "The following RADIUS probes are NOT reachable: " . implode(', ', $probeReturns)); |
|
365 | + $this->storeTestResult(common\Entity::L_ERROR, "The following RADIUS probes are NOT reachable: ".implode(', ', $probeReturns)); |
|
366 | 366 | } |
367 | 367 | } |
368 | 368 | |
@@ -380,9 +380,9 @@ discard block |
||
380 | 380 | $SSPconfig = \SimpleSAML\Configuration::getInstance(); |
381 | 381 | $sspVersion = explode('.', $SSPconfig->getVersion()); |
382 | 382 | if ((int) $sspVersion[0] >= $this->needversionSSP['major'] && (int) $sspVersion[1] >= $this->needversionSSP['minor']) { |
383 | - $this->storeTestResult(\core\common\Entity::L_OK, "<strong>simpleSAMLphp</strong> is sufficently recent. You are running " . implode('.', $sspVersion)); |
|
383 | + $this->storeTestResult(\core\common\Entity::L_OK, "<strong>simpleSAMLphp</strong> is sufficently recent. You are running ".implode('.', $sspVersion)); |
|
384 | 384 | } else { |
385 | - $this->storeTestResult(\core\common\Entity::L_ERROR, "<strong>simpleSAMLphp</strong> is too old. We need at least " . implode('.', $this->needversionSSP)); |
|
385 | + $this->storeTestResult(\core\common\Entity::L_ERROR, "<strong>simpleSAMLphp</strong> is too old. We need at least ".implode('.', $this->needversionSSP)); |
|
386 | 386 | } |
387 | 387 | } |
388 | 388 | } |
@@ -440,8 +440,8 @@ discard block |
||
440 | 440 | */ |
441 | 441 | private function testLogdir() |
442 | 442 | { |
443 | - if (fopen(\config\Master::PATHS['logdir'] . "/debug.log", "a") == FALSE) { |
|
444 | - $this->storeTestResult(\core\common\Entity::L_WARN, "Log files in <strong>" . \config\Master::PATHS['logdir'] . "</strong> are not writable!"); |
|
443 | + if (fopen(\config\Master::PATHS['logdir']."/debug.log", "a") == FALSE) { |
|
444 | + $this->storeTestResult(\core\common\Entity::L_WARN, "Log files in <strong>".\config\Master::PATHS['logdir']."</strong> are not writable!"); |
|
445 | 445 | } else { |
446 | 446 | $this->storeTestResult(\core\common\Entity::L_OK, "Log directory is writable."); |
447 | 447 | } |
@@ -473,7 +473,7 @@ discard block |
||
473 | 473 | } |
474 | 474 | |
475 | 475 | $classname = 'Imagick'; |
476 | - if (class_exists('\\' . $classname)) { |
|
476 | + if (class_exists('\\'.$classname)) { |
|
477 | 477 | $this->storeTestResult(\core\common\Entity::L_OK, "PHP extension <strong>Imagick</strong> is installed."); |
478 | 478 | } else { |
479 | 479 | $this->storeTestResult(\core\common\Entity::L_ERROR, "PHP extension <strong>Imagick</strong> not found! Get it from your distribution or <a href='http://pecl.php.net/package/imagick'>here</a>."); |
@@ -569,7 +569,7 @@ discard block |
||
569 | 569 | { |
570 | 570 | $A = $this->getExecPath('openssl'); |
571 | 571 | if ($A['exec'] != "") { |
572 | - $t = exec($A['exec'] . ' version'); |
|
572 | + $t = exec($A['exec'].' version'); |
|
573 | 573 | if ($A['exec_is'] == "EXPLICIT") { |
574 | 574 | $this->storeTestResult(\core\common\Entity::L_OK, "<strong>$t</strong> was found and is configured explicitly in your config."); |
575 | 575 | } else { |
@@ -597,14 +597,14 @@ discard block |
||
597 | 597 | } |
598 | 598 | $A = $this->getExecPath('makensis'); |
599 | 599 | if ($A['exec'] != "") { |
600 | - $t = exec($A['exec'] . ' -VERSION'); |
|
600 | + $t = exec($A['exec'].' -VERSION'); |
|
601 | 601 | if ($A['exec_is'] == "EXPLICIT") { |
602 | 602 | $this->storeTestResult(\core\common\Entity::L_OK, "<strong>makensis $t</strong> was found and is configured explicitly in your config."); |
603 | 603 | } else { |
604 | 604 | $this->storeTestResult(\core\common\Entity::L_WARN, "<strong>makensis $t</strong> was found, but is not configured with an absolute path in your config."); |
605 | 605 | } |
606 | 606 | $outputArray = []; |
607 | - exec($A['exec'] . ' -HELP', $outputArray); |
|
607 | + exec($A['exec'].' -HELP', $outputArray); |
|
608 | 608 | $t1 = count(preg_grep('/INPUTCHARSET/', $outputArray)); |
609 | 609 | if ($t1 == 1 && \config\ConfAssistant::NSIS_VERSION == 2) { |
610 | 610 | $this->storeTestResult(\core\common\Entity::L_ERROR, "Declared NSIS_VERSION does not seem to match the file pointed to by PATHS['makensis']!"); |
@@ -634,7 +634,7 @@ discard block |
||
634 | 634 | $NSIS_Module_status = []; |
635 | 635 | foreach ($this->NSISModules as $module) { |
636 | 636 | unset($out); |
637 | - exec(\config\ConfAssistant::PATHS['makensis'] . " -V1 '-X!include $module' '-XOutFile $exe' '-XSection X' '-XSectionEnd'", $out, $retval); |
|
637 | + exec(\config\ConfAssistant::PATHS['makensis']." -V1 '-X!include $module' '-XOutFile $exe' '-XSection X' '-XSectionEnd'", $out, $retval); |
|
638 | 638 | if ($retval > 0) { |
639 | 639 | $NSIS_Module_status[$module] = 0; |
640 | 640 | } else { |
@@ -701,8 +701,8 @@ discard block |
||
701 | 701 | $locales = shell_exec("locale -a"); |
702 | 702 | $allthere = ""; |
703 | 703 | foreach (\config\Master::LANGUAGES as $onelanguage) { |
704 | - if (preg_match("/" . $onelanguage['locale'] . "/", $locales) == 0) { |
|
705 | - $allthere .= $onelanguage['locale'] . " "; |
|
704 | + if (preg_match("/".$onelanguage['locale']."/", $locales) == 0) { |
|
705 | + $allthere .= $onelanguage['locale']." "; |
|
706 | 706 | } |
707 | 707 | } |
708 | 708 | if ($allthere == "") { |
@@ -716,47 +716,47 @@ discard block |
||
716 | 716 | ["SETTING" => \config\Master::APPEARANCE['from-mail'], |
717 | 717 | "DEFVALUE" => "[email protected]", |
718 | 718 | "COMPLAINTSTRING" => "APPEARANCE/from-mail ", |
719 | - "REQUIRED" => FALSE,], |
|
719 | + "REQUIRED" => FALSE, ], |
|
720 | 720 | ["SETTING" => \config\Master::APPEARANCE['support-contact']['url'], |
721 | 721 | "DEFVALUE" => "[email protected]?body=Only%20English%20language%20please!", |
722 | 722 | "COMPLAINTSTRING" => "APPEARANCE/support-contact/url ", |
723 | - "REQUIRED" => FALSE,], |
|
723 | + "REQUIRED" => FALSE, ], |
|
724 | 724 | ["SETTING" => \config\Master::APPEARANCE['support-contact']['display'], |
725 | 725 | "DEFVALUE" => "[email protected]", |
726 | 726 | "COMPLAINTSTRING" => "APPEARANCE/support-contact/display ", |
727 | - "REQUIRED" => FALSE,], |
|
727 | + "REQUIRED" => FALSE, ], |
|
728 | 728 | ["SETTING" => \config\Master::APPEARANCE['support-contact']['developer-mail'], |
729 | 729 | "DEFVALUE" => "[email protected]", |
730 | 730 | "COMPLAINTSTRING" => "APPEARANCE/support-contact/mail ", |
731 | - "REQUIRED" => FALSE,], |
|
731 | + "REQUIRED" => FALSE, ], |
|
732 | 732 | ["SETTING" => \config\Master::APPEARANCE['abuse-mail'], |
733 | 733 | "DEFVALUE" => "[email protected]", |
734 | 734 | "COMPLAINTSTRING" => "APPEARANCE/abuse-mail ", |
735 | - "REQUIRED" => FALSE,], |
|
735 | + "REQUIRED" => FALSE, ], |
|
736 | 736 | ["SETTING" => \config\Master::APPEARANCE['MOTD'], |
737 | 737 | "DEFVALUE" => "Release Candidate. All bugs to be shot on sight!", |
738 | 738 | "COMPLAINTSTRING" => "APPEARANCE/MOTD ", |
739 | - "REQUIRED" => FALSE,], |
|
739 | + "REQUIRED" => FALSE, ], |
|
740 | 740 | ["SETTING" => \config\Master::APPEARANCE['webcert_CRLDP'], |
741 | 741 | "DEFVALUE" => ['list', 'of', 'CRL', 'pointers'], |
742 | 742 | "COMPLAINTSTRING" => "APPEARANCE/webcert_CRLDP ", |
743 | - "REQUIRED" => TRUE,], |
|
743 | + "REQUIRED" => TRUE, ], |
|
744 | 744 | ["SETTING" => \config\Master::APPEARANCE['webcert_OCSP'], |
745 | 745 | "DEFVALUE" => ['list', 'of', 'OCSP', 'pointers'], |
746 | 746 | "COMPLAINTSTRING" => "APPEARANCE/webcert_OCSP ", |
747 | - "REQUIRED" => TRUE,], |
|
747 | + "REQUIRED" => TRUE, ], |
|
748 | 748 | ["SETTING" => \config\Master::DB['INST']['host'], |
749 | 749 | "DEFVALUE" => "db.host.example", |
750 | 750 | "COMPLAINTSTRING" => "DB/INST ", |
751 | - "REQUIRED" => TRUE,], |
|
751 | + "REQUIRED" => TRUE, ], |
|
752 | 752 | ["SETTING" => \config\Master::DB['INST']['host'], |
753 | 753 | "DEFVALUE" => "db.host.example", |
754 | 754 | "COMPLAINTSTRING" => "DB/USER ", |
755 | - "REQUIRED" => TRUE,], |
|
755 | + "REQUIRED" => TRUE, ], |
|
756 | 756 | ["SETTING" => \config\Master::DB['EXTERNAL']['host'], |
757 | 757 | "DEFVALUE" => "customerdb.otherhost.example", |
758 | 758 | "COMPLAINTSTRING" => "DB/EXTERNAL ", |
759 | - "REQUIRED" => FALSE,], |
|
759 | + "REQUIRED" => FALSE, ], |
|
760 | 760 | ]; |
761 | 761 | |
762 | 762 | /** |
@@ -785,11 +785,11 @@ discard block |
||
785 | 785 | if (isset(\config\Diagnostics::RADIUSTESTS['TLS-clientcerts'])) { |
786 | 786 | foreach (\config\Diagnostics::RADIUSTESTS['TLS-clientcerts'] as $cadata) { |
787 | 787 | foreach ($cadata['certificates'] as $cert_files) { |
788 | - if (file_get_contents(ROOT . "/config/cli-certs/" . $cert_files['public']) === FALSE) { |
|
789 | - $defaultvalues .= "CERTIFICATE/" . $cert_files['public'] . " "; |
|
788 | + if (file_get_contents(ROOT."/config/cli-certs/".$cert_files['public']) === FALSE) { |
|
789 | + $defaultvalues .= "CERTIFICATE/".$cert_files['public']." "; |
|
790 | 790 | } |
791 | - if (file_get_contents(ROOT . "/config/cli-certs/" . $cert_files['private']) === FALSE) { |
|
792 | - $defaultvalues .= "CERTIFICATE/" . $cert_files['private'] . " "; |
|
791 | + if (file_get_contents(ROOT."/config/cli-certs/".$cert_files['private']) === FALSE) { |
|
792 | + $defaultvalues .= "CERTIFICATE/".$cert_files['private']." "; |
|
793 | 793 | } |
794 | 794 | } |
795 | 795 | } |
@@ -882,14 +882,14 @@ discard block |
||
882 | 882 | if ($global_no_cache) { |
883 | 883 | foreach ($Devs as $dev => $D) { |
884 | 884 | if (empty($D['options']['no_cache']) || $D['options']['no_cache'] != 0) { |
885 | - $no_cache_dev .= $dev . " "; |
|
885 | + $no_cache_dev .= $dev." "; |
|
886 | 886 | $no_cache_dev_count++; |
887 | 887 | } |
888 | 888 | } |
889 | 889 | } else { |
890 | 890 | foreach ($Devs as $dev => $D) { |
891 | 891 | if (!empty($D['options']['no_cache']) && $D['options']['no_cache'] != 0) { |
892 | - $no_cache_dev .= $dev . " "; |
|
892 | + $no_cache_dev .= $dev." "; |
|
893 | 893 | $no_cache_dev_count++; |
894 | 894 | } |
895 | 895 | } |
@@ -928,13 +928,13 @@ discard block |
||
928 | 928 | $mail->isHTML(FALSE); |
929 | 929 | $mail->CharSet = 'UTF-8'; |
930 | 930 | $mail->From = \config\Master::APPEARANCE['from-mail']; |
931 | - $mail->FromName = \config\Master::APPEARANCE['productname'] . " Invitation System"; |
|
931 | + $mail->FromName = \config\Master::APPEARANCE['productname']." Invitation System"; |
|
932 | 932 | $mail->addAddress(\config\Master::APPEARANCE['abuse-mail']); |
933 | 933 | $mail->Subject = "testing CAT configuration mail"; |
934 | 934 | $mail->Body = "Testing CAT mailing\n"; |
935 | 935 | $sent = $mail->send(); |
936 | 936 | if ($sent) { |
937 | - $this->storeTestResult(\core\common\Entity::L_OK, "mailer settings appear to be working, check " . \config\Master::APPEARANCE['abuse-mail'] . " mailbox if the message was receiced."); |
|
937 | + $this->storeTestResult(\core\common\Entity::L_OK, "mailer settings appear to be working, check ".\config\Master::APPEARANCE['abuse-mail']." mailbox if the message was receiced."); |
|
938 | 938 | } else { |
939 | 939 | $this->storeTestResult(\core\common\Entity::L_ERROR, "mailer settings failed, check the Config::MAILSETTINGS"); |
940 | 940 | } |
@@ -179,15 +179,15 @@ discard block |
||
179 | 179 | <key>PayloadDescription</key> |
180 | 180 | <string>$tagline</string> |
181 | 181 | <key>PayloadDisplayName</key> |
182 | - <string>" . \config\ConfAssistant::CONSORTIUM['display_name'] . "</string> |
|
182 | + <string>".\config\ConfAssistant::CONSORTIUM['display_name']."</string> |
|
183 | 183 | <key>PayloadIdentifier</key> |
184 | - <string>" . self::IPHONE_PAYLOAD_PREFIX . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang</string> |
|
184 | + <string>" . self::IPHONE_PAYLOAD_PREFIX.".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang</string> |
|
185 | 185 | <key>PayloadOrganization</key> |
186 | - <string>" . htmlspecialchars(iconv("UTF-8", "UTF-8//IGNORE", $this->attributes['general:instname'][0]), ENT_XML1, 'UTF-8') . ( $this->attributes['internal:profile_count'][0] > 1 ? " (" . htmlspecialchars(iconv("UTF-8", "UTF-8//IGNORE", $this->attributes['profile:name'][0]), ENT_XML1, 'UTF-8') . ")" : "") . "</string> |
|
186 | + <string>".htmlspecialchars(iconv("UTF-8", "UTF-8//IGNORE", $this->attributes['general:instname'][0]), ENT_XML1, 'UTF-8').($this->attributes['internal:profile_count'][0] > 1 ? " (".htmlspecialchars(iconv("UTF-8", "UTF-8//IGNORE", $this->attributes['profile:name'][0]), ENT_XML1, 'UTF-8').")" : "")."</string> |
|
187 | 187 | <key>PayloadType</key> |
188 | 188 | <string>Configuration</string> |
189 | 189 | <key>PayloadUUID</key> |
190 | - <string>" . \core\common\Entity::uuid('', self::IPHONE_PAYLOAD_PREFIX . $this->massagedConsortium . $this->massagedCountry . $this->massagedInst . $this->massagedProfile) . "</string> |
|
190 | + <string>" . \core\common\Entity::uuid('', self::IPHONE_PAYLOAD_PREFIX.$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile)."</string> |
|
191 | 191 | <key>PayloadVersion</key> |
192 | 192 | <integer>1</integer>"; |
193 | 193 | \core\common\Entity::outOfThePotatoes(); |
@@ -219,21 +219,21 @@ discard block |
||
219 | 219 | { |
220 | 220 | \core\common\Entity::intoThePotatoes(); |
221 | 221 | if (isset($this->attributes['support:info_file'])) { |
222 | - return MobileconfigSuperclass::BUFFER_CONSENT_PRE . htmlspecialchars(iconv("UTF-8", "UTF-8//TRANSLIT", $this->attributes['support:info_file'][0]), ENT_XML1, 'UTF-8') . MobileconfigSuperclass::BUFFER_CONSENT_POST; |
|
222 | + return MobileconfigSuperclass::BUFFER_CONSENT_PRE.htmlspecialchars(iconv("UTF-8", "UTF-8//TRANSLIT", $this->attributes['support:info_file'][0]), ENT_XML1, 'UTF-8').MobileconfigSuperclass::BUFFER_CONSENT_POST; |
|
223 | 223 | } |
224 | 224 | if ($this->attributes['internal:verify_userinput_suffix'][0] != 0) { |
225 | 225 | if ($this->attributes['internal:hint_userinput_suffix'][0] != 0) { |
226 | - $retval = MobileconfigSuperclass::BUFFER_CONSENT_PRE . sprintf(_("Important Notice: your username MUST end exactly with '...@%s' !"), $this->attributes['internal:realm'][0]) . MobileconfigSuperclass::BUFFER_CONSENT_POST; |
|
226 | + $retval = MobileconfigSuperclass::BUFFER_CONSENT_PRE.sprintf(_("Important Notice: your username MUST end exactly with '...@%s' !"), $this->attributes['internal:realm'][0]).MobileconfigSuperclass::BUFFER_CONSENT_POST; |
|
227 | 227 | \core\common\Entity::outOfThePotatoes(); |
228 | 228 | return $retval; |
229 | 229 | } else { |
230 | 230 | if (strlen($this->attributes['internal:realm'][0]) > 0) { |
231 | 231 | /// note space between variable and exclamation mark - makes sure users don't mistakenly think the exclamation mark is part of the required username! |
232 | - $retval = MobileconfigSuperclass::BUFFER_CONSENT_PRE . sprintf(_("Important Notice: your username MUST contain an '@' and end with ...%s !"), $this->attributes['internal:realm'][0]) . MobileconfigSuperclass::BUFFER_CONSENT_POST; |
|
232 | + $retval = MobileconfigSuperclass::BUFFER_CONSENT_PRE.sprintf(_("Important Notice: your username MUST contain an '@' and end with ...%s !"), $this->attributes['internal:realm'][0]).MobileconfigSuperclass::BUFFER_CONSENT_POST; |
|
233 | 233 | \core\common\Entity::outOfThePotatoes(); |
234 | 234 | return $retval; |
235 | 235 | } |
236 | - $retval = MobileconfigSuperclass::BUFFER_CONSENT_PRE . _("Important Notice: your username MUST be in the form of xxx@yyy where the yyy is a common suffix identifying your Identity Provider. Please find out what to use there and enter the username in the correct format.") . MobileconfigSuperclass::BUFFER_CONSENT_POST; |
|
236 | + $retval = MobileconfigSuperclass::BUFFER_CONSENT_PRE._("Important Notice: your username MUST be in the form of xxx@yyy where the yyy is a common suffix identifying your Identity Provider. Please find out what to use there and enter the username in the correct format.").MobileconfigSuperclass::BUFFER_CONSENT_POST; |
|
237 | 237 | \core\common\Entity::outOfThePotatoes(); |
238 | 238 | return $retval; |
239 | 239 | } |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | // also escape htmlspecialchars |
258 | 258 | // not all names and profiles have a name, so be prepared |
259 | 259 | |
260 | - $this->loggerInstance->debug(5, "List of available attributes: " . var_export($this->attributes, TRUE)); |
|
260 | + $this->loggerInstance->debug(5, "List of available attributes: ".var_export($this->attributes, TRUE)); |
|
261 | 261 | |
262 | 262 | $this->instName = $this->attributes['general:instname'][0] ?? _("Unnamed Organisation"); |
263 | 263 | $this->profileName = $this->attributes['profile:name'][0] ?? _("Unnamed Profile"); |
@@ -299,7 +299,7 @@ discard block |
||
299 | 299 | |
300 | 300 | file_put_contents('installer_profile', $outputXml); |
301 | 301 | |
302 | - $fileName = $this->installerBasename . '.mobileconfig'; |
|
302 | + $fileName = $this->installerBasename.'.mobileconfig'; |
|
303 | 303 | |
304 | 304 | if (!$this->sign) { |
305 | 305 | rename("installer_profile", $fileName); |
@@ -307,7 +307,7 @@ discard block |
||
307 | 307 | return $fileName; |
308 | 308 | } |
309 | 309 | // still here? Then we are signing. |
310 | - $signing = system($this->sign . " installer_profile '$fileName' > /dev/null"); |
|
310 | + $signing = system($this->sign." installer_profile '$fileName' > /dev/null"); |
|
311 | 311 | if ($signing === FALSE) { |
312 | 312 | $this->loggerInstance->debug(2, "Signing the mobileconfig installer $fileName FAILED!\n"); |
313 | 313 | } |
@@ -326,19 +326,19 @@ discard block |
||
326 | 326 | \core\common\Entity::intoThePotatoes(); |
327 | 327 | $ssidCount = count($this->attributes['internal:SSID']); |
328 | 328 | $certCount = count($this->attributes['internal:CAs'][0]); |
329 | - $out = "<p>" . _("For best results, please use the built-in browser (Safari) to open the configuration file.") . "</p>"; |
|
329 | + $out = "<p>"._("For best results, please use the built-in browser (Safari) to open the configuration file.")."</p>"; |
|
330 | 330 | $out .= "<p>"; |
331 | 331 | $out .= _("The profile will install itself after you click (or tap) the button. You will be asked for confirmation/input at several points:"); |
332 | 332 | $out .= "<ul>"; |
333 | - $out .= "<li>" . _("to install the profile") . "</li>"; |
|
334 | - $out .= "<li>" . ngettext("to accept the server certificate authority", "to accept the server certificate authorities", $certCount); |
|
333 | + $out .= "<li>"._("to install the profile")."</li>"; |
|
334 | + $out .= "<li>".ngettext("to accept the server certificate authority", "to accept the server certificate authorities", $certCount); |
|
335 | 335 | if ($certCount > 1) { |
336 | - $out .= " " . sprintf(_("(%d times)"), $certCount); |
|
336 | + $out .= " ".sprintf(_("(%d times)"), $certCount); |
|
337 | 337 | } |
338 | 338 | $out .= "</li>"; |
339 | - $out .= "<li>" . _("to enter the username and password you have been given by your organisation"); |
|
339 | + $out .= "<li>"._("to enter the username and password you have been given by your organisation"); |
|
340 | 340 | if ($ssidCount > 1) { |
341 | - $out .= " " . sprintf(_("(%d times each, because %s is installed for %d SSIDs)"), $ssidCount, \config\ConfAssistant::CONSORTIUM['display_name'], $ssidCount); |
|
341 | + $out .= " ".sprintf(_("(%d times each, because %s is installed for %d SSIDs)"), $ssidCount, \config\ConfAssistant::CONSORTIUM['display_name'], $ssidCount); |
|
342 | 342 | } |
343 | 343 | $out .= "</li>"; |
344 | 344 | $out .= "</ul>"; |
@@ -378,7 +378,7 @@ discard block |
||
378 | 378 | <key>ServiceProviderRoamingEnabled</key> |
379 | 379 | <true/> |
380 | 380 | <key>DisplayedOperatorName</key> |
381 | - <string>" . \config\ConfAssistant::CONSORTIUM['display_name'] . " via Passpoint</string>"; |
|
381 | + <string>" . \config\ConfAssistant::CONSORTIUM['display_name']." via Passpoint</string>"; |
|
382 | 382 | // if we don't know the realm, omit the entire DomainName key |
383 | 383 | if (isset($this->attributes['internal:realm'])) { |
384 | 384 | $retval .= "<key>DomainName</key> |
@@ -390,7 +390,7 @@ discard block |
||
390 | 390 | $retval .= " <key>RoamingConsortiumOIs</key> |
391 | 391 | <array>"; |
392 | 392 | |
393 | - $retval .= "<string>" . strtoupper($consortiumOi) . "</string>"; |
|
393 | + $retval .= "<string>".strtoupper($consortiumOi)."</string>"; |
|
394 | 394 | |
395 | 395 | $retval .= "</array>"; |
396 | 396 | // this is an undocumented value found on the net. Does it do something useful? |
@@ -427,7 +427,7 @@ discard block |
||
427 | 427 | <dict> |
428 | 428 | <key>AcceptEAPTypes</key> |
429 | 429 | <array> |
430 | - <integer>" . $eapType['OUTER'] . "</integer> |
|
430 | + <integer>" . $eapType['OUTER']."</integer> |
|
431 | 431 | </array> |
432 | 432 | <key>EAPFASTProvisionPAC</key> |
433 | 433 | <true /> |
@@ -440,7 +440,7 @@ discard block |
||
440 | 440 | "; |
441 | 441 | if ($realm !== NULL) { |
442 | 442 | $retval .= "<key>OuterIdentity</key> |
443 | - <string>" . htmlspecialchars($realm, ENT_XML1, 'UTF-8') . "</string> |
|
443 | + <string>" . htmlspecialchars($realm, ENT_XML1, 'UTF-8')."</string> |
|
444 | 444 | "; |
445 | 445 | } |
446 | 446 | $retval .= "<key>PayloadCertificateAnchorUUID</key> |
@@ -464,11 +464,11 @@ discard block |
||
464 | 464 | $retval .= " |
465 | 465 | </array>"; |
466 | 466 | if ($eapType['INNER'] == \core\common\EAP::NE_SILVERBULLET) { |
467 | - $retval .= "<key>UserName</key><string>" . $this->clientCert["certObject"]->username . "</string>"; |
|
467 | + $retval .= "<key>UserName</key><string>".$this->clientCert["certObject"]->username."</string>"; |
|
468 | 468 | } |
469 | 469 | $retval .= " |
470 | 470 | <key>TTLSInnerAuthentication</key> |
471 | - <string>" . ($eapType['INNER'] == \core\common\EAP::NE_PAP ? "PAP" : "MSCHAPv2") . "</string> |
|
471 | + <string>" . ($eapType['INNER'] == \core\common\EAP::NE_PAP ? "PAP" : "MSCHAPv2")."</string> |
|
472 | 472 | </dict>"; |
473 | 473 | return $retval; |
474 | 474 | } |
@@ -488,9 +488,9 @@ discard block |
||
488 | 488 | // characters are still reversed, invert on use! |
489 | 489 | $buffer .= "<string>Manual</string> |
490 | 490 | <key>ProxyServer</key> |
491 | - <string>" . strrev($serverAndPort[1]) . "</string> |
|
491 | + <string>" . strrev($serverAndPort[1])."</string> |
|
492 | 492 | <key>ProxyServerPort</key> |
493 | - <integer>" . strrev($serverAndPort[0]) . "</integer> |
|
493 | + <integer>" . strrev($serverAndPort[0])."</integer> |
|
494 | 494 | <key>ProxyPACFallbackAllowed</key> |
495 | 495 | <false/>"; |
496 | 496 | } else { |
@@ -519,7 +519,7 @@ discard block |
||
519 | 519 | throw new Exception("SSID must be a string!"); |
520 | 520 | } |
521 | 521 | $escapedSSID = htmlspecialchars($toBeConfigured, ENT_XML1, 'UTF-8'); |
522 | - $payloadIdentifier = "wifi." . $this->serial; |
|
522 | + $payloadIdentifier = "wifi.".$this->serial; |
|
523 | 523 | $payloadShortName = sprintf(_("SSID %s"), $escapedSSID); |
524 | 524 | $payloadName = sprintf(_("%s configuration for network name %s"), \config\ConfAssistant::CONSORTIUM['display_name'], $escapedSSID); |
525 | 525 | $encryptionTypeString = "WPA"; |
@@ -549,7 +549,7 @@ discard block |
||
549 | 549 | $payloadIdentifier = "hs20.$toBeConfigured"; |
550 | 550 | $knownOiName = array_search($toBeConfigured, \config\ConfAssistant::CONSORTIUM['interworking-consortium-oi']); |
551 | 551 | if ($knownOiName === FALSE) { // a custom RCOI as set by the IdP admin; do not use the term "eduroam" in that one! |
552 | - $knownOiName = $this->instName . " "._("Roaming Partner"); |
|
552 | + $knownOiName = $this->instName." "._("Roaming Partner"); |
|
553 | 553 | } |
554 | 554 | $payloadShortName = $knownOiName; |
555 | 555 | $payloadName = _("Passpoint roaming configuration ($knownOiName)"); |
@@ -571,11 +571,11 @@ discard block |
||
571 | 571 | <key>PayloadDisplayName</key> |
572 | 572 | <string>$payloadShortName</string> |
573 | 573 | <key>PayloadIdentifier</key> |
574 | - <string>" . self::IPHONE_PAYLOAD_PREFIX . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang.$payloadIdentifier</string> |
|
574 | + <string>".self::IPHONE_PAYLOAD_PREFIX.".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang.$payloadIdentifier</string> |
|
575 | 575 | <key>PayloadOrganization</key> |
576 | - <string>" . $this->massagedConsortium . ".1x-config.org</string> |
|
576 | + <string>".$this->massagedConsortium.".1x-config.org</string> |
|
577 | 577 | <key>PayloadType</key> |
578 | - <string>com.apple." . ($blocktype == MobileconfigSuperclass::NETWORK_BLOCK_TYPE_WIRED ? "firstactiveethernet" : "wifi") . ".managed</string>"; |
|
578 | + <string>com.apple." . ($blocktype == MobileconfigSuperclass::NETWORK_BLOCK_TYPE_WIRED ? "firstactiveethernet" : "wifi").".managed</string>"; |
|
579 | 579 | $retval .= $this->proxySettings(); |
580 | 580 | $retval .= $setupModesString; |
581 | 581 | if ($eapType['INNER'] == \core\common\EAP::NE_SILVERBULLET) { |
@@ -587,7 +587,7 @@ discard block |
||
587 | 587 | } |
588 | 588 | $retval .= " |
589 | 589 | <key>PayloadUUID</key> |
590 | - <string>" . \core\common\Entity::uuid() . "</string> |
|
590 | + <string>" . \core\common\Entity::uuid()."</string> |
|
591 | 591 | <key>PayloadVersion</key> |
592 | 592 | <integer>1</integer> |
593 | 593 | $wifiNetworkIdentification</dict>"; |
@@ -617,15 +617,15 @@ discard block |
||
617 | 617 | <key>IsHotspot</key> |
618 | 618 | <false/> |
619 | 619 | <key>PayloadDescription</key> |
620 | - <string>" . sprintf(_("This SSID should not be used after bootstrapping %s"), \config\ConfAssistant::CONSORTIUM['display_name']) . "</string> |
|
620 | + <string>" . sprintf(_("This SSID should not be used after bootstrapping %s"), \config\ConfAssistant::CONSORTIUM['display_name'])."</string> |
|
621 | 621 | <key>PayloadDisplayName</key> |
622 | - <string>" . _("Disabled WiFi network") . "</string> |
|
622 | + <string>" . _("Disabled WiFi network")."</string> |
|
623 | 623 | <key>PayloadIdentifier</key> |
624 | - <string>" . self::IPHONE_PAYLOAD_PREFIX . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang.wifi.disabled.$this->removeSerial</string> |
|
624 | + <string>" . self::IPHONE_PAYLOAD_PREFIX.".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang.wifi.disabled.$this->removeSerial</string> |
|
625 | 625 | <key>PayloadType</key> |
626 | 626 | <string>com.apple.wifi.managed</string> |
627 | 627 | <key>PayloadUUID</key> |
628 | - <string>" . \core\common\Entity::uuid() . "</string> |
|
628 | + <string>".\core\common\Entity::uuid()."</string> |
|
629 | 629 | <key>PayloadVersion</key> |
630 | 630 | <real>1</real>"; |
631 | 631 | $retval .= $this->proxySettings(); |
@@ -704,12 +704,12 @@ discard block |
||
704 | 704 | $mimeBlob = base64_encode($binaryBlob); |
705 | 705 | $mimeFormatted = chunk_split($mimeBlob, 52, "\r\n"); |
706 | 706 | $payloadUUID = \core\common\Entity::uuid('', $mimeBlob); |
707 | - $retArray = ["block" => "<dict>" . |
|
707 | + $retArray = ["block" => "<dict>". |
|
708 | 708 | // we don't include the import password. It's displayed on screen, and should be input by the user. |
709 | 709 | // <key>Password</key> |
710 | 710 | // <string>" . $this->clientCert['password'] . "</string> |
711 | 711 | "<key>PayloadCertificateFileName</key> |
712 | - <string>" . $this->massagedConsortium . ".pfx</string> |
|
712 | + <string>" . $this->massagedConsortium.".pfx</string> |
|
713 | 713 | <key>PayloadContent</key> |
714 | 714 | <data> |
715 | 715 | $mimeFormatted |
@@ -717,7 +717,7 @@ discard block |
||
717 | 717 | <key>PayloadDescription</key> |
718 | 718 | <string>MIME Base-64 encoded PKCS#12 Client Certificate</string> |
719 | 719 | <key>PayloadDisplayName</key> |
720 | - <string>" . _("User certificate") . "</string> |
|
720 | + <string>"._("User certificate")."</string> |
|
721 | 721 | <key>PayloadIdentifier</key> |
722 | 722 | <string>com.apple.security.pkcs12.$payloadUUID</string> |
723 | 723 | <key>PayloadType</key> |
@@ -727,7 +727,7 @@ discard block |
||
727 | 727 | <key>PayloadVersion</key> |
728 | 728 | <integer>1</integer> |
729 | 729 | </dict>", |
730 | - "UUID" => $payloadUUID,]; |
|
730 | + "UUID" => $payloadUUID, ]; |
|
731 | 731 | \core\common\Entity::outOfThePotatoes(); |
732 | 732 | return $retArray; |
733 | 733 | } |
@@ -745,7 +745,7 @@ discard block |
||
745 | 745 | } |
746 | 746 | $expiryTime = new \DateTime($this->clientCert['certObject']->expiry); |
747 | 747 | return "<key>RemovalDate</key> |
748 | - <date>" . $expiryTime->format("Y-m-d") . "T" . $expiryTime->format("H:i:s") . "Z</date>"; |
|
748 | + <date>" . $expiryTime->format("Y-m-d")."T".$expiryTime->format("H:i:s")."Z</date>"; |
|
749 | 749 | } |
750 | 750 | |
751 | 751 | /** |
@@ -767,27 +767,27 @@ discard block |
||
767 | 767 | $stream = " |
768 | 768 | <dict> |
769 | 769 | <key>PayloadCertificateFileName</key> |
770 | - <string>" . $ca['uuid'] . ".der</string> |
|
770 | + <string>" . $ca['uuid'].".der</string> |
|
771 | 771 | <key>PayloadContent</key> |
772 | 772 | <data> |
773 | -" . $trimmedPem . "</data> |
|
773 | +" . $trimmedPem."</data> |
|
774 | 774 | <key>PayloadDescription</key> |
775 | - <string>" . sprintf(_("The %s Certification Authority"), \core\common\Entity::$nomenclature_inst) . "</string> |
|
775 | + <string>" . sprintf(_("The %s Certification Authority"), \core\common\Entity::$nomenclature_inst)."</string> |
|
776 | 776 | <key>PayloadDisplayName</key> |
777 | 777 | <string>" . |
778 | 778 | /// example: "Identity Provider CA #1 (Root)" |
779 | - sprintf(_("%s CA #%d (%s)" ), |
|
779 | + sprintf(_("%s CA #%d (%s)"), |
|
780 | 780 | \core\common\Entity::$nomenclature_inst, |
781 | - count($this->CAsAccountedFor)+1, |
|
782 | - ($ca['root'] ? _("Root") : _("Intermediate"))) . |
|
781 | + count($this->CAsAccountedFor) + 1, |
|
782 | + ($ca['root'] ? _("Root") : _("Intermediate"))). |
|
783 | 783 | "</string> |
784 | 784 | <key>PayloadIdentifier</key> |
785 | - <string>" . self::IPHONE_PAYLOAD_PREFIX . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.credential.$this->caSerial</string> |
|
785 | + <string>" . self::IPHONE_PAYLOAD_PREFIX.".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.credential.$this->caSerial</string> |
|
786 | 786 | <key>PayloadOrganization</key> |
787 | - <string>" . $this->massagedConsortium . ".1x-config.org</string> |
|
787 | + <string>".$this->massagedConsortium.".1x-config.org</string> |
|
788 | 788 | <key>PayloadType</key> |
789 | 789 | <string>com.apple.security.root</string> |
790 | - <key>PayloadUUID</key><string>" . $ca['uuid'] . "</string> |
|
790 | + <key>PayloadUUID</key><string>" . $ca['uuid']."</string> |
|
791 | 791 | <key>PayloadVersion</key> |
792 | 792 | <integer>1</integer> |
793 | 793 | </dict>"; |