Test Setup Failed
Push — master ( d62009...b98104 )
by Stefan
21:57
created
web/skins/modern/copyright.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 <head>
25 25
 <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no">
26 26
 <link rel="stylesheet" media="screen" type="text/css" href="<?php echo $Gui->skinObject->findResourceUrl("CSS", "cat-user.css"); ?>" />
27
-<title><?php echo config\Master::APPEARANCE['productname'];?> Copyright and Licensing</title>
27
+<title><?php echo config\Master::APPEARANCE['productname']; ?> Copyright and Licensing</title>
28 28
 </head>
29 29
 <body>
30 30
 <div id="wrap">
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
             <div id="user_page" style="display:block">
36 36
                 <?php echo $divs->divPagetitle(config\Master::APPEARANCE['productname']." Copyright and Licensing", ""); ?>
37 37
                 <div style="padding:20px">
38
-            <?php require dirname(dirname(__DIR__)) . "/copyright.inc.php"; ?>
38
+            <?php require dirname(dirname(__DIR__))."/copyright.inc.php"; ?>
39 39
                 </div>
40 40
             </div>
41 41
         </div>
Please login to merge, or discard this patch.
web/skins/modern/diag/diag.php 1 patch
Spacing   +68 added lines, -68 removed lines patch added patch discarded remove patch
@@ -46,9 +46,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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@<strong>realm.tld</strong>):");
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,11 +143,11 @@  discard block
 block discarded – undo
143 143
                             echo 'none';
144 144
                         }
145 145
                         echo ";'>";
146
-                        echo '<h3>' . _("What is the nature of the problem?") . '</h3>';
147
-                        echo '<input type="radio" name="problem_type" value="0"' . (($sp==1)? ' checked' : '') . '>';
148
-                        echo _("I suspect a technical problem at a particular IdP") . '<br>';
146
+                        echo '<h3>'._("What is the nature of the problem?").'</h3>';
147
+                        echo '<input type="radio" name="problem_type" value="0"'.(($sp == 1) ? ' checked' : '').'>';
148
+                        echo _("I suspect a technical problem at a particular IdP").'<br>';
149 149
                         echo '<input type="radio" name="problem_type" value="1">';
150
-                        echo _("I want to report abuse of network resources by a roaming user") . '<br>';
150
+                        echo _("I want to report abuse of network resources by a roaming user").'<br>';
151 151
                         echo '<input type="radio" name="problem_type" value="2">';
152 152
                         echo _("I suspect a technical problem for one of my users at a particular SP");
153 153
                         echo "<div id='idp_contact_area'></div>";
@@ -156,9 +156,9 @@  discard block
 block discarded – undo
156 156
                         echo "</div>"; 
157 157
                     } else {
158 158
                         echo "0\">";
159
-                        echo _("This service is for authenticated admins only.") . '<br>';
160
-                        echo "<a href=\"diag.php?admin=1\">" .
161
-                             _("eduroam® admin access is needed") . "</a>";
159
+                        echo _("This service is for authenticated admins only.").'<br>';
160
+                        echo "<a href=\"diag.php?admin=1\">".
161
+                             _("eduroam® admin access is needed")."</a>";
162 162
                     }
163 163
                 ?>
164 164
             </div> 
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
         return false;
235 235
     });
