Passed
Push — master ( 3d1824...01304e )
by Tomasz
03:12
created
web/skins/classic/user/js/cat_js.php 2 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -11,14 +11,14 @@  discard block
 block discarded – undo
11 11
 <?php 
12 12
 $cat = new core\CAT();
13 13
 function escaped_echo($s) {
14
-   echo preg_replace('/"/','&quot;',$s);
14
+    echo preg_replace('/"/','&quot;',$s);
15 15
 }
16 16
 
17 17
 $langObject = new \core\common\Language();
18 18
 $langObject->setTextDomain('web_user');
19 19
 $idpId = filter_input(INPUT_GET, 'idp', FILTER_VALIDATE_INT) ?? filter_input(INPUT_POST, 'idp', FILTER_VALIDATE_INT);
20 20
 $profileId = filter_input(INPUT_GET, 'profile', FILTER_VALIDATE_INT) ?? filter_input(INPUT_POST, 'profile', FILTER_VALIDATE_INT);
21
- ?>
21
+    ?>
22 22
 var n;
23 23
 var profile;
24 24
 var generateTimer;
@@ -353,7 +353,7 @@  discard block
 block discarded – undo
353 353
 }
354 354
 
355 355
 <?php if($idpId) { 
356
-      print "front_page = 0;\n";
356
+        print "front_page = 0;\n";
357 357
 } ?>
358 358
 
