@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | */ |
21 | 21 | ?> |
22 | 22 | <?php |
23 | -require_once dirname(dirname(dirname(dirname(__FILE__)))) . "/config/_config.php"; |
|
23 | +require_once dirname(dirname(dirname(dirname(__FILE__))))."/config/_config.php"; |
|
24 | 24 | |
25 | 25 | $auth = new \web\lib\admin\Authentication(); |
26 | 26 | $uiElements = new \web\lib\admin\UIElements(); |
@@ -57,8 +57,8 @@ discard block |
||
57 | 57 | <?php |
58 | 58 | echo sprintf(_("On this page, you can add a new %s to your %s. Please fill out the form below to send out an email invitation to the new %s administrator."), $uiElements->nomenclatureInst, $uiElements->nomenclatureFed, $uiElements->nomenclatureInst); |
59 | 59 | if (CONFIG['DB']['enforce-external-sync']) { |
60 | - echo "<p>" . sprintf(_("You can either register a known %s (as defined in the %s database) or create a totally new %s."), $uiElements->nomenclatureInst, CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $uiElements->nomenclatureInst) . "</p>"; |
|
61 | - echo "<p>" . sprintf(_("The latter one is typically for an %s which is yet in a testing phase and therefore doesn't appear in the %s database yet."), $uiElements->nomenclatureInst, CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) . "</p>"; |
|
60 | + echo "<p>".sprintf(_("You can either register a known %s (as defined in the %s database) or create a totally new %s."), $uiElements->nomenclatureInst, CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $uiElements->nomenclatureInst)."</p>"; |
|
61 | + echo "<p>".sprintf(_("The latter one is typically for an %s which is yet in a testing phase and therefore doesn't appear in the %s database yet."), $uiElements->nomenclatureInst, CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'])."</p>"; |
|
62 | 62 | } |
63 | 63 | ?> |
64 | 64 | <hr/> |
@@ -68,12 +68,12 @@ discard block |
||
68 | 68 | <?php |
69 | 69 | if (CONFIG['DB']['enforce-external-sync']) { |
70 | 70 | echo "<tr><td> |
71 | - <input type='radio' name='creation' value='existing'>" . _("Existing IdP:") . "</input> |
|
71 | + <input type='radio' name='creation' value='existing'>" . _("Existing IdP:")."</input> |
|
72 | 72 | </td>"; |
73 | 73 | |
74 | 74 | echo "<td colspan='2'> |
75 | 75 | <select id='externals' name='externals' onchange='document.sendinvite.creation[0].checked=true; document.sendinvite.mailaddr.value=this.options[this.selectedIndex].id;'> |
76 | - <option value='FREETEXT'>" . _("--- select IdP here ---") . "</option>"; |
|
76 | + <option value='FREETEXT'>" . _("--- select IdP here ---")."</option>"; |
|
77 | 77 | |
78 | 78 | foreach ($feds as $fed_value) { |
79 | 79 | $thefed = new \core\Federation(strtoupper($fed_value['value'])); |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | $entities = $thefed->listExternalEntities(TRUE, \core\Federation::EDUROAM_DB_TYPE_IDP); |
83 | 83 | |
84 | 84 | foreach ($entities as $v) { |
85 | - echo "<option id='" . $v['contactlist'] . "' value='" . $v['ID'] . "'>[" . $fed_value['value'] . "] " . $v['name'] . "</option>"; |
|
85 | + echo "<option id='".$v['contactlist']."' value='".$v['ID']."'>[".$fed_value['value']."] ".$v['name']."</option>"; |
|
86 | 86 | } |
87 | 87 | } |
88 | 88 |
@@ -377,7 +377,7 @@ discard block |
||
377 | 377 | "eduroamCAT", |
378 | 378 | "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>", |
379 | 379 | "<a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>", |
380 | - "<a target='_blank' href='eduroamCAT-stable.apk'>" . _("as local download") . "</a>"), |
|
380 | + "<a target='_blank' href='eduroamCAT-stable.apk'>"._("as local download")."</a>"), |
|
381 | 381 | ], |
382 | 382 | ], |
383 | 383 | 'android_pie' => [ |
@@ -392,7 +392,7 @@ discard block |
||
392 | 392 | "eduroamCAT", |
393 | 393 | "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>", |
394 | 394 | "<a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>", |
395 | - "<a target='_blank' href='eduroamCAT-stable.apk'>" . _("as local download") . "</a>"), |
|
395 | + "<a target='_blank' href='eduroamCAT-stable.apk'>"._("as local download")."</a>"), |
|
396 | 396 | ], |
397 | 397 | ], |
398 | 398 | 'android_oreo' => [ |
@@ -407,7 +407,7 @@ discard block |
||
407 | 407 | "eduroamCAT", |
408 | 408 | "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>", |
409 | 409 | "<a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>", |
410 | - "<a target='_blank' href='eduroamCAT-stable.apk'>" . _("as local download") . "</a>"), |
|
410 | + "<a target='_blank' href='eduroamCAT-stable.apk'>"._("as local download")."</a>"), |
|
411 | 411 | ], |
412 | 412 | ], |
413 | 413 | 'android_nougat' => [ |
@@ -422,7 +422,7 @@ discard block |
||
422 | 422 | "eduroamCAT", |
423 | 423 | "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>", |
424 | 424 | "<a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>", |
425 | - "<a target='_blank' href='eduroamCAT-stable.apk'>" . _("as local download") . "</a>"), |
|
425 | + "<a target='_blank' href='eduroamCAT-stable.apk'>"._("as local download")."</a>"), |
|
426 | 426 | ], |
427 | 427 | ], |
428 | 428 | 'android_marshmallow' => [ |
@@ -437,7 +437,7 @@ discard block |
||
437 | 437 | "eduroamCAT", |
438 | 438 | "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>", |
439 | 439 | "<a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>", |
440 | - "<a target='_blank' href='eduroamCAT-stable.apk'>" . _("as local download") . "</a>"), |
|
440 | + "<a target='_blank' href='eduroamCAT-stable.apk'>"._("as local download")."</a>"), |
|
441 | 441 | ], |
442 | 442 | ], |
443 | 443 | 'android_lollipop' => [ |
@@ -452,7 +452,7 @@ discard block |
||
452 | 452 | "eduroamCAT", |
453 | 453 | "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>", |
454 | 454 | "<a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>", |
455 | - "<a target='_blank' href='eduroamCAT-stable.apk'>" . _("as local download") . "</a>"), |
|
455 | + "<a target='_blank' href='eduroamCAT-stable.apk'>"._("as local download")."</a>"), |
|
456 | 456 | ], |
457 | 457 | ], |
458 | 458 | 'android_kitkat' => [ |
@@ -467,7 +467,7 @@ discard block |
||
467 | 467 | "eduroamCAT", |
468 | 468 | "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>", |
469 | 469 | "<a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>", |
470 | - "<a target='_blank' href='eduroamCAT-stable.apk'>" . _("as local download") . "</a>"), |
|
470 | + "<a target='_blank' href='eduroamCAT-stable.apk'>"._("as local download")."</a>"), |
|
471 | 471 | ], |
472 | 472 | ], |
473 | 473 | 'android_43' => [ |
@@ -482,7 +482,7 @@ discard block |
||
482 | 482 | "eduroamCAT", |
483 | 483 | "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>", |
484 | 484 | "<a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>", |
485 | - "<a target='_blank' href='eduroamCAT-stable.apk'>" . _("as local download") . "</a>"), |
|
485 | + "<a target='_blank' href='eduroamCAT-stable.apk'>"._("as local download")."</a>"), |
|
486 | 486 | ], |
487 | 487 | ], |
488 | 488 | 'android_legacy' => [ |
@@ -36,7 +36,7 @@ |
||
36 | 36 | * @return boolean |
37 | 37 | */ |
38 | 38 | |
39 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
39 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
40 | 40 | |
41 | 41 | // we are referring to $_SESSION later in the file |
42 | 42 | CAT_session_start(); |
@@ -23,54 +23,54 @@ |
||
23 | 23 | this is just an include file for Gui class definition |
24 | 24 | */ |
25 | 25 | $Faq = [ |
26 | - [ |
|
26 | + [ |
|
27 | 27 | 'id'=>'idp_not_listed', |
28 | 28 | 'title'=>_("My organisation is not listed. Can't I just use any of the other ones?"), |
29 | 29 | 'text'=>_("No! The installers contain security settings which are specific to the organisation. If you are not from that organisation, your device will detect that you are about to send your username and credential to an unauthorised server and will abort the login. Using an installer from a different organisation is <i>guaranteed to not work</i>!") |
30 | - ], |
|
31 | - [ |
|
30 | + ], |
|
31 | + [ |
|
32 | 32 | 'id'=>'idp_not_listed', |
33 | 33 | 'title'=>_("What can I do to get my organisation listed?"), |
34 | 34 | 'text'=>sprintf(_("Contact %s administrators within your organisation and request that they add their organisation to the system. It will take at most one hour of their time to get things done."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) |
35 | 35 | ], |
36 | - [ |
|
36 | + [ |
|
37 | 37 | 'id'=>'device_not_listed', |
38 | 38 | 'title'=>sprintf(_("My device is not listed! Does that mean I can't do %s?"),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']), |
39 | 39 | 'text'=>sprintf(_("No. The CAT tool can only support Operating Systems which can be automatically configured in some way. Many other devices can still be used with %s, but must be configured manually. Please contact your organisation to get help in setting up such a device."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) |
40 | - ], |
|
40 | + ], |
|
41 | 41 | |
42 | - [ |
|
42 | + [ |
|
43 | 43 | 'title'=>sprintf(_("I can connect to %s simply by providing username and password, what is the point of using an installer?"),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']), |
44 | 44 | 'text'=>sprintf(_("When you are connecting from an unconfigured device your security is at risk. The very point of preconfiguration is to set up security, when this is done, your device will first confirm that it talks to the correct authentication server and will never send your password to an untrusted one.")) |
45 | 45 | ], |
46 | - [ |
|
46 | + [ |
|
47 | 47 | 'title'=>sprintf(_("Is it safe to use %s installers?"),CONFIG['APPEARANCE']['productname']), |
48 | 48 | 'text'=>sprintf(_("%s installers configure security settings on your device, therefore you should be sure that you are using genuine ones."),CONFIG['APPEARANCE']['productname']).' '.( isset(CONFIG_CONFASSISTANT['CONSORTIUM']['signer_name']) && CONFIG_CONFASSISTANT['CONSORTIUM']['signer_name'] != "" ? sprintf(_("This is why %s installers are digitally signed by %s. Watch out for a system message confirming this."),CONFIG['APPEARANCE']['productname'],CONFIG_CONFASSISTANT['CONSORTIUM']['signer_name']):""), |
49 | 49 | |
50 | 50 | ], |
51 | - [ |
|
51 | + [ |
|
52 | 52 | 'title'=>_("Windows 'SmartScreen' or 'Internet Explorer' tell me that the file is not commonly downloaded and possibly harmful. Should I be concerned?"), |
53 | 53 | 'text'=>_("Contrary to what the name suggests, 'SmartScreen' isn't actually very smart. The warning merely means that the file has not yet been downloaded by enough users to make Microsoft consider it popular (which would strangely enough make it be considered 'safe'). This message alone is not a security problem.")." ".(isset(CONFIG_CONFASSISTANT['CONSORTIUM']['signer_name']) && CONFIG_CONFASSISTANT['CONSORTIUM']['signer_name'] != "" ? sprintf(_("So long as the file is carrying a valid signature from %s, the download is safe."),CONFIG_CONFASSISTANT['CONSORTIUM']['signer_name'])." ":"").sprintf(_("Please see also Microsoft's FAQ regarding SmartScreen at %s."),"<a href='http://windows.microsoft.com/en-US/windows7/SmartScreen-Filter-frequently-asked-questions-IE9?SignedIn=1'>Microsoft FAQ</a>") |
54 | 54 | |
55 | 55 | ], |
56 | - [ |
|
56 | + [ |
|
57 | 57 | 'title'=>sprintf(_("I can see %s network and my device is configured but it does not connect, what can be the cause?"),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']), |
58 | - 'text'=>sprintf(_("There can be a number of different reasons. The network you see may not be a genuine %s one and your device silently drops the connection attempt; there may be something wrong with the configuration of the network; your account may have expired; there may be a connection problem with your home authentication server; you may have broken the regulations of the network you are using and have been refused access as a consequence. You should contact your organisation and report the problem, the administrators should be able to trace your connections."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) |
|
58 | + 'text'=>sprintf(_("There can be a number of different reasons. The network you see may not be a genuine %s one and your device silently drops the connection attempt; there may be something wrong with the configuration of the network; your account may have expired; there may be a connection problem with your home authentication server; you may have broken the regulations of the network you are using and have been refused access as a consequence. You should contact your organisation and report the problem, the administrators should be able to trace your connections."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) |
|
59 | 59 | ], |
60 | - [ |
|
60 | + [ |
|
61 | 61 | 'id'=>'contact', |
62 | 62 | 'title'=>sprintf(_("I have a question about this web site. Whom should I contact?")), |
63 | 63 | 'text'=>sprintf(_("You should send a mail to %s."),CONFIG['APPEARANCE']['support-contact']['display']) |
64 | - ], |
|
64 | + ], |
|
65 | 65 | ]; |
66 | 66 | |
67 | 67 | if (CONFIG_CONFASSISTANT['CONSORTIUM']['name'] == "eduroam") { |
68 | 68 | $eduroamDb = new core\ExternalEduroamDBData(); |
69 | 69 | $SPs = $eduroamDb->allServiceProviders(); |
70 | - array_push($Faq, |
|
71 | - [ |
|
72 | - 'id'=>'what_is_'.CONFIG_CONFASSISTANT['CONSORTIUM']['name'], |
|
73 | - 'title'=>sprintf(_("What is this %s thing anyway?"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']), |
|
74 | - 'text'=>sprintf(_("%s is a global WiFi roaming consortium which gives members of education and research access to the internet <i>for free</i> on all %s hotspots on the planet. There are several million %s users already, enjoying free internet access on more than %d hotspots! Visit <a href='http://www.eduroam.org'>the %s homepage</a> or <a href='http://monitor.eduroam.org/map_service_loc.php'>the %s location map</a> for more details."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'],CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'],CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $SPs, CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) |
|
75 | - ]); |
|
70 | + array_push($Faq, |
|
71 | + [ |
|
72 | + 'id'=>'what_is_'.CONFIG_CONFASSISTANT['CONSORTIUM']['name'], |
|
73 | + 'title'=>sprintf(_("What is this %s thing anyway?"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']), |
|
74 | + 'text'=>sprintf(_("%s is a global WiFi roaming consortium which gives members of education and research access to the internet <i>for free</i> on all %s hotspots on the planet. There are several million %s users already, enjoying free internet access on more than %d hotspots! Visit <a href='http://www.eduroam.org'>the %s homepage</a> or <a href='http://monitor.eduroam.org/map_service_loc.php'>the %s location map</a> for more details."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'],CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'],CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $SPs, CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) |
|
75 | + ]); |
|
76 | 76 | } |
@@ -31,36 +31,36 @@ discard block |
||
31 | 31 | [ |
32 | 32 | 'id'=>'idp_not_listed', |
33 | 33 | 'title'=>_("What can I do to get my organisation listed?"), |
34 | - 'text'=>sprintf(_("Contact %s administrators within your organisation and request that they add their organisation to the system. It will take at most one hour of their time to get things done."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) |
|
34 | + 'text'=>sprintf(_("Contact %s administrators within your organisation and request that they add their organisation to the system. It will take at most one hour of their time to get things done."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) |
|
35 | 35 | ], |
36 | 36 | [ |
37 | 37 | 'id'=>'device_not_listed', |
38 | - 'title'=>sprintf(_("My device is not listed! Does that mean I can't do %s?"),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']), |
|
39 | - 'text'=>sprintf(_("No. The CAT tool can only support Operating Systems which can be automatically configured in some way. Many other devices can still be used with %s, but must be configured manually. Please contact your organisation to get help in setting up such a device."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) |
|
38 | + 'title'=>sprintf(_("My device is not listed! Does that mean I can't do %s?"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']), |
|
39 | + 'text'=>sprintf(_("No. The CAT tool can only support Operating Systems which can be automatically configured in some way. Many other devices can still be used with %s, but must be configured manually. Please contact your organisation to get help in setting up such a device."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) |
|
40 | 40 | ], |
41 | 41 | |
42 | 42 | [ |
43 | - 'title'=>sprintf(_("I can connect to %s simply by providing username and password, what is the point of using an installer?"),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']), |
|
43 | + 'title'=>sprintf(_("I can connect to %s simply by providing username and password, what is the point of using an installer?"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']), |
|
44 | 44 | 'text'=>sprintf(_("When you are connecting from an unconfigured device your security is at risk. The very point of preconfiguration is to set up security, when this is done, your device will first confirm that it talks to the correct authentication server and will never send your password to an untrusted one.")) |
45 | 45 | ], |
46 | 46 | [ |
47 | - 'title'=>sprintf(_("Is it safe to use %s installers?"),CONFIG['APPEARANCE']['productname']), |
|
48 | - 'text'=>sprintf(_("%s installers configure security settings on your device, therefore you should be sure that you are using genuine ones."),CONFIG['APPEARANCE']['productname']).' '.( isset(CONFIG_CONFASSISTANT['CONSORTIUM']['signer_name']) && CONFIG_CONFASSISTANT['CONSORTIUM']['signer_name'] != "" ? sprintf(_("This is why %s installers are digitally signed by %s. Watch out for a system message confirming this."),CONFIG['APPEARANCE']['productname'],CONFIG_CONFASSISTANT['CONSORTIUM']['signer_name']):""), |
|
47 | + 'title'=>sprintf(_("Is it safe to use %s installers?"), CONFIG['APPEARANCE']['productname']), |
|
48 | + 'text'=>sprintf(_("%s installers configure security settings on your device, therefore you should be sure that you are using genuine ones."), CONFIG['APPEARANCE']['productname']).' '.(isset(CONFIG_CONFASSISTANT['CONSORTIUM']['signer_name']) && CONFIG_CONFASSISTANT['CONSORTIUM']['signer_name'] != "" ? sprintf(_("This is why %s installers are digitally signed by %s. Watch out for a system message confirming this."), CONFIG['APPEARANCE']['productname'], CONFIG_CONFASSISTANT['CONSORTIUM']['signer_name']) : ""), |
|
49 | 49 | |
50 | 50 | ], |
51 | 51 | [ |
52 | 52 | 'title'=>_("Windows 'SmartScreen' or 'Internet Explorer' tell me that the file is not commonly downloaded and possibly harmful. Should I be concerned?"), |
53 | - 'text'=>_("Contrary to what the name suggests, 'SmartScreen' isn't actually very smart. The warning merely means that the file has not yet been downloaded by enough users to make Microsoft consider it popular (which would strangely enough make it be considered 'safe'). This message alone is not a security problem.")." ".(isset(CONFIG_CONFASSISTANT['CONSORTIUM']['signer_name']) && CONFIG_CONFASSISTANT['CONSORTIUM']['signer_name'] != "" ? sprintf(_("So long as the file is carrying a valid signature from %s, the download is safe."),CONFIG_CONFASSISTANT['CONSORTIUM']['signer_name'])." ":"").sprintf(_("Please see also Microsoft's FAQ regarding SmartScreen at %s."),"<a href='http://windows.microsoft.com/en-US/windows7/SmartScreen-Filter-frequently-asked-questions-IE9?SignedIn=1'>Microsoft FAQ</a>") |
|
53 | + 'text'=>_("Contrary to what the name suggests, 'SmartScreen' isn't actually very smart. The warning merely means that the file has not yet been downloaded by enough users to make Microsoft consider it popular (which would strangely enough make it be considered 'safe'). This message alone is not a security problem.")." ".(isset(CONFIG_CONFASSISTANT['CONSORTIUM']['signer_name']) && CONFIG_CONFASSISTANT['CONSORTIUM']['signer_name'] != "" ? sprintf(_("So long as the file is carrying a valid signature from %s, the download is safe."), CONFIG_CONFASSISTANT['CONSORTIUM']['signer_name'])." " : "").sprintf(_("Please see also Microsoft's FAQ regarding SmartScreen at %s."), "<a href='http://windows.microsoft.com/en-US/windows7/SmartScreen-Filter-frequently-asked-questions-IE9?SignedIn=1'>Microsoft FAQ</a>") |
|
54 | 54 | |
55 | 55 | ], |
56 | 56 | [ |
57 | - 'title'=>sprintf(_("I can see %s network and my device is configured but it does not connect, what can be the cause?"),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']), |
|
58 | - 'text'=>sprintf(_("There can be a number of different reasons. The network you see may not be a genuine %s one and your device silently drops the connection attempt; there may be something wrong with the configuration of the network; your account may have expired; there may be a connection problem with your home authentication server; you may have broken the regulations of the network you are using and have been refused access as a consequence. You should contact your organisation and report the problem, the administrators should be able to trace your connections."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) |
|
57 | + 'title'=>sprintf(_("I can see %s network and my device is configured but it does not connect, what can be the cause?"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']), |
|
58 | + 'text'=>sprintf(_("There can be a number of different reasons. The network you see may not be a genuine %s one and your device silently drops the connection attempt; there may be something wrong with the configuration of the network; your account may have expired; there may be a connection problem with your home authentication server; you may have broken the regulations of the network you are using and have been refused access as a consequence. You should contact your organisation and report the problem, the administrators should be able to trace your connections."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) |
|
59 | 59 | ], |
60 | 60 | [ |
61 | 61 | 'id'=>'contact', |
62 | 62 | 'title'=>sprintf(_("I have a question about this web site. Whom should I contact?")), |
63 | - 'text'=>sprintf(_("You should send a mail to %s."),CONFIG['APPEARANCE']['support-contact']['display']) |
|
63 | + 'text'=>sprintf(_("You should send a mail to %s."), CONFIG['APPEARANCE']['support-contact']['display']) |
|
64 | 64 | ], |
65 | 65 | ]; |
66 | 66 | |
@@ -71,6 +71,6 @@ discard block |
||
71 | 71 | [ |
72 | 72 | 'id'=>'what_is_'.CONFIG_CONFASSISTANT['CONSORTIUM']['name'], |
73 | 73 | 'title'=>sprintf(_("What is this %s thing anyway?"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']), |
74 | - 'text'=>sprintf(_("%s is a global WiFi roaming consortium which gives members of education and research access to the internet <i>for free</i> on all %s hotspots on the planet. There are several million %s users already, enjoying free internet access on more than %d hotspots! Visit <a href='http://www.eduroam.org'>the %s homepage</a> or <a href='http://monitor.eduroam.org/map_service_loc.php'>the %s location map</a> for more details."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'],CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'],CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $SPs, CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) |
|
74 | + 'text'=>sprintf(_("%s is a global WiFi roaming consortium which gives members of education and research access to the internet <i>for free</i> on all %s hotspots on the planet. There are several million %s users already, enjoying free internet access on more than %d hotspots! Visit <a href='http://www.eduroam.org'>the %s homepage</a> or <a href='http://monitor.eduroam.org/map_service_loc.php'>the %s location map</a> for more details."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $SPs, CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) |
|
75 | 75 | ]); |
76 | 76 | } |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | return $this->counter; |
105 | 105 | } |
106 | 106 | |
107 | - $cachedNumber = @file_get_contents(ROOT . "/var/tmp/cachedSPNumber.serialised"); |
|
107 | + $cachedNumber = @file_get_contents(ROOT."/var/tmp/cachedSPNumber.serialised"); |
|
108 | 108 | if ($cachedNumber !== FALSE) { |
109 | 109 | $numberData = unserialize($cachedNumber); |
110 | 110 | $now = new \DateTime(); |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | while ($iterator = mysqli_fetch_object(/** @scrutinizer ignore-type */ $query)) { |
120 | 120 | $this->counter = $iterator->total; |
121 | 121 | } |
122 | - file_put_contents(ROOT . "/var/tmp/cachedSPNumber.serialised", serialize(["number" => $this->counter, "timestamp" => new \DateTime()])); |
|
122 | + file_put_contents(ROOT."/var/tmp/cachedSPNumber.serialised", serialize(["number" => $this->counter, "timestamp" => new \DateTime()])); |
|
123 | 123 | } |
124 | 124 | } |
125 | 125 |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | |
30 | 30 | use Exception; |
31 | 31 | |
32 | -require_once dirname(dirname(dirname(dirname(__FILE__)))) . "/config/_config.php"; |
|
32 | +require_once dirname(dirname(dirname(dirname(__FILE__))))."/config/_config.php"; |
|
33 | 33 | |
34 | 34 | /** |
35 | 35 | * This class defines the various actions doable with the admin API, the |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | const ACTIONS = [ |
245 | 245 | // Inst-level actions. |
246 | 246 | API::ACTION_NEWINST_BY_REF => [ |
247 | - "REQ" => [API::AUXATTRIB_EXTERNALID,], |
|
247 | + "REQ" => [API::AUXATTRIB_EXTERNALID, ], |
|
248 | 248 | "OPT" => [ |
249 | 249 | 'general:geo_coordinates', |
250 | 250 | 'general:logo_file', |
@@ -555,8 +555,8 @@ discard block |
||
555 | 555 | |
556 | 556 | case \core\Options::TYPECODE_COORDINATES: |
557 | 557 | $extension = \core\Options::TYPECODE_TEXT; |
558 | - $coercedInline["option"][$basename] = $oneAttrib['NAME'] . "#"; |
|
559 | - $coercedInline["value"][$basename . "-" . $extension] = $oneAttrib['VALUE']; |
|
558 | + $coercedInline["option"][$basename] = $oneAttrib['NAME']."#"; |
|
559 | + $coercedInline["value"][$basename."-".$extension] = $oneAttrib['VALUE']; |
|
560 | 560 | break; |
561 | 561 | case \core\Options::TYPECODE_TEXT: |
562 | 562 | // Fall-through: they all get the same treatment. |
@@ -566,18 +566,18 @@ discard block |
||
566 | 566 | // Fall-through: they all get the same treatment. |
567 | 567 | case \core\Options::TYPECODE_INTEGER: |
568 | 568 | $extension = $optionInfo['type']; |
569 | - $coercedInline["option"][$basename] = $oneAttrib['NAME'] . "#"; |
|
570 | - $coercedInline["value"][$basename . "-" . $extension] = $oneAttrib['VALUE']; |
|
569 | + $coercedInline["option"][$basename] = $oneAttrib['NAME']."#"; |
|
570 | + $coercedInline["value"][$basename."-".$extension] = $oneAttrib['VALUE']; |
|
571 | 571 | if ($optionInfo['flag'] == "ML") { |
572 | - $coercedInline["value"][$basename . "-lang"] = $oneAttrib['LANG']; |
|
572 | + $coercedInline["value"][$basename."-lang"] = $oneAttrib['LANG']; |
|
573 | 573 | } |
574 | 574 | break; |
575 | 575 | case \core\Options::TYPECODE_FILE: |
576 | 576 | // Binary data is expected in base64 encoding. This is true also for PEM files! |
577 | 577 | $extension = $optionInfo['type']; |
578 | - $coercedInline["option"][$basename] = $oneAttrib['NAME'] . "#"; |
|
579 | - file_put_contents($dir['dir'] . "/" . $basename . "-" . $extension, base64_decode($oneAttrib['VALUE'])); |
|
580 | - $coercedFile["value"]['tmp_name'][$basename . "-" . $extension] = $dir['dir'] . "/" . $basename . "-" . $extension; |
|
578 | + $coercedInline["option"][$basename] = $oneAttrib['NAME']."#"; |
|
579 | + file_put_contents($dir['dir']."/".$basename."-".$extension, base64_decode($oneAttrib['VALUE'])); |
|
580 | + $coercedFile["value"]['tmp_name'][$basename."-".$extension] = $dir['dir']."/".$basename."-".$extension; |
|
581 | 581 | break; |
582 | 582 | default: |
583 | 583 | throw new Exception("We don't seem to know this type code!"); |
@@ -606,7 +606,7 @@ discard block |
||
606 | 606 | public function returnSuccess($details) { |
607 | 607 | $output = json_encode(["result" => "SUCCESS", "details" => $details], JSON_PRETTY_PRINT); |
608 | 608 | if ($output === FALSE) { |
609 | - $this->returnError(API::ERROR_INTERNAL_ERROR, "Unable to JSON encode return data: ". json_last_error(). " - ". json_last_error_msg()); |
|
609 | + $this->returnError(API::ERROR_INTERNAL_ERROR, "Unable to JSON encode return data: ".json_last_error()." - ".json_last_error_msg()); |
|
610 | 610 | } |
611 | 611 | else { |
612 | 612 | echo $output; |
@@ -607,8 +607,7 @@ |
||
607 | 607 | $output = json_encode(["result" => "SUCCESS", "details" => $details], JSON_PRETTY_PRINT); |
608 | 608 | if ($output === FALSE) { |
609 | 609 | $this->returnError(API::ERROR_INTERNAL_ERROR, "Unable to JSON encode return data: ". json_last_error(). " - ". json_last_error_msg()); |
610 | - } |
|
611 | - else { |
|
610 | + } else { |
|
612 | 611 | echo $output; |
613 | 612 | } |
614 | 613 | } |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | * <base_url>/copyright.php after deploying the software |
20 | 20 | */ |
21 | 21 | |
22 | -require_once dirname(dirname(__DIR__)) . '/config/_config.php'; |
|
22 | +require_once dirname(dirname(__DIR__)).'/config/_config.php'; |
|
23 | 23 | |
24 | 24 | $uiElements = new web\lib\admin\UIElements(); |
25 | 25 | |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | // filesystem cleanup |
76 | 76 | case web\lib\common\FormElements::BUTTON_DELETE: |
77 | 77 | $i = web\lib\admin\Maintenance::deleteObsoleteTempDirs(); |
78 | - echo "<div class='ca-summary'><table>" . $uiElements->boxRemark(sprintf("Deleted %d cache directories.", $i), "Cache deleted") . "</table></div>"; |
|
78 | + echo "<div class='ca-summary'><table>".$uiElements->boxRemark(sprintf("Deleted %d cache directories.", $i), "Cache deleted")."</table></div>"; |
|
79 | 79 | break; |
80 | 80 | default: |
81 | 81 | break; |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | $admin_query = $dbHandle->exec("SELECT SUM(downloads_admin) AS admin, SUM(downloads_user) AS user, SUM(downloads_silverbullet) as silverbullet FROM downloads WHERE device_id = '$index'"); |
142 | 142 | // SELECT -> mysqli_result, not boolean |
143 | 143 | while ($a = mysqli_fetch_object(/** @scrutinizer ignore-type */ $admin_query)) { |
144 | - echo "<td>" . $device_array['display'] . "</td><td>" . $a->admin . "</td><td>" . $a->user . "</td><td>" . $a->silverbullet . "</td><td>" . sprintf("%s", $a->user + $a->silverbullet) . "</td>"; |
|
144 | + echo "<td>".$device_array['display']."</td><td>".$a->admin."</td><td>".$a->user."</td><td>".$a->silverbullet."</td><td>".sprintf("%s", $a->user + $a->silverbullet)."</td>"; |
|
145 | 145 | $gross_admin = $gross_admin + $a->admin; |
146 | 146 | $gross_user = $gross_user + $a->user; |
147 | 147 | $gross_silverbullet = $gross_silverbullet + $a->silverbullet; |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | |
22 | 22 | namespace core; |
23 | 23 | |
24 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
24 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
25 | 25 | |
26 | 26 | $instMgmt = new \core\UserManagement(); |
27 | 27 | $deco = new \web\lib\admin\PageDecoration(); |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | <?php echo $uiElements->infoblock($user->getAttributes(), "user", "User"); ?> |
52 | 52 | <tr> |
53 | 53 | <td> |
54 | -<?php echo "" . _("Unique Identifier") ?> |
|
54 | +<?php echo ""._("Unique Identifier") ?> |
|
55 | 55 | </td> |
56 | 56 | <td> |
57 | 57 | </td> |
@@ -64,14 +64,14 @@ discard block |
||
64 | 64 | <div> |
65 | 65 | <?php |
66 | 66 | if (CONFIG['DB']['USER']['readonly'] === FALSE) { |
67 | - echo "<a href='edit_user.php'><button>" . _("Edit User Details") . "</button></a>"; |
|
67 | + echo "<a href='edit_user.php'><button>"._("Edit User Details")."</button></a>"; |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | if ($user->isFederationAdmin()) { |
71 | - echo "<form action='overview_federation.php' method='GET' accept-charset='UTF-8'><button type='submit'>" . sprintf(_('Click here for %s management tasks'), $uiElements->nomenclatureFed) . "</button></form>"; |
|
71 | + echo "<form action='overview_federation.php' method='GET' accept-charset='UTF-8'><button type='submit'>".sprintf(_('Click here for %s management tasks'), $uiElements->nomenclatureFed)."</button></form>"; |
|
72 | 72 | } |
73 | 73 | if ($user->isSuperadmin()) { |
74 | - echo "<form action='112365365321.php' method='GET' accept-charset='UTF-8'><button type='submit'>" . _('Click here to access the superadmin page') . "</button></form>"; |
|
74 | + echo "<form action='112365365321.php' method='GET' accept-charset='UTF-8'><button type='submit'>"._('Click here to access the superadmin page')."</button></form>"; |
|
75 | 75 | } |
76 | 76 | ?> |
77 | 77 | </div> |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | if (CONFIG['FUNCTIONALITY_LOCATIONS']['CONFASSISTANT_SILVERBULLET'] == "LOCAL") { |
84 | 84 | $target = "https://wiki.geant.org/x/6Zg7Bw"; // Managed IdP manual |
85 | 85 | } |
86 | - $helptext = "<h3 style='display:inline;'>" . sprintf(_("(Need help? Refer to the <a href='%s'>%s administrator manual</a>)"), $target, $uiElements->nomenclatureInst) . "</h3>"; |
|
86 | + $helptext = "<h3 style='display:inline;'>".sprintf(_("(Need help? Refer to the <a href='%s'>%s administrator manual</a>)"), $target, $uiElements->nomenclatureInst)."</h3>"; |
|
87 | 87 | } else { |
88 | 88 | $helptext = ""; |
89 | 89 | } |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | // we need to run the Federation constructor |
93 | 93 | $cat = new \core\CAT; |
94 | 94 | /// first parameter: number of Identity Providers; second param is the literal configured term for 'Identity Provider' (you may or may not be able to add a plural suffix for your locale) |
95 | - echo "<h2>" . sprintf(ngettext("You are managing the following <span style='display:none'>%d </span>%s:", "You are managing the following <strong>%d</strong> %s:", sizeof($hasInst)), sizeof($hasInst), $uiElements->nomenclatureInst) . "</h2>"; |
|
95 | + echo "<h2>".sprintf(ngettext("You are managing the following <span style='display:none'>%d </span>%s:", "You are managing the following <strong>%d</strong> %s:", sizeof($hasInst)), sizeof($hasInst), $uiElements->nomenclatureInst)."</h2>"; |
|
96 | 96 | $instlist = []; |
97 | 97 | $my_idps = []; |
98 | 98 | $myFeds = []; |
@@ -114,10 +114,10 @@ discard block |
||
114 | 114 | $country[$key] = $row['country']; |
115 | 115 | $name[$key] = $row['name']; |
116 | 116 | } |
117 | - echo "<tr><th>" . sprintf(_("%s Name"), $uiElements->nomenclatureInst) . "</th><th>" . sprintf(_("Other admins of this %s"), $uiElements->nomenclatureInst) . "</th><th>" . ( CONFIG['DB']['INST']['readonly'] === FALSE ? _("Administrator Management") : "") . "</th></tr>"; |
|
117 | + echo "<tr><th>".sprintf(_("%s Name"), $uiElements->nomenclatureInst)."</th><th>".sprintf(_("Other admins of this %s"), $uiElements->nomenclatureInst)."</th><th>".(CONFIG['DB']['INST']['readonly'] === FALSE ? _("Administrator Management") : "")."</th></tr>"; |
|
118 | 118 | foreach ($myFeds as $fed_id => $fed_name) { |
119 | 119 | /// nomenclature 'fed', fed name, nomenclature 'inst' |
120 | - echo "<tr><td colspan='3'><strong>" . sprintf(_("%s %s: %s list"), $uiElements->nomenclatureFed, $fed_name, $uiElements->nomenclatureInst) . "</strong></td></tr>"; |
|
120 | + echo "<tr><td colspan='3'><strong>".sprintf(_("%s %s: %s list"), $uiElements->nomenclatureFed, $fed_name, $uiElements->nomenclatureInst)."</strong></td></tr>"; |
|
121 | 121 | |
122 | 122 | $fed_idps = $my_idps[$fed_id]; |
123 | 123 | asort($fed_idps); |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | $oneinst = $instlist[$index]; |
126 | 126 | $the_inst = $oneinst['object']; |
127 | 127 | |
128 | - echo "<tr><td><a href='overview_idp.php?inst_id=$the_inst->identifier'>" . $oneinst['name'] . "</a></td><td>"; |
|
128 | + echo "<tr><td><a href='overview_idp.php?inst_id=$the_inst->identifier'>".$oneinst['name']."</a></td><td>"; |
|
129 | 129 | echo "<input type='hidden' name='inst' value='$the_inst->identifier'>"; |
130 | 130 | $admins = $the_inst->listOwners(); |
131 | 131 | $blessedUser = FALSE; |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | $coadmin = new \core\User($username['ID']); |
135 | 135 | $coadmin_name = $coadmin->getAttributes('user:realname'); |
136 | 136 | if (count($coadmin_name) > 0) { |
137 | - echo $coadmin_name[0]['value'] . "<br/>"; |
|
137 | + echo $coadmin_name[0]['value']."<br/>"; |
|
138 | 138 | unset($admins[$number]); |
139 | 139 | } |
140 | 140 | } else { // don't list self |
@@ -150,25 +150,25 @@ discard block |
||
150 | 150 | } |
151 | 151 | echo "</td><td>"; |
152 | 152 | if ($blessedUser && CONFIG['DB']['INST']['readonly'] === FALSE) { |
153 | - echo "<div style='white-space: nowrap;'><form method='post' action='inc/manageAdmins.inc.php?inst_id=" . $the_inst->identifier . "' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'><button type='submit'>" . _("Add/Remove Administrators") . "</button></form></div>"; |
|
153 | + echo "<div style='white-space: nowrap;'><form method='post' action='inc/manageAdmins.inc.php?inst_id=".$the_inst->identifier."' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'><button type='submit'>"._("Add/Remove Administrators")."</button></form></div>"; |
|
154 | 154 | } |
155 | 155 | echo "</td></tr>"; |
156 | 156 | } |
157 | 157 | } |
158 | 158 | echo "</table>"; |
159 | 159 | } else { |
160 | - echo "<h2>" . sprintf(_("You are not managing any %s."), $uiElements->nomenclatureInst) . "</h2>"; |
|
160 | + echo "<h2>".sprintf(_("You are not managing any %s."), $uiElements->nomenclatureInst)."</h2>"; |
|
161 | 161 | } |
162 | 162 | if (CONFIG['DB']['INST']['readonly'] === FALSE) { |
163 | 163 | if (CONFIG_CONFASSISTANT['CONSORTIUM']['selfservice_registration'] === NULL) { |
164 | - echo "<p>" . sprintf(_("Please ask your %s administrator to invite you to become an %s administrator."), $uiElements->nomenclatureFed, $uiElements->nomenclatureInst) . "</p>"; |
|
164 | + echo "<p>".sprintf(_("Please ask your %s administrator to invite you to become an %s administrator."), $uiElements->nomenclatureFed, $uiElements->nomenclatureInst)."</p>"; |
|
165 | 165 | echo "<hr/> |
166 | 166 | <div style='white-space: nowrap;'> |
167 | 167 | <form action='action_enrollment.php' method='get' accept-charset='UTF-8'>" . |
168 | - sprintf(_("Did you receive an invitation token to manage an %s? Please paste it here:"), $uiElements->nomenclatureInst) . |
|
168 | + sprintf(_("Did you receive an invitation token to manage an %s? Please paste it here:"), $uiElements->nomenclatureInst). |
|
169 | 169 | " <input type='text' id='token' name='token'/> |
170 | 170 | <button type='submit'>" . |
171 | - _("Go!") . " |
|
171 | + _("Go!")." |
|
172 | 172 | </button> |
173 | 173 | </form> |
174 | 174 | </div>"; |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | <div style='white-space: nowrap;'> |
178 | 178 | <form action='action_enrollment.php' method='get'><button type='submit' accept-charset='UTF-8'> |
179 | 179 | <input type='hidden' id='token' name='token' value='SELF-REGISTER'/>" . |
180 | - sprintf(_("New %s Registration"), $uiElements->nomenclatureInst) . " |
|
180 | + sprintf(_("New %s Registration"), $uiElements->nomenclatureInst)." |
|
181 | 181 | </button> |
182 | 182 | </form> |
183 | 183 | </div>"; |
@@ -93,15 +93,15 @@ discard block |
||
93 | 93 | <key>PayloadDescription</key> |
94 | 94 | <string>$tagline</string> |
95 | 95 | <key>PayloadDisplayName</key> |
96 | - <string>" . CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'] . "</string> |
|
96 | + <string>".CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']."</string> |
|
97 | 97 | <key>PayloadIdentifier</key> |
98 | - <string>" . self::$iPhonePayloadPrefix . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang</string> |
|
98 | + <string>" . self::$iPhonePayloadPrefix.".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang</string> |
|
99 | 99 | <key>PayloadOrganization</key> |
100 | - <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> |
|
100 | + <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> |
|
101 | 101 | <key>PayloadType</key> |
102 | 102 | <string>Configuration</string> |
103 | 103 | <key>PayloadUUID</key> |
104 | - <string>" . \core\common\Entity::uuid('', self::$iPhonePayloadPrefix . $this->massagedConsortium . $this->massagedCountry . $this->massagedInst . $this->massagedProfile) . "</string> |
|
104 | + <string>" . \core\common\Entity::uuid('', self::$iPhonePayloadPrefix.$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile)."</string> |
|
105 | 105 | <key>PayloadVersion</key> |
106 | 106 | <integer>1</integer>"; |
107 | 107 | \core\common\Entity::outOfThePotatoes(); |
@@ -132,15 +132,15 @@ discard block |
||
132 | 132 | protected function consentBlock() { |
133 | 133 | \core\common\Entity::intoThePotatoes(); |
134 | 134 | if (isset($this->attributes['support:info_file'])) { |
135 | - 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; |
|
135 | + 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; |
|
136 | 136 | } |
137 | 137 | if ($this->attributes['internal:verify_userinput_suffix'][0] != 0) { |
138 | 138 | if (strlen($this->attributes['internal:realm'][0]) > 0) { |
139 | - $retval =MobileconfigSuperclass::BUFFER_CONSENT_PRE . sprintf(_("Important Notice: your username must end with @%s!"), $this->attributes['internal:realm'][0]) . MobileconfigSuperclass::BUFFER_CONSENT_POST; |
|
139 | + $retval = MobileconfigSuperclass::BUFFER_CONSENT_PRE.sprintf(_("Important Notice: your username must end with @%s!"), $this->attributes['internal:realm'][0]).MobileconfigSuperclass::BUFFER_CONSENT_POST; |
|
140 | 140 | \core\common\Entity::outOfThePotatoes(); |
141 | 141 | return $retval; |
142 | 142 | } |
143 | - $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; |
|
143 | + $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; |
|
144 | 144 | \core\common\Entity::outOfThePotatoes(); |
145 | 145 | return $retval; |
146 | 146 | } |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | // also escape htmlspecialchars |
164 | 164 | // not all names and profiles have a name, so be prepared |
165 | 165 | |
166 | - $this->loggerInstance->debug(5, "List of available attributes: " . var_export($this->attributes, TRUE)); |
|
166 | + $this->loggerInstance->debug(5, "List of available attributes: ".var_export($this->attributes, TRUE)); |
|
167 | 167 | |
168 | 168 | $this->instName = $this->attributes['general:instname'][0] ?? _("Unnamed Organisation"); |
169 | 169 | $this->profileName = $this->attributes['profile:name'][0] ?? _("Unnamed Profile"); |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | |
206 | 206 | file_put_contents('installer_profile', $outputXml); |
207 | 207 | |
208 | - $fileName = $this->installerBasename . '.mobileconfig'; |
|
208 | + $fileName = $this->installerBasename.'.mobileconfig'; |
|
209 | 209 | |
210 | 210 | if (!$this->sign) { |
211 | 211 | rename("installer_profile", $fileName); |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | return $fileName; |
214 | 214 | } |
215 | 215 | // still here? Then we are signing. |
216 | - $signing = system($this->sign . " installer_profile '$fileName' > /dev/null"); |
|
216 | + $signing = system($this->sign." installer_profile '$fileName' > /dev/null"); |
|
217 | 217 | if ($signing === FALSE) { |
218 | 218 | $this->loggerInstance->debug(2, "Signing the mobileconfig installer $fileName FAILED!\n"); |
219 | 219 | } |
@@ -231,19 +231,19 @@ discard block |
||
231 | 231 | \core\common\Entity::intoThePotatoes(); |
232 | 232 | $ssidCount = count($this->attributes['internal:SSID']); |
233 | 233 | $certCount = count($this->attributes['internal:CAs'][0]); |
234 | - $out = "<p>" . _("For best results, please use the built-in browser (Safari) to open the configuration file.") . "</p>"; |
|
234 | + $out = "<p>"._("For best results, please use the built-in browser (Safari) to open the configuration file.")."</p>"; |
|
235 | 235 | $out .= "<p>"; |
236 | 236 | $out .= _("The profile will install itself after you click (or tap) the button. You will be asked for confirmation/input at several points:"); |
237 | 237 | $out .= "<ul>"; |
238 | - $out .= "<li>" . _("to install the profile") . "</li>"; |
|
239 | - $out .= "<li>" . ngettext("to accept the server certificate authority", "to accept the server certificate authorities", $certCount); |
|
238 | + $out .= "<li>"._("to install the profile")."</li>"; |
|
239 | + $out .= "<li>".ngettext("to accept the server certificate authority", "to accept the server certificate authorities", $certCount); |
|
240 | 240 | if ($certCount > 1) { |
241 | - $out .= " " . sprintf(_("(%d times)"), $certCount); |
|
241 | + $out .= " ".sprintf(_("(%d times)"), $certCount); |
|
242 | 242 | } |
243 | 243 | $out .= "</li>"; |
244 | - $out .= "<li>" . _("to enter the username and password you have been given by your organisation"); |
|
244 | + $out .= "<li>"._("to enter the username and password you have been given by your organisation"); |
|
245 | 245 | if ($ssidCount > 1) { |
246 | - $out .= " " . sprintf(_("(%d times each, because %s is installed for %d SSIDs)"), $ssidCount, CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $ssidCount); |
|
246 | + $out .= " ".sprintf(_("(%d times each, because %s is installed for %d SSIDs)"), $ssidCount, CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $ssidCount); |
|
247 | 247 | } |
248 | 248 | $out .= "</li>"; |
249 | 249 | $out .= "</ul>"; |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | <key>ServiceProviderRoamingEnabled</key> |
281 | 281 | <true/> |
282 | 282 | <key>DisplayedOperatorName</key> |
283 | - <string>" . CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'] . " via Passpoint</string>"; |
|
283 | + <string>" . CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']." via Passpoint</string>"; |
|
284 | 284 | // if we don't know the realm, omit the entire DomainName key |
285 | 285 | if (isset($this->attributes['internal:realm'])) { |
286 | 286 | $retval .= "<key>DomainName</key> |
@@ -332,7 +332,7 @@ discard block |
||
332 | 332 | <dict> |
333 | 333 | <key>AcceptEAPTypes</key> |
334 | 334 | <array> |
335 | - <integer>" . $eapType['OUTER'] . "</integer> |
|
335 | + <integer>" . $eapType['OUTER']."</integer> |
|
336 | 336 | </array> |
337 | 337 | <key>EAPFASTProvisionPAC</key> |
338 | 338 | <true /> |
@@ -345,7 +345,7 @@ discard block |
||
345 | 345 | "; |
346 | 346 | if ($realm !== NULL) { |
347 | 347 | $retval .= "<key>OuterIdentity</key> |
348 | - <string>" . htmlspecialchars($realm, ENT_XML1, 'UTF-8') . "</string> |
|
348 | + <string>" . htmlspecialchars($realm, ENT_XML1, 'UTF-8')."</string> |
|
349 | 349 | "; |
350 | 350 | } |
351 | 351 | $retval .= "<key>PayloadCertificateAnchorUUID</key> |
@@ -369,11 +369,11 @@ discard block |
||
369 | 369 | $retval .= " |
370 | 370 | </array>"; |
371 | 371 | if ($eapType['INNER'] == \core\common\EAP::NE_SILVERBULLET) { |
372 | - $retval .= "<key>UserName</key><string>" . $this->clientCert["certObject"]->username . "</string>"; |
|
372 | + $retval .= "<key>UserName</key><string>".$this->clientCert["certObject"]->username."</string>"; |
|
373 | 373 | } |
374 | 374 | $retval .= " |
375 | 375 | <key>TTLSInnerAuthentication</key> |
376 | - <string>" . ($eapType['INNER'] == \core\common\EAP::NONE ? "PAP" : "MSCHAPv2") . "</string> |
|
376 | + <string>" . ($eapType['INNER'] == \core\common\EAP::NONE ? "PAP" : "MSCHAPv2")."</string> |
|
377 | 377 | </dict>"; |
378 | 378 | return $retval; |
379 | 379 | } |
@@ -392,9 +392,9 @@ discard block |
||
392 | 392 | // characters are still reversed, invert on use! |
393 | 393 | $buffer .= "<string>Manual</string> |
394 | 394 | <key>ProxyServer</key> |
395 | - <string>" . strrev($serverAndPort[1]) . "</string> |
|
395 | + <string>" . strrev($serverAndPort[1])."</string> |
|
396 | 396 | <key>ProxyServerPort</key> |
397 | - <integer>" . strrev($serverAndPort[0]) . "</integer> |
|
397 | + <integer>" . strrev($serverAndPort[0])."</integer> |
|
398 | 398 | <key>ProxyPACFallbackAllowed</key> |
399 | 399 | <false/>"; |
400 | 400 | } else { |
@@ -422,7 +422,7 @@ discard block |
||
422 | 422 | throw new Exception("SSID must be a string!"); |
423 | 423 | } |
424 | 424 | $escapedSSID = htmlspecialchars($toBeConfigured, ENT_XML1, 'UTF-8'); |
425 | - $payloadIdentifier = "wifi." . $this->serial; |
|
425 | + $payloadIdentifier = "wifi.".$this->serial; |
|
426 | 426 | $payloadShortName = sprintf(_("SSID %s"), $escapedSSID); |
427 | 427 | $payloadName = sprintf(_("%s configuration for network name %s"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $escapedSSID); |
428 | 428 | $encryptionTypeString = "WPA"; |
@@ -470,11 +470,11 @@ discard block |
||
470 | 470 | <key>PayloadDisplayName</key> |
471 | 471 | <string>$payloadShortName</string> |
472 | 472 | <key>PayloadIdentifier</key> |
473 | - <string>" . self::$iPhonePayloadPrefix . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang.$payloadIdentifier</string> |
|
473 | + <string>".self::$iPhonePayloadPrefix.".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang.$payloadIdentifier</string> |
|
474 | 474 | <key>PayloadOrganization</key> |
475 | - <string>" . $this->massagedConsortium . ".1x-config.org</string> |
|
475 | + <string>".$this->massagedConsortium.".1x-config.org</string> |
|
476 | 476 | <key>PayloadType</key> |
477 | - <string>com.apple." . ($blocktype == MobileconfigSuperclass::NETWORK_BLOCK_TYPE_WIRED ? "firstactiveethernet" : "wifi") . ".managed</string>"; |
|
477 | + <string>com.apple." . ($blocktype == MobileconfigSuperclass::NETWORK_BLOCK_TYPE_WIRED ? "firstactiveethernet" : "wifi").".managed</string>"; |
|
478 | 478 | $retval .= $this->proxySettings(); |
479 | 479 | $retval .= $setupModesString; |
480 | 480 | if ($eapType['INNER'] == \core\common\EAP::NE_SILVERBULLET) { |
@@ -486,7 +486,7 @@ discard block |
||
486 | 486 | } |
487 | 487 | $retval .= " |
488 | 488 | <key>PayloadUUID</key> |
489 | - <string>" . \core\common\Entity::uuid() . "</string> |
|
489 | + <string>" . \core\common\Entity::uuid()."</string> |
|
490 | 490 | <key>PayloadVersion</key> |
491 | 491 | <integer>1</integer> |
492 | 492 | $wifiNetworkIdentification</dict>"; |
@@ -515,15 +515,15 @@ discard block |
||
515 | 515 | <key>IsHotspot</key> |
516 | 516 | <false/> |
517 | 517 | <key>PayloadDescription</key> |
518 | - <string>" . sprintf(_("This SSID should not be used after bootstrapping %s"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) . "</string> |
|
518 | + <string>" . sprintf(_("This SSID should not be used after bootstrapping %s"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'])."</string> |
|
519 | 519 | <key>PayloadDisplayName</key> |
520 | - <string>" . _("Disabled WiFi network") . "</string> |
|
520 | + <string>" . _("Disabled WiFi network")."</string> |
|
521 | 521 | <key>PayloadIdentifier</key> |
522 | - <string>" . self::$iPhonePayloadPrefix . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang.wifi.disabled.$this->removeSerial</string> |
|
522 | + <string>" . self::$iPhonePayloadPrefix.".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang.wifi.disabled.$this->removeSerial</string> |
|
523 | 523 | <key>PayloadType</key> |
524 | 524 | <string>com.apple.wifi.managed</string> |
525 | 525 | <key>PayloadUUID</key> |
526 | - <string>" . \core\common\Entity::uuid() . "</string> |
|
526 | + <string>".\core\common\Entity::uuid()."</string> |
|
527 | 527 | <key>PayloadVersion</key> |
528 | 528 | <real>1</real>"; |
529 | 529 | $retval .= $this->proxySettings(); |
@@ -597,7 +597,7 @@ discard block |
||
597 | 597 | $mimeBlob = base64_encode($binaryBlob); |
598 | 598 | $mimeFormatted = chunk_split($mimeBlob, 52, "\r\n"); |
599 | 599 | $payloadUUID = \core\common\Entity::uuid('', $mimeBlob); |
600 | - $retArray = ["block" => "<dict>" . |
|
600 | + $retArray = ["block" => "<dict>". |
|
601 | 601 | // we don't include the import password. It's displayed on screen, and should be input by the user. |
602 | 602 | // <key>Password</key> |
603 | 603 | // <string>" . $this->clientCert['password'] . "</string> |
@@ -610,7 +610,7 @@ discard block |
||
610 | 610 | <key>PayloadDescription</key> |
611 | 611 | <string>MIME Base-64 encoded PKCS#12 Client Certificate</string> |
612 | 612 | <key>PayloadDisplayName</key> |
613 | - <string>" . _("eduroam user certificate") . "</string> |
|
613 | + <string>"._("eduroam user certificate")."</string> |
|
614 | 614 | <key>PayloadIdentifier</key> |
615 | 615 | <string>com.apple.security.pkcs12.$payloadUUID</string> |
616 | 616 | <key>PayloadType</key> |
@@ -620,7 +620,7 @@ discard block |
||
620 | 620 | <key>PayloadVersion</key> |
621 | 621 | <integer>1</integer> |
622 | 622 | </dict>", |
623 | - "UUID" => $payloadUUID,]; |
|
623 | + "UUID" => $payloadUUID, ]; |
|
624 | 624 | \core\common\Entity::outOfThePotatoes(); |
625 | 625 | return $retArray; |
626 | 626 | } |
@@ -638,7 +638,7 @@ discard block |
||
638 | 638 | } |
639 | 639 | $expiryTime = new \DateTime($this->clientCert['certObject']->expiry); |
640 | 640 | return "<key>RemovalDate</key> |
641 | - <date>" . $expiryTime->format("Y-m-d") . "T" . $expiryTime->format("H:i:s") . "Z</date>"; |
|
641 | + <date>" . $expiryTime->format("Y-m-d")."T".$expiryTime->format("H:i:s")."Z</date>"; |
|
642 | 642 | } |
643 | 643 | |
644 | 644 | private $CAsAccountedFor = []; |
@@ -661,21 +661,21 @@ discard block |
||
661 | 661 | $stream = " |
662 | 662 | <dict> |
663 | 663 | <key>PayloadCertificateFileName</key> |
664 | - <string>" . $ca['uuid'] . ".der</string> |
|
664 | + <string>" . $ca['uuid'].".der</string> |
|
665 | 665 | <key>PayloadContent</key> |
666 | 666 | <data> |
667 | -" . $trimmedPem . "</data> |
|
667 | +" . $trimmedPem."</data> |
|
668 | 668 | <key>PayloadDescription</key> |
669 | - <string>" . sprintf(_("The %s Certification Authority"), \core\common\Entity::$nomenclature_inst) . "</string> |
|
669 | + <string>" . sprintf(_("The %s Certification Authority"), \core\common\Entity::$nomenclature_inst)."</string> |
|
670 | 670 | <key>PayloadDisplayName</key> |
671 | - <string>" . sprintf(_("%s CA"), \core\common\Entity::$nomenclature_inst) . "</string> |
|
671 | + <string>" . sprintf(_("%s CA"), \core\common\Entity::$nomenclature_inst)."</string> |
|
672 | 672 | <key>PayloadIdentifier</key> |
673 | - <string>" . self::$iPhonePayloadPrefix . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.credential.$this->caSerial</string> |
|
673 | + <string>" . self::$iPhonePayloadPrefix.".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.credential.$this->caSerial</string> |
|
674 | 674 | <key>PayloadOrganization</key> |
675 | - <string>" . $this->massagedConsortium . ".1x-config.org</string> |
|
675 | + <string>".$this->massagedConsortium.".1x-config.org</string> |
|
676 | 676 | <key>PayloadType</key> |
677 | 677 | <string>com.apple.security.root</string> |
678 | - <key>PayloadUUID</key><string>" . $ca['uuid'] . "</string> |
|
678 | + <key>PayloadUUID</key><string>" . $ca['uuid']."</string> |
|
679 | 679 | <key>PayloadVersion</key> |
680 | 680 | <integer>1</integer> |
681 | 681 | </dict>"; |