236 236
     $(document).on('change', '#idp_country' , function() {
237
-        var comment = <?php echo '"' . _("Fetching institutions list") . '..."'; ?>;  
237
+        var comment = <?php echo '"'._("Fetching institutions list").'..."'; ?>;  
238 238
         var id = $(this).attr('id');
239 239
         var k = id.indexOf('_');
240 240
         var type = id.substr(0,k);
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
                         var shtml = '';
253 253
                         var select = '';
254 254
                         if (type !== 'asp') {
255
-                            shtml = <?php echo '"<td>' . _("Select institution:") . '</td><td>"'; ?>;
255
+                            shtml = <?php echo '"<td>'._("Select institution:").'</td><td>"'; ?>;
256 256
                         }
257 257
                         select = '<select id="' + type + '_inst" name="' + type + '_inst" style="margin-left:0px; width:400px;"><option value=""></option>';
258 258
                         for (var i in institutions) {
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
                     } else {
274 274
                         if (data.status === 0) {
275 275
                             inProgress(0);
276
-                            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.") . '"'; ?>;
276
+                            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.").'"'; ?>;
277 277
                             alert(msg);
278 278
                             $('#select_idp_country').show();
279 279
                             $('#select_idp_area').hide();
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
                 },
283 283
                 error:function() {
284 284
                     inProgress(0);
285
-                    var msg = <?php echo '"' . _("Can not search in database. You have to provide the realm you are interested in.") . '"'; ?>;
285
+                    var msg = <?php echo '"'._("Can not search in database. You have to provide the realm you are interested in.").'"'; ?>;
286 286
                     alert(msg);
287 287
                     $('#select_idp_country').show();
288 288
                     $('#select_idp_area').hide();
@@ -298,9 +298,9 @@  discard block
 block discarded – undo
298 298
     });
299 299
     $(document).on('change', '#select_sp_problem' , function() {
300 300
         if ($('#select_sp_problem').val().substr(0,6) == 'abuse-') {
301
-            $('#realm_in_db_admin').text(<?php echo '"' . _("Check if this realm is registered") . '"'; ?>);
301
+            $('#realm_in_db_admin').text(<?php echo '"'._("Check if this realm is registered").'"'; ?>);
302 302
         } else {
303
-            $('#realm_in_db_admin').text(<?php echo '"' . _("Check this realm") . '"'; ?>);
303
+            $('#realm_in_db_admin').text(<?php echo '"'._("Check this realm").'"'; ?>);
304 304
         }
305 305
         $('#realm_in_db_admin').hide();
306 306
         $('#admin_realm').val('');
@@ -308,7 +308,7 @@  discard block
 block discarded – undo
308 308
         clear_sp_question();
309 309
     });
310 310
     $(document).on('change', '#sp_country, #asp_country' , function() {
311
-        var comment = <?php echo '"' . _("Fetching institutions list") . '..."'; ?>;  
311
+        var comment = <?php echo '"'._("Fetching institutions list").'..."'; ?>;  
312 312
         var id = $(this).attr('id');
313 313
         var k = id.indexOf('_');
314 314
         var type = id.substr(0,k);
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
                         var shtml = '';
327 327
                         var select = '';
328 328
                         if (type !== 'asp') {
329
-                            shtml = <?php echo '"<td>' . _("Select institution:") . '</td><td>"'; ?>;
329
+                            shtml = <?php echo '"<td>'._("Select institution:").'</td><td>"'; ?>;
330 330
                         }
331 331
                         select = '<select id="' + type + '_inst" name="' + type + '_inst" style="margin-left:0px; width:400px;"><option value=""></option>';
332 332
                         for (var i in hotspots) {
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
                             inProgress(0);
350 350
                             var select = '<select id="' + type + '_inst" name="' + type + '_inst" style="margin-left:0px; width:400px;"><option value="">';
351 351
                             var shtml = '<td></td><td>';
352
-                            select = select + <?php echo '"' . _("Other location") . '"'; ?> + '</option></select></td>';
352
+                            select = select + <?php echo '"'._("Other location").'"'; ?> + '</option></select></td>';
353 353
                             if (type !== 'asp') {
354 354
                                 $('#row_' + type + '_institution').html('');
355 355
                                 $('#row_' + type + '_institution').append(shtml + select);
@@ -383,7 +383,7 @@  discard block
 block discarded – undo
383 383
             $('#start_test_area').hide();
384 384
             return false;
385 385
         }
386
-        var comment = <?php echo '"' . _("Fetching realms list") . '..."'; ?>;
386
+        var comment = <?php echo '"'._("Fetching realms list").'..."'; ?>;
387 387
         inProgress(1, comment);
388 388
         $.ajax({
389 389
             url: "findRealm.php",
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
                     var realms = data.realms;
396 396
                     var realmselect = '';
397 397
                     if (realms.length > 1) {
398
-                        realmselect = <?php echo '"<td>' . _("Check realm(s):") . '</td>"'; ?>;
398
+                        realmselect = <?php echo '"<td>'._("Check realm(s):").'</td>"'; ?>;
399 399
                         realmselect = realmselect + '<td>' + "<span style='margin-left: 10px'>";
400 400
                         for (var i in realms) {
401 401
                             realmselect = realmselect + '<input type="radio" name="realm" ';
@@ -407,7 +407,7 @@  discard block
 block discarded – undo
407 407
                         }
408 408
                         realmselect = realmselect + '</span></td>';
409 409
                     } else {
410
-                        realmselect = <?php echo '"<td>' . _("Realm:") . '</td>"'; ?>;
410
+                        realmselect = <?php echo '"<td>'._("Realm:").'</td>"'; ?>;
411 411
                         realmselect = realmselect + '<td>' + "<span style='margin-left: 10px'>";
412 412
                         realmselect = realmselect + realms[0] + '</span>';
413 413
                         realmselect = realmselect + '<input type="hidden" name="realm" value="' + realms[0] + '">';
@@ -459,7 +459,7 @@  discard block
 block discarded – undo
459 459
             clear_sp_question();
460 460
             t = 1;
461 461
         }
462
-        var comment = <?php echo '"' . _("Running realm tests") . '..."'; ?>;
462
+        var comment = <?php echo '"'._("Running realm tests").'..."'; ?>;
463 463
         inProgress(1, comment);
464 464
         /*waiting(comment);*/
465 465
         $.ajax({
@@ -518,7 +518,7 @@  discard block
 block discarded – undo
518 518
         testSociopath('', answer);
519 519
     });
520 520
     $('#realmtest').click(function(event){
521
-        var comment = <?php echo '"<br><br>' . _("Running realm tests") . '..."'; ?>;
521
+        var comment = <?php echo '"<br><br>'._("Running realm tests").'..."'; ?>;
522 522
         inProgress(1, comment);
523 523
         $('#start_test_area').hide();
524 524
         if ($('#select_sp_area').is(':hidden')) {
@@ -566,13 +566,13 @@  discard block
 block discarded – undo
566 566
                         reset_footer();
567 567
                         testSociopath(realm, 0);
568 568
                     } else {
569
-                        var title = <?php echo '"' . _("Diagnostics results for selected realms") . '"'; ?>;
570
-                        result = '<div class="padding"><h3>' + <?php echo '"' . _("An unknown problem occured") . '"'; ?>;
569
+                        var title = <?php echo '"'._("Diagnostics results for selected realms").'"'; ?>;
570
+                        result = '<div class="padding"><h3>' + <?php echo '"'._("An unknown problem occured").'"'; ?>;
571 571
                         result = result + '</h3>'
572 572
                         if (r.length == 1) {
573
-                            result = result + <?php echo '"' . _("This test includes checking of the following realm") . '"'; ?>;
573
+                            result = result + <?php echo '"'._("This test includes checking of the following realm").'"'; ?>;
574 574
                         } else {    
575
-                            result = result + <?php echo '"' . _("This test includes checking of the following realms") . '"'; ?>;
575
+                            result = result + <?php echo '"'._("This test includes checking of the following realms").'"'; ?>;
576 576
                         }
577 577
                         result = result + ': '
578 578
                         for (var i=0; i < r.length; i++) {
@@ -582,7 +582,7 @@  discard block
 block discarded – undo
582 582
                             result = result + r[i];
583 583
                         }
584 584
                         result = result + '.<br>';
585
-                        result = result + <?php echo '"' . _("You should report this to") . '"'; ?> + ' <a href="mailto:[email protected]">[email protected]</a>';
585
+                        result = result + <?php echo '"'._("You should report this to").'"'; ?> + ' <a href="mailto:[email protected]">[email protected]</a>';
586 586
                         result = result + '</div>';
587 587
                         $('#after_stage_1').hide();
588 588
                         $('#before_stage_1').show();
@@ -650,43 +650,43 @@  discard block
 block discarded – undo
650 650
             success:function(data) {
651 651
                 if (data.status === 1) {
652 652
                     var result = '';
653
-                    var title = <?php echo '"' . _("eduroam admin report submission") . '"'; ?>;
653
+                    var title = <?php echo '"'._("eduroam admin report submission").'"'; ?>;
654 654
                     result = '<div class="padding">';
655 655
                     if (type == 'idp_send') {
656
-                        result = result + '<h3>'+ <?php echo '"' . _("SP contacting IdP due to technical problems or abuse") . '"'; ?> + '</h3>';
656
+                        result = result + '<h3>'+ <?php echo '"'._("SP contacting IdP due to technical problems or abuse").'"'; ?> + '</h3>';
657 657
                         result = result + '<table>';
658
-                        result = result + '<tr><td>' + <?php echo '"' . _("Reason") . '"'; ?> + '</td><td>' + data.reason + '</td></tr>';
659
-                        result = result + '<tr><td>' + <?php echo '"' . _("Event's timestamp") . '"'; ?> + '</td><td>' + data.timestamp + '</td></tr>';
660
-                        result = result + '<tr><td>' + <?php echo '"' . _("Calling-Station-Id") . '"'; ?> + '</td><td>' + data.mac + '</td></tr>';
661
-                        result = result + '<tr><td>' + <?php echo '"' . _("Additional description") . '"'; ?> +'</td><td>' + data.freetext + '</td></tr>';
662
-                        result = result + '<tr><td>' + <?php echo '"' . _("An email to contact the reporter") . '"'; ?> + '</td><td>' + data.email + '</td></tr>';
663
-                        result = result + '<tr><td>' + <?php echo '"' . _("Test result") . '" '; ?> +'</td><td>';
658
+                        result = result + '<tr><td>' + <?php echo '"'._("Reason").'"'; ?> + '</td><td>' + data.reason + '</td></tr>';
659
+                        result = result + '<tr><td>' + <?php echo '"'._("Event's timestamp").'"'; ?> + '</td><td>' + data.timestamp + '</td></tr>';
660
+                        result = result + '<tr><td>' + <?php echo '"'._("Calling-Station-Id").'"'; ?> + '</td><td>' + data.mac + '</td></tr>';
661
+                        result = result + '<tr><td>' + <?php echo '"'._("Additional description").'"'; ?> +'</td><td>' + data.freetext + '</td></tr>';
662
+                        result = result + '<tr><td>' + <?php echo '"'._("An email to contact the reporter").'"'; ?> + '</td><td>' + data.email + '</td></tr>';
663
+                        result = result + '<tr><td>' + <?php echo '"'._("Test result").'" '; ?> +'</td><td>';
664 664
                         if (data.tests_result == 1) {
665
-                            result = result + <?php echo '"' . _("failure") . '"'; ?>;
665
+                            result = result + <?php echo '"'._("failure").'"'; ?>;
666 666
                         } else {
667
-                            result = result + <?php echo '"' . _("success") . '"'; ?>;
667
+                            result = result + <?php echo '"'._("success").'"'; ?>;
668 668
                         }
669 669
                         result = result + '</td></tr>';
670
-                        result = result + '<tr><td>' + <?php echo '"' . _("Test URL") . '" '; ?> +'</td><td><a href="' + data.testurl + '">' + data.testurl + '</a></td></tr>';
671
-                        result = result + '<tr><td>' + <?php echo '"' . _("Email to IdP administrators ") . '"'; ?> + ' ';
670
+                        result = result + '<tr><td>' + <?php echo '"'._("Test URL").'" '; ?> +'</td><td><a href="' + data.testurl + '">' + data.testurl + '</a></td></tr>';
671
+                        result = result + '<tr><td>' + <?php echo '"'._("Email to IdP administrators ").'"'; ?> + ' ';
672 672
                         if (data.emailsent == 1) {
673
-                            result = result + <?php echo '"' . _("send successfully") . '"'; ?>;
673
+                            result = result + <?php echo '"'._("send successfully").'"'; ?>;
674 674
                         } else {
675
-                            result = result + <?php echo '"' . _("not sent - failure while sending") . '"'; ?>;
675
+                            result = result + <?php echo '"'._("not sent - failure while sending").'"'; ?>;
676 676
                         }
677 677
                         result = result + '</td><td></td></tr>';
678 678
                     }
679 679
                     if (type == 'sp_send') {
680
-                        result = result + '<h3>'+ <?php echo '"' . _("IdP contacting SP due to technical problems or abuse") . '"'; ?> + '</h3>';
680
+                        result = result + '<h3>'+ <?php echo '"'._("IdP contacting SP due to technical problems or abuse").'"'; ?> + '</h3>';
681 681
                         result = result + '<table>';
682
-                        result = result + '<tr><td>' + <?php echo '"' . _("Reason") . '"'; ?> + '</td><td>' + data.reason + '</td></tr>';
683
-                        result = result + '<tr><td>' + <?php echo '"' . _("SP's Operator-Name") . '"'; ?> + '</td><td>' + data.opname + '</td></tr>';
684
-                        result = result + '<tr><td>' + <?php echo '"' . _("User's outer ID") . '"'; ?> + '</td><td>' + data.outerid + '</td></tr>';
685
-                        result = result + '<tr><td>' + <?php echo '"' . _("IdP email") . '"'; ?> + '</td><td>' + data.email + '</td></tr>';
686
-                        result = result + '<tr><td>' + <?php echo '"' . _("Event's timestamp") . '"'; ?> + '</td><td>' + data.timestamp + '</td></tr>';
687
-                        result = result + '<tr><td>' + <?php echo '"' . _("Calling-Station-Id") . '"'; ?> + '</td><td>' + data.mac + '</td></tr>';
688
-                        result = result + '<tr><td>' + <?php echo '"' . _("Additional description") . '"'; ?> +'</td><td>' + data.freetext + '</td></tr>';
689
-                        result = result + '<tr><td>' + <?php echo '"' . _("How to contact the user") . '"'; ?> +'</td><td>' + data.cdetails + '</td></tr>';
682
+                        result = result + '<tr><td>' + <?php echo '"'._("Reason").'"'; ?> + '</td><td>' + data.reason + '</td></tr>';
683
+                        result = result + '<tr><td>' + <?php echo '"'._("SP's Operator-Name").'"'; ?> + '</td><td>' + data.opname + '</td></tr>';
684
+                        result = result + '<tr><td>' + <?php echo '"'._("User's outer ID").'"'; ?> + '</td><td>' + data.outerid + '</td></tr>';
685
+                        result = result + '<tr><td>' + <?php echo '"'._("IdP email").'"'; ?> + '</td><td>' + data.email + '</td></tr>';
686
+                        result = result + '<tr><td>' + <?php echo '"'._("Event's timestamp").'"'; ?> + '</td><td>' + data.timestamp + '</td></tr>';
687
+                        result = result + '<tr><td>' + <?php echo '"'._("Calling-Station-Id").'"'; ?> + '</td><td>' + data.mac + '</td></tr>';
688
+                        result = result + '<tr><td>' + <?php echo '"'._("Additional description").'"'; ?> +'</td><td>' + data.freetext + '</td></tr>';
689
+                        result = result + '<tr><td>' + <?php echo '"'._("How to contact the user").'"'; ?> +'</td><td>' + data.cdetails + '</td></tr>';
690 690
                     }
691 691
                     result = result + '</div>';
692 692
                     showInfo(result, title);
@@ -711,7 +711,7 @@  discard block
 block discarded – undo
711 711
                         $(this).removeClass('visible_row').addClass('hidden_row');
712 712
                     }
713 713
                 });
714
-                $('#admin_realm').attr('title', <?php echo '"' . _("Wrong format of realm") . '"'; ?>);
714
+                $('#admin_realm').attr('title', <?php echo '"'._("Wrong format of realm").'"'; ?>);
715 715
             } else {
716 716
                 $('#admin_realm').removeClass('error_input');
717 717
                 $('#admin_realm').attr('title', '');
@@ -721,7 +721,7 @@  discard block
 block discarded – undo
721 721
     $(document).on('keyup change', '#email' , function() {
722 722
         if ($(this).val().length == 0 || !isEmail($(this).val())) {
723 723
             $('#email').addClass('error_input');
724
-            $('#email').attr('title', <?php echo '"' . _("Wrong format of email") . '"'; ?>);
724
+            $('#email').attr('title', <?php echo '"'._("Wrong format of email").'"'; ?>);
725 725
         } else {
726 726
             $('#email').removeClass('error_input');
727 727
             $('#email').attr('title', '');
@@ -734,7 +734,7 @@  discard block
 block discarded – undo
734 734
         if ($('#mac').val().length > 0) {
735 735
             if ($('#mac').val().length != 17) {
736 736
                 $('#mac').addClass('error_input');
737
-                $('#mac').attr('title', <?php echo '"' . _("MAC address is incomplete") . '"'; ?>);
737
+                $('#mac').attr('title', <?php echo '"'._("MAC address is incomplete").'"'; ?>);
738 738
             } else {
739 739
                 $('#mac').removeClass('error_input'); 
740 740
                 $('#mac').attr('title', '');
@@ -743,7 +743,7 @@  discard block
 block discarded – undo
743 743
         if ($(this).attr('id') == 'email' &&  $(this).val().length > 0) {
744 744
             if (!isEmail($(this).val())) {
745 745
                 $('#email').addClass('error_input');
746
-                $('#email').attr('title', <?php echo '"' . _("Wrong format of email") . '"'; ?>);
746
+                $('#email').attr('title', <?php echo '"'._("Wrong format of email").'"'; ?>);
747 747
             } else {
748 748
                 $('#email').removeClass('error_input');
749 749
                 $('#email').attr('title', '');
@@ -752,7 +752,7 @@  discard block
 block discarded – undo
752 752
         if ($(this).attr('id') == 'outer_id' &&  $(this).val().length > 0) {
753 753
             if (!isEmail($(this).val(), true)) {
754 754
                 $('#outer_id').addClass('error_input');
755
-                $('#outer_id').attr('title', <?php echo '"' . _("Wrong format of outer ID") . '"'; ?>);
755
+                $('#outer_id').attr('title', <?php echo '"'._("Wrong format of outer ID").'"'; ?>);
756 756
             } else {
757 757
                 $('#outer_id').removeClass('error_input');
758 758
                 $('#outer_id').attr('title', '');
@@ -761,7 +761,7 @@  discard block
 block discarded – undo
761 761
         if ($(this).attr('id') == 'opname' && $('#opname').val().length > 0) {
762 762
             if (!isOperatorName($(this).val())) {
763 763
                 $('#opname').addClass('error_input');
764
-                $('#opname').attr('title', <?php echo '"' . _("Wrong string given as OperatorName") . '"'; ?>);
764
+                $('#opname').attr('title', <?php echo '"'._("Wrong string given as OperatorName").'"'; ?>);
765 765
                 $('#spmanually').show();
766 766
             } else {
767 767
                 $('#opname').removeClass('error_input');
Please login to merge, or discard this patch.
web/skins/example/accountstatus.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -16,12 +16,12 @@
 block discarded – undo
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 alt='Consortium logo' 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 alt='Consortium logo' 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 alt='Custom image' 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 alt='Custom image' 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>
Please login to merge, or discard this patch.
web/skins/example/index.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
  */
21 21
 ?>
22 22
 <h1>Example Skin (main user frontpage)</h1>
23
-<img alt='Consortium logo' src="<?php echo $Gui->skinObject->findresourceUrl("IMAGES","consortium_logo.png");?>"/>
23
+<img alt='Consortium logo' src="<?php echo $Gui->skinObject->findresourceUrl("IMAGES", "consortium_logo.png"); ?>"/>
24 24
 <p>This skin is much more sober and less bloated than the default one. As it happens, it also doesn't do anything.</p>
25 25
 <p>But at least it goes to show that it's possible to include custom images/CSS/external software using findResourceUrl(..., $filename):
26
-<img alt='Custom image' src="<?php echo $Gui->skinObject->findresourceUrl("IMAGES","custom.png");?>"/>
26
+<img alt='Custom image' src="<?php echo $Gui->skinObject->findresourceUrl("IMAGES", "custom.png"); ?>"/>
Please login to merge, or discard this patch.
web/tou.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
  * @package UserGUI
28 28
  * 
29 29
  */
30
-require dirname(dirname(__FILE__)) . "/config/_config.php";
30
+require dirname(dirname(__FILE__))."/config/_config.php";
31 31
 $loggerInstance = new \core\common\Logging();
32 32
 $langObject = new \core\common\Language();
33 33
 $cat = new \core\CAT();
@@ -51,9 +51,9 @@  discard block
 block discarded – undo
51 51
     <body style='background: #fff url(resources/images/bg_grey_tile.png) repeat-x;'>
52 52
         <img src="<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']), '/') ?>/resources/images/consortium_logo.png" style="padding-right:20px; padding-top:20px; float:right" alt="logo" />
53 53
 
54
-        <div id="motd"><?php print ( isset(\config\Master::APPEARANCE['MOTD']) ? \config\Master::APPEARANCE['MOTD'] : '&nbsp'); ?></div>
54
+        <div id="motd"><?php print (isset(\config\Master::APPEARANCE['MOTD']) ? \config\Master::APPEARANCE['MOTD'] : '&nbsp'); ?></div>
55 55
 
56
-        <h1><a href="<?php echo dirname($_SERVER['SCRIPT_NAME']) . '?lang=' . $langObject->getLang(); ?>"><?php echo \config\Master::APPEARANCE['productname']; ?></a></h1>
56
+        <h1><a href="<?php echo dirname($_SERVER['SCRIPT_NAME']).'?lang='.$langObject->getLang(); ?>"><?php echo \config\Master::APPEARANCE['productname']; ?></a></h1>
57 57
         <div id="tou">
58 58
             <?php
59 59
             require "user/tou.php";
@@ -61,11 +61,11 @@  discard block
 block discarded – undo
61 61
         </div>
62 62
         <div>
63 63
             <table style='width:100%'>
64
-                <caption><?php echo "Legalese";?></caption>
64
+                <caption><?php echo "Legalese"; ?></caption>
65 65
                 <tr>
66
-                    <th class='wai-invisible' scope='col'><?php echo "Copyright";?></th>
67
-                    <th class='wai-invisible' scope='col'><?php echo "Privacy Notice";?></th>
68
-                    <th class='wai-invisible' scope='col'><?php echo "Attribution";?></th>
66
+                    <th class='wai-invisible' scope='col'><?php echo "Copyright"; ?></th>
67
+                    <th class='wai-invisible' scope='col'><?php echo "Privacy Notice"; ?></th>
68
+                    <th class='wai-invisible' scope='col'><?php echo "Attribution"; ?></th>
69 69
                 </tr>
70 70
                 <tr>
71 71
                     <td style='padding-left:20px; padding-right:20px; text-align:left; vertical-align:top;'>
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
                     </td>
74 74
                     <?php
75 75
                     if (!empty(\config\Master::APPEARANCE['privacy_notice_url'])) {
76
-                        $retval .= "<td><a href='".\config\Master::APPEARANCE['privacy_notice_url']."'>" . sprintf(_("%s Privacy Notice"),\config\ConfAssistant::CONSORTIUM['name']) . "</a></td>";
76
+                        $retval .= "<td><a href='".\config\Master::APPEARANCE['privacy_notice_url']."'>".sprintf(_("%s Privacy Notice"), \config\ConfAssistant::CONSORTIUM['name'])."</a></td>";
77 77
                     }
78 78
                     ?>
79 79
                     <td style='padding-left:80px; padding-right:20px; text-align:right; vertical-align:top;'>
Please login to merge, or discard this patch.
web/admin/action_generate_zone.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
  */
27 27
 ?>
28 28
 <?php
29
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
29
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
30 30
 
31 31
 $auth = new \web\lib\admin\Authentication();
32 32
 $deco = new \web\lib\admin\PageDecoration();
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
     "nl" => "_radsec._tcp.eduroam.nl.",
76 76
     ];
77 77
     foreach ($cat->getSuperglueZone() as $oneEntry) {
78
-        foreach (explode(',',$oneEntry['inst_realm']) as $oneRealm) {
78
+        foreach (explode(',', $oneEntry['inst_realm']) as $oneRealm) {
79 79
             $target = "_radsec._somewhere.eduroam.org";
80 80
             foreach ($NROs as $tld => $nroTarget) {
81 81
                 if (preg_match("/$tld$/", $oneRealm)) {
Please login to merge, or discard this patch.
core/CAT.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -105,28 +105,28 @@
 block discarded – undo
105 105
         parent::__construct();
106 106
         common\Entity::intoThePotatoes();
107 107
 
108
-        $this->catVersionString = sprintf(_("Unreleased %s Git Revision"), "<a href='https://github.com/GEANT/CAT/tree/master/Changes.md'>") . "</a>";
108
+        $this->catVersionString = sprintf(_("Unreleased %s Git Revision"), "<a href='https://github.com/GEANT/CAT/tree/master/Changes.md'>")."</a>";
109 109
         if (CAT::RELEASE_VERSION) {
110 110
             $major = CAT::VERSION_MAJOR;
111 111
             $minor = CAT::VERSION_MINOR;
112 112
             $patch = CAT::VERSION_PATCH;
113 113
             $extra = CAT::VERSION_EXTRA;
114 114
             $temp_version = "CAT-$major.$minor";
115
-            $branch = "release_$major" . "_$minor";
115
+            $branch = "release_$major"."_$minor";
116 116
             if (CAT::VERSION_PATCH != 0) {
117 117
                 $temp_version .= ".$patch";
118 118
             }
119 119
             if (CAT::VERSION_EXTRA != "") {
120 120
                 $temp_version .= "-$extra";
121 121
             }
122
-            $this->catVersionString = sprintf(_("Release <a href='%s'>%s</a>"), "https://github.com/GEANT/CAT/tree/" . $branch . "/Changes.md", $temp_version);
122
+            $this->catVersionString = sprintf(_("Release <a href='%s'>%s</a>"), "https://github.com/GEANT/CAT/tree/".$branch."/Changes.md", $temp_version);
123 123
         }
124 124
         $product = \config\Master::APPEARANCE['productname'];
125 125
         $minYear = self::COPYRIGHT_MIN_YEAR;
126 126
         $maxYear = self::COPYRIGHT_MAX_YEAR;
127 127
         $holder = self::COPYRIGHT_HOLDER;
128 128
         $consortia = self::COPYRIGHT_CONSORTIA;
129
-        $this->catCopyright = "$product - " . $this->catVersionString . " &copy; $minYear-$maxYear $holder<br/>on behalf of $consortia; and others <a href='copyright.php'>Full Copyright and Licenses</a>";
129
+        $this->catCopyright = "$product - ".$this->catVersionString." &copy; $minYear-$maxYear $holder<br/>on behalf of $consortia; and others <a href='copyright.php'>Full Copyright and Licenses</a>";
130 130
 
131 131
 
132 132
         /* Federations are created in DB with bootstrapFederation, and listed via listFederations
Please login to merge, or discard this patch.
web/admin/sanity_tests.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
  *          <base_url>/copyright.php after deploying the software
20 20
  */
21 21
 
22
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
22
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
23 23
 
24 24
 $Tests = [
25 25
     'Directories',
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 
44 44
 $uiElements = new \web\lib\admin\UIElements();
45 45
 
46
-if (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_SILVERBULLET'] == "LOCAL" || \config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_RADIUS'] == "LOCAL" ) {
46
+if (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_SILVERBULLET'] == "LOCAL" || \config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_RADIUS'] == "LOCAL") {
47 47
     $Tests[] = 'Makensis';
48 48
     $Tests[] = 'Makensis=>NSISmodules';
49 49
 }
Please login to merge, or discard this patch.
core/DeviceConfig.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
     protected function setSupportedEapMethods($eapArray)
86 86
     {
87 87
         $this->supportedEapMethods = $eapArray;
88
-        $this->loggerInstance->debug(4, "This device (" . __CLASS__ . ") supports the following EAP methods: ");
88
+        $this->loggerInstance->debug(4, "This device (".__CLASS__.") supports the following EAP methods: ");
89 89
         $this->loggerInstance->debug(4, $this->supportedEapMethods);
90 90
     }
91 91
 
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
                     break 2;
138 138
                 }
139 139
             }
140
-            $longestSuffix = $candidate . $longestSuffix;
140
+            $longestSuffix = $candidate.$longestSuffix;
141 141
         }
142 142
         return $longestSuffix;
143 143
     }
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
             throw new Exception("No EAP type available.");
176 176
         }
177 177
         $this->attributes = $this->getProfileAttributes($profile);
178
-        $this->deviceUUID = common\Entity::uuid('', 'CAT' . $profile->institution . "-" . $profile->identifier . "-" . $this->device_id);
178
+        $this->deviceUUID = common\Entity::uuid('', 'CAT'.$profile->institution."-".$profile->identifier."-".$this->device_id);
179 179
 
180 180
 
181 181
         // if we are instantiating a Silverbullet profile AND have been given
@@ -200,8 +200,8 @@  discard block
 block discarded – undo
200 200
         // create temporary directory, its full path will be saved in $this->FPATH;
201 201
         $tempDir = \core\common\Entity::createTemporaryDirectory($purpose);
202 202
         $this->FPATH = $tempDir['dir'];
203
-        mkdir($tempDir['dir'] . '/tmp');
204
-        chdir($tempDir['dir'] . '/tmp');
203
+        mkdir($tempDir['dir'].'/tmp');
204
+        chdir($tempDir['dir'].'/tmp');
205 205
         $caList = [];
206 206
         $x509 = new \core\common\X509();
207 207
         if (isset($this->attributes['eap:ca_file'])) {
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
         $this->support_url_substitute = sprintf(_("your local %s support page"), \config\ConfAssistant::CONSORTIUM['display_name']);
240 240
 
241 241
         if ($this->signer && $this->options['sign']) {
242
-            $this->sign = ROOT . '/signer/' . $this->signer;
242
+            $this->sign = ROOT.'/signer/'.$this->signer;
243 243
         }
244 244
         $this->installerBasename = $this->getInstallerBasename();
245 245
         common\Entity::outOfThePotatoes();
@@ -299,10 +299,10 @@  discard block
 block discarded – undo
299 299
      */
300 300
     protected function findSourceFile($file)
301 301
     {
302
-        if (is_file($this->module_path . '/Files/' . $this->device_id . '/' . $file)) {
303
-            return $this->module_path . '/Files/' . $this->device_id . '/' . $file;
304
-        } elseif (is_file($this->module_path . '/Files/' . $file)) {
305
-            return $this->module_path . '/Files/' . $file;
302
+        if (is_file($this->module_path.'/Files/'.$this->device_id.'/'.$file)) {
303
+            return $this->module_path.'/Files/'.$this->device_id.'/'.$file;
304
+        } elseif (is_file($this->module_path.'/Files/'.$file)) {
305
+            return $this->module_path.'/Files/'.$file;
306 306
         } else {
307 307
             $this->loggerInstance->debug(2, "requested file $file does not exist\n");
308 308
             return FALSE;
@@ -426,19 +426,19 @@  discard block
 block discarded – undo
426 426
      */
427 427
     private function getInstallerBasename()
428 428
     {
429
-        $baseName = $this->customTranslit(\config\ConfAssistant::CONSORTIUM['name']) . "-" . $this->getDeviceId();
429
+        $baseName = $this->customTranslit(\config\ConfAssistant::CONSORTIUM['name'])."-".$this->getDeviceId();
430 430
         if (isset($this->attributes['profile:customsuffix'][1])) {
431 431
             // this string will end up as a filename on a filesystem, so always
432 432
             // take a latin-based language variant if available
433 433
             // and then scrub non-ASCII just in case
434
-            return $baseName . $this->customTranslit($this->attributes['profile:customsuffix'][1]);
434
+            return $baseName.$this->customTranslit($this->attributes['profile:customsuffix'][1]);
435 435
         }
436 436
         // Okay, no custom suffix. 
437 437
         // Use the configured inst name and apply shortening heuristics
438 438
         // if an instshortname is set, base on that, otherwise, the normal instname
439 439
         $attribToUse = (isset($this->attributes['general:instshortname']) ? 'general:instshortname' : 'general:instname');
440 440
         $lang_pointer = \config\Master::LANGUAGES[$this->languageInstance->getLang()]['latin_based'] == TRUE ? 0 : 1;
441
-        $this->loggerInstance->debug(5, "getInstallerBasename1:" . $this->attributes[$attribToUse][$lang_pointer] . "\n");
441
+        $this->loggerInstance->debug(5, "getInstallerBasename1:".$this->attributes[$attribToUse][$lang_pointer]."\n");
442 442
         $inst = $this->customTranslit($this->attributes[$attribToUse][$lang_pointer]);
443 443
         $this->loggerInstance->debug(4, "getInstallerBasename2:$inst\n");
444 444
         $Inst_a = explode('_', $inst);
@@ -453,10 +453,10 @@  discard block
 block discarded – undo
453 453
             if (!empty($this->attributes['profile:name']) && !empty($this->attributes['profile:name'][$lang_pointer])) {
454 454
                 $profTemp = $this->customTranslit($this->attributes['profile:name'][$lang_pointer]);
455 455
                 $prof = preg_replace('/_+$/', '', $profTemp);
456
-                return $baseName . $inst . '-' . $prof;
456
+                return $baseName.$inst.'-'.$prof;
457 457
             }
458 458
         }
459
-        return $baseName . $inst;
459
+        return $baseName.$inst;
460 460
     }
461 461
 
462 462
     /**
@@ -640,7 +640,7 @@  discard block
 block discarded – undo
640 640
                 $ext = 'unsupported';
641 641
             }
642 642
             $this->loggerInstance->debug(5, "saveLogoFile: $mime : $ext\n");
643
-            $fileName = 'logo-' . $type . $iterator . '.' . $ext;
643
+            $fileName = 'logo-'.$type.$iterator.'.'.$ext;
644 644
             $fileHandle = fopen($fileName, "w");
645 645
             if (!$fileHandle) {
646 646
                 $this->loggerInstance->debug(2, "saveLogoFile failed for: $fileName\n");
@@ -667,13 +667,13 @@  discard block
 block discarded – undo
667 667
         $mime = $finfo->buffer($blob);
668 668
         $ext = isset($this->mime_extensions[$mime]) ? $this->mime_extensions[$mime] : 'usupported';
669 669
         $this->loggerInstance->debug(5, "saveInfoFile: $mime : $ext\n");
670
-        $fileHandle = fopen('local-info.' . $ext, "w");
670
+        $fileHandle = fopen('local-info.'.$ext, "w");
671 671
         if ($fileHandle === FALSE) {
672 672
             throw new Exception("problem opening the file");
673 673
         }
674 674
         fwrite($fileHandle, $blob);
675 675
         fclose($fileHandle);
676
-        return(['name' => 'local-info.' . $ext, 'mime' => $ext]);
676
+        return(['name' => 'local-info.'.$ext, 'mime' => $ext]);
677 677
     }
678 678
 
679 679
     /**
@@ -727,9 +727,9 @@  discard block
 block discarded – undo
727 727
     {
728 728
         $outerId = NULL;
729 729
         if (isset($this->attributes['internal:use_anon_outer']) && $this->attributes['internal:use_anon_outer'][0] == "1" && isset($this->attributes['internal:realm'])) {
730
-            $outerId = "@" . $this->attributes['internal:realm'][0];
730
+            $outerId = "@".$this->attributes['internal:realm'][0];
731 731
             if (isset($this->attributes['internal:anon_local_value'])) {
732
-                $outerId = $this->attributes['internal:anon_local_value'][0] . $outerId;
732
+                $outerId = $this->attributes['internal:anon_local_value'][0].$outerId;
733 733
             }
734 734
         }
735 735
         return $outerId;
Please login to merge, or discard this patch.