359 359
 function showTOU(){
@@ -487,7 +487,7 @@  discard block
 block discarded – undo
487 487
 if ($profileId) {
488 488
     print "listProfiles($idpId,$profileId);";
489 489
 }
490
- ?>
490
+    ?>
491 491
 
492 492
 $(".signin").click(function(event){
493 493
      pressedButton = $(this);
@@ -548,12 +548,12 @@  discard block
 block discarded – undo
548 548
         });
549 549
 DiscoJuice.Constants.Countries = {
550 550
 <?php 
551
-  $C = $Gui->printCountryList(1);
552
-     $ret = '';
553
-   foreach ($C as $key => $val) {
551
+    $C = $Gui->printCountryList(1);
552
+        $ret = '';
553
+    foreach ($C as $key => $val) {
554 554
     $ret .= "'$key': \"$val\",";
555
-   }
556
-   echo substr($ret, 0, -1);
555
+    }
556
+    echo substr($ret, 0, -1);
557 557
 ?>
558 558
         };
559 559
 
Please login to merge, or discard this patch.
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 <?php 
12 12
 $cat = new core\CAT();
13 13
 function escaped_echo($s) {
14
-   echo preg_replace('/"/','&quot;',$s);
14
+   echo preg_replace('/"/', '&quot;', $s);
15 15
 }
16 16
 
17 17
 $langObject = new \core\common\Language();
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
     result = j.status;
71 71
     if(! result) {
72 72
       alert("<?php escaped_echo(_("no matching data found"))?>");
73
-      document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']),'/').'/'?>';
73
+      document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']), '/') . '/'?>';
74 74
     }
75 75
     j = j.data;
76 76
     n = j.length;
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
     inst_name = j[0].idp_name;
79 79
     logo = j[0].logo;
80 80
     $("#inst_name").val(inst_name);
81
-    $("#inst_name_span").html("<?php escaped_echo(sprintf(_("Selected %s:"),$cat->nomenclature_inst))?> <strong>"+inst_name+"</strong>");
81
+    $("#inst_name_span").html("<?php escaped_echo(sprintf(_("Selected %s:"), $cat->nomenclature_inst))?> <strong>"+inst_name+"</strong>");
82 82
     $(".inst_name").text(inst_name);
83 83
     $("#user_page").show();
84 84
     $("#institution_name").show();
@@ -191,8 +191,8 @@  discard block
 block discarded – undo
191 191
        j1 = $.parseJSON(data);
192 192
        result = j1.status;
193 193
        if(! result) {
194
-            alert("<?php escaped_echo( _("no matching data found"))?>");
195
-            document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']),'/').'/'?>';
194
+            alert("<?php escaped_echo(_("no matching data found"))?>");
195
+            document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']), '/') . '/'?>';
196 196
        }
197 197
        j = j1.data;
198 198
        if(j.description !== undefined && j.description) {
@@ -203,15 +203,15 @@  discard block
 block discarded – undo
203 203
          $("#profile_desc").text('');
204 204
        }
205 205
        if(j.local_url !== undefined && j.local_url) 
206
-         txt = txt+'<tr><td><?php escaped_echo(_("WWW:"));?></td><td><a href="'+j.local_url+'" target="_blank">'+j.local_url+'</a></td></tr>';
206
+         txt = txt+'<tr><td><?php escaped_echo(_("WWW:")); ?></td><td><a href="'+j.local_url+'" target="_blank">'+j.local_url+'</a></td></tr>';
207 207
        if(j.local_email !== undefined && j.local_email) 
208
-         txt = txt+'<tr><td><?php escaped_echo(_("email:"));?></td><td><a href=mailto:"'+j.local_email+'">'+j.local_email+'</a></td></tr>';
208
+         txt = txt+'<tr><td><?php escaped_echo(_("email:")); ?></td><td><a href=mailto:"'+j.local_email+'">'+j.local_email+'</a></td></tr>';
209 209
        if(j.local_phone !== undefined && j.local_phone) 
210
-         txt = txt+'<tr><td><?php escaped_echo(_("tel:"));?></td><td>'+j.local_phone+'</td></tr>';
210
+         txt = txt+'<tr><td><?php escaped_echo(_("tel:")); ?></td><td>'+j.local_phone+'</td></tr>';
211 211
        if(txt) 
212
-         txt = "<table><tr><th colspan='2'><?php escaped_echo(sprintf(_("If you encounter problems, then you can obtain direct assistance from your %s at:"),$cat->nomenclature_inst)); ?></th></tr>"+txt+'</table>';
212
+         txt = "<table><tr><th colspan='2'><?php escaped_echo(sprintf(_("If you encounter problems, then you can obtain direct assistance from your %s at:"), $cat->nomenclature_inst)); ?></th></tr>"+txt+'</table>';
213 213
         else 
214
-         txt = "<table><tr><th colspan='2'><?php escaped_echo(sprintf(_("If you encounter problems you should ask for help at your %s"),$cat->nomenclature_inst)); ?>.</th></tr></table>";
214
+         txt = "<table><tr><th colspan='2'><?php escaped_echo(sprintf(_("If you encounter problems you should ask for help at your %s"), $cat->nomenclature_inst)); ?>.</th></tr></table>";
215 215
       $("#user_info").html(txt);
216 216
       $("#user_info").show();
217 217
       if(j.silverbullet) {
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
           $("#g_"+v.id).addClass('alertButton');
230 230
           $("#cross_icon_"+v.id).show();
231 231
           $("#"+v.id).addClass('disabledDevice');
232
-          $("#download_button_header_"+v.id).html("<?php escaped_echo(sprintf(_("This device cannot be configured with settings provided by your %s"),$cat->nomenclature_inst))?>");
232
+          $("#download_button_header_"+v.id).html("<?php escaped_echo(sprintf(_("This device cannot be configured with settings provided by your %s"), $cat->nomenclature_inst))?>");
233 233
           $("#info_b_"+v.id+",#g_info_b_"+v.id).hide();
234 234
         } else  {
235 235
           if(v.status == -1)
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
           $("#"+v.id+",#g_"+v.id).addClass('additionalInfo');
242 242
           $("#"+v.id+",#g_"+v.id).click(function(event){
243 243
             i_div = $("#info_"+$(this).attr('id'));
244
-            t = "<?php escaped_echo(_("Your site administrator has specified that this device should be configured with resources located on a local page. When you click <b>Continue</b> this page will be opened in a new window/tab."))?>"+"<br><span class='redirect_link'><a href='"+v.redirect+"' target='_blank'><?php escaped_echo(_("Continue"));?></a></span>";
244
+            t = "<?php escaped_echo(_("Your site administrator has specified that this device should be configured with resources located on a local page. When you click <b>Continue</b> this page will be opened in a new window/tab."))?>"+"<br><span class='redirect_link'><a href='"+v.redirect+"' target='_blank'><?php escaped_echo(_("Continue")); ?></a></span>";
245 245
             i_div.html(t);
246 246
             $(".redirect_link").click(function(event) {
247 247
                i_div.hide();
@@ -249,13 +249,13 @@  discard block
 block discarded – undo
249 249
                
250 250
           });
251 251
         } else if(v.device_customtext != '0' || v.eap_customtext != '0' || v.message != '0' || v.status > 0) {
252
-          var continue_text = "<?php escaped_echo(_("Continue"));?>";
252
+          var continue_text = "<?php escaped_echo(_("Continue")); ?>";
253 253
           $("#"+v.id+",#g_"+v.id).addClass('additionalInfo');
254 254
           $("#"+v.id+",#g_"+v.id).click(function(event){
255 255
             i_div = $("#info_"+$(this).attr('id'));
256 256
             if(v.status > 0) {
257
-              t = "<?php escaped_echo(sprintf(_("This device cannot be configured with settings provided by your %s"),$cat->nomenclature_inst))?>";
258
-              continue_text = "<?php escaped_echo(_("Close"));?>";
257
+              t = "<?php escaped_echo(sprintf(_("This device cannot be configured with settings provided by your %s"), $cat->nomenclature_inst))?>";
258
+              continue_text = "<?php escaped_echo(_("Close")); ?>";
259 259
             } else {
260 260
             t = i_div.html();
261 261
             if(v.message != '0') {
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
   }
313 313
 
314 314
   function infoCAT(k,title) {
315
-      $.post('<?php echo $Gui->skinObject->findResourceUrl("BASE", "user/cat_info.php");?>', {page: k, lang: lang}, function(data) {
315
+      $.post('<?php echo $Gui->skinObject->findResourceUrl("BASE", "user/cat_info.php"); ?>', {page: k, lang: lang}, function(data) {
316 316
     if(data.substring(0,8) == 'no_title') {
317 317
        data = data.substring(8,data.length);
318 318
     } else {
@@ -331,7 +331,7 @@  discard block
 block discarded – undo
331 331
    $("#loading_ico").css('left',x+'px');
332 332
    $("#loading_ico").attr('src','resources/images/icons/loading9.gif');
333 333
    $("#loading_ico").show();
334
-   window.location.replace("<?php echo $Gui->skinObject->findResourceUrl("BASE","admin/overview_user.php");?>?lang="+lang);
334
+   window.location.replace("<?php echo $Gui->skinObject->findResourceUrl("BASE", "admin/overview_user.php"); ?>?lang="+lang);
335 335
 }
336 336
 
337 337
 /* Get horizontal center of the Browser Window */
@@ -352,7 +352,7 @@  discard block
 block discarded – undo
352 352
     return(Math.round(windowWidth/2));
353 353
 }
354 354
 
355
-<?php if($idpId) { 
355
+<?php if ($idpId) { 
356 356
       print "front_page = 0;\n";
357 357
 } ?>
358 358
 
@@ -390,10 +390,10 @@  discard block
 block discarded – undo
390 390
     $("#download_info a").attr('href',download_link);
391 391
     $('#download_info').show();
392 392
     if( generateTimer > 0 ) {
393
-       setTimeout("document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']),'/')?>'+'/'+download_link",generateTimer);
393
+       setTimeout("document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']), '/')?>'+'/'+download_link",generateTimer);
394 394
     }
395 395
     else {
396
-       document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']),'/')?>'+'/'+download_link;
396
+       document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']), '/')?>'+'/'+download_link;
397 397
     }
398 398
   }
399 399
 }
@@ -511,13 +511,13 @@  discard block
 block discarded – undo
511 511
    "overlay":true,"cookie":true,"type":false,
512 512
    "country":true,"location":true,
513 513
    "title":"<?php escaped_echo($cat->nomenclature_inst) ?>",
514
-   "subtitle":"<?php escaped_echo(sprintf(_("Select your <strong>%s<\/strong>"),$cat->nomenclature_inst)) ?>",
515
-   "textHelp": "<?php escaped_echo(sprintf(_("Help, my %s is not on the list"),$cat->nomenclature_inst)) ?>",
516
-   "textHelpMore": "<?php escaped_echo(sprintf(_("This system relies on information supplied by local %s administrators. If your %s is not on the list, then nag them to add information to the %s database."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $cat->nomenclature_inst, CONFIG['APPEARANCE']['productname'])); ?>",
514
+   "subtitle":"<?php escaped_echo(sprintf(_("Select your <strong>%s<\/strong>"), $cat->nomenclature_inst)) ?>",
515
+   "textHelp": "<?php escaped_echo(sprintf(_("Help, my %s is not on the list"), $cat->nomenclature_inst)) ?>",
516
+   "textHelpMore": "<?php escaped_echo(sprintf(_("This system relies on information supplied by local %s administrators. If your %s is not on the list, then nag them to add information to the %s database."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $cat->nomenclature_inst, CONFIG['APPEARANCE']['productname'])); ?>",
517 517
    "textLocateMe": "<?php escaped_echo(_("Locate me more accurately using HTML5 Geo-Location")) ?>",
518
-   "textShowProviders": "<?php escaped_echo(sprintf(_("Show %ss in"),$cat->nomenclature_inst)) ?>",
518
+   "textShowProviders": "<?php escaped_echo(sprintf(_("Show %ss in"), $cat->nomenclature_inst)) ?>",
519 519
    "textAllCountries": "<?php escaped_echo(_("all countries")) ?>",
520
-   "textSearch" : "<?php escaped_echo(sprintf(_("or search for an %s, in example Univerity of Oslo"),$cat->nomenclature_inst)) ?>",
520
+   "textSearch" : "<?php escaped_echo(sprintf(_("or search for an %s, in example Univerity of Oslo"), $cat->nomenclature_inst)) ?>",
521 521
    "textShowAllCountries": "<?php escaped_echo(_("show all countries")) ?>",
522 522
    "textLimited1" : "<?php escaped_echo(_("Results limited to"))?>",
523 523
    "textLimited2" : "<?php escaped_echo(_("entries - show more"))?>",
Please login to merge, or discard this patch.
web/skins/eduroam2016/Divs.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
             <img id='logo_img' src='" . $this->Gui->skinObject->findResourceUrl("IMAGES", "consortium_logo.png") . "' alt='Consortium Logo'/>
40 40
             <span>Configuration Assistant Tool</span>
41 41
         </div>
42
-        <div id='motd'>" . (isset(CONFIG['APPEARANCE']['MOTD']) ? CONFIG['APPEARANCE']['MOTD'] : '&nbsp' ) . "</div>
42
+        <div id='motd'>" . (isset(CONFIG['APPEARANCE']['MOTD']) ? CONFIG['APPEARANCE']['MOTD'] : '&nbsp') . "</div>
43 43
         <img id='hamburger' src='" . $this->Gui->skinObject->findResourceUrl("IMAGES", "icons/menu.png") . "' alt='Menu'/>
44 44
         <div id='menu_top'>
45 45
 ";
Please login to merge, or discard this patch.
web/skins/eduroam2016/user/js/cat_js.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -206,13 +206,13 @@  discard block
 block discarded – undo
206 206
        if(j.local_url !== undefined && j.local_url) 
207 207
          txt = txt+'<tr><td><?php escaped_echo(_("WWW:")); ?></td><td><a href="'+j.local_url+'" target="_blank">'+j.local_url+'</a></td></tr>';
208 208
        if(j.local_email !== undefined && j.local_email) 
209
-         txt = txt+'<tr><td><?php escaped_echo(_("email:"));?></td><td><a href=mailto:"'+j.local_email+'">'+j.local_email+'</a></td></tr>';
209
+         txt = txt+'<tr><td><?php escaped_echo(_("email:")); ?></td><td><a href=mailto:"'+j.local_email+'">'+j.local_email+'</a></td></tr>';
210 210
        if(j.local_phone !== undefined && j.local_phone) 
211
-         txt = txt+'<tr><td><?php escaped_echo(_("tel:"));?></td><td>'+j.local_phone+'</td></tr>';
211
+         txt = txt+'<tr><td><?php escaped_echo(_("tel:")); ?></td><td>'+j.local_phone+'</td></tr>';
212 212
        if(txt) 
213
-         txt = "<table><tr><th colspan='2'><?php escaped_echo(sprintf(_("If you encounter problems, then you can obtain direct assistance from your %s at:"),$cat->nomenclature_inst)); ?></th></tr>"+txt+'</table>';
213
+         txt = "<table><tr><th colspan='2'><?php escaped_echo(sprintf(_("If you encounter problems, then you can obtain direct assistance from your %s at:"), $cat->nomenclature_inst)); ?></th></tr>"+txt+'</table>';
214 214
         else 
215
-         txt = "<table><tr><th colspan='2'><?php escaped_echo(sprintf(_("If you encounter problems you should ask for help at your %s"),$cat->nomenclature_inst)); ?>.</th></tr></table>";
215
+         txt = "<table><tr><th colspan='2'><?php escaped_echo(sprintf(_("If you encounter problems you should ask for help at your %s"), $cat->nomenclature_inst)); ?>.</th></tr></table>";
216 216
       $("#user_info").html(txt);
217 217
       $("#user_info").show();
218 218
       resetDevices();
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
           $("#g_"+v.id).addClass('alertButton');
226 226
           $("#cross_icon_"+v.id).show();
227 227
           $("#"+v.id).addClass('disabledDevice');
228
-          $("#download_button_header_"+v.id).html("<?php escaped_echo(sprintf(_("This device cannot be configured with settings provided by your %s"),$cat->nomenclature_inst))?>");
228
+          $("#download_button_header_"+v.id).html("<?php escaped_echo(sprintf(_("This device cannot be configured with settings provided by your %s"), $cat->nomenclature_inst))?>");
229 229
           $("#info_b_"+v.id+",#g_info_b_"+v.id).hide();
230 230
         } else  {
231 231
           if(v.status == -1)
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
           $("#"+v.id+",#g_"+v.id).addClass('additionalInfo');
238 238
           $("#"+v.id+",#g_"+v.id).click(function(event){
239 239
             i_div = $("#info_"+$(this).attr('id'));
240
-            t = "<?php escaped_echo(_("Your site administrator has specified that this device should be configured with resources located on a local page. When you click <b>Continue</b> this page will be opened in a new window/tab."))?>"+"<br><span class='redirect_link'><a href='"+v.redirect+"' target='_blank'><?php escaped_echo(_("Continue"));?></a></span>";
240
+            t = "<?php escaped_echo(_("Your site administrator has specified that this device should be configured with resources located on a local page. When you click <b>Continue</b> this page will be opened in a new window/tab."))?>"+"<br><span class='redirect_link'><a href='"+v.redirect+"' target='_blank'><?php escaped_echo(_("Continue")); ?></a></span>";
241 241
             i_div.html(t);
242 242
             $(".redirect_link").click(function(event) {
243 243
                i_div.hide();
@@ -245,13 +245,13 @@  discard block
 block discarded – undo
245 245
                
246 246
           });
247 247
         } else if(v.device_customtext != '0' || v.eap_customtext != '0' || v.message != '0' || v.status > 0) {
248
-          var continue_text = "<?php escaped_echo(_("Continue"));?>";
248
+          var continue_text = "<?php escaped_echo(_("Continue")); ?>";
249 249
           $("#"+v.id+",#g_"+v.id).addClass('additionalInfo');
250 250
           $("#"+v.id+",#g_"+v.id).click(function(event){
251 251
             i_div = $("#info_"+$(this).attr('id'));
252 252
             if(v.status > 0) {
253
-              t = "<?php escaped_echo(sprintf(_("This device cannot be configured with settings provided by your %s"),$cat->nomenclature_inst))?>";
254
-              continue_text = "<?php escaped_echo(_("Close"));?>";
253
+              t = "<?php escaped_echo(sprintf(_("This device cannot be configured with settings provided by your %s"), $cat->nomenclature_inst))?>";
254
+              continue_text = "<?php escaped_echo(_("Close")); ?>";
255 255
             } else {
256 256
             t = i_div.html();
257 257
             if(v.message != '0') {
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
   }
307 307
 
308 308
   function infoCAT(k,subK,title) {
309
-      $.post('<?php echo $Gui->skinObject->findResourceUrl("BASE","user/cat_info.php")?>', {page: k, subpage: subK, lang: lang}, function(data) {
309
+      $.post('<?php echo $Gui->skinObject->findResourceUrl("BASE", "user/cat_info.php")?>', {page: k, subpage: subK, lang: lang}, function(data) {
310 310
     if(data.substring(0,8) == 'no_title') {
311 311
        data = data.substring(8,data.length);
312 312
     } else {
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
    $("#loading_ico").css('left',x+'px');
330 330
    $("#loading_ico").attr('src','resources/images/icons/loading9.gif');
331 331
    $("#loading_ico").show();
332
-   window.location.replace("<?php echo $Gui->skinObject->findResourceUrl("BASE","admin/overview_user.php")?>?lang="+lang);
332
+   window.location.replace("<?php echo $Gui->skinObject->findResourceUrl("BASE", "admin/overview_user.php")?>?lang="+lang);
333 333
 }
334 334
 
335 335
 
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
     return(Math.round(windowWidth/2));
352 352
 }
353 353
 
354
-<?php if($idpId) { 
354
+<?php if ($idpId) { 
355 355
         print "front_page = 0;\n";
356 356
 } ?>
357 357
 
@@ -390,10 +390,10 @@  discard block
 block discarded – undo
390 390
     $("#download_info a").attr('href',download_link);
391 391
     $('#download_info').show();
392 392
     if( generateTimer > 0 ) {
393
-       setTimeout("document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']),'/')?>'+'/'+download_link",generateTimer);
393
+       setTimeout("document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']), '/')?>'+'/'+download_link",generateTimer);
394 394
     }
395 395
     else {
396
-       document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']),'/')?>'+'/'+download_link;
396
+       document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']), '/')?>'+'/'+download_link;
397 397
     }
398 398
   }
399 399
 }
@@ -475,13 +475,13 @@  discard block
 block discarded – undo
475 475
    "overlay":true,"cookie":true,"type":false,
476 476
    "country":true,"location":true,
477 477
    "title":"<?php escaped_echo($cat->nomenclature_inst) ?>",
478
-   "subtitle":"<?php escaped_echo(sprintf(_("Select your <strong>%s<\/strong>"),$cat->nomenclature_inst)) ?>",
479
-   "textHelp": "<?php escaped_echo(sprintf(_("Help, my %s is not on the list"),$cat->nomenclature_inst)) ?>",
480
-   "textHelpMore": "<?php escaped_echo(sprintf(_("This system relies on information supplied by local %s administrators. If your %s is not on the list, then nag them to add information to the %s database."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $cat->nomenclature_inst, CONFIG['APPEARANCE']['productname'])); ?>",
478
+   "subtitle":"<?php escaped_echo(sprintf(_("Select your <strong>%s<\/strong>"), $cat->nomenclature_inst)) ?>",
479
+   "textHelp": "<?php escaped_echo(sprintf(_("Help, my %s is not on the list"), $cat->nomenclature_inst)) ?>",
480
+   "textHelpMore": "<?php escaped_echo(sprintf(_("This system relies on information supplied by local %s administrators. If your %s is not on the list, then nag them to add information to the %s database."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $cat->nomenclature_inst, CONFIG['APPEARANCE']['productname'])); ?>",
481 481
    "textLocateMe": "<?php escaped_echo(_("Locate me more accurately using HTML5 Geo-Location")) ?>",
482 482
    "textShowProviders": "<?php escaped_echo(sprintf(_("Show %ss in"), $cat->nomenclature_inst)) ?>",
483 483
    "textAllCountries": "<?php escaped_echo(_("all countries")) ?>",
484
-   "textSearch" : "<?php escaped_echo(sprintf(_("or search for an %s, in example Univerity of Oslo"),$cat->nomenclature_inst)) ?>",
484
+   "textSearch" : "<?php escaped_echo(sprintf(_("or search for an %s, in example Univerity of Oslo"), $cat->nomenclature_inst)) ?>",
485 485
    "textShowAllCountries": "<?php escaped_echo(_("show all countries")) ?>",
486 486
    "textLimited1" : "<?php escaped_echo(_("Results limited to"))?>",
487 487
    "textLimited2" : "<?php escaped_echo(_("entries - show more"))?>",
Please login to merge, or discard this patch.
web/skins/eduroam2016/user/cat_info.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
 $Gui->langObject->setTextDomain("web_user");
29 29
 
30 30
 $page = $_REQUEST['page'];
31
-$subpage= $_REQUEST['subpage'];
31
+$subpage = $_REQUEST['subpage'];
32 32
 switch ($page) {
33 33
     case 'about' :
34 34
         require_once(dirname(dirname(dirname(dirname(__FILE__)))) . "/user/about_cat.inc.php");
Please login to merge, or discard this patch.
web/skins/eduroam2016/Menu.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -62,9 +62,9 @@  discard block
 block discarded – undo
62 62
     }
63 63
     public function printMenu($menu = NULL, $id=NULL) {
64 64
         $menu = $menu ?? $this->menu;
65
-     if(count($menu) == 0) {
66
-          return;
67
-     }
65
+        if(count($menu) == 0) {
66
+            return;
67
+        }
68 68
         $out = "\n<ul>\n";
69 69
         foreach ($menu as $menuItem) {
70 70
             $itemVisibility = $menuItem['visibility'] ?? 'all';
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
                 $out .= $this->printMenuItem($menuItem['text'], $link, $class);
81 81
                 $out .= $this->printMenu($submenu,$iD);
82 82
                 $out .= "</li>\n";
83
-             }
83
+                }
84 84
         }
85 85
         $out .= '</ul>';
86 86
         return($out);
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -20,9 +20,9 @@  discard block
 block discarded – undo
20 20
         $langsArray = [];
21 21
         foreach (CONFIG['LANGUAGES'] as $lang => $value) {
22 22
             if ($lang == $selectedLang) {
23
-                $langsArray[] = ['text'=>$value['display'], 'link'=>'javascript:changeLang("'.$lang.'")', 'class'=>'selected-lang'];
23
+                $langsArray[] = ['text'=>$value['display'], 'link'=>'javascript:changeLang("' . $lang . '")', 'class'=>'selected-lang'];
24 24
             } else {
25
-                $langsArray[] = ['text'=>$value['display'], 'link'=>'javascript:changeLang("'.$lang.'")'];
25
+                $langsArray[] = ['text'=>$value['display'], 'link'=>'javascript:changeLang("' . $lang . '")'];
26 26
             }
27 27
         }
28 28
         $this->menu = [['id' => 'start',
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
                         'link' => CONFIG_CONFASSISTANT['CONSORTIUM']['homepage']],
37 37
                 ]],
38 38
             ['id' => 'lang',
39
-                'text' => _("Language"), 'submenu' => $langsArray,],
39
+                'text' => _("Language"), 'submenu' => $langsArray, ],
40 40
             ['id' => 'help',
41 41
                 'text' => _("Help"), 'submenu' => [
42 42
                     ['text' => _("My institution is not listed"), 'catInfo' => ['idp_not_listed', _("FAQ")], 'visibility' => 'index'],
@@ -60,9 +60,9 @@  discard block
 block discarded – undo
60 60
         ];
61 61
         $this->visibility = $visibility;
62 62
     }
63
-    public function printMenu($menu = NULL, $id=NULL) {
63
+    public function printMenu($menu = NULL, $id = NULL) {
64 64
         $menu = $menu ?? $this->menu;
65
-     if(count($menu) == 0) {
65
+     if (count($menu) == 0) {
66 66
           return;
67 67
      }
68 68
         $out = "\n<ul>\n";
@@ -72,13 +72,13 @@  discard block
 block discarded – undo
72 72
                 $iD = $menuItem['id'] ?? $id;
73 73
                 $catInfo = NULL;
74 74
                 if (!empty($menuItem['catInfo'])) {
75
-                    $catInfo = 'javascript:infoCAT("'.$iD.'", "'.$menuItem['catInfo'][0].'","'.$menuItem['catInfo'][1].'")';
75
+                    $catInfo = 'javascript:infoCAT("' . $iD . '", "' . $menuItem['catInfo'][0] . '","' . $menuItem['catInfo'][1] . '")';
76 76
                 }
77 77
                 $link = $catInfo ?? $menuItem['link'] ?? '';
78
-                $class = empty($menuItem['class']) ? '' : ' class="'.$menuItem['class'].'"';
79
-                $submenu  = $menuItem['submenu'] ?? [];
78
+                $class = empty($menuItem['class']) ? '' : ' class="' . $menuItem['class'] . '"';
79
+                $submenu = $menuItem['submenu'] ?? [];
80 80
                 $out .= $this->printMenuItem($menuItem['text'], $link, $class);
81
-                $out .= $this->printMenu($submenu,$iD);
81
+                $out .= $this->printMenu($submenu, $iD);
82 82
                 $out .= "</li>\n";
83 83
              }
84 84
         }
@@ -86,8 +86,8 @@  discard block
 block discarded – undo
86 86
         return($out);
87 87
     }
88 88
 
89
-    private function printMenuItem($itemText,$itemLink = '',$itemClass = '') {
90
-        return "<li><a href='" . $itemLink . "'".$itemClass.'>' . $itemText . "</a>";
89
+    private function printMenuItem($itemText, $itemLink = '', $itemClass = '') {
90
+        return "<li><a href='" . $itemLink . "'" . $itemClass . '>' . $itemText . "</a>";
91 91
     }
92 92
     
93 93
 
Please login to merge, or discard this patch.
web/skins/eduroam2016/accountstatus/accountstatus.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
             <div id="user_info"></div> <!-- this will be filled with the profile contact information -->
50 50
             <div id="sb_info">
51 51
                 <?php 
52
-             switch ($statusInfo['errorcode']) {
52
+                switch ($statusInfo['errorcode']) {
53 53
                     case "GENERATOR_CONSUMED":
54 54
                         echo $uiElements->boxError(_("You attempted to download an installer that was already downloaded before. Please request a new token from your administrator instead."), _("Attempt to re-use download link"), TRUE) . "<p>";
55 55
                         break;
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
                         }
148 148
 
149 149
                         echo "<div id='sb_download_message'><p>".sprintf(_("You can now download a personalised  %s installation program."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']);
150
- //                       echo sprintf(_("The installation program is <span class='emph'>strictly personal</span>, to be used <span class='emph'>only on this device (%s)</span>, and it is <span class='emph'>not permitted to share</span> this information with anyone."), $statusInfo['OS']['display']);
150
+    //                       echo sprintf(_("The installation program is <span class='emph'>strictly personal</span>, to be used <span class='emph'>only on this device (%s)</span>, and it is <span class='emph'>not permitted to share</span> this information with anyone."), $statusInfo['OS']['display']);
151 151
                         echo sprintf(_("The installation program is <span class='emph'>strictly personal</span>, to be used <span class='emph'>only on this device (%s)</span>, and it is <span class='emph'>not permitted to share</span> this information with anyone."), $statusInfo['OS']['display']);
152 152
                         echo "<p style='color:red;'>" . _("When the system detects abuse such as sharing login data with others, all access rights for you will be revoked and you may be sanctioned by your local eduroam administrator.") . "</p>";
153 153
                         echo "<p>" . _("During the installation process, you will be asked for the following import PIN. This only happens once during the installation. You do not have to write down this PIN.") . "</p></div>";
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -3,9 +3,9 @@  discard block
 block discarded – undo
3 3
 $Gui->defaultPagePrelude();
4 4
 ?>
5 5
 <!-- JQuery -->
6
-<script type="text/javascript" src="<?php echo $Gui->skinObject->findResourceUrl("EXTERNAL","jquery/jquery.js");?>"></script>
7
-<script type="text/javascript" src="<?php echo $Gui->skinObject->findResourceUrl("EXTERNAL","jquery/jquery-migrate-1.2.1.js");?>"></script>
8
-<script type="text/javascript" src="<?php echo $Gui->skinObject->findResourceUrl("EXTERNAL","jquery/jquery-ui.js");?>"></script>
6
+<script type="text/javascript" src="<?php echo $Gui->skinObject->findResourceUrl("EXTERNAL", "jquery/jquery.js"); ?>"></script>
7
+<script type="text/javascript" src="<?php echo $Gui->skinObject->findResourceUrl("EXTERNAL", "jquery/jquery-migrate-1.2.1.js"); ?>"></script>
8
+<script type="text/javascript" src="<?php echo $Gui->skinObject->findResourceUrl("EXTERNAL", "jquery/jquery-ui.js"); ?>"></script>
9 9
 <!-- JQuery -->
10 10
 <script type="text/javascript">
11 11
     var recognisedOS = '';
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 ?>
28 28
 var lang = "<?php echo($Gui->langObject->getLang()) ?>";
29 29
 </script>
30
-<link rel="stylesheet" media="screen" type="text/css" href="<?php echo $Gui->skinObject->findResourceUrl("CSS","cat-user.css");?>" />
30
+<link rel="stylesheet" media="screen" type="text/css" href="<?php echo $Gui->skinObject->findResourceUrl("CSS", "cat-user.css"); ?>" />
31 31
 
32 32
 </head>
33 33
 <body>
@@ -37,15 +37,15 @@  discard block
 block discarded – undo
37 37
     <?php echo $divs->div_heading($visibility); ?>
38 38
     <div id="info_overlay"> <!-- device info -->
39 39
         <div id="info_window"></div>
40
-        <img id="info_menu_close" class="close_button" src="<?php echo $Gui->skinObject->findResourceUrl("IMAGES","icons/button_cancel.png")?>" ALT="Close"/>
40
+        <img id="info_menu_close" class="close_button" src="<?php echo $Gui->skinObject->findResourceUrl("IMAGES", "icons/button_cancel.png")?>" ALT="Close"/>
41 41
     </div>
42 42
     <div id="main_menu_info" style="display:none"> <!-- stuff triggered form main menu -->
43
-          <img id="main_menu_close" class="close_button" src="<?php echo $Gui->skinObject->findResourceUrl("IMAGES","icons/button_cancel.png")?>" ALT="Close"/>
43
+          <img id="main_menu_close" class="close_button" src="<?php echo $Gui->skinObject->findResourceUrl("IMAGES", "icons/button_cancel.png")?>" ALT="Close"/>
44 44
           <div id="main_menu_content"></div>
45 45
     </div>
46 46
     <div id="main_body">
47 47
         <div id="user_page">
48
-            <?php  echo $divs->div_institution(FALSE);?>
48
+            <?php  echo $divs->div_institution(FALSE); ?>
49 49
             <div id="user_info"></div> <!-- this will be filled with the profile contact information -->
50 50
             <div id="sb_info">
51 51
                 <?php 
@@ -101,11 +101,11 @@  discard block
 block discarded – undo
101 101
                                 $categoryText = "<tr style='color:$color;'><th colspan=5 class='th1'>" . $categoryText;
102 102
 
103 103
                                 $categoryText .= "</th></tr>";
104
-                                $categoryText .= "<tr style='color:$color;'><th>" . _("Pseudonym") . "</th><th>" . _("Device Type") . "</th><th>" . _("Serial Number") . "</th><th>" . _("Issue Date") . "</th><th>" . _("Expiry Date") . "</th>". ( $category == \core\ProfileSilverbullet::SB_CERTSTATUS_VALID ? $revokeText : "") . "</tr>";
104
+                                $categoryText .= "<tr style='color:$color;'><th>" . _("Pseudonym") . "</th><th>" . _("Device Type") . "</th><th>" . _("Serial Number") . "</th><th>" . _("Issue Date") . "</th><th>" . _("Expiry Date") . "</th>" . ($category == \core\ProfileSilverbullet::SB_CERTSTATUS_VALID ? $revokeText : "") . "</tr>";
105 105
                                 foreach ($allcerts as $oneCredential) {
106 106
                                     if ($oneCredential['status'] == $category) {
107 107
                                         $categoryCount++;
108
-                                        ${$categoryCountVar} ++;
108
+                                        ${$categoryCountVar}++;
109 109
                                         $categoryText .= "<tr style='color:$color;'>";
110 110
                                         $categoryText .= "<td>" . $oneCredential['name'] . "</td>";
111 111
                                         $categoryText .= "<td>" . $oneCredential['device'] . "</td>";
@@ -139,18 +139,18 @@  discard block
 block discarded – undo
139 139
                             echo "<h3>" . sprintf(_("Your invitation token is valid for %d more device activations (%d have already been used)."), $statusInfo['tokenstatus']['activations_remaining'], $statusInfo['tokenstatus']['activations_total'] - $statusInfo['tokenstatus']['activations_remaining']) . "</h3>";
140 140
                         }
141 141
                         if (!$statusInfo["OS"]) {
142
-                            echo "<p>"._("Unfortunately, we are unable to determine your device's operating system. If you have made modifications on your device which prevent it from being recognised (e.g. custom 'User Agent' settings), please undo such modifications. You can come back to this page again; the invitation link has not been used up yet.") . "</p>";
142
+                            echo "<p>" . _("Unfortunately, we are unable to determine your device's operating system. If you have made modifications on your device which prevent it from being recognised (e.g. custom 'User Agent' settings), please undo such modifications. You can come back to this page again; the invitation link has not been used up yet.") . "</p>";
143 143
                             break;
144 144
                         }
145 145
 
146 146
                         $dev = new \core\DeviceFactory($statusInfo['OS']['device']);
147 147
                         $dev->device->calculatePreferredEapType([new \core\common\EAP(\core\common\EAP::EAPTYPE_SILVERBULLET)]);
148 148
                         if ($dev->device->selectedEap == []) {
149
-                            echo "<p>".sprintf(_("Unfortunately, the operating system your device uses (%s) is currently not supported for hosted end-user accounts. You can visit this page with a supported operating system later; the invitation link has not been used up yet."), $statusInfo['OS']['display']) . "</p>";
149
+                            echo "<p>" . sprintf(_("Unfortunately, the operating system your device uses (%s) is currently not supported for hosted end-user accounts. You can visit this page with a supported operating system later; the invitation link has not been used up yet."), $statusInfo['OS']['display']) . "</p>";
150 150
                             break;
151 151
                         }
152 152
 
153
-                        echo "<div id='sb_download_message'><p>".sprintf(_("You can now download a personalised  %s installation program."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']);
153
+                        echo "<div id='sb_download_message'><p>" . sprintf(_("You can now download a personalised  %s installation program."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']);
154 154
  //                       echo sprintf(_("The installation program is <span class='emph'>strictly personal</span>, to be used <span class='emph'>only on this device (%s)</span>, and it is <span class='emph'>not permitted to share</span> this information with anyone."), $statusInfo['OS']['display']);
155 155
                         echo sprintf(_("The installation program is <span class='emph'>strictly personal</span>, to be used <span class='emph'>only on this device (%s)</span>, and it is <span class='emph'>not permitted to share</span> this information with anyone."), $statusInfo['OS']['display']);
156 156
                         echo "<p style='color:red;'>" . _("When the system detects abuse such as sharing login data with others, all access rights for you will be revoked and you may be sanctioned by your local eduroam administrator.") . "</p>";
@@ -202,9 +202,9 @@  discard block
 block discarded – undo
202 202
             $supportInfo .= '<tr><td>' . ("tel:") . '</td><td><a href="' . $attributes['local_phone'] . '" target="_blank">' . $attributes['local_phone'] . '</a></td></tr>';
203 203
         }
204 204
         if ($supportInfo != '') {
205
-            $supportInfo = "<table><tr><th colspan='2'>" . sprintf(_("If you encounter problems, then you can obtain direct assistance from your %s at:"),$cat->nomenclature_inst) . "</th></tr>$supportInfo</table>";
205
+            $supportInfo = "<table><tr><th colspan='2'>" . sprintf(_("If you encounter problems, then you can obtain direct assistance from your %s at:"), $cat->nomenclature_inst) . "</th></tr>$supportInfo</table>";
206 206
         } else {
207
-            $supportInfo = "<table><tr><th colspan='2'>" . sprintf(_("If you encounter problems you should ask for help at your %s"),$cat->nomenclature_inst) . "</th></tr></table>";
207
+            $supportInfo = "<table><tr><th colspan='2'>" . sprintf(_("If you encounter problems you should ask for help at your %s"), $cat->nomenclature_inst) . "</th></tr></table>";
208 208
         }
209 209
 ?>
210 210
     <script>
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
     $("#inst_name").val(idpName);
216 216
     $("#inst_name_span").html(idpName);
217 217
     $(".inst_name").text(idpName);
218
-    $("#inst_extra_text").html("<?php escaped_echo(sprintf(_("Your personal %s account status page"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']));?>");
218
+    $("#inst_extra_text").html("<?php escaped_echo(sprintf(_("Your personal %s account status page"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'])); ?>");
219 219
         if(logo) {
220 220
     $("#idp_logo").attr("src","<?php echo $skinObject->findResourceUrl("BASE", "user/API.php"); ?>?action=sendLogo&api_version=2&idp="+idpId);
221 221
     $("#idp_logo").show();
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
         
231 231
         $("#user_button_sb").click(function(event){
232 232
             event.preventDefault();
233
-            $("#cat_form").attr('action','<?php echo $Gui->skinObject->findResourceUrl("BASE","user/sb_download.php");?>');
233
+            $("#cat_form").attr('action','<?php echo $Gui->skinObject->findResourceUrl("BASE", "user/sb_download.php"); ?>');
234 234
             $("#cat_form").submit();
235 235
         });
236 236
         
Please login to merge, or discard this patch.
web/user/API.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
     'getUserCerts',
40 40
 ];
41 41
 
42
-function getRequest($varName,$filter) {
42
+function getRequest($varName, $filter) {
43 43
     $safeText = ["options"=>["regexp"=>"/^[\w\d]+$/"]];
44 44
     switch ($filter) {
45 45
         case 'safe_text':
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 
58 58
 // make sure this is a known action
59 59
 $actionR = getRequest('action', 'safe_text');
60
-$action = array_search($actionR,LISTOFACTIONS) ? $actionR : FALSE;
60
+$action = array_search($actionR, LISTOFACTIONS) ? $actionR : FALSE;
61 61
 if ($action === FALSE) {
62 62
     exit;
63 63
 }
@@ -65,18 +65,18 @@  discard block
 block discarded – undo
65 65
 $lang = $langR ? $validator->supportedLanguage($langR) : FALSE;
66 66
 $deviceR = getRequest('device', 'safe_text');
67 67
 $device = $deviceR ? $validator->Device($deviceR) : FALSE;
68
-$idpR = getRequest('idp','int');
68
+$idpR = getRequest('idp', 'int');
69 69
 $idp = $idpR ? $validator->IdP($idpR)->identifier : FALSE;
70
-$profileR = getRequest('profile','int');
70
+$profileR = getRequest('profile', 'int');
71 71
 $profile = $profileR ? $validator->Profile($profileR)->identifier : FALSE;
72
-$federationR = getRequest('federation','safe_text');
72
+$federationR = getRequest('federation', 'safe_text');
73 73
 $federation = $federationR ? $validator->Federation($deviceR)->identifier : FALSE;
74
-$disco = getRequest('disco','int');
75
-$width = getRequest('width','int') ?? 0;
76
-$height = getRequest('height','int') ?? 0;
77
-$sort = getRequest('sort','int') ?? 0;
78
-$generatedforR = getRequest('generatedfor','safe_text') ?? 'user';
79
-$token = getRequest('token','safe_text');
74
+$disco = getRequest('disco', 'int');
75
+$width = getRequest('width', 'int') ?? 0;
76
+$height = getRequest('height', 'int') ?? 0;
77
+$sort = getRequest('sort', 'int') ?? 0;
78
+$generatedforR = getRequest('generatedfor', 'safe_text') ?? 'user';
79
+$token = getRequest('token', 'safe_text');
80 80
 
81 81
 
82 82
 switch ($action) {
Please login to merge, or discard this patch.