@@ -260,6 +260,9 @@ discard block |
||
260 | 260 | return _("Sorry, this should not happen - no additional information is available"); |
261 | 261 | } |
262 | 262 | |
263 | + /** |
|
264 | + * @param string $file |
|
265 | + */ |
|
263 | 266 | private function findSourceFile($file) { |
264 | 267 | if (is_file($this->module_path . '/Files/' . $this->device_id . '/' . $file)) { |
265 | 268 | return $this->module_path . '/Files/' . $this->device_id . '/' . $file; |
@@ -540,6 +543,9 @@ discard block |
||
540 | 543 | 'application/pdf' => 'pdf', |
541 | 544 | ]; |
542 | 545 | |
546 | + /** |
|
547 | + * @param string $type |
|
548 | + */ |
|
543 | 549 | private function saveLogoFile($logos,$type) { |
544 | 550 | $iterator = 0; |
545 | 551 | $returnarray = []; |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | } |
213 | 213 | if (isset($this->attributes['general:logo_file'])) { |
214 | 214 | $this->loggerInstance->debug(5, "saving IDP logo\n"); |
215 | - $this->attributes['internal:logo_file'] = $this->saveLogoFile($this->attributes['general:logo_file'],'idp'); |
|
215 | + $this->attributes['internal:logo_file'] = $this->saveLogoFile($this->attributes['general:logo_file'], 'idp'); |
|
216 | 216 | } |
217 | 217 | if (isset($this->attributes['fed:logo_file'])) { |
218 | 218 | $this->loggerInstance->debug(5, "saving FED logo\n"); |
@@ -540,7 +540,7 @@ discard block |
||
540 | 540 | 'application/pdf' => 'pdf', |
541 | 541 | ]; |
542 | 542 | |
543 | - private function saveLogoFile($logos,$type) { |
|
543 | + private function saveLogoFile($logos, $type) { |
|
544 | 544 | $iterator = 0; |
545 | 545 | $returnarray = []; |
546 | 546 | foreach ($logos as $blob) { |
@@ -94,7 +94,7 @@ |
||
94 | 94 | |
95 | 95 | while ($oneAttrib = mysqli_fetch_object($idpWideOptionsQuery)) { |
96 | 96 | if (!isset($profiles[$oneAttrib->institution_id])) { |
97 | - $idp = new \core\IdP((int)$oneAttrib->institution_id); |
|
97 | + $idp = new \core\IdP((int) $oneAttrib->institution_id); |
|
98 | 98 | $profiles[$oneAttrib->institution_id] = ['IdP' => $idp, 'Profiles' => $idp->listProfiles()]; |
99 | 99 | echo "Debug: IdP " . $idp->identifier . " has profiles "; |
100 | 100 | foreach ($profiles[$oneAttrib->institution_id]['Profiles'] as $oneProfileObject) { |
@@ -297,10 +297,11 @@ |
||
297 | 297 | <allow-save>true</allow-save> |
298 | 298 | '; |
299 | 299 | if ($use_anon == 1) { |
300 | - if ($outer_user == '') |
|
301 | - $profileFileCont .= '<AnonymousIdentity>@</AnonymousIdentity>'; |
|
302 | - else |
|
303 | - $profileFileCont .= '<AnonymousIdentity>' . $outer_id . '</AnonymousIdentity>'; |
|
300 | + if ($outer_user == '') { |
|
301 | + $profileFileCont .= '<AnonymousIdentity>@</AnonymousIdentity>'; |
|
302 | + } else { |
|
303 | + $profileFileCont .= '<AnonymousIdentity>' . $outer_id . '</AnonymousIdentity>'; |
|
304 | + } |
|
304 | 305 | } |
305 | 306 | $profileFileCont .= '</ClientSideCredential> |
306 | 307 | <ServerSideCredential> |
@@ -446,8 +446,8 @@ |
||
446 | 446 | |
447 | 447 | $fcontents .= ';-------------------------------- |
448 | 448 | !define ORGANISATION "' . $this->translateString($attr['general:instname'][0], $this->codePage) . '" |
449 | -!define SUPPORT "' . ((isset($attr['support:email'][0]) && $attr['support:email'][0] ) ? $attr['support:email'][0] : $this->translateString($this->support_email_substitute, $this->codePage)) . '" |
|
450 | -!define URL "' . ((isset($attr['support:url'][0]) && $attr['support:url'][0] ) ? $attr['support:url'][0] : $this->translateString($this->support_url_substitute, $this->codePage)) . '" |
|
449 | +!define SUPPORT "' . ((isset($attr['support:email'][0]) && $attr['support:email'][0]) ? $attr['support:email'][0] : $this->translateString($this->support_email_substitute, $this->codePage)) . '" |
|
450 | +!define URL "' . ((isset($attr['support:url'][0]) && $attr['support:url'][0]) ? $attr['support:url'][0] : $this->translateString($this->support_url_substitute, $this->codePage)) . '" |
|
451 | 451 | |
452 | 452 | !ifdef TLS |
453 | 453 | '; |
@@ -446,8 +446,8 @@ |
||
446 | 446 | |
447 | 447 | $fcontents .= ';-------------------------------- |
448 | 448 | !define ORGANISATION "' . $this->translateString($attr['general:instname'][0], $this->codePage) . '" |
449 | -!define SUPPORT "' . ((isset($attr['support:email'][0]) && $attr['support:email'][0] ) ? $attr['support:email'][0] : $this->translateString($this->support_email_substitute, $this->codePage)) . '" |
|
450 | -!define URL "' . ((isset($attr['support:url'][0]) && $attr['support:url'][0] ) ? $attr['support:url'][0] : $this->translateString($this->support_url_substitute, $this->codePage)) . '" |
|
449 | +!define SUPPORT "' . ((isset($attr['support:email'][0]) && $attr['support:email'][0]) ? $attr['support:email'][0] : $this->translateString($this->support_email_substitute, $this->codePage)) . '" |
|
450 | +!define URL "' . ((isset($attr['support:url'][0]) && $attr['support:url'][0]) ? $attr['support:url'][0] : $this->translateString($this->support_url_substitute, $this->codePage)) . '" |
|
451 | 451 | |
452 | 452 | !ifdef TLS |
453 | 453 | '; |
@@ -446,8 +446,8 @@ |
||
446 | 446 | |
447 | 447 | $fcontents .= ';-------------------------------- |
448 | 448 | !define ORGANISATION "' . $this->translateString($attr['general:instname'][0], $this->codePage) . '" |
449 | -!define SUPPORT "' . ((isset($attr['support:email'][0]) && $attr['support:email'][0] ) ? $attr['support:email'][0] : $this->translateString($this->support_email_substitute, $this->codePage)) . '" |
|
450 | -!define URL "' . ((isset($attr['support:url'][0]) && $attr['support:url'][0] ) ? $attr['support:url'][0] : $this->translateString($this->support_url_substitute, $this->codePage)) . '" |
|
449 | +!define SUPPORT "' . ((isset($attr['support:email'][0]) && $attr['support:email'][0]) ? $attr['support:email'][0] : $this->translateString($this->support_email_substitute, $this->codePage)) . '" |
|
450 | +!define URL "' . ((isset($attr['support:url'][0]) && $attr['support:url'][0]) ? $attr['support:url'][0] : $this->translateString($this->support_url_substitute, $this->codePage)) . '" |
|
451 | 451 | |
452 | 452 | !ifdef TLS |
453 | 453 | '; |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | */ |
11 | 11 | namespace web\lib\user; |
12 | 12 | |
13 | -require_once(ROOT."/config/_config.php"); |
|
13 | +require_once(ROOT . "/config/_config.php"); |
|
14 | 14 | /** |
15 | 15 | * these constants live in the global space just to ease their use - with class |
16 | 16 | * prefix, the names simply get too long for comfort |
@@ -70,9 +70,9 @@ discard block |
||
70 | 70 | $this->templates[WELCOME_ABOARD_BACKTODOWNLOADS] = _("Back to downloads"); |
71 | 71 | $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']); |
72 | 72 | $this->templates[HEADING_TOPLEVEL_GREET] = sprintf(_("Welcome to %s"), CONFIG['APPEARANCE']['productname']); |
73 | - $this->templates[HEADING_TOPLEVEL_PURPOSE] = sprintf(_("Connect your device to %s"),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']); |
|
73 | + $this->templates[HEADING_TOPLEVEL_PURPOSE] = sprintf(_("Connect your device to %s"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']); |
|
74 | 74 | $this->templates[FRONTPAGE_ROLLER_EASY] = sprintf(_("%s installation made easy:"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']); |
75 | - $this->templates[FRONTPAGE_ROLLER_CUSTOMBUILT] = sprintf(_("Custom built for your %s"),$parent->nomenclature_inst); |
|
75 | + $this->templates[FRONTPAGE_ROLLER_CUSTOMBUILT] = sprintf(_("Custom built for your %s"), $parent->nomenclature_inst); |
|
76 | 76 | $this->templates[FRONTPAGE_ROLLER_SIGNEDBY] = sprintf(_("Digitally signed by the organisation that coordinates %s: %s"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], CONFIG_CONFASSISTANT['CONSORTIUM']['signer_name']); |
77 | 77 | $this->templates[FRONTPAGE_BIGDOWNLOADBUTTON] = sprintf(_("Click here to download your %s installer"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']); |
78 | 78 | $this->templates[PROFILE_SELECTION] = _("Select the user group"); |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | <td> |
44 | 44 | </td> |
45 | 45 | <td> |
46 | - <span class='tooltip' style='cursor: pointer;' onclick='alert("<?php echo str_replace('\'','\x27',str_replace('"','\x22', $_SESSION["user"])); ?>")'><?php echo _("click to display"); ?></span> |
|
46 | + <span class='tooltip' style='cursor: pointer;' onclick='alert("<?php echo str_replace('\'', '\x27', str_replace('"', '\x22', $_SESSION["user"])); ?>")'><?php echo _("click to display"); ?></span> |
|
47 | 47 | </td> |
48 | 48 | </tr> |
49 | 49 | </table> |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | } |
56 | 56 | |
57 | 57 | if ($user->isFederationAdmin()) { |
58 | - echo "<form action='overview_federation.php' method='GET' accept-charset='UTF-8'><button type='submit'>" . sprintf(_('Click here to manage your %ss'),$uiElements->nomenclature_fed) . "</button></form>"; |
|
58 | + echo "<form action='overview_federation.php' method='GET' accept-charset='UTF-8'><button type='submit'>" . sprintf(_('Click here to manage your %ss'), $uiElements->nomenclature_fed) . "</button></form>"; |
|
59 | 59 | } |
60 | 60 | if ($user->isSuperadmin()) { |
61 | 61 | echo "<form action='112365365321.php' method='GET' accept-charset='UTF-8'><button type='submit'>" . _('Click here to access the superadmin page') . "</button></form>"; |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | <div style='white-space: nowrap;'> |
159 | 159 | <form action='action_enrollment.php' method='get'><button type='submit' accept-charset='UTF-8'> |
160 | 160 | <input type='hidden' id='token' name='token' value='SELF-REGISTER'/>" . |
161 | - sprintf(_("Register new %s!"),$uiElements->nomenclature_inst) . " |
|
161 | + sprintf(_("Register new %s!"), $uiElements->nomenclature_inst) . " |
|
162 | 162 | </button> |
163 | 163 | </form> |
164 | 164 | </div>"; |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | echo $deco->productheader("FEDERATION"); |
26 | 26 | ?> |
27 | 27 | <h1> |
28 | - <?php echo sprintf(_("%s Overview"),$uiElements->nomenclature_fed); ?> |
|
28 | + <?php echo sprintf(_("%s Overview"), $uiElements->nomenclature_fed); ?> |
|
29 | 29 | </h1> |
30 | 30 | |
31 | 31 | <div class="infobox"> |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | <td> |
40 | 40 | </td> |
41 | 41 | <td> |
42 | - <span class='tooltip' style='cursor: pointer;' onclick='alert("<?php echo str_replace('\'','\x27',str_replace('"','\x22', $_SESSION["user"])); ?>")'><?php echo _("click to display"); ?></span> |
|
42 | + <span class='tooltip' style='cursor: pointer;' onclick='alert("<?php echo str_replace('\'', '\x27', str_replace('"', '\x22', $_SESSION["user"])); ?>")'><?php echo _("click to display"); ?></span> |
|
43 | 43 | </td> |
44 | 44 | </tr> |
45 | 45 | </table> |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | $mgmt = new \core\UserManagement(); |
50 | 50 | |
51 | 51 | if (!$user->isFederationAdmin()) { |
52 | - echo "<p>" . sprintf(_("You are not a %s manager."),$uiElements->nomenclature_fed) . "</p>"; |
|
52 | + echo "<p>" . sprintf(_("You are not a %s manager."), $uiElements->nomenclature_fed) . "</p>"; |
|
53 | 53 | echo $deco->footer(); |
54 | 54 | exit(0); |
55 | 55 | } |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | // deployment status; need to dive into profiles for this |
199 | 199 | // show happy eyeballs if at least one profile is configured/showtime |
200 | 200 | echo "<td>"; |
201 | - echo ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_CONFIGURED ? "C" : "" ) . " " . ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_SHOWTIME ? "V" : "" ); |
|
201 | + echo ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_CONFIGURED ? "C" : "") . " " . ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_SHOWTIME ? "V" : ""); |
|
202 | 202 | echo "</td>"; |
203 | 203 | // name |
204 | 204 | echo "<td> |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | echo "<tr> |
238 | 238 | <td colspan='2'> |
239 | 239 | <strong>" . |
240 | - sprintf(_("Pending invitations in your %s:"),$uiElements->nomenclature_fed) . " |
|
240 | + sprintf(_("Pending invitations in your %s:"), $uiElements->nomenclature_fed) . " |
|
241 | 241 | </strong> |
242 | 242 | </td> |
243 | 243 | </tr>"; |
@@ -14,6 +14,6 @@ |
||
14 | 14 | $validator = new \web\lib\common\InputValidation(); |
15 | 15 | |
16 | 16 | echo "<pre>"; |
17 | -echo "Testing ".$validator->realm(filter_input(INPUT_GET,'realm', FILTER_SANITIZE_STRING))." in ".$validator->string(filter_input(INPUT_GET, 'visited', FILTER_SANITIZE_STRING)); |
|
17 | +echo "Testing " . $validator->realm(filter_input(INPUT_GET, 'realm', FILTER_SANITIZE_STRING)) . " in " . $validator->string(filter_input(INPUT_GET, 'visited', FILTER_SANITIZE_STRING)); |
|
18 | 18 | print_r($telepath->magic()); |
19 | 19 | echo "</pre>"; |
20 | 20 | \ No newline at end of file |