Passed
Push — master ( 192b85...66bfa3 )
by Tomasz
03:58
created
core/ProfileSilverbullet.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 // realm is automatically calculated, then stored in DB
101 101
 
102 102
         $this->realm = "opaquehash@$myInst->identifier-$this->identifier." . strtolower($myInst->federation) . CONFIG_CONFASSISTANT['SILVERBULLET']['realm_suffix'];
103
-        $this->setRealm($myInst->identifier."-".$this->identifier."." . strtolower($myInst->federation) . strtolower(CONFIG_CONFASSISTANT['SILVERBULLET']['realm_suffix']));
103
+        $this->setRealm($myInst->identifier . "-" . $this->identifier . "." . strtolower($myInst->federation) . strtolower(CONFIG_CONFASSISTANT['SILVERBULLET']['realm_suffix']));
104 104
         $localValueIfAny = "";
105 105
 
106 106
 // but there's some common internal attributes populated directly
@@ -176,11 +176,11 @@  discard block
 block discarded – undo
176 176
     public function invitationMailBody($invitationLink) {
177 177
         $text = _("Hello!");
178 178
         $text .= "\n\n";
179
-        $text .= sprintf(_("A new %s access credential has been created for you by your network administrator."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']);
179
+        $text .= sprintf(_("A new %s access credential has been created for you by your network administrator."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']);
180 180
         $text .= " ";
181 181
         $text .= sprintf(_("Please follow the following link with the device you want to enable for %s to get a custom %s installation program just for you. You can click on the link, copy and paste it into a browser or scan the attached QR code."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']);
182 182
         $text .= "\n\n$invitationLink\n\n"; // gets replaced with the token value by getBody()
183
-        $text .= sprintf(_("Please keep this email or bookmark this link for future use. After picking up your %s installation program, you can use the same link to get status information about your %s account."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']);
183
+        $text .= sprintf(_("Please keep this email or bookmark this link for future use. After picking up your %s installation program, you can use the same link to get status information about your %s account."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']);
184 184
         $text .= "\n\n";
185 185
         $text .= _("Regards,");
186 186
         $text .= "\n\n";
@@ -561,7 +561,7 @@  discard block
 block discarded – undo
561 561
         if (!$invitationsResult || $invitationsResult->num_rows == 0) {
562 562
             $loggerInstance->debug(2, "Token  $tokenvalue not found in database or database query error!\n");
563 563
             return ["status" => self::SB_TOKENSTATUS_INVALID,
564
-                "cert_status" => [],];
564
+                "cert_status" => [], ];
565 565
         }
566 566
         // if not returned, we found the token in the DB
567 567
         $invitationRow = mysqli_fetch_object($invitationsResult);
@@ -716,9 +716,9 @@  discard block
 block discarded – undo
716 716
         $link = $link . $relPath;
717 717
 
718 718
         if (preg_match('/admin$/', $link)) {
719
-            $link = substr($link, 0, strlen($link)-6);
719
+            $link = substr($link, 0, strlen($link) - 6);
720 720
         }
721
-        $link .= '/accountstatus/accountstatus.php?token='.$token;
721
+        $link .= '/accountstatus/accountstatus.php?token=' . $token;
722 722
         return $link;
723 723
     }
724 724
 
Please login to merge, or discard this patch.
web/lib/admin/PageDecoration.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
                         <select id='lang' name='lang' onchange='this.form.submit()'>";
66 66
 
67 67
         foreach (CONFIG['LANGUAGES'] as $lang => $value) {
68
-            $retval .= "<option value='$lang' " . (strtoupper($language) == strtoupper($lang) ? "selected" : "" ) . " >" . $value['display'] . "</option> ";
68
+            $retval .= "<option value='$lang' " . (strtoupper($language) == strtoupper($lang) ? "selected" : "") . " >" . $value['display'] . "</option> ";
69 69
         }
70 70
         $retval .= "</select>";
71 71
 
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
         $retval .= "</form>
78 78
                 </div><!--langselection-->";
79 79
 
80
-        $logoUrl = "//" . $this->validator->hostname($_SERVER['SERVER_NAME']) . substr($_SERVER['PHP_SELF'], 0, (strrpos($_SERVER['PHP_SELF'], "admin/") !== FALSE ? strrpos($_SERVER['PHP_SELF'], "admin/") : strrpos($_SERVER['PHP_SELF'], "/")))."/resources/images/consortium_logo.png";        
80
+        $logoUrl = "//" . $this->validator->hostname($_SERVER['SERVER_NAME']) . substr($_SERVER['PHP_SELF'], 0, (strrpos($_SERVER['PHP_SELF'], "admin/") !== FALSE ? strrpos($_SERVER['PHP_SELF'], "admin/") : strrpos($_SERVER['PHP_SELF'], "/"))) . "/resources/images/consortium_logo.png";        
81 81
         $retval .= "<div class='consortium_logo'>
82 82
                     <img id='test_locate' src='$logoUrl' alt='Consortium Logo'>
83 83
                 </div> <!-- consortium_logo -->
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
         $advancedControls = TRUE;
121 121
         switch ($area) {
122 122
             case "ADMIN-IDP":
123
-                $cap2 = sprintf(_("Administrator Interface - Identity Provider"),$this->ui->nomenclature_inst);
123
+                $cap2 = sprintf(_("Administrator Interface - Identity Provider"), $this->ui->nomenclature_inst);
124 124
                 break;
125 125
             case "ADMIN-IDP-USERS":
126 126
                 $cap2 = sprintf(_("Administrator Interface - %s User Management"), \core\ProfileSilverbullet::PRODUCTNAME);
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
                 $cap2 = _("Management of User Details");
133 133
                 break;
134 134
             case "FEDERATION":
135
-                $cap2 = sprintf(_("Administrator Interface - %s Management"),$this->ui->nomenclature_fed);
135
+                $cap2 = sprintf(_("Administrator Interface - %s Management"), $this->ui->nomenclature_fed);
136 136
                 break;
137 137
             case "USER":
138 138
                 $cap1 = sprintf(_("Welcome to %s"), CONFIG['APPEARANCE']['productname']);
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
         // content from here on will SCROLL instead of being fixed at the top
155 155
         $retval .= "<div class='pagecontent'>"; // closes in footer again
156 156
         $retval .= "<div class='trick'>"; // closes in footer again
157
-        $retval .= "<div id='secondrow' style='border-bottom:5px solid ".CONFIG['APPEARANCE']['colour1']."; min-height:100px;'>
157
+        $retval .= "<div id='secondrow' style='border-bottom:5px solid " . CONFIG['APPEARANCE']['colour1'] . "; min-height:100px;'>
158 158
             <div id='secondarycaptions' style='display:inline-block; float:left'>
159 159
                 <h2>$cap2</h2>
160 160
             </div><!--secondarycaptions-->";
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
             $cutoffPosition = strrpos($_SERVER['PHP_SELF'], "/");
200 200
         }
201 201
 
202
-        $cssUrl = "//" . $this->validator->hostname($_SERVER['SERVER_NAME']) . substr($_SERVER['PHP_SELF'], 0, $cutoffPosition )."/resources/css/cat.css.php";
202
+        $cssUrl = "//" . $this->validator->hostname($_SERVER['SERVER_NAME']) . substr($_SERVER['PHP_SELF'], 0, $cutoffPosition) . "/resources/css/cat.css.php";
203 203
         
204 204
         $retval .= "<link rel='stylesheet' type='text/css' href='$cssUrl' />";
205 205
         $retval .= "<title>" . htmlspecialchars($pagetitle) . "</title>";
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
             $cutoffPosition = strrpos($_SERVER['PHP_SELF'], "/");
228 228
         }
229 229
         
230
-        $logoBase = "//" . $this->validator->hostname($_SERVER['SERVER_NAME']) . substr($_SERVER['PHP_SELF'], 0, $cutoffPosition)."/resources/images";
230
+        $logoBase = "//" . $this->validator->hostname($_SERVER['SERVER_NAME']) . substr($_SERVER['PHP_SELF'], 0, $cutoffPosition) . "/resources/images";
231 231
 
232 232
         return "<span id='logos' style='position:fixed; left:50%;'><img src='$logoBase/dante.png' alt='DANTE' style='height:23px;width:47px'/>
233 233
               <img src='$logoBase/eu.png' alt='EU' style='height:23px;width:27px;border-width:0px;'/></span>
Please login to merge, or discard this patch.
web/skins/modern/Menu.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@
 block discarded – undo
79 79
                 $class = empty($menuItem['class']) ? '' : ' class="' . $menuItem['class'] . '"';
80 80
                 $submenu = $menuItem['submenu'] ?? [];
81 81
                 $out .= $this->printMenuItem($menuItem['text'], $link, $class);
82
-                $out .= $this->printMenu($submenu,$iD);
82
+                $out .= $this->printMenu($submenu, $iD);
83 83
                 $out .= "</li>\n";
84 84
             }
85 85
         }
Please login to merge, or discard this patch.
web/skins/modern/accountstatus/accountstatus.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -89,18 +89,18 @@  discard block
 block discarded – undo
89 89
                             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>";
90 90
                         }
91 91
                         if (!$statusInfo["OS"]) {
92
-                            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>";
92
+                            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>";
93 93
                             break;
94 94
                         }
95 95
 
96 96
                         $dev = new \core\DeviceFactory($statusInfo['OS']['device']);
97 97
                         $dev->device->calculatePreferredEapType([new \core\common\EAP(\core\common\EAP::EAPTYPE_SILVERBULLET)]);
98 98
                         if ($dev->device->selectedEap == []) {
99
-                            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>";
99
+                            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>";
100 100
                             break;
101 101
                         }
102 102
 
103
-                        echo "<div id='sb_download_message'><p>".sprintf(_("You can now download a personalised  %s installation program."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']);
103
+                        echo "<div id='sb_download_message'><p>" . sprintf(_("You can now download a personalised  %s installation program."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']);
104 104
 //                       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']);
105 105
                         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']);
106 106
                         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>";
@@ -152,9 +152,9 @@  discard block
 block discarded – undo
152 152
             $supportInfo .= '<tr><td>' . ("tel:") . '</td><td><a href="' . $attributes['local_phone'] . '" target="_blank">' . $attributes['local_phone'] . '</a></td></tr>';
153 153
         }
154 154
         if ($supportInfo != '') {
155
-            $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>";
155
+            $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>";
156 156
         } else {
157
-            $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>";
157
+            $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>";
158 158
         }
159 159
 ?>
160 160
     <script>
Please login to merge, or discard this patch.
web/skins/modern/user/js/cat_js.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -212,9 +212,9 @@  discard block
 block discarded – undo
212 212
        if(j.local_phone !== undefined && j.local_phone) 
213 213
          txt = txt+'<tr><td><?php escaped_echo(_("tel:")); ?></td><td>'+j.local_phone+'</td></tr>';
214 214
        if(txt) 
215
-         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>';
215
+         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>';
216 216
         else 
217
-         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>";
217
+         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>";
218 218
       $("#user_info").html(txt);
219 219
       $("#user_info").show();
220 220
       resetDevices();
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
           $("#g_"+v.id).addClass('alertButton');
228 228
           $("#cross_icon_"+v.id).show();
229 229
           $("#"+v.id).addClass('disabledDevice');
230
-          $("#download_button_header_"+v.id).html("<?php escaped_echo(sprintf(_("This device cannot be configured with settings provided by your %s"),$cat->nomenclature_inst))?>");
230
+          $("#download_button_header_"+v.id).html("<?php escaped_echo(sprintf(_("This device cannot be configured with settings provided by your %s"), $cat->nomenclature_inst))?>");
231 231
           $("#info_b_"+v.id+",#g_info_b_"+v.id).hide();
232 232
         } else  {
233 233
           if(v.status == -1)
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
           $("#"+v.id+",#g_"+v.id).click(function(event){
253 253
             i_div = $("#info_"+$(this).attr('id'));
254 254
             if(v.status > 0) {
255
-              t = "<?php escaped_echo(sprintf(_("This device cannot be configured with settings provided by your %s"),$cat->nomenclature_inst))?>";
255
+              t = "<?php escaped_echo(sprintf(_("This device cannot be configured with settings provided by your %s"), $cat->nomenclature_inst))?>";
256 256
               continue_text = "<?php escaped_echo(_("Close")); ?>";
257 257
             } else {
258 258
             t = i_div.html();
@@ -322,7 +322,7 @@  discard block
 block discarded – undo
322 322
   }
323 323
   
324 324
   function infoCAT(k,subK,title) {
325
-      $.post('<?php echo $Gui->skinObject->findResourceUrl("BASE","user/cat_info.php")?>', {page: k, subpage: subK, lang: lang}, function(data) {
325
+      $.post('<?php echo $Gui->skinObject->findResourceUrl("BASE", "user/cat_info.php")?>', {page: k, subpage: subK, lang: lang}, function(data) {
326 326
           showInfo(data, title)});
327 327
   }
328 328
 
@@ -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
 
@@ -353,7 +353,7 @@  discard block
 block discarded – undo
353 353
     return(Math.round(windowWidth/2));
354 354
 }
355 355
 
356
-<?php if($idpId) { 
356
+<?php if ($idpId) { 
357 357
         print "front_page = 0;\n";
358 358
 } ?>
359 359
 
@@ -477,13 +477,13 @@  discard block
 block discarded – undo
477 477
    "overlay":true,"cookie":true,"type":false,
478 478
    "country":true,"location":true,
479 479
    "title":"<?php escaped_echo($cat->nomenclature_inst) ?>",
480
-   "subtitle":"<?php escaped_echo(sprintf(_("Select your <strong>%s<\/strong>"),$cat->nomenclature_inst)) ?>",
481
-   "textHelp": "<?php escaped_echo(sprintf(_("Help, my %s is not on the list"),$cat->nomenclature_inst)) ?>",
482
-   "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'])); ?>",
480
+   "subtitle":"<?php escaped_echo(sprintf(_("Select your <strong>%s<\/strong>"), $cat->nomenclature_inst)) ?>",
481
+   "textHelp": "<?php escaped_echo(sprintf(_("Help, my %s is not on the list"), $cat->nomenclature_inst)) ?>",
482
+   "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'])); ?>",
483 483
    "textLocateMe": "<?php escaped_echo(_("Locate me more accurately using HTML5 Geo-Location")) ?>",
484 484
    "textShowProviders": "<?php escaped_echo(sprintf(_("Show %ss in"), $cat->nomenclature_inst)) ?>",
485 485
    "textAllCountries": "<?php escaped_echo(_("all countries")) ?>",
486
-   "textSearch" : "<?php escaped_echo(sprintf(_("or search for an %s, in example Univerity of Oslo"),$cat->nomenclature_inst)) ?>",
486
+   "textSearch" : "<?php escaped_echo(sprintf(_("or search for an %s, in example Univerity of Oslo"), $cat->nomenclature_inst)) ?>",
487 487
    "textShowAllCountries": "<?php escaped_echo(_("show all countries")) ?>",
488 488
    "textLimited1" : "<?php escaped_echo(_("Results limited to"))?>",
489 489
    "textLimited2" : "<?php escaped_echo(_("entries - show more"))?>",
Please login to merge, or discard this patch.
web/skins/modern/resources/css/cat.css.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -187,7 +187,7 @@
 block discarded – undo
187 187
     border-bottom-style:solid;
188 188
     border-top-width:5px; 
189 189
     border-bottom-width:5px; 
190
-    border-color: <?php echo $colour1;?>;
190
+    border-color: <?php echo $colour1; ?>;
191 191
     padding-left:30px;
192 192
     color: <?php echo $colour2; ?>;
193 193
 }
Please login to merge, or discard this patch.