Passed
Push — release_2_0 ( e102f0...0d5fd5 )
by Stefan
07:40
created
web/diag/findRealm.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -37,16 +37,16 @@
 block discarded – undo
37 37
  */
38 38
 function check_my_nonce($nonce, $optSalt = '') {
39 39
     $remote = filter_input(INPUT_SERVER, 'REMOTE_ADDR');
40
-    $lasthour = date("G") - 1 < 0 ? date('Ymd') . '23' : date("YmdG") - 1;
41
-    if (hash_hmac('sha256', session_id() . $optSalt, date("YmdG") . '1qaz2wsx3edc!QAZ@WSX#EDC' . $remote) == $nonce ||
42
-            hash_hmac('sha256', session_id() . $optSalt, $lasthour . '1qaz2wsx3edc!QAZ@WSX#EDC' . $remote) == $nonce) {
40
+    $lasthour = date("G") - 1 < 0 ? date('Ymd').'23' : date("YmdG") - 1;
41
+    if (hash_hmac('sha256', session_id().$optSalt, date("YmdG").'1qaz2wsx3edc!QAZ@WSX#EDC'.$remote) == $nonce ||
42
+            hash_hmac('sha256', session_id().$optSalt, $lasthour.'1qaz2wsx3edc!QAZ@WSX#EDC'.$remote) == $nonce) {
43 43
         return true;
44 44
     } else {
45 45
         return false;
46 46
     }
47 47
 }
48 48
 
49
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
49
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
50 50
 
51 51
 // we are referring to $_SESSION later in the file
52 52
 CAT_session_start();
Please login to merge, or discard this patch.
web/admin/inc/manageNewInst.inc.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
  */
21 21
 ?>
22 22
 <?php
23
-require_once dirname(dirname(dirname(dirname(__FILE__)))) . "/config/_config.php";
23
+require_once dirname(dirname(dirname(dirname(__FILE__))))."/config/_config.php";
24 24
 
25 25
 $auth = new \web\lib\admin\Authentication();
26 26
 $uiElements = new \web\lib\admin\UIElements();
@@ -57,8 +57,8 @@  discard block
 block discarded – undo
57 57
 <?php
58 58
 echo sprintf(_("On this page, you can add a new %s to your %s. Please fill out the form below to send out an email invitation to the new %s administrator."), $uiElements->nomenclatureInst, $uiElements->nomenclatureFed, $uiElements->nomenclatureInst);
59 59
 if (CONFIG['DB']['enforce-external-sync']) {
60
-    echo "<p>" . sprintf(_("You can either register a known %s (as defined in the %s database) or create a totally new %s."), $uiElements->nomenclatureInst, CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $uiElements->nomenclatureInst) . "</p>";
61
-    echo "<p>" . sprintf(_("The latter one is typically for an %s which is yet in a testing phase and therefore doesn't appear in the %s database yet."), $uiElements->nomenclatureInst, CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) . "</p>";    
60
+    echo "<p>".sprintf(_("You can either register a known %s (as defined in the %s database) or create a totally new %s."), $uiElements->nomenclatureInst, CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $uiElements->nomenclatureInst)."</p>";
61
+    echo "<p>".sprintf(_("The latter one is typically for an %s which is yet in a testing phase and therefore doesn't appear in the %s database yet."), $uiElements->nomenclatureInst, CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'])."</p>";    
62 62
 }
63 63
 ?>
64 64
 <hr/>
@@ -68,12 +68,12 @@  discard block
 block discarded – undo
68 68
         <?php
69 69
         if (CONFIG['DB']['enforce-external-sync']) {
70 70
             echo "<tr><td>
71
-                <input type='radio' name='creation' value='existing'>" . _("Existing IdP:") . "</input>
71
+                <input type='radio' name='creation' value='existing'>" . _("Existing IdP:")."</input>
72 72
                      </td>";
73 73
 
74 74
             echo "<td colspan='2'>
75 75
                 <select id='externals' name='externals' onchange='document.sendinvite.creation[0].checked=true; document.sendinvite.mailaddr.value=this.options[this.selectedIndex].id;'>
76
-                    <option value='FREETEXT'>" . _("--- select IdP here ---") . "</option>";
76
+                    <option value='FREETEXT'>" . _("--- select IdP here ---")."</option>";
77 77
 
78 78
             foreach ($feds as $fed_value) {
79 79
                 $thefed = new \core\Federation(strtoupper($fed_value['value']));
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
                 $entities = $thefed->listExternalEntities(TRUE, \core\Federation::EDUROAM_DB_TYPE_IDP);
83 83
 
84 84
                 foreach ($entities as $v) {
85
-                    echo "<option id='" . $v['contactlist'] . "' value='" . $v['ID'] . "'>[" . $fed_value['value'] . "] " . $v['name'] . "</option>";
85
+                    echo "<option id='".$v['contactlist']."' value='".$v['ID']."'>[".$fed_value['value']."] ".$v['name']."</option>";
86 86
                 }
87 87
             }
88 88
 
Please login to merge, or discard this patch.
web/skins/modern/diag/diag.php 1 patch
Spacing   +78 added lines, -78 removed lines patch added patch discarded remove patch
@@ -40,16 +40,16 @@  discard block
 block discarded – undo
40 40
 
41 41
 <?php
42 42
 $profile_list_size = 1;
43
-require_once dirname(__DIR__) . '/Divs.php';
43
+require_once dirname(__DIR__).'/Divs.php';
44 44
 $divs = new Divs($Gui);
45 45
 $visibility = 'index';
46 46
 $operatingSystem = $Gui->detectOS();
47 47
 $Gui->loggerInstance->debug(4, $operatingSystem);
48 48
 $uiElements = new web\lib\admin\UIElements();
49 49
 if ($operatingSystem) {
50
-    print "recognisedOS = '" . $operatingSystem['device'] . "';\n";
50
+    print "recognisedOS = '".$operatingSystem['device']."';\n";
51 51
 }
52
-require dirname(__DIR__) . '/user/js/cat_js.php';
52
+require dirname(__DIR__).'/user/js/cat_js.php';
53 53
 ?>
54 54
 
55 55
 </script>
@@ -81,9 +81,9 @@  discard block
 block discarded – undo
81 81
             <?php echo $divs->divPagetitle(_("Diagnostics site"), ""); ?>
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@<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
 block discarded – undo
143 143
                             echo 'none';
144 144
                         }
145 145
                         echo ";'>";
146
-                        echo '<h3>' . _("Which problem are you reporting?") . '</h3>';
146
+                        echo '<h3>'._("Which problem are you reporting?").'</h3>';
147 147
                         echo '<input type="radio" name="problem_type" value="1">';
148
-                        echo _("SP contacting IdP due to technical problems or abuse") . '<br>';
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
 block discarded – undo
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> 
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
         if (type === 'idp' || type === 'sp') {
181 181
             shtml = '<table><tbody><tr id="row_'+type+'_country"></tr>';
182 182
             shtml = shtml + '<tr id="row_'+type+'_institution" style="visibility: collapse;">';
183
-            shtml = shtml + '<td>' + <?php echo '"' . _("Select institiution:") . '"'; ?> + '</td><td></td></tr>';
183
+            shtml = shtml + '<td>' + <?php echo '"'._("Select institiution:").'"'; ?> + '</td><td></td></tr>';
184 184
             if (type === 'idp') {
185 185
                 shtml = shtml + '<tr id="row_idp_realm"></tr>';
186 186
             }
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
         var options = '';
207 207
         var selecthead = '';
208 208
         if (type1 === 'sp' || type1 === 'idp') {
209
-            selecthead = <?php echo '"<td>' . _("Select country or region:") . ' </td>"'; ?>;
209
+            selecthead = <?php echo '"<td>'._("Select country or region:").' </td>"'; ?>;
210 210
             selecthead = selecthead + '<td>\n';
211 211
         }
212 212
         var select = '<select id="' + type1 + '_country" name="' + type1 + '_country" style="margin-left:0px; width:400px;">';
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
             options = ($('#'+type2+'_country').html());
215 215
             countryAddSelect(selecthead, select + options + '</select>', type1);
216 216
         } else {
217
-            var comment = <?php echo '"<br><br>' . _("Fetching country/region list") . '..."'; ?>;
217
+            var comment = <?php echo '"<br><br>'._("Fetching country/region list").'..."'; ?>;
218 218
             inProgress(1, comment);
219 219
             $.ajax({
220 220
                 url: "findRealm.php",
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
         return false;
249 249
     }
250 250
     function testSociopath(realm, answer) {
251
-        var comment = <?php echo '"' . _("Testing realm") . '..."'; ?>; 
251
+        var comment = <?php echo '"'._("Testing realm").'..."'; ?>; 
252 252
         inProgress(1, comment);
253 253
         if ($('#tested_realm').length == 0) {
254 254
             $('<input>').attr({
@@ -273,9 +273,9 @@  discard block
 block discarded – undo
273 273
                                 query = '<input type="hidden" id="tested_realm" value="' + realm + '">';
274 274
                             }    
275 275
                             query = query + '<div id="current_query">'+data['TEXT']+'</div>';
276
-                            query = query + '<div><button id="answer_yes">' + <?php echo '"' . _("Yes") . '"'; ?> + '</button>';
277
-                            query = query + '<button style="margin-left:20px;" id="answer_no">' + <?php echo '"' . _("No") . '"'; ?> + '</button>';
278
-                            query = query + '<button style="margin-left:20px;" id="answer_noidea">' + <?php echo '"' . _("I don't know") . '"'; ?> + '</button></div>';
276
+                            query = query + '<div><button id="answer_yes">' + <?php echo '"'._("Yes").'"'; ?> + '</button>';
277
+                            query = query + '<button style="margin-left:20px;" id="answer_no">' + <?php echo '"'._("No").'"'; ?> + '</button>';
278
+                            query = query + '<button style="margin-left:20px;" id="answer_noidea">' + <?php echo '"'._("I don't know").'"'; ?> + '</button></div>';
279 279
                             $('#sociopath_queries').html(query);
280 280
                             $('#sociopath_query_area').show();
281 281
                         }
@@ -306,55 +306,55 @@  discard block
 block discarded – undo
306 306
        }); 
307 307
     }
308 308
     function finalVerdict(realm, verdict) {
309
-        var title = <?php echo '"' . _("Diagnostic tests results for selected realm") . '"'; ?>;
309
+        var title = <?php echo '"'._("Diagnostic tests results for selected realm").'"'; ?>;
310 310
         result = '<div class="padding">';
311 311
         result = result + '<div><h3>';
312
-        result = result + <?php echo '"' . _("The result for tested realm:") . ' "'; ?> + realm;
312
+        result = result + <?php echo '"'._("The result for tested realm:").' "'; ?> + realm;
313 313
         result = result + '</h3></p><div style="padding: 5px;"><div style="padding: 0px;">';
314
-        result = result + <?php echo '"' . _("The system identified") . '" '; ?>  + ' ';
314
+        result = result + <?php echo '"'._("The system identified").'" '; ?>  + ' ';
315 315
         result = result + Object.keys(verdict).length + ' ';
316
-        result = result + <?php echo '"' . _("suspected areas which potentially can cause a problem.") . '"'; ?> + '<br>';
317
-        result = result + <?php echo '"' . _("Next to the problem description we show a speculated probability of this event.") . '"'; ?>;
316
+        result = result + <?php echo '"'._("suspected areas which potentially can cause a problem.").'"'; ?> + '<br>';
317
+        result = result + <?php echo '"'._("Next to the problem description we show a speculated probability of this event.").'"'; ?>;
318 318
         result = result + '</div><div style="padding: 5px;"><table>';
319 319
         k = 1;
320 320
         for (key in verdict) {
321 321
             result = result + '<tr><td>' + k + '.</td>';
322 322
             k = k + 1;
323 323
             if (key === 'INFRA_DEVICE') {
324
-                result = result + '<td>' + <?php echo '"' . _("Your device configuration is broken") . '"'; ?> + '</td>';
324
+                result = result + '<td>' + <?php echo '"'._("Your device configuration is broken").'"'; ?> + '</td>';
325 325
             }
326 326
             if (key === 'INFRA_SP_80211') {
327
-                result = result + '<td>' + <?php echo '"' . _("The Wi-Fi network in your vicinity has quality issues") . '"'; ?> + '</td>';
327
+                result = result + '<td>' + <?php echo '"'._("The Wi-Fi network in your vicinity has quality issues").'"'; ?> + '</td>';
328 328
             }
329 329
             if (key === 'INFRA_SP_LAN') {
330
-                result = result + '<td>' + <?php echo '"' . _("The network environment around you is broken") . '"'; ?> + '</td>';
330
+                result = result + '<td>' + <?php echo '"'._("The network environment around you is broken").'"'; ?> + '</td>';
331 331
             }
332 332
             if (key === 'INFRA_SP_RADIUS') {
333
-                result = result + '<td>' + <?php echo '"' . _("The RADIUS server of your service provider is the source of the problem") . '"'; ?> + '</td>';
333
+                result = result + '<td>' + <?php echo '"'._("The RADIUS server of your service provider is the source of the problem").'"'; ?> + '</td>';
334 334
             }
335 335
             if (key === 'INFRA_IDP_AUTHBACKEND') {
336
-                result = result + '<td>' + <?php echo '"' . _("The RADIUS server in your home institution is currently unable to authenticate you") . '"'; ?> + '</td>';
336
+                result = result + '<td>' + <?php echo '"'._("The RADIUS server in your home institution is currently unable to authenticate you").'"'; ?> + '</td>';
337 337
             }
338 338
             if (key === 'INFRA_NRO_SP') {
339
-                result = result + '<td>' + <?php echo '"' . _("The national server in the country/region you are visiting is not functioning correctly") . '"'; ?> + '</td>';
339
+                result = result + '<td>' + <?php echo '"'._("The national server in the country/region you are visiting is not functioning correctly").'"'; ?> + '</td>';
340 340
             }
341 341
             if (key === 'INFRA_LINK_ETLR_NRO_SP') {
342
-                result = result + '<td>' + <?php echo '"' . _("The link between the national server of the country/region you are visiting and the top-level server is broken") . '"'; ?> + '</td>';
342
+                result = result + '<td>' + <?php echo '"'._("The link between the national server of the country/region you are visiting and the top-level server is broken").'"'; ?> + '</td>';
343 343
             }
344 344
             if (key === 'INFRA_LINK_ETLR_NRO_IdP') {
345
-                result = result + '<td>' + <?php echo '"' . _("The link between the national server of your home country/region and the top-level server is broken") . '"'; ?> + '</td>';
345
+                result = result + '<td>' + <?php echo '"'._("The link between the national server of your home country/region and the top-level server is broken").'"'; ?> + '</td>';
346 346
             }
347 347
             if (key === 'INFRA_ETLR') {
348
-                result = result + '<td>' + <?php echo '"' . _("The communication to the top-level server is down") . '"'; ?> + '</td>';
348
+                result = result + '<td>' + <?php echo '"'._("The communication to the top-level server is down").'"'; ?> + '</td>';
349 349
             }
350 350
             if (key === 'INFRA_NRO_IdP') {
351
-                result = result + '<td>' + <?php echo '"' . _("The national server in your home country/region is not functioning properly.") . '"'; ?> + '</td>';
351
+                result = result + '<td>' + <?php echo '"'._("The national server in your home country/region is not functioning properly.").'"'; ?> + '</td>';
352 352
             }
353 353
             if (key === 'INFRA_IdP_RADIUS') {
354
-                result = result + '<td>' + <?php echo '"' . _("The RADIUS server of your home institution is the source of the problem") . '"'; ?> + '</td>';
354
+                result = result + '<td>' + <?php echo '"'._("The RADIUS server of your home institution is the source of the problem").'"'; ?> + '</td>';
355 355
             }
356 356
             if (key === 'INFRA_NONEXISTENTREALM') {
357
-                result = result + '<td>' + <?php echo '"' . _("This realm does not exist") . '"'; ?> + '</td>';
357
+                result = result + '<td>' + <?php echo '"'._("This realm does not exist").'"'; ?> + '</td>';
358 358
             }
359 359
             result = result + '<td style="padding-left: 5px;">' + (verdict[key] * 100).toFixed(2) + "%</td></tr>";
360 360
         }
@@ -466,7 +466,7 @@  discard block
 block discarded – undo
466 466
         return false;
467 467
     });
468 468
     $(document).on('change', '#idp_country' , function() {
469
-        var comment = <?php echo '"' . _("Fetching institutions list") . '..."'; ?>;  
469
+        var comment = <?php echo '"'._("Fetching institutions list").'..."'; ?>;  
470 470
         var id = $(this).attr('id');
471 471
         var k = id.indexOf('_');
472 472
         var type = id.substr(0,k);
@@ -484,7 +484,7 @@  discard block
 block discarded – undo
484 484
                         var shtml = '';
485 485
                         var select = '';
486 486
                         if (type !== 'asp') {
487
-                            shtml = <?php echo '"<td>' . _("Select institution:") . '</td><td>"'; ?>;
487
+                            shtml = <?php echo '"<td>'._("Select institution:").'</td><td>"'; ?>;
488 488
                         }
489 489
                         select = '<select id="' + type + '_inst" name="' + type + '_inst" style="margin-left:0px; width:400px;"><option value=""></option>';
490 490
                         for (var i in institutions) {
@@ -518,7 +518,7 @@  discard block
 block discarded – undo
518 518
         return false;
519 519
     });
520 520
     $(document).on('change', '#sp_country, #asp_country' , function() {
521
-        var comment = <?php echo '"' . _("Fetching institutions list") . '..."'; ?>;  
521
+        var comment = <?php echo '"'._("Fetching institutions list").'..."'; ?>;  
522 522
         var id = $(this).attr('id');
523 523
         var k = id.indexOf('_');
524 524
         var type = id.substr(0,k);
@@ -536,7 +536,7 @@  discard block
 block discarded – undo
536 536
                         var shtml = '';
537 537
                         var select = '';
538 538
                         if (type !== 'asp') {
539
-                            shtml = <?php echo '"<td>' . _("Select institution:") . '</td><td>"'; ?>;
539
+                            shtml = <?php echo '"<td>'._("Select institution:").'</td><td>"'; ?>;
540 540
                         }
541 541
                         select = '<select id="' + type + '_inst" name="' + type + '_inst" style="margin-left:0px; width:400px;"><option value=""></option>';
542 542
                         for (var i in institutions) {
@@ -576,7 +576,7 @@  discard block
 block discarded – undo
576 576
             $('#start_test_area').hide();
577 577
             return false;
578 578
         }
579
-        var comment = <?php echo '"' . _("Fetching realms list") . '..."'; ?>;
579
+        var comment = <?php echo '"'._("Fetching realms list").'..."'; ?>;
580 580
         inProgress(1, comment);
581 581
         $.ajax({
582 582
             url: "findRealm.php",
@@ -588,7 +588,7 @@  discard block
 block discarded – undo
588 588
                     var realms = data.realms;
589 589
                     var realmselect = '';
590 590
                     if (realms.length > 1) {
591
-                        realmselect = <?php echo '"<td>' . _("Check realm(s):") . '</td>"'; ?>;
591
+                        realmselect = <?php echo '"<td>'._("Check realm(s):").'</td>"'; ?>;
592 592
                         realmselect = realmselect + '<td>' + "<span style='margin-left: 10px'>";
593 593
                         for (var i in realms) {
594 594
                             realmselect = realmselect + '<input type="radio" name="realm" ';
@@ -600,7 +600,7 @@  discard block
 block discarded – undo
600 600
                         }
601 601
                         realmselect = realmselect + '</span></td>';
602 602
                     } else {
603
-                        realmselect = <?php echo '"<td>' . _("Realm:") . '</td>"'; ?>;
603
+                        realmselect = <?php echo '"<td>'._("Realm:").'</td>"'; ?>;
604 604
                         realmselect = realmselect + '<td>' + "<span style='margin-left: 10px'>";
605 605
                         realmselect = realmselect + realms[0] + '</span>';
606 606
                         realmselect = realmselect + '<input type="hidden" name="realm" value="' + realms[0] + '">';
@@ -655,7 +655,7 @@  discard block
 block discarded – undo
655 655
             });
656 656
             t = 1;
657 657
         }
658
-        var comment = <?php echo '"' . _("Running realm tests") . '..."'; ?>;
658
+        var comment = <?php echo '"'._("Running realm tests").'..."'; ?>;
659 659
         inProgress(1, comment);
660 660
         /*waiting(comment);*/
661 661
         $.ajax({
@@ -699,7 +699,7 @@  discard block
 block discarded – undo
699 699
                             }
700 700
                         });
701 701
                         $('#sp_questions > tbody').append('<tr class="error_row"><td>' +
702
-                                <?php echo '"' . _("Realm is not registered with the eduroam database:") . '"'; ?> +
702
+                                <?php echo '"'._("Realm is not registered with the eduroam database:").'"'; ?> +
703 703
                                 '</td><td>' + realm + '</td></tr>');
704 704
                         $('#admin_realm').val('');
705 705
                     }    
@@ -723,7 +723,7 @@  discard block
 block discarded – undo
723 723
         testSociopath('', answer);
724 724
     });
725 725
     $('#realmtest').click(function(event){
726
-        var comment = <?php echo '"<br><br>' . _("Running realm tests") . '..."'; ?>;
726
+        var comment = <?php echo '"<br><br>'._("Running realm tests").'..."'; ?>;
727 727
         inProgress(1, comment);
728 728
         $('#start_test_area').hide();
729 729
         if ($('#select_sp_area').is(':hidden')) {
@@ -771,13 +771,13 @@  discard block
 block discarded – undo
771 771
                         reset_footer();
772 772
                         testSociopath(realm, 0);
773 773
                     } else {
774
-                        var title = <?php echo '"' . _("Diagnostics results for selected realms") . '"'; ?>;
775
-                        result = '<div class="padding"><h3>' + <?php echo '"' . _("An unknown problem occured") . '"'; ?>;
774
+                        var title = <?php echo '"'._("Diagnostics results for selected realms").'"'; ?>;
775
+                        result = '<div class="padding"><h3>' + <?php echo '"'._("An unknown problem occured").'"'; ?>;
776 776
                         result = result + '</h3>'
777 777
                         if (r.length == 1) {
778
-                            result = result + <?php echo '"' . _("This test includes checking of the following realm") . '"'; ?>;
778
+                            result = result + <?php echo '"'._("This test includes checking of the following realm").'"'; ?>;
779 779
                         } else {    
780
-                            result = result + <?php echo '"' . _("This test includes checking of the following realms") . '"'; ?>;
780
+                            result = result + <?php echo '"'._("This test includes checking of the following realms").'"'; ?>;
781 781
                         }
782 782
                         result = result + ': '
783 783
                         for (var i=0; i < r.length; i++) {
@@ -787,7 +787,7 @@  discard block
 block discarded – undo
787 787
                             result = result + r[i];
788 788
                         }
789 789
                         result = result + '.<br>';
790
-                        result = result + <?php echo '"' . _("You should report this to") . '"'; ?> + ' <a href="mailto:[email protected]">[email protected]</a>';
790
+                        result = result + <?php echo '"'._("You should report this to").'"'; ?> + ' <a href="mailto:[email protected]">[email protected]</a>';
791 791
                         result = result + '</div>';
792 792
                         $('#after_stage_1').hide();
793 793
                         $('#before_stage_1').show();
@@ -847,7 +847,7 @@  discard block
 block discarded – undo
847 847
                 });
848 848
             });
