Passed
Push — master ( 24687e...3d1824 )
by Tomasz
03:18
created
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.
web/skins/eduroam2016/accountstatus/accountstatus.php 1 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.