@@ -25,7 +25,7 @@ |
||
25 | 25 | * @author Stefan Winter <[email protected]> |
26 | 26 | * @package Core |
27 | 27 | */ |
28 | -require_once dirname(dirname(__FILE__)) . "/config/_config.php"; |
|
28 | +require_once dirname(dirname(__FILE__))."/config/_config.php"; |
|
29 | 29 | |
30 | 30 | $Gui = new \web\lib\user\Gui(); |
31 | 31 | // ... unless overwritten by direct GET/POST parameter in the request or a SESSION setting |
@@ -16,12 +16,12 @@ |
||
16 | 16 | * License: see the web/copyright.inc.php file in the file structure or |
17 | 17 | * <base_url>/copyright.php after deploying the software |
18 | 18 | */?> |
19 | -<h1>Example Skin (Pick-Up and Status page for <?php echo \core\ProfileSilverbullet::PRODUCTNAME;?>)</h1> |
|
20 | -<img src="<?php echo $Gui->skinObject->findresourceUrl("IMAGES","consortium_logo.png");?>"/> |
|
19 | +<h1>Example Skin (Pick-Up and Status page for <?php echo \core\ProfileSilverbullet::PRODUCTNAME; ?>)</h1> |
|
20 | +<img src="<?php echo $Gui->skinObject->findresourceUrl("IMAGES", "consortium_logo.png"); ?>"/> |
|
21 | 21 | <p>This skin is much more sober and less bloated than the default one. As it happens, it also doesn't do anything.</p> |
22 | 22 | <p>But at least it goes to show that it's possible to include custom images/CSS/external software using findResourceUrl(..., $filename): |
23 | -<img src="<?php echo $Gui->skinObject->findresourceUrl("IMAGES","custom.png");?>"/> |
|
24 | -<p>For <?php echo \core\ProfileSilverbullet::PRODUCTNAME;?>, this page can make use of the request status info we have collected prior to invocation of the skinned page:</p> |
|
23 | +<img src="<?php echo $Gui->skinObject->findresourceUrl("IMAGES", "custom.png"); ?>"/> |
|
24 | +<p>For <?php echo \core\ProfileSilverbullet::PRODUCTNAME; ?>, this page can make use of the request status info we have collected prior to invocation of the skinned page:</p> |
|
25 | 25 | <pre> |
26 | - <?php print_r($statusInfo);?> |
|
26 | + <?php print_r($statusInfo); ?> |
|
27 | 27 | </pre> |
@@ -25,7 +25,7 @@ |
||
25 | 25 | * @author Stefan Winter <[email protected]> |
26 | 26 | * @package Core |
27 | 27 | */ |
28 | -require_once dirname(dirname(__FILE__)) . "/config/_config.php"; |
|
28 | +require_once dirname(dirname(__FILE__))."/config/_config.php"; |
|
29 | 29 | |
30 | 30 | $Gui = new \web\lib\user\Gui(); |
31 | 31 | // ... unless overwritten by direct GET/POST parameter in the request or a SESSION setting |
@@ -156,7 +156,7 @@ |
||
156 | 156 | echo "0\">"; |
157 | 157 | echo _("This service is for authenticated admins only.") . '<br>'; |
158 | 158 | echo "<a href=\"diag.php?admin=1\">" . |
159 | - _("eduroam® admin access is needed") . "</a>"; |
|
159 | + _("eduroam® admin access is needed") . "</a>"; |
|
160 | 160 | } |
161 | 161 | ?> |
162 | 162 | </div> |
@@ -46,9 +46,9 @@ discard block |
||
46 | 46 | $Gui->loggerInstance->debug(4, $operatingSystem); |
47 | 47 | $uiElements = new web\lib\admin\UIElements(); |
48 | 48 | if ($operatingSystem) { |
49 | - print "recognisedOS = '" . $operatingSystem['device'] . "';\n"; |
|
49 | + print "recognisedOS = '".$operatingSystem['device']."';\n"; |
|
50 | 50 | } |
51 | -require dirname(__DIR__) . '/user/js/cat_js.php'; |
|
51 | +require dirname(__DIR__).'/user/js/cat_js.php'; |
|
52 | 52 | |
53 | 53 | ?> |
54 | 54 | </script> |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | <div id='wrap' style='background-image:url("<?php echo $Gui->skinObject->findResourceUrl("IMAGES", "beta.png"); ?>");'> |
61 | 61 | <form id="cat_form" name="cat_form" accept-charset="UTF-8" action="<?php echo $_SERVER['SCRIPT_NAME']; ?>" method="POST"> |
62 | 62 | <?php |
63 | -require dirname(__DIR__) . '/diag/js/diag_js.php'; |
|
63 | +require dirname(__DIR__).'/diag/js/diag_js.php'; |
|
64 | 64 | echo $divs->divHeading($visibility); |
65 | 65 | $Gui->languageInstance->setTextDomain("diagnostics"); |
66 | 66 | ?> |
@@ -78,12 +78,12 @@ discard block |
||
78 | 78 | </div> |
79 | 79 | <div id="main_body"> |
80 | 80 | <div id="user_page"> |
81 | - <?php echo $divs->divPagetitle(_("Diagnostics site") . " (<span style='color:red'>beta</span>)", ""); ?> |
|
81 | + <?php echo $divs->divPagetitle(_("Diagnostics site")." (<span style='color:red'>beta</span>)", ""); ?> |
|
82 | 82 | <div id="user_info" style='padding-top: 10px;'> |
83 | 83 | <div id='diagnostic_choice'> |
84 | - <?php echo _("The diagnostics system will do its best to identify and resolve your problems!") . ' ' . _("Please help the system by answering the questions as precisely as possible.") . "<br/>" . _("Are you a") . ' '; ?> |
|
85 | - <input type='radio' name='diagnostic_usertype' value='0'><?php echo _("end-user") . ' ' . _("or"); ?> |
|
86 | - <input type='radio' name='diagnostic_usertype' value='1' <?php if ($admin == 1) { echo " checked"; } ?> > <?php echo _("eduroam administrator") .'?'; ?> |
|
84 | + <?php echo _("The diagnostics system will do its best to identify and resolve your problems!").' '._("Please help the system by answering the questions as precisely as possible.")."<br/>"._("Are you a").' '; ?> |
|
85 | + <input type='radio' name='diagnostic_usertype' value='0'><?php echo _("end-user").' '._("or"); ?> |
|
86 | + <input type='radio' name='diagnostic_usertype' value='1' <?php if ($admin == 1) { echo " checked"; } ?> > <?php echo _("eduroam administrator").'?'; ?> |
|
87 | 87 | </div> |
88 | 88 | <div id='diagnostic_enduser' style='display: none;'> |
89 | 89 | <h2><?php echo _("Tools for End Users"); ?></h2> |
@@ -93,24 +93,24 @@ discard block |
||
93 | 93 | ?> |
94 | 94 | </p> |
95 | 95 | <?php |
96 | - echo '<div id="before_stage_1"><h3>' . _("The system needs some information on your home institution - issuer of your account") . '</h3>'; |
|
96 | + echo '<div id="before_stage_1"><h3>'._("The system needs some information on your home institution - issuer of your account").'</h3>'; |
|
97 | 97 | echo _("What is the realm part of your user account (the part behind the @ of 'your.username@<b>realm.tld</b>):"); |
98 | 98 | ?> |
99 | 99 | <input type='text' name='user_realm' id='user_realm' value=''> |
100 | 100 | <?php |
101 | - echo '<div id="realm_by_select"><br/>' . _("alternatively") . '<br/>'; |
|
102 | - echo _("You can select your home institution from the following list") . '<br/>'; |
|
101 | + echo '<div id="realm_by_select"><br/>'._("alternatively").'<br/>'; |
|
102 | + echo _("You can select your home institution from the following list").'<br/>'; |
|
103 | 103 | echo '<div id="select_idp_country"><a href="" id="idp_countries_list">'; |
104 | - echo '<span id="realmselect">' . _("Click to select your country/region and organisation") . '</span></a></div>'; |
|
104 | + echo '<span id="realmselect">'._("Click to select your country/region and organisation").'</span></a></div>'; |
|
105 | 105 | ?> |
106 | 106 | <div id="select_idp_area" style="display:none;"> |
107 | 107 | </div> |
108 | 108 | </div> |
109 | 109 | <div id="position_info"> |
110 | 110 | <?php |
111 | - echo '<h3>' . _("Optionally, to improve tests, you can provide information on your current location") . '</h3>'; |
|
111 | + echo '<h3>'._("Optionally, to improve tests, you can provide information on your current location").'</h3>'; |
|
112 | 112 | echo '<div id="select_sp_country"><a href="" id="sp_countries_list">'; |
113 | - echo '<span id="spselect">' . _("Click to select a location in which you have an eduroam problem") . '</span></a></div>'; |
|
113 | + echo '<span id="spselect">'._("Click to select a location in which you have an eduroam problem").'</span></a></div>'; |
|
114 | 114 | ?> |
115 | 115 | <div id="select_sp_area" style="display:none;"> |
116 | 116 | </div> |
@@ -143,9 +143,9 @@ discard block |
||
143 | 143 | echo 'none'; |
144 | 144 | } |
145 | 145 | echo ";'>"; |
146 | - echo '<h3>' . _("Which problem are you reporting?") . '</h3>'; |
|
147 | - echo '<input type="radio" name="problem_type" value="1"' . (($sp==1)? ' checked' : '') . '>'; |
|
148 | - echo _("SP contacting IdP due to technical problems or abuse") . '<br>'; |
|
146 | + echo '<h3>'._("Which problem are you reporting?").'</h3>'; |
|
147 | + echo '<input type="radio" name="problem_type" value="1"'.(($sp == 1) ? ' checked' : '').'>'; |
|
148 | + echo _("SP contacting IdP due to technical problems or abuse").'<br>'; |
|
149 | 149 | echo '<input type="radio" name="problem_type" value="2">'; |
150 | 150 | echo _("IdP contacting SP due to technical problems"); |
151 | 151 | echo "<div id='idp_contact_area'></div>"; |
@@ -154,9 +154,9 @@ discard block |
||
154 | 154 | echo "</div>"; |
155 | 155 | } else { |
156 | 156 | echo "0\">"; |
157 | - echo _("This service is for authenticated admins only.") . '<br>'; |
|
158 | - echo "<a href=\"diag.php?admin=1\">" . |
|
159 | - _("eduroam® admin access is needed") . "</a>"; |
|
157 | + echo _("This service is for authenticated admins only.").'<br>'; |
|
158 | + echo "<a href=\"diag.php?admin=1\">". |
|
159 | + _("eduroam® admin access is needed")."</a>"; |
|
160 | 160 | } |
161 | 161 | ?> |
162 | 162 | </div> |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | return false; |
233 | 233 | }); |
234 | 234 | $(document).on('change', '#idp_country' , function() { |
235 | - var comment = <?php echo '"' . _("Fetching institutions list") . '..."'; ?>; |
|
235 | + var comment = <?php echo '"'._("Fetching institutions list").'..."'; ?>; |
|
236 | 236 | var id = $(this).attr('id'); |
237 | 237 | var k = id.indexOf('_'); |
238 | 238 | var type = id.substr(0,k); |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | var shtml = ''; |
251 | 251 | var select = ''; |
252 | 252 | if (type !== 'asp') { |
253 | - shtml = <?php echo '"<td>' . _("Select institution:") . '</td><td>"'; ?>; |
|
253 | + shtml = <?php echo '"<td>'._("Select institution:").'</td><td>"'; ?>; |
|
254 | 254 | } |
255 | 255 | select = '<select id="' + type + '_inst" name="' + type + '_inst" style="margin-left:0px; width:400px;"><option value=""></option>'; |
256 | 256 | for (var i in institutions) { |
@@ -271,7 +271,7 @@ discard block |
||
271 | 271 | } else { |
272 | 272 | if (data.status === 0) { |
273 | 273 | inProgress(0); |
274 | - var msg = <?php echo '"' . _("The database does not contain the information needed to help you in realm selection for this country. You have to provide the realm you are interested in.") . '"'; ?>; |
|
274 | + var msg = <?php echo '"'._("The database does not contain the information needed to help you in realm selection for this country. You have to provide the realm you are interested in.").'"'; ?>; |
|
275 | 275 | alert(msg); |
276 | 276 | $('#select_idp_country').show(); |
277 | 277 | $('#select_idp_area').hide(); |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | }, |
281 | 281 | error:function() { |
282 | 282 | inProgress(0); |
283 | - var msg = <?php echo '"' . _("Can not search in database. You have to provide the realm you are interested in.") . '"'; ?>; |
|
283 | + var msg = <?php echo '"'._("Can not search in database. You have to provide the realm you are interested in.").'"'; ?>; |
|
284 | 284 | alert(msg); |
285 | 285 | $('#select_idp_country').show(); |
286 | 286 | $('#select_idp_area').hide(); |
@@ -296,9 +296,9 @@ discard block |
||
296 | 296 | }); |
297 | 297 | $(document).on('change', '#select_sp_problem' , function() { |
298 | 298 | if ($('#select_sp_problem').val().substr(0,6) == 'abuse-') { |
299 | - $('#realm_in_db_admin').text(<?php echo '"' . _("Check if this realm is registered") . '"'; ?>); |
|
299 | + $('#realm_in_db_admin').text(<?php echo '"'._("Check if this realm is registered").'"'; ?>); |
|
300 | 300 | } else { |
301 | - $('#realm_in_db_admin').text(<?php echo '"' . _("Check this realm") . '"'; ?>); |
|
301 | + $('#realm_in_db_admin').text(<?php echo '"'._("Check this realm").'"'; ?>); |
|
302 | 302 | } |
303 | 303 | $('#realm_in_db_admin').hide(); |
304 | 304 | $('#admin_realm').val(''); |
@@ -306,7 +306,7 @@ discard block |
||
306 | 306 | clear_sp_question(); |
307 | 307 | }); |
308 | 308 | $(document).on('change', '#sp_country, #asp_country' , function() { |
309 | - var comment = <?php echo '"' . _("Fetching institutions list") . '..."'; ?>; |
|
309 | + var comment = <?php echo '"'._("Fetching institutions list").'..."'; ?>; |
|
310 | 310 | var id = $(this).attr('id'); |
311 | 311 | var k = id.indexOf('_'); |
312 | 312 | var type = id.substr(0,k); |
@@ -324,7 +324,7 @@ discard block |
||
324 | 324 | var shtml = ''; |
325 | 325 | var select = ''; |
326 | 326 | if (type !== 'asp') { |
327 | - shtml = <?php echo '"<td>' . _("Select institution:") . '</td><td>"'; ?>; |
|
327 | + shtml = <?php echo '"<td>'._("Select institution:").'</td><td>"'; ?>; |
|
328 | 328 | } |
329 | 329 | select = '<select id="' + type + '_inst" name="' + type + '_inst" style="margin-left:0px; width:400px;"><option value=""></option>'; |
330 | 330 | for (var i in hotspots) { |
@@ -347,7 +347,7 @@ discard block |
||
347 | 347 | inProgress(0); |
348 | 348 | var select = '<select id="' + type + '_inst" name="' + type + '_inst" style="margin-left:0px; width:400px;"><option value="">'; |
349 | 349 | var shtml = '<td></td><td>'; |
350 | - select = select + <?php echo '"' . _("Other location") . '"'; ?> + '</option></select></td>'; |
|
350 | + select = select + <?php echo '"'._("Other location").'"'; ?> + '</option></select></td>'; |
|
351 | 351 | if (type !== 'asp') { |
352 | 352 | $('#row_' + type + '_institution').html(''); |
353 | 353 | $('#row_' + type + '_institution').append(shtml + select); |
@@ -381,7 +381,7 @@ discard block |
||
381 | 381 | $('#start_test_area').hide(); |
382 | 382 | return false; |
383 | 383 | } |
384 | - var comment = <?php echo '"' . _("Fetching realms list") . '..."'; ?>; |
|
384 | + var comment = <?php echo '"'._("Fetching realms list").'..."'; ?>; |
|
385 | 385 | inProgress(1, comment); |
386 | 386 | $.ajax({ |
387 | 387 | url: "findRealm.php", |
@@ -393,7 +393,7 @@ discard block |
||
393 | 393 | var realms = data.realms; |
394 | 394 | var realmselect = ''; |
395 | 395 | if (realms.length > 1) { |
396 | - realmselect = <?php echo '"<td>' . _("Check realm(s):") . '</td>"'; ?>; |
|
396 | + realmselect = <?php echo '"<td>'._("Check realm(s):").'</td>"'; ?>; |
|
397 | 397 | realmselect = realmselect + '<td>' + "<span style='margin-left: 10px'>"; |
398 | 398 | for (var i in realms) { |
399 | 399 | realmselect = realmselect + '<input type="radio" name="realm" '; |
@@ -405,7 +405,7 @@ discard block |
||
405 | 405 | } |
406 | 406 | realmselect = realmselect + '</span></td>'; |
407 | 407 | } else { |
408 | - realmselect = <?php echo '"<td>' . _("Realm:") . '</td>"'; ?>; |
|
408 | + realmselect = <?php echo '"<td>'._("Realm:").'</td>"'; ?>; |
|
409 | 409 | realmselect = realmselect + '<td>' + "<span style='margin-left: 10px'>"; |
410 | 410 | realmselect = realmselect + realms[0] + '</span>'; |
411 | 411 | realmselect = realmselect + '<input type="hidden" name="realm" value="' + realms[0] + '">'; |
@@ -457,7 +457,7 @@ discard block |
||
457 | 457 | clear_sp_question(); |
458 | 458 | t = 1; |
459 | 459 | } |
460 | - var comment = <?php echo '"' . _("Running realm tests") . '..."'; ?>; |
|
460 | + var comment = <?php echo '"'._("Running realm tests").'..."'; ?>; |
|
461 | 461 | inProgress(1, comment); |
462 | 462 | /*waiting(comment);*/ |
463 | 463 | $.ajax({ |
@@ -516,7 +516,7 @@ discard block |
||
516 | 516 | testSociopath('', answer); |
517 | 517 | }); |
518 | 518 | $('#realmtest').click(function(event){ |
519 | - var comment = <?php echo '"<br><br>' . _("Running realm tests") . '..."'; ?>; |
|
519 | + var comment = <?php echo '"<br><br>'._("Running realm tests").'..."'; ?>; |
|
520 | 520 | inProgress(1, comment); |
521 | 521 | $('#start_test_area').hide(); |
522 | 522 | if ($('#select_sp_area').is(':hidden')) { |
@@ -564,13 +564,13 @@ discard block |
||
564 | 564 | reset_footer(); |
565 | 565 | testSociopath(realm, 0); |
566 | 566 | } else { |
567 | - var title = <?php echo '"' . _("Diagnostics results for selected realms") . '"'; ?>; |
|
568 | - result = '<div class="padding"><h3>' + <?php echo '"' . _("An unknown problem occured") . '"'; ?>; |
|
567 | + var title = <?php echo '"'._("Diagnostics results for selected realms").'"'; ?>; |
|
568 | + result = '<div class="padding"><h3>' + <?php echo '"'._("An unknown problem occured").'"'; ?>; |
|
569 | 569 | result = result + '</h3>' |
570 | 570 | if (r.length == 1) { |
571 | - result = result + <?php echo '"' . _("This test includes checking of the following realm") . '"'; ?>; |
|
571 | + result = result + <?php echo '"'._("This test includes checking of the following realm").'"'; ?>; |
|
572 | 572 | } else { |
573 | - result = result + <?php echo '"' . _("This test includes checking of the following realms") . '"'; ?>; |
|
573 | + result = result + <?php echo '"'._("This test includes checking of the following realms").'"'; ?>; |
|
574 | 574 | } |
575 | 575 | result = result + ': ' |
576 | 576 | for (var i=0; i < r.length; i++) { |
@@ -580,7 +580,7 @@ discard block |
||
580 | 580 | result = result + r[i]; |
581 | 581 | } |
582 | 582 | result = result + '.<br>'; |
583 | - result = result + <?php echo '"' . _("You should report this to") . '"'; ?> + ' <a href="mailto:[email protected]">[email protected]</a>'; |
|
583 | + result = result + <?php echo '"'._("You should report this to").'"'; ?> + ' <a href="mailto:[email protected]">[email protected]</a>'; |
|
584 | 584 | result = result + '</div>'; |
585 | 585 | $('#after_stage_1').hide(); |
586 | 586 | $('#before_stage_1').show(); |
@@ -648,43 +648,43 @@ discard block |
||
648 | 648 | success:function(data) { |
649 | 649 | if (data.status === 1) { |
650 | 650 | var result = ''; |
651 | - var title = <?php echo '"' . _("eduroam admin report submission") . '"'; ?>; |
|
651 | + var title = <?php echo '"'._("eduroam admin report submission").'"'; ?>; |
|
652 | 652 | result = '<div class="padding">'; |
653 | 653 | if (type == 'idp_send') { |
654 | - result = result + '<h3>'+ <?php echo '"' . _("SP contacting IdP due to technical problems or abuse") . '"'; ?> + '</h3>'; |
|
654 | + result = result + '<h3>'+ <?php echo '"'._("SP contacting IdP due to technical problems or abuse").'"'; ?> + '</h3>'; |
|
655 | 655 | result = result + '<table>'; |
656 | - result = result + '<tr><td>' + <?php echo '"' . _("Reason") . '"'; ?> + '</td><td>' + data.reason + '</td></tr>'; |
|
657 | - result = result + '<tr><td>' + <?php echo '"' . _("Event's timestamp") . '"'; ?> + '</td><td>' + data.timestamp + '</td></tr>'; |
|
658 | - result = result + '<tr><td>' + <?php echo '"' . _("Calling-Station-Id") . '"'; ?> + '</td><td>' + data.mac + '</td></tr>'; |
|
659 | - result = result + '<tr><td>' + <?php echo '"' . _("Additional description") . '"'; ?> +'</td><td>' + data.freetext + '</td></tr>'; |
|
660 | - result = result + '<tr><td>' + <?php echo '"' . _("An email to contact the reporter") . '"'; ?> + '</td><td>' + data.email + '</td></tr>'; |
|
661 | - result = result + '<tr><td>' + <?php echo '"' . _("Test result") . '" '; ?> +'</td><td>'; |
|
656 | + result = result + '<tr><td>' + <?php echo '"'._("Reason").'"'; ?> + '</td><td>' + data.reason + '</td></tr>'; |
|
657 | + result = result + '<tr><td>' + <?php echo '"'._("Event's timestamp").'"'; ?> + '</td><td>' + data.timestamp + '</td></tr>'; |
|
658 | + result = result + '<tr><td>' + <?php echo '"'._("Calling-Station-Id").'"'; ?> + '</td><td>' + data.mac + '</td></tr>'; |
|
659 | + result = result + '<tr><td>' + <?php echo '"'._("Additional description").'"'; ?> +'</td><td>' + data.freetext + '</td></tr>'; |
|
660 | + result = result + '<tr><td>' + <?php echo '"'._("An email to contact the reporter").'"'; ?> + '</td><td>' + data.email + '</td></tr>'; |
|
661 | + result = result + '<tr><td>' + <?php echo '"'._("Test result").'" '; ?> +'</td><td>'; |
|
662 | 662 | if (data.tests_result == 1) { |
663 | - result = result + <?php echo '"' . _("failure") . '"'; ?>; |
|
663 | + result = result + <?php echo '"'._("failure").'"'; ?>; |
|
664 | 664 | } else { |
665 | - result = result + <?php echo '"' . _("success") . '"'; ?>; |
|
665 | + result = result + <?php echo '"'._("success").'"'; ?>; |
|
666 | 666 | } |
667 | 667 | result = result + '</td></tr>'; |
668 | - result = result + '<tr><td>' + <?php echo '"' . _("Test URL") . '" '; ?> +'</td><td><a href="' + data.testurl + '">' + data.testurl + '</a></td></tr>'; |
|
669 | - result = result + '<tr><td>' + <?php echo '"' . _("Email to IdP administrators ") . '"'; ?> + ' '; |
|
668 | + result = result + '<tr><td>' + <?php echo '"'._("Test URL").'" '; ?> +'</td><td><a href="' + data.testurl + '">' + data.testurl + '</a></td></tr>'; |
|
669 | + result = result + '<tr><td>' + <?php echo '"'._("Email to IdP administrators ").'"'; ?> + ' '; |
|
670 | 670 | if (data.emailsent == 1) { |
671 | - result = result + <?php echo '"' . _("send successfully") . '"'; ?>; |
|
671 | + result = result + <?php echo '"'._("send successfully").'"'; ?>; |
|
672 | 672 | } else { |
673 | - result = result + <?php echo '"' . _("not sent - failure while sending") . '"'; ?>; |
|
673 | + result = result + <?php echo '"'._("not sent - failure while sending").'"'; ?>; |
|
674 | 674 | } |
675 | 675 | result = result + '</td><td></td></tr>'; |
676 | 676 | } |
677 | 677 | if (type == 'sp_send') { |
678 | - result = result + '<h3>'+ <?php echo '"' . _("IdP contacting SP due to technical problems or abuse") . '"'; ?> + '</h3>'; |
|
678 | + result = result + '<h3>'+ <?php echo '"'._("IdP contacting SP due to technical problems or abuse").'"'; ?> + '</h3>'; |
|
679 | 679 | result = result + '<table>'; |
680 | - result = result + '<tr><td>' + <?php echo '"' . _("Reason") . '"'; ?> + '</td><td>' + data.reason + '</td></tr>'; |
|
681 | - result = result + '<tr><td>' + <?php echo '"' . _("SP's Operator-Name") . '"'; ?> + '</td><td>' + data.opname + '</td></tr>'; |
|
682 | - result = result + '<tr><td>' + <?php echo '"' . _("User's outer ID") . '"'; ?> + '</td><td>' + data.outerid + '</td></tr>'; |
|
683 | - result = result + '<tr><td>' + <?php echo '"' . _("IdP email") . '"'; ?> + '</td><td>' + data.email + '</td></tr>'; |
|
684 | - result = result + '<tr><td>' + <?php echo '"' . _("Event's timestamp") . '"'; ?> + '</td><td>' + data.timestamp + '</td></tr>'; |
|
685 | - result = result + '<tr><td>' + <?php echo '"' . _("Calling-Station-Id") . '"'; ?> + '</td><td>' + data.mac + '</td></tr>'; |
|
686 | - result = result + '<tr><td>' + <?php echo '"' . _("Additional description") . '"'; ?> +'</td><td>' + data.freetext + '</td></tr>'; |
|
687 | - result = result + '<tr><td>' + <?php echo '"' . _("How to contact the user") . '"'; ?> +'</td><td>' + data.cdetails + '</td></tr>'; |
|
680 | + result = result + '<tr><td>' + <?php echo '"'._("Reason").'"'; ?> + '</td><td>' + data.reason + '</td></tr>'; |
|
681 | + result = result + '<tr><td>' + <?php echo '"'._("SP's Operator-Name").'"'; ?> + '</td><td>' + data.opname + '</td></tr>'; |
|
682 | + result = result + '<tr><td>' + <?php echo '"'._("User's outer ID").'"'; ?> + '</td><td>' + data.outerid + '</td></tr>'; |
|
683 | + result = result + '<tr><td>' + <?php echo '"'._("IdP email").'"'; ?> + '</td><td>' + data.email + '</td></tr>'; |
|
684 | + result = result + '<tr><td>' + <?php echo '"'._("Event's timestamp").'"'; ?> + '</td><td>' + data.timestamp + '</td></tr>'; |
|
685 | + result = result + '<tr><td>' + <?php echo '"'._("Calling-Station-Id").'"'; ?> + '</td><td>' + data.mac + '</td></tr>'; |
|
686 | + result = result + '<tr><td>' + <?php echo '"'._("Additional description").'"'; ?> +'</td><td>' + data.freetext + '</td></tr>'; |
|
687 | + result = result + '<tr><td>' + <?php echo '"'._("How to contact the user").'"'; ?> +'</td><td>' + data.cdetails + '</td></tr>'; |
|
688 | 688 | } |
689 | 689 | result = result + '</div>'; |
690 | 690 | showInfo(result, title); |
@@ -709,7 +709,7 @@ discard block |
||
709 | 709 | $(this).removeClass('visible_row').addClass('hidden_row'); |
710 | 710 | } |
711 | 711 | }); |
712 | - $('#admin_realm').attr('title', <?php echo '"' . _("Wrong format of realm") . '"'; ?>); |
|
712 | + $('#admin_realm').attr('title', <?php echo '"'._("Wrong format of realm").'"'; ?>); |
|
713 | 713 | } else { |
714 | 714 | $('#admin_realm').removeClass('error_input'); |
715 | 715 | $('#admin_realm').attr('title', ''); |
@@ -719,7 +719,7 @@ discard block |
||
719 | 719 | $(document).on('keyup change', '#email' , function() { |
720 | 720 | if ($(this).val().length == 0 || !isEmail($(this).val())) { |
721 | 721 | $('#email').addClass('error_input'); |
722 | - $('#email').attr('title', <?php echo '"' . _("Wrong format of email") . '"'; ?>); |
|
722 | + $('#email').attr('title', <?php echo '"'._("Wrong format of email").'"'; ?>); |
|
723 | 723 | } else { |
724 | 724 | $('#email').removeClass('error_input'); |
725 | 725 | $('#email').attr('title', ''); |
@@ -732,7 +732,7 @@ discard block |
||
732 | 732 | if ($('#mac').val().length > 0) { |
733 | 733 | if ($('#mac').val().length != 17) { |
734 | 734 | $('#mac').addClass('error_input'); |
735 | - $('#mac').attr('title', <?php echo '"' . _("MAC address is incomplete") . '"'; ?>); |
|
735 | + $('#mac').attr('title', <?php echo '"'._("MAC address is incomplete").'"'; ?>); |
|
736 | 736 | } else { |
737 | 737 | $('#mac').removeClass('error_input'); |
738 | 738 | $('#mac').attr('title', ''); |
@@ -741,7 +741,7 @@ discard block |
||
741 | 741 | if ($(this).attr('id') == 'email' && $(this).val().length > 0) { |
742 | 742 | if (!isEmail($(this).val())) { |
743 | 743 | $('#email').addClass('error_input'); |
744 | - $('#email').attr('title', <?php echo '"' . _("Wrong format of email") . '"'; ?>); |
|
744 | + $('#email').attr('title', <?php echo '"'._("Wrong format of email").'"'; ?>); |
|
745 | 745 | } else { |
746 | 746 | $('#email').removeClass('error_input'); |
747 | 747 | $('#email').attr('title', ''); |
@@ -750,7 +750,7 @@ discard block |
||
750 | 750 | if ($(this).attr('id') == 'outer_id' && $(this).val().length > 0) { |
751 | 751 | if (!isEmail($(this).val(), true)) { |
752 | 752 | $('#outer_id').addClass('error_input'); |
753 | - $('#outer_id').attr('title', <?php echo '"' . _("Wrong format of outer ID") . '"'; ?>); |
|
753 | + $('#outer_id').attr('title', <?php echo '"'._("Wrong format of outer ID").'"'; ?>); |
|
754 | 754 | } else { |
755 | 755 | $('#outer_id').removeClass('error_input'); |
756 | 756 | $('#outer_id').attr('title', ''); |
@@ -759,7 +759,7 @@ discard block |
||
759 | 759 | if ($(this).attr('id') == 'opname' && $('#opname').val().length > 0) { |
760 | 760 | if (!isOperatorName($(this).val())) { |
761 | 761 | $('#opname').addClass('error_input'); |
762 | - $('#opname').attr('title', <?php echo '"' . _("Wrong string given as OperatorName") . '"'; ?>); |
|
762 | + $('#opname').attr('title', <?php echo '"'._("Wrong string given as OperatorName").'"'; ?>); |
|
763 | 763 | $('#spmanually').show(); |
764 | 764 | } else { |
765 | 765 | $('#opname').removeClass('error_input'); |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | $cryptoJson = openssl_encrypt($clearJson, 'AES-256-CBC', $encryptionKey, OPENSSL_RAW_DATA, $initVector); |
118 | 118 | $hmac = hash_hmac("sha1", $cryptoJson, $encryptionKey, TRUE); |
119 | 119 | |
120 | - $this->loggerInstance->debug(4, "Clear = $clearJson\nSalt = $salt\nPW = " . $password . "\nb(IV) = " . base64_encode($initVector) . "\nb(Cipher) = " . base64_encode($cryptoJson) . "\nb(HMAC) = " . base64_encode($hmac)); |
|
120 | + $this->loggerInstance->debug(4, "Clear = $clearJson\nSalt = $salt\nPW = ".$password."\nb(IV) = ".base64_encode($initVector)."\nb(Cipher) = ".base64_encode($cryptoJson)."\nb(HMAC) = ".base64_encode($hmac)); |
|
121 | 121 | |
122 | 122 | // now, generate the container that holds all the crypto data |
123 | 123 | $finalArray = [ |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | */ |
189 | 189 | private function wiredBlock($eapdetails) { |
190 | 190 | return [ |
191 | - "GUID" => \core\common\Entity::uuid('', "wired-dot1x-ethernet") . "}", |
|
191 | + "GUID" => \core\common\Entity::uuid('', "wired-dot1x-ethernet")."}", |
|
192 | 192 | "Name" => "eduroam configuration (wired network)", |
193 | 193 | "Remove" => false, |
194 | 194 | "Type" => "Ethernet", |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | // if silverbullet, we deliver the client cert inline |
229 | 229 | |
230 | 230 | if ($selectedEap == \core\common\EAP::EAPTYPE_SILVERBULLET) { |
231 | - $eaparray['ClientCertRef'] = "[" . $this->clientCert['GUID'] . "]"; |
|
231 | + $eaparray['ClientCertRef'] = "[".$this->clientCert['GUID']."]"; |
|
232 | 232 | $eaparray['ClientCertType'] = "Ref"; |
233 | 233 | } |
234 | 234 | |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | $jsonArray = ["Type" => "UnencryptedConfiguration"]; |
262 | 262 | |
263 | 263 | foreach ($this->attributes['internal:CAs'][0] as $ca) { |
264 | - $caRefs[] = "{" . $ca['uuid'] . "}"; |
|
264 | + $caRefs[] = "{".$ca['uuid']."}"; |
|
265 | 265 | } |
266 | 266 | // define CA certificates |
267 | 267 | foreach ($this->attributes['internal:CAs'][0] as $ca) { |
@@ -271,15 +271,15 @@ discard block |
||
271 | 271 | if ($caSanitized1 === FALSE) { |
272 | 272 | throw new Exception("Error cropping PEM data at its BEGIN marker."); |
273 | 273 | } |
274 | - $this->loggerInstance->debug(4, $caSanitized1 . "\n"); |
|
274 | + $this->loggerInstance->debug(4, $caSanitized1."\n"); |
|
275 | 275 | // remove \n |
276 | 276 | $caSanitized = str_replace("\n", "", $caSanitized1); |
277 | - $jsonArray["Certificates"][] = ["GUID" => "{" . $ca['uuid'] . "}", "Remove" => false, "Type" => "Authority", "X509" => $caSanitized]; |
|
278 | - $this->loggerInstance->debug(3, $caSanitized . "\n"); |
|
277 | + $jsonArray["Certificates"][] = ["GUID" => "{".$ca['uuid']."}", "Remove" => false, "Type" => "Authority", "X509" => $caSanitized]; |
|
278 | + $this->loggerInstance->debug(3, $caSanitized."\n"); |
|
279 | 279 | } |
280 | 280 | // if we are doing silverbullet, include the unencrypted(!) P12 as a client certificate |
281 | 281 | if ($this->selectedEap == \core\common\EAP::EAPTYPE_SILVERBULLET) { |
282 | - $jsonArray["Certificates"][] = ["GUID" => "[" . $this->clientCert['GUID'] . "]", "PKCS12" => base64_encode($this->clientCert['certdataclear']), "Remove" => false, "Type" => "Client"]; |
|
282 | + $jsonArray["Certificates"][] = ["GUID" => "[".$this->clientCert['GUID']."]", "PKCS12" => base64_encode($this->clientCert['certdataclear']), "Remove" => false, "Type" => "Client"]; |
|
283 | 283 | } |
284 | 284 | $eaparray = $this->eapBlock($caRefs); |
285 | 285 | // define Wi-Fi networks |
@@ -300,7 +300,7 @@ discard block |
||
300 | 300 | |
301 | 301 | file_put_contents('installer_profile', $finalJson); |
302 | 302 | |
303 | - $fileName = $this->installerBasename . '.onc'; |
|
303 | + $fileName = $this->installerBasename.'.onc'; |
|
304 | 304 | |
305 | 305 | if (!$this->sign) { |
306 | 306 | rename("installer_profile", $fileName); |
@@ -311,7 +311,7 @@ discard block |
||
311 | 311 | // have the notion of signing |
312 | 312 | // but if they ever change their mind, we are prepared |
313 | 313 | |
314 | - $outputFromSigning = system($this->sign . " installer_profile '$fileName' > /dev/null"); |
|
314 | + $outputFromSigning = system($this->sign." installer_profile '$fileName' > /dev/null"); |
|
315 | 315 | if ($outputFromSigning === FALSE) { |
316 | 316 | $this->loggerInstance->debug(2, "Signing the ONC installer $fileName FAILED!\n"); |
317 | 317 | } |
@@ -211,7 +211,7 @@ |
||
211 | 211 | } |
212 | 212 | |
213 | 213 | if (!empty($this->attributes['internal:realm'][0])) { |
214 | - $config['user_realm'] = $this->attributes['internal:realm'][0]; |
|
214 | + $config['user_realm'] = $this->attributes['internal:realm'][0]; |
|
215 | 215 | } |
216 | 216 | |
217 | 217 | if(!empty($this->attributes['internal:hint_userinput_suffix'][0]) && $this->attributes['internal:hint_userinput_suffix'][0] == 1) { |
@@ -201,8 +201,7 @@ |
||
201 | 201 | |
202 | 202 | if ($this->selectedEap == \core\common\EAP::EAPTYPE_TLS && isset($this->attributes['eap-specific:tls_use_other_id']) && $this->attributes['eap-specific:tls_use_other_id'][0] == 'on') { |
203 | 203 | $configRaw['use_other_tls_id'] = "True"; |
204 | - } |
|
205 | - else { |
|
204 | + } else { |
|
206 | 205 | $configRaw['use_other_tls_id'] = "False"; |
207 | 206 | } |
208 | 207 |
@@ -55,9 +55,9 @@ discard block |
||
55 | 55 | * |
56 | 56 | */ |
57 | 57 | public function writeInstaller() { |
58 | - $installerPath = $this->installerBasename . ".py"; |
|
58 | + $installerPath = $this->installerBasename.".py"; |
|
59 | 59 | $this->copyFile("main.py", $installerPath); |
60 | - $installer = fopen($installerPath,"a"); |
|
60 | + $installer = fopen($installerPath, "a"); |
|
61 | 61 | if ($installer === FALSE) { |
62 | 62 | throw new Exception("Unable to open installer file for writing!"); |
63 | 63 | } |
@@ -84,9 +84,9 @@ discard block |
||
84 | 84 | $out .= "<p>"; |
85 | 85 | if ($ssidCount > 1) { |
86 | 86 | if ($ssidCount > 2) { |
87 | - $out .= sprintf(_("In addition to <strong>%s</strong> the installer will also configure access to the following networks:"), implode(', ', \config\ConfAssistant::CONSORTIUM['ssid'])) . " "; |
|
87 | + $out .= sprintf(_("In addition to <strong>%s</strong> the installer will also configure access to the following networks:"), implode(', ', \config\ConfAssistant::CONSORTIUM['ssid']))." "; |
|
88 | 88 | } else { |
89 | - $out .= sprintf(_("In addition to <strong>%s</strong> the installer will also configure access to:"), implode(', ', \config\ConfAssistant::CONSORTIUM['ssid'])) . " "; |
|
89 | + $out .= sprintf(_("In addition to <strong>%s</strong> the installer will also configure access to:"), implode(', ', \config\ConfAssistant::CONSORTIUM['ssid']))." "; |
|
90 | 90 | } |
91 | 91 | $iterator = 0; |
92 | 92 | foreach ($this->attributes['internal:SSID'] as $ssid => $v) { |
@@ -124,8 +124,8 @@ discard block |
||
124 | 124 | * @return void |
125 | 125 | */ |
126 | 126 | private function writeConfigLine($file, $prefix, $name, $text) { |
127 | - $out = $prefix . $name . ' = "' . $text; |
|
128 | - fwrite($file, wordwrap($out, 70, " \" \\\n \"") . "\n"); |
|
127 | + $out = $prefix.$name.' = "'.$text; |
|
128 | + fwrite($file, wordwrap($out, 70, " \" \\\n \"")."\n"); |
|
129 | 129 | } |
130 | 130 | |
131 | 131 | /** |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | 'user_cert_missing' => _("personal certificate file not found"), |
165 | 165 | ]; |
166 | 166 | foreach ($messages as $name => $value) { |
167 | - $this->writeConfigLine($file, 'Messages.', $name, $value . '"'); |
|
167 | + $this->writeConfigLine($file, 'Messages.', $name, $value.'"'); |
|
168 | 168 | } |
169 | 169 | \core\common\Entity::outOfThePotatoes(); |
170 | 170 | } |
@@ -208,39 +208,39 @@ discard block |
||
208 | 208 | } |
209 | 209 | |
210 | 210 | if ($outerId !== NULL) { |
211 | - $configRaw['anonymous_identity'] = '"' . $outerId . '"'; |
|
211 | + $configRaw['anonymous_identity'] = '"'.$outerId.'"'; |
|
212 | 212 | } |
213 | 213 | |
214 | 214 | if (!empty($this->attributes['internal:realm'][0])) { |
215 | 215 | $config['user_realm'] = $this->attributes['internal:realm'][0]; |
216 | 216 | } |
217 | 217 | |
218 | - if(!empty($this->attributes['internal:hint_userinput_suffix'][0]) && $this->attributes['internal:hint_userinput_suffix'][0] == 1) { |
|
218 | + if (!empty($this->attributes['internal:hint_userinput_suffix'][0]) && $this->attributes['internal:hint_userinput_suffix'][0] == 1) { |
|
219 | 219 | $configRaw['hint_user_input'] = "True"; |
220 | 220 | } |
221 | 221 | |
222 | - if(!empty($this->attributes['internal:verify_userinput_suffix'][0]) && $this->attributes['internal:verify_userinput_suffix'][0] == 1) { |
|
222 | + if (!empty($this->attributes['internal:verify_userinput_suffix'][0]) && $this->attributes['internal:verify_userinput_suffix'][0] == 1) { |
|
223 | 223 | $configRaw['verify_user_realm_input'] = "True"; |
224 | 224 | } |
225 | 225 | |
226 | 226 | foreach ($config as $name => $value) { |
227 | - $this->writeConfigLine($file, 'Config.', $name, $value . '"'); |
|
227 | + $this->writeConfigLine($file, 'Config.', $name, $value.'"'); |
|
228 | 228 | } |
229 | 229 | |
230 | 230 | foreach ($configRaw as $name => $value) { |
231 | - fwrite($file, 'Config.' . $name . ' = ' . $value . "\n"); |
|
231 | + fwrite($file, 'Config.'.$name.' = '.$value."\n"); |
|
232 | 232 | } |
233 | 233 | |
234 | 234 | if ($tou === '') { |
235 | - fwrite($file, 'Config.tou = ""' . "\n"); |
|
235 | + fwrite($file, 'Config.tou = ""'."\n"); |
|
236 | 236 | } else { |
237 | - fwrite($file, 'Config.tou = """' . $tou . '"""' . "\n"); |
|
237 | + fwrite($file, 'Config.tou = """'.$tou.'"""'."\n"); |
|
238 | 238 | } |
239 | 239 | |
240 | - fwrite($file, 'Config.CA = """' . $this->mkCAfile() . '"""' . "\n"); |
|
240 | + fwrite($file, 'Config.CA = """'.$this->mkCAfile().'"""'."\n"); |
|
241 | 241 | $sbUserFile = $this->mkSbUserFile(); |
242 | 242 | if ($sbUserFile !== '') { |
243 | - fwrite($file, 'Config.sb_user_file = """' . $sbUserFile . '"""' . "\n"); |
|
243 | + fwrite($file, 'Config.sb_user_file = """'.$sbUserFile.'"""'."\n"); |
|
244 | 244 | } |
245 | 245 | } |
246 | 246 | |
@@ -292,7 +292,7 @@ discard block |
||
292 | 292 | } |
293 | 293 | $out .= "'DNS:$oneServer'"; |
294 | 294 | } |
295 | - return "[" . $out. "]"; |
|
295 | + return "[".$out."]"; |
|
296 | 296 | } |
297 | 297 | |
298 | 298 | /** |
@@ -306,7 +306,7 @@ discard block |
||
306 | 306 | foreach ($ssids as $ssid => $cipher) { |
307 | 307 | $outArray[] = "'$ssid'"; |
308 | 308 | } |
309 | - return '[' . implode(', ', $outArray) . ']'; |
|
309 | + return '['.implode(', ', $outArray).']'; |
|
310 | 310 | } |
311 | 311 | |
312 | 312 | /** |
@@ -322,7 +322,7 @@ discard block |
||
322 | 322 | $outArray[] = "'$ssid'"; |
323 | 323 | } |
324 | 324 | } |
325 | - return '[' . implode(', ', $outArray) . ']'; |
|
325 | + return '['.implode(', ', $outArray).']'; |
|
326 | 326 | } |
327 | 327 | |
328 | 328 | /** |
@@ -330,7 +330,7 @@ discard block |
||
330 | 330 | * |
331 | 331 | * @return string |
332 | 332 | */ |
333 | - private function mkCAfile(){ |
|
333 | + private function mkCAfile() { |
|
334 | 334 | $out = ''; |
335 | 335 | $cAlist = $this->attributes['internal:CAs'][0]; |
336 | 336 | foreach ($cAlist as $oneCa) { |
@@ -346,7 +346,7 @@ discard block |
||
346 | 346 | */ |
347 | 347 | private function mkIntro() { |
348 | 348 | \core\common\Entity::intoThePotatoes(); |
349 | - $out = _("This installer has been prepared for {0}") . '\n\n' . _("More information and comments:") . '\n\nEMAIL: {1}\nWWW: {2}\n\n' . |
|
349 | + $out = _("This installer has been prepared for {0}").'\n\n'._("More information and comments:").'\n\nEMAIL: {1}\nWWW: {2}\n\n'. |
|
350 | 350 | _("Installer created with software from the GEANT project."); |
351 | 351 | \core\common\Entity::outOfThePotatoes(); |
352 | 352 | return $out; |
@@ -138,8 +138,8 @@ |
||
138 | 138 | */ |
139 | 139 | private function zipInstaller() { |
140 | 140 | // one can always access $this->attributes to check things |
141 | - $fileName = $this->installerBasename . '.zip'; |
|
142 | - $output = system('zip -q ' . $fileName . ' *'); |
|
141 | + $fileName = $this->installerBasename.'.zip'; |
|
142 | + $output = system('zip -q '.$fileName.' *'); |
|
143 | 143 | if ($output === FALSE) { |
144 | 144 | $this->loggerInstance->debug(2, "unable to zip the installer\n"); |
145 | 145 | } |
@@ -22,15 +22,15 @@ |
||
22 | 22 | namespace devices\redirect_dev; |
23 | 23 | |
24 | 24 | class DeviceRedirectDev extends \core\DeviceConfig { |
25 | - /** |
|
26 | - * Constructs a Device object. |
|
27 | - * |
|
28 | - * @final not to be redefined |
|
29 | - */ |
|
25 | + /** |
|
26 | + * Constructs a Device object. |
|
27 | + * |
|
28 | + * @final not to be redefined |
|
29 | + */ |
|
30 | 30 | final public function __construct() { |
31 | 31 | parent::__construct(); |
32 | - $this->setSupportedEapMethods([\core\common\EAP::EAPTYPE_NONE]); |
|
33 | - $this->loggerInstance->debug(4,"RedirectEx called"); |
|
32 | + $this->setSupportedEapMethods([\core\common\EAP::EAPTYPE_NONE]); |
|
33 | + $this->loggerInstance->debug(4,"RedirectEx called"); |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | /** |
@@ -30,7 +30,7 @@ |
||
30 | 30 | final public function __construct() { |
31 | 31 | parent::__construct(); |
32 | 32 | $this->setSupportedEapMethods([\core\common\EAP::EAPTYPE_NONE]); |
33 | - $this->loggerInstance->debug(4,"RedirectEx called"); |
|
33 | + $this->loggerInstance->debug(4, "RedirectEx called"); |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | /** |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | } else { |
147 | 147 | $this->databaseHandle->exec("INSERT INTO ownership (user_id, institution_id, blesslevel, orig_mail) VALUES(?, ?, ?, ?)", "siss", $owner, $catId, $level, $destMail); |
148 | 148 | } |
149 | - $this->loggerInstance->writeAudit((string) $owner, "OWN", "IdP " . $invitationDetails->cat_institution_id . " - added user as owner"); |
|
149 | + $this->loggerInstance->writeAudit((string) $owner, "OWN", "IdP ".$invitationDetails->cat_institution_id." - added user as owner"); |
|
150 | 150 | common\Entity::outOfThePotatoes(); |
151 | 151 | return new IdP($invitationDetails->cat_institution_id); |
152 | 152 | } |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | $idp = new IdP($fed->newIdP($invitationDetails->invite_fortype, $owner, $invitationDetails->invite_issuer_level, $invitationDetails->invite_dest_mail, $bestnameguess)); |
169 | 169 | } |
170 | 170 | $idp->addAttribute("general:instname", 'C', $bestnameguess); |
171 | - $this->loggerInstance->writeAudit($owner, "NEW", "IdP " . $idp->identifier . " - created from invitation"); |
|
171 | + $this->loggerInstance->writeAudit($owner, "NEW", "IdP ".$idp->identifier." - created from invitation"); |
|
172 | 172 | |
173 | 173 | // in case we have more admins in the queue which were invited to |
174 | 174 | // administer the same inst but haven't redeemed their invitations |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | WHERE invite_created >= TIMESTAMPADD(DAY, -1, NOW()) AND used = 0 AND name = ? AND country = ? AND ( cat_institution_id IS NULL OR external_db_uniquehandle IS NULL ) ", "ss", $invitationDetails->name, $invitationDetails->country); |
183 | 183 | // SELECT -> resource, no boolean |
184 | 184 | while ($pendingDetail = mysqli_fetch_object(/** @scrutinizer ignore-type */ $otherPending)) { |
185 | - $this->databaseHandle->exec("UPDATE invitations SET cat_institution_id = " . $idp->identifier . " WHERE id = " . $pendingDetail->id); |
|
185 | + $this->databaseHandle->exec("UPDATE invitations SET cat_institution_id = ".$idp->identifier." WHERE id = ".$pendingDetail->id); |
|
186 | 186 | } |
187 | 187 | |
188 | 188 | common\Entity::outOfThePotatoes(); |
@@ -281,9 +281,9 @@ discard block |
||
281 | 281 | $retval = []; |
282 | 282 | $invitations = $this->databaseHandle->exec("SELECT cat_institution_id, country, name, invite_issuer_level, invite_dest_mail, invite_token , TIMESTAMPADD(DAY, 1, invite_created) as expiry |
283 | 283 | FROM invitations |
284 | - WHERE cat_institution_id " . ( $idpIdentifier != 0 ? "= $idpIdentifier" : "IS NULL") . " AND invite_created >= TIMESTAMPADD(DAY, -1, NOW()) AND used = 0"); |
|
284 | + WHERE cat_institution_id " . ($idpIdentifier != 0 ? "= $idpIdentifier" : "IS NULL")." AND invite_created >= TIMESTAMPADD(DAY, -1, NOW()) AND used = 0"); |
|
285 | 285 | // SELECT -> resource, not boolean |
286 | - $this->loggerInstance->debug(4, "Retrieving pending invitations for " . ($idpIdentifier != 0 ? "IdP $idpIdentifier" : "IdPs awaiting initial creation" ) . ".\n"); |
|
286 | + $this->loggerInstance->debug(4, "Retrieving pending invitations for ".($idpIdentifier != 0 ? "IdP $idpIdentifier" : "IdPs awaiting initial creation").".\n"); |
|
287 | 287 | while ($invitationQuery = mysqli_fetch_object(/** @scrutinizer ignore-type */ $invitations)) { |
288 | 288 | $retval[] = ["country" => $invitationQuery->country, "name" => $invitationQuery->name, "mail" => $invitationQuery->invite_dest_mail, "token" => $invitationQuery->invite_token, "expiry" => $invitationQuery->expiry]; |
289 | 289 | } |