849 849
         });
850
-        var comment = <?php echo '"' . _("Running realm tests") . '..."'; ?>;
850
+        var comment = <?php echo '"'._("Running realm tests").'..."'; ?>;
851 851
         inProgress(1, comment);
852 852
         $.ajax({
853 853
             url: "findRealm.php",
@@ -918,29 +918,29 @@  discard block
 block discarded – undo
918 918
             success:function(data) {
919 919
                 if (data.status === 1) {
920 920
                     var result = '';
921
-                    var title = <?php echo '"' . _("eduroam admin report submission") . '"'; ?>;
921
+                    var title = <?php echo '"'._("eduroam admin report submission").'"'; ?>;
922 922
                     result = '<div class="padding">';
923 923
                     if (type == 'idp_send') {
924
-                        result = result + '<h3>'+ <?php echo '"' . _("SP contacting IdP due to technical problems or abuse") . '"'; ?> + '</h3>';
924
+                        result = result + '<h3>'+ <?php echo '"'._("SP contacting IdP due to technical problems or abuse").'"'; ?> + '</h3>';
925 925
                         result = result + '<table>';
926
-                        result = result + '<tr><td>' + <?php echo '"' . _("Reason") . '"'; ?> + '</td><td>' + data.reason + '</td></tr>';
927
-                        result = result + '<tr><td>' + <?php echo '"' . _("SP email") . '"'; ?> + '</td><td>' + data.email + '</td></tr>';
928
-                        result = result + '<tr><td>' + <?php echo '"' . _("IdP email(s)") . '"'; ?> + '</td><td>' + data.idpcontact + '</td></tr>';
929
-                        result = result + '<tr><td>' + <?php echo '"' . _("Event's timestamp") . '"'; ?> + '</td><td>' + data.timestamp + '</td></tr>';
930
-                        result = result + '<tr><td>' + <?php echo '"' . _("Calling-Station-Id") . '"'; ?> + '</td><td>' + data.mac + '</td></tr>';
931
-                        result = result + '<tr><td>' + <?php echo '"' . _("Additional description") . '"'; ?> +'</td><td>' + data.freetext + '</td></tr>';
926
+                        result = result + '<tr><td>' + <?php echo '"'._("Reason").'"'; ?> + '</td><td>' + data.reason + '</td></tr>';
927
+                        result = result + '<tr><td>' + <?php echo '"'._("SP email").'"'; ?> + '</td><td>' + data.email + '</td></tr>';
928
+                        result = result + '<tr><td>' + <?php echo '"'._("IdP email(s)").'"'; ?> + '</td><td>' + data.idpcontact + '</td></tr>';
929
+                        result = result + '<tr><td>' + <?php echo '"'._("Event's timestamp").'"'; ?> + '</td><td>' + data.timestamp + '</td></tr>';
930
+                        result = result + '<tr><td>' + <?php echo '"'._("Calling-Station-Id").'"'; ?> + '</td><td>' + data.mac + '</td></tr>';
931
+                        result = result + '<tr><td>' + <?php echo '"'._("Additional description").'"'; ?> +'</td><td>' + data.freetext + '</td></tr>';
932 932
                     }
933 933
                     if (type == 'sp_send') {
934
-                        result = result + '<h3>'+ <?php echo '"' . _("IdP contacting SP due to technical problems or abuse") . '"'; ?> + '</h3>';
934
+                        result = result + '<h3>'+ <?php echo '"'._("IdP contacting SP due to technical problems or abuse").'"'; ?> + '</h3>';
935 935
                         result = result + '<table>';
936
-                        result = result + '<tr><td>' + <?php echo '"' . _("Reason") . '"'; ?> + '</td><td>' + data.reason + '</td></tr>';
937
-                        result = result + '<tr><td>' + <?php echo '"' . _("SP's Operator-Name") . '"'; ?> + '</td><td>' + data.opname + '</td></tr>';
938
-                        result = result + '<tr><td>' + <?php echo '"' . _("User's outer ID") . '"'; ?> + '</td><td>' + data.outerid + '</td></tr>';
939
-                        result = result + '<tr><td>' + <?php echo '"' . _("IdP email") . '"'; ?> + '</td><td>' + data.email + '</td></tr>';
940
-                        result = result + '<tr><td>' + <?php echo '"' . _("Event's timestamp") . '"'; ?> + '</td><td>' + data.timestamp + '</td></tr>';
941
-                        result = result + '<tr><td>' + <?php echo '"' . _("Calling-Station-Id") . '"'; ?> + '</td><td>' + data.mac + '</td></tr>';
942
-                        result = result + '<tr><td>' + <?php echo '"' . _("Additional description") . '"'; ?> +'</td><td>' + data.freetext + '</td></tr>';
943
-                        result = result + '<tr><td>' + <?php echo '"' . _("How to contact the user") . '"'; ?> +'</td><td>' + data.cdetails + '</td></tr>';
936
+                        result = result + '<tr><td>' + <?php echo '"'._("Reason").'"'; ?> + '</td><td>' + data.reason + '</td></tr>';
937
+                        result = result + '<tr><td>' + <?php echo '"'._("SP's Operator-Name").'"'; ?> + '</td><td>' + data.opname + '</td></tr>';
938
+                        result = result + '<tr><td>' + <?php echo '"'._("User's outer ID").'"'; ?> + '</td><td>' + data.outerid + '</td></tr>';
939
+                        result = result + '<tr><td>' + <?php echo '"'._("IdP email").'"'; ?> + '</td><td>' + data.email + '</td></tr>';
940
+                        result = result + '<tr><td>' + <?php echo '"'._("Event's timestamp").'"'; ?> + '</td><td>' + data.timestamp + '</td></tr>';
941
+                        result = result + '<tr><td>' + <?php echo '"'._("Calling-Station-Id").'"'; ?> + '</td><td>' + data.mac + '</td></tr>';
942
+                        result = result + '<tr><td>' + <?php echo '"'._("Additional description").'"'; ?> +'</td><td>' + data.freetext + '</td></tr>';
943
+                        result = result + '<tr><td>' + <?php echo '"'._("How to contact the user").'"'; ?> +'</td><td>' + data.cdetails + '</td></tr>';
944 944
                     }
945 945
                     result = result + '</div>';
946 946
                     showInfo(result, title);
@@ -957,7 +957,7 @@  discard block
 block discarded – undo
957 957
         if ($('#mac').val().length > 0) {
958 958
             if ($('#mac').val().length != 17) {
959 959
                 $('#mac').addClass('error_input');
960
-                $('#mac').attr('title', <?php echo '"' . _("MAC address is incomplete") . '"'; ?>);
960
+                $('#mac').attr('title', <?php echo '"'._("MAC address is incomplete").'"'; ?>);
961 961
             } else {
962 962
                 $('#mac').removeClass('error_input'); 
963 963
                 $('#mac').attr('title', '');
@@ -966,7 +966,7 @@  discard block
 block discarded – undo
966 966
         if ($(this).attr('id') == 'email' &&  $(this).val().length > 0) {
967 967
             if (!isEmail($(this).val())) {
968 968
                 $('#email').addClass('error_input');
969
-                $('#email').attr('title', <?php echo '"' . _("Wrong format of email") . '"'; ?>);
969
+                $('#email').attr('title', <?php echo '"'._("Wrong format of email").'"'; ?>);
970 970
             } else {
971 971
                 $('#email').removeClass('error_input');
972 972
                 $('#email').attr('title', '');
@@ -975,7 +975,7 @@  discard block
 block discarded – undo
975 975
         if ($(this).attr('id') == 'outer_id' &&  $(this).val().length > 0) {
976 976
             if (!isEmail($(this).val(), true)) {
977 977
                 $('#outer_id').addClass('error_input');
978
-                $('#outer_id').attr('title', <?php echo '"' . _("Wrong format of outer ID") . '"'; ?>);
978
+                $('#outer_id').attr('title', <?php echo '"'._("Wrong format of outer ID").'"'; ?>);
979 979
             } else {
980 980
                 $('#outer_id').removeClass('error_input');
981 981
                 $('#outer_id').attr('title', '');
@@ -984,7 +984,7 @@  discard block
 block discarded – undo
984 984
         if ($(this).attr('id') == 'opname' && $('#opname').val().length > 0) {
985 985
             if (!isOperatorName($(this).val())) {
986 986
                 $('#opname').addClass('error_input');
987
-                $('#opname').attr('title', <?php echo '"' . _("Wrong string given as OperatorName") . '"'; ?>);
987
+                $('#opname').attr('title', <?php echo '"'._("Wrong string given as OperatorName").'"'; ?>);
988 988
                 $('#spmanually').show();
989 989
             } else {
990 990
                 $('#opname').removeClass('error_input');
Please login to merge, or discard this patch.