Test Setup Failed
Push — master ( 5d224e...fb5bc7 )
by Maja
06:44 queued 10s
created
web/skins/modern/Divs.php 1 patch
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -60,11 +60,11 @@  discard block
 block discarded – undo
60 60
         $location = $this->Gui->skinObject->findResourceUrl("IMAGES", "consortium_logo.png");
61 61
         if ($location !== FALSE) {
62 62
             $retval .= "<div id='cat_logo'>
63
-            <a href='" . \config\ConfAssistant::CONSORTIUM['homepage'] . "'><img id='logo_img' src='$location' alt='Consortium Logo'/></a>
63
+            <a href='" . \config\ConfAssistant::CONSORTIUM['homepage']."'><img id='logo_img' src='$location' alt='Consortium Logo'/></a>
64 64
             <span>Configuration Assistant Tool</span>
65 65
             </div>";
66 66
         }
67
-        $retval .= "<div id='motd'>" . (isset(\config\Master::APPEARANCE['MOTD']) ? \config\Master::APPEARANCE['MOTD'] : '&nbsp') . "</div>";
67
+        $retval .= "<div id='motd'>".(isset(\config\Master::APPEARANCE['MOTD']) ? \config\Master::APPEARANCE['MOTD'] : '&nbsp')."</div>";
68 68
         $loc2 = $this->Gui->skinObject->findResourceUrl("IMAGES", "icons/menu.png");
69 69
         if ($loc2 !== FALSE) {
70 70
             $retval .= "<img id='hamburger' src='$loc2' alt='Menu'/>";
@@ -87,13 +87,13 @@  discard block
 block discarded – undo
87 87
     public function divUserWelcome() {
88 88
         $retval = "
89 89
 <div id='user_welcome'> <!-- this information is shown just before the download -->
90
-    <strong>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_PAGEHEADING] . "</strong>
90
+    <strong>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_PAGEHEADING]."</strong>
91 91
     <p>
92 92
     <span id='download_info'>
93 93
     <!-- the empty href is dynamically exchanged with the actual path by jQuery at runtime -->
94
-        " . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_DOWNLOAD] . "
94
+        " . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_DOWNLOAD]."
95 95
     </span>
96
-    <p>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_HEADING] . "
96
+    <p>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_HEADING]."
97 97
     <br/>
98 98
     <br/>";
99 99
         switch (\config\ConfAssistant::CONSORTIUM['name']) {
@@ -104,11 +104,11 @@  discard block
 block discarded – undo
104 104
         }
105 105
         $retval .= "
106 106
     </p>
107
-    <p>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_USAGE] . "
108
-    <p>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_PROBLEMS] . "
107
+    <p>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_USAGE]."
108
+    <p>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_PROBLEMS]."
109 109
     </p>
110 110
     <p>
111
-    <a href='javascript:back_to_downloads()'><strong>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_BACKTODOWNLOADS] . "</strong></a>
111
+    <a href='javascript:back_to_downloads()'><strong>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_BACKTODOWNLOADS]."</strong></a>
112 112
     </p>
113 113
 </div> <!-- id='user_welcomer_page' -->
114 114
 ";
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
     public function divSilverbullet() {
124 124
         $retval = "
125 125
 <div id='silverbullet'>"
126
-                . $this->Gui->textTemplates->templates[user\SB_GO_AWAY] .
126
+                . $this->Gui->textTemplates->templates[user\SB_GO_AWAY].
127 127
                 "</div>
128 128
     ";
129 129
         return $retval;
@@ -137,14 +137,14 @@  discard block
 block discarded – undo
137 137
     public function divTopWelcome() {
138 138
         $retval = '';
139 139
         if (\config\ConfAssistant::CONSORTIUM['name'] == "eduroam" && isset(\config\ConfAssistant::CONSORTIUM['deployment-voodoo']) && \config\ConfAssistant::CONSORTIUM['deployment-voodoo'] == "Operations Team") { // SW: APPROVED
140
-            $retval = "<br><div id='top_invite_ad'>" . $this->Gui->textTemplates->templates[user\FRONTPAGE_EDUROAM_AD] . "</div>";
140
+            $retval = "<br><div id='top_invite_ad'>".$this->Gui->textTemplates->templates[user\FRONTPAGE_EDUROAM_AD]."</div>";
141 141
         }
142 142
         return "
143 143
 <div id='welcome_top1'>
144
-    " . $this->Gui->textTemplates->templates[user\HEADING_TOPLEVEL_GREET] . "
144
+    " . $this->Gui->textTemplates->templates[user\HEADING_TOPLEVEL_GREET]."
145 145
 </div>
146 146
 <div id='top_invite'>
147
-    " . $this->Gui->textTemplates->templates[user\HEADING_TOPLEVEL_PURPOSE] . $retval . "
147
+    " . $this->Gui->textTemplates->templates[user\HEADING_TOPLEVEL_PURPOSE].$retval."
148 148
 </div>";
149 149
     }
150 150
 
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
         $retval = "
158 158
 <div id='roller'>
159 159
     <div id='slides'>
160
-        <span id='line1'>" . $this->Gui->textTemplates->templates[user\FRONTPAGE_ROLLER_EASY] . "</span>
160
+        <span id='line1'>" . $this->Gui->textTemplates->templates[user\FRONTPAGE_ROLLER_EASY]."</span>
161 161
         <span id='line2'></span>
162 162
         <span id='line3'></span>
163 163
         <span id='line4'>";
@@ -219,9 +219,9 @@  discard block
 block discarded – undo
219 219
     public function divProfiles() {
220 220
         return "
221 221
 <div id='profiles'> <!-- this is the profile selection filled during run time -->
222
-    <div id='profiles_h' class='sub_h'>" . $this->Gui->textTemplates->templates[user\PROFILE_SELECTION] . "
222
+    <div id='profiles_h' class='sub_h'>" . $this->Gui->textTemplates->templates[user\PROFILE_SELECTION]."
223 223
     </div>" .
224
-                "<select id='profile_list'></select><div id='profile_desc' class='profile_desc'></div>" .
224
+                "<select id='profile_list'></select><div id='profile_desc' class='profile_desc'></div>".
225 225
                 "</div>";
226 226
     }
227 227
 
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
     public function divInstitution($selectButton = TRUE) {
250 250
         $retval = "<div id='institution_name'>
251 251
     <span id='inst_name_span'></span> <div id='inst_extra_text'></div><!-- this will be filled with the IdP name -->" .
252
-                ($selectButton ? "<a  id='select_another' class='signin' href=\"\">" . $this->Gui->textTemplates->templates[user\INSTITUTION_SELECTION] . "</a>" : "") .
252
+                ($selectButton ? "<a  id='select_another' class='signin' href=\"\">".$this->Gui->textTemplates->templates[user\INSTITUTION_SELECTION]."</a>" : "").
253 253
                 "</div>";
254 254
         $retval .= $this->emptyImage('idp_logo', 'IdP Logo');
255 255
         return $retval;
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
     public function divOtherinstallers() {
274 274
         $retval = "
275 275
 <div class='sub_h'>
276
-    <div id='other_installers'>" . $this->Gui->textTemplates->templates[user\DOWNLOAD_CHOOSE] . "
276
+    <div id='other_installers'>" . $this->Gui->textTemplates->templates[user\DOWNLOAD_CHOOSE]."
277 277
          <table id='device_list' style='padding:0px;'>";
278 278
 
279 279
         foreach ($this->Gui->listDevices(isset($_REQUEST['hidden']) ? $_REQUEST['hidden'] : 0) as $group => $deviceGroup) {
@@ -281,18 +281,18 @@  discard block
 block discarded – undo
281 281
             $deviceIndex = 0;
282 282
 
283 283
             $imgTag = "";
284
-            $imgLocation = $this->Gui->skinObject->findResourceUrl("IMAGES", "vendorlogo/" . $group . ".png");
284
+            $imgLocation = $this->Gui->skinObject->findResourceUrl("IMAGES", "vendorlogo/".$group.".png");
285 285
             if ($imgLocation !== FALSE) {
286
-                $imgTag = '<img src="' . $imgLocation . '" alt="' . $group . ' Device" title="' . $group . ' Device">';
286
+                $imgTag = '<img src="'.$imgLocation.'" alt="'.$group.' Device" title="'.$group.' Device">';
287 287
             }
288
-            $retval .= '<tbody><tr><td class="vendor" rowspan="' . $groupIndex . '">' . $imgTag . '</td>';
288
+            $retval .= '<tbody><tr><td class="vendor" rowspan="'.$groupIndex.'">'.$imgTag.'</td>';
289 289
             foreach ($deviceGroup as $d => $D) {
290 290
                 if ($deviceIndex) {
291 291
                     $retval .= '<tr>';
292 292
                 }
293
-                $retval .= "<td><button id='" . $d . "'>" . $D['display'] . "</button>"
294
-                        . "<div class='device_info' id='info_" . $d . "'></div></td>"
295
-                        . "<td><button class='more_info_b' id='info_b_" . $d . "'>i</button></td></tr>\n";
293
+                $retval .= "<td><button id='".$d."'>".$D['display']."</button>"
294
+                        . "<div class='device_info' id='info_".$d."'></div></td>"
295
+                        . "<td><button class='more_info_b' id='info_b_".$d."'>i</button></td></tr>\n";
296 296
                 $deviceIndex++;
297 297
             }
298 298
             $retval .= "</tbody>";
@@ -312,15 +312,15 @@  discard block
 block discarded – undo
312 312
      * @return string
313 313
      */
314 314
     public function divGuessOs($operatingSystem) {
315
-        $vendorlogo = $this->Gui->skinObject->findResourceUrl("IMAGES", "vendorlogo/" . $operatingSystem['group'] . ".png");
315
+        $vendorlogo = $this->Gui->skinObject->findResourceUrl("IMAGES", "vendorlogo/".$operatingSystem['group'].".png");
316 316
         $vendorstyle = "";
317 317
         if ($vendorlogo !== FALSE) {
318
-            $vendorstyle = "style='background-image:url(\"" . $vendorlogo . "\")'";
318
+            $vendorstyle = "style='background-image:url(\"".$vendorlogo."\")'";
319 319
         }
320 320
         $deleteIcon = $this->Gui->skinObject->findResourceUrl("IMAGES", "icons/delete_32.png");
321 321
         $deleteImg = "";
322 322
         if ($deleteIcon !== FALSE) {
323
-            $deleteImg = "<img id='cross_icon_" . $operatingSystem['device'] . "' src='$deleteIcon' >";
323
+            $deleteImg = "<img id='cross_icon_".$operatingSystem['device']."' src='$deleteIcon' >";
324 324
         }
325 325
         return "
326 326
 <div class='sub_h' id='guess_os'>
@@ -328,23 +328,23 @@  discard block
 block discarded – undo
328 328
     <table id='browser'>
329 329
         <tr>
330 330
             <td>
331
-                <button class='large_button guess_os' $vendorstyle id='g_" . $operatingSystem['device'] . "'>
331
+                <button class='large_button guess_os' $vendorstyle id='g_".$operatingSystem['device']."'>
332 332
                     $deleteImg
333
-                    <div class='download_button_text_1' id='download_button_header_" . $operatingSystem['device'] . "'> " . $this->Gui->textTemplates->templates[user\DOWNLOAD_MESSAGE] . "
333
+                    <div class='download_button_text_1' id='download_button_header_".$operatingSystem['device']."'> ".$this->Gui->textTemplates->templates[user\DOWNLOAD_MESSAGE]."
334 334
                     </div>
335 335
                     <div class='download_button_text'>" .
336
-                $operatingSystem['display'] . "
336
+                $operatingSystem['display']."
337 337
                     </div>
338 338
                 </button>
339
-                <div class='device_info' id='info_g_" . $operatingSystem['device'] . "'></div>
339
+                <div class='device_info' id='info_g_" . $operatingSystem['device']."'></div>
340 340
           </td>
341 341
           <td style='vertical-align:top'>
342
-               <button class='more_info_b large_button' id='g_info_b_" . $operatingSystem['device'] . "'>i</button>
342
+               <button class='more_info_b large_button' id='g_info_b_" . $operatingSystem['device']."'>i</button>
343 343
           </td>
344 344
       </tr>
345 345
     </table> <!-- id='browser' -->
346 346
     <div class='sub_h'>
347
-       <a href='javascript:other_installers()'>" . $this->Gui->textTemplates->templates[user\DOWNLOAD_CHOOSE] . "</a>
347
+       <a href='javascript:other_installers()'>" . $this->Gui->textTemplates->templates[user\DOWNLOAD_CHOOSE]."</a>
348 348
     </div>
349 349
 </div> <!-- id='guess_os' -->";
350 350
     }
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
             </td>";
366 366
 
367 367
         if (!empty(\config\Master::APPEARANCE['privacy_notice_url'])) {
368
-            $retval .= "<td><a href='" . \config\Master::APPEARANCE['privacy_notice_url'] . "'>" . sprintf(_("%s Privacy Notice"), \config\ConfAssistant::CONSORTIUM['display_name']) . "</a></td>";
368
+            $retval .= "<td><a href='".\config\Master::APPEARANCE['privacy_notice_url']."'>".sprintf(_("%s Privacy Notice"), \config\ConfAssistant::CONSORTIUM['display_name'])."</a></td>";
369 369
         }
370 370
         $retval .= "<td>";
371 371
         if (\config\ConfAssistant::CONSORTIUM['name'] == "eduroam" && isset(\config\ConfAssistant::CONSORTIUM['deployment-voodoo']) && \config\ConfAssistant::CONSORTIUM['deployment-voodoo'] == "Operations Team") {
Please login to merge, or discard this patch.
devices/xml/XMLElement.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@
 block discarded – undo
123 123
         if (is_scalar($value)) {
124 124
             $this->value = strval($value);
125 125
         } else {
126
-            throw new Exception("unexpected value type passed" . gettype($value));
126
+            throw new Exception("unexpected value type passed".gettype($value));
127 127
         }
128 128
     }
129 129
 
Please login to merge, or discard this patch.
utils/installTranslations.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
  * License: see the web/copyright.php file in the file structure
9 9
  * ******************************************************************************
10 10
  */
11
-require_once dirname(dirname(__FILE__)) . "/config/_config.php";
11
+require_once dirname(dirname(__FILE__))."/config/_config.php";
12 12
 
13 13
 const AREAS = ["web_admin", "web_user", "devices", "core", "diagnostics"];
14 14
 foreach (\config\Master::LANGUAGES as $lang => $details) {
Please login to merge, or discard this patch.
web/skins/modern/accountstatus/accountstatus.php 1 patch
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -47,9 +47,9 @@  discard block
 block discarded – undo
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
     var lang = "<?php echo($Gui->languageInstance->getLang()) ?>";
55 55
 </script>
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
                         <?php
80 80
                         switch ($statusInfo['errorcode']) {
81 81
                             case "GENERATOR_CONSUMED":
82
-                                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>";
82
+                                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>";
83 83
                                 break;
84 84
                             case NULL:
85 85
                             default:
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
                                     echo " ";
103 103
                                     echo sprintf(ngettext("<strong>%d</strong> of your credentials is not valid any more.", "<strong>%d</strong> of your credentials are not valid any more.", $noGoodCerts), $noGoodCerts);
104 104
                                 }
105
-                                echo " <span id='detailtext'>" . _("I want to see the details.") . "</span>";
105
+                                echo " <span id='detailtext'>"._("I want to see the details.")."</span>";
106 106
                                 echo "<table id='cert_details'></table>";
107 107
                             }
108 108
                         }
@@ -111,60 +111,60 @@  discard block
 block discarded – undo
111 111
                             case \core\SilverbulletInvitation::SB_TOKENSTATUS_VALID: // treat both cases as equal
112 112
                             case \core\SilverbulletInvitation::SB_TOKENSTATUS_PARTIALLY_REDEEMED:
113 113
                                 if ($statusInfo['invitation_object']->activationsTotal > 1) { // only show this extra info in the non-trivial case.
114
-                                    echo "<h3>" . sprintf(_("Your invitation token is valid for %d more device activations (%d have already been used)."), $statusInfo['invitation_object']->activationsRemaining, $statusInfo['invitation_object']->activationsTotal - $statusInfo['invitation_object']->activationsRemaining) . "</h3>";
114
+                                    echo "<h3>".sprintf(_("Your invitation token is valid for %d more device activations (%d have already been used)."), $statusInfo['invitation_object']->activationsRemaining, $statusInfo['invitation_object']->activationsTotal - $statusInfo['invitation_object']->activationsRemaining)."</h3>";
115 115
                                 }
116 116
                                 if (!$statusInfo["OS"]) {
117
-                                    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>";
117
+                                    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>";
118 118
                                     break;
119 119
                                 }
120 120
 
121 121
                                 $dev = new \core\DeviceFactory($statusInfo['OS']['device']);
122 122
                                 $dev->device->calculatePreferredEapType([new \core\common\EAP(\core\common\EAP::EAPTYPE_SILVERBULLET)]);
123 123
                                 if ($dev->device->selectedEap == []) {
124
-                                    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>";
124
+                                    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>";
125 125
                                     break;
126 126
                                 }
127
-                                $message = $dev->device->options['message'] ?? '' ;
127
+                                $message = $dev->device->options['message'] ?? '';
128 128
 
129 129
                                 $sbMessage = $dev->device->options['sb_message'] ?? '';
130 130
                                 if ($message != '' && $sbMessage != '') {
131
-                                    $message = $message . "<p>" . $sbMessage;
131
+                                    $message = $message."<p>".$sbMessage;
132 132
                                 } else {
133
-                                    $message = $message . $sbMessage;
133
+                                    $message = $message.$sbMessage;
134 134
                                 }
135 135
                          
136
-                                echo "<div id='sb_download_message'><p>" . sprintf(_("You can now download a personalised  %s installation program."), \config\ConfAssistant::CONSORTIUM['display_name']);
136
+                                echo "<div id='sb_download_message'><p>".sprintf(_("You can now download a personalised  %s installation program."), \config\ConfAssistant::CONSORTIUM['display_name']);
137 137
 //                       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']);
138 138
                                 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']);
139
-                                echo "<p style='color:red;'>" . sprintf(_("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 %s administrator."), \config\ConfAssistant::CONSORTIUM['display_name']) . "</p>";
140
-                                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>";
139
+                                echo "<p style='color:red;'>".sprintf(_("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 %s administrator."), \config\ConfAssistant::CONSORTIUM['display_name'])."</p>";
140
+                                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>";
141 141
 
142 142
                                 $importPassword = \core\common\Entity::randomString(4, "0123456789");
143 143
                                 $profile = new \core\ProfileSilverbullet($statusInfo['profile']->identifier, NULL);
144 144
                                 
145
-                                echo "<h2>" . sprintf(_("Import PIN: %s"), $importPassword) . "</h2>";
145
+                                echo "<h2>".sprintf(_("Import PIN: %s"), $importPassword)."</h2>";
146 146
                                 $_SESSION['individualtoken'] = $cleanToken;
147 147
                                 $_SESSION['importpassword'] = $importPassword;
148
-                                echo "<input type='hidden' name='device' value='" . $statusInfo['OS']['device'] . "'/>";
148
+                                echo "<input type='hidden' name='device' value='".$statusInfo['OS']['device']."'/>";
149 149
                                 echo "<input type='hidden' name='generatedfor' value='silverbullet'/>";
150
-                                echo "<button class='large_button' id='user_button_sb' style='height:80px;'><span id='user_buttonnnn'>" . sprintf(_("Click here to download your %s installer!"), \config\ConfAssistant::CONSORTIUM['display_name']) . "</span></button>";
150
+                                echo "<button class='large_button' id='user_button_sb' style='height:80px;'><span id='user_buttonnnn'>".sprintf(_("Click here to download your %s installer!"), \config\ConfAssistant::CONSORTIUM['display_name'])."</span></button>";
151 151
                                 echo "<div class='device_info' id='info_g_sb'></div>";
152 152
                                 break;
153 153
                             case \core\SilverbulletInvitation::SB_TOKENSTATUS_EXPIRED:
154 154
                                 echo "<h2>Invitation link expired</h2>";
155
-                                echo "<p>" . sprintf(_("Unfortunately, the invitation link you just used is too old. The %s sign-up invitation was valid until %s. You cannot use this link any more. Please ask your administrator to issue you a new invitation link."), \config\ConfAssistant::CONSORTIUM['display_name'], $statusInfo['invitation_object']->expiry) . "</p>";
155
+                                echo "<p>".sprintf(_("Unfortunately, the invitation link you just used is too old. The %s sign-up invitation was valid until %s. You cannot use this link any more. Please ask your administrator to issue you a new invitation link."), \config\ConfAssistant::CONSORTIUM['display_name'], $statusInfo['invitation_object']->expiry)."</p>";
156 156
                                 echo "<p>Below is all the information about your account's other login details, if any.</p>";
157 157
 // do NOT break, display full account info instead (this was a previously valid token after all)
158 158
                             case \core\SilverbulletInvitation::SB_TOKENSTATUS_REDEEMED:
159 159
                                 // nothing to say really. User got the breakdown of certs above, and this link doesn't give him any new ones.
160 160
                                 break;
161 161
                             case \core\SilverbulletInvitation::SB_TOKENSTATUS_INVALID:
162
-                                echo "<h2>" . _("Account information not found") . "</h2>";
163
-                                echo "<p>" . sprintf(_("The invitation link you followed does not map to any invititation we have on file.") . "</p><p>" . _("You should use the exact link you got during sign-up to come here. Alternatively, if you have a valid %s credential already, you can visit this page and Accept the question about logging in with a client certificate (select a certificate with a name ending in '…%s')."),\config\ConfAssistant::CONSORTIUM['display_name'], \config\ConfAssistant::SILVERBULLET['realm_suffix']);
162
+                                echo "<h2>"._("Account information not found")."</h2>";
163
+                                echo "<p>".sprintf(_("The invitation link you followed does not map to any invititation we have on file.")."</p><p>"._("You should use the exact link you got during sign-up to come here. Alternatively, if you have a valid %s credential already, you can visit this page and Accept the question about logging in with a client certificate (select a certificate with a name ending in '…%s')."), \config\ConfAssistant::CONSORTIUM['display_name'], \config\ConfAssistant::SILVERBULLET['realm_suffix']);
164 164
                         }
165 165
                         if (isset($statusInfo['profile_id']) && isset($statusInfo['idp_id'])) {
166
-                            echo "<input type='hidden' name='profile' id='profile_id' value='" . $statusInfo['profile_id'] . "'/>";
167
-                            echo "<input type='hidden' id='inst_id' name='idp' value='" . $statusInfo['idp_id'] . "'/>";
166
+                            echo "<input type='hidden' name='profile' id='profile_id' value='".$statusInfo['profile_id']."'/>";
167
+                            echo "<input type='hidden' id='inst_id' name='idp' value='".$statusInfo['idp_id']."'/>";
168 168
                         }
169 169
                         ?>
170 170
                     </div>
@@ -184,18 +184,18 @@  discard block
 block discarded – undo
184 184
     $attributes = $statusInfo['attributes'];
185 185
     $supportInfo = '';
186 186
     if (!empty($attributes['local_url'])) {
187
-        $supportInfo .= '<tr><td>' . ("WWW:") . '</td><td><a href="' . $attributes['local_url'] . '" target="_blank">' . $attributes['local_url'] . '</a></td></tr>';
187
+        $supportInfo .= '<tr><td>'.("WWW:").'</td><td><a href="'.$attributes['local_url'].'" target="_blank">'.$attributes['local_url'].'</a></td></tr>';
188 188
     }
189 189
     if (!empty($attributes['local_email'])) {
190
-        $supportInfo .= '<tr><td>' . ("email:") . '</td><td><a href="' . $attributes['local_email'] . '" target="_blank">' . $attributes['local_email'] . '</a></td></tr>';
190
+        $supportInfo .= '<tr><td>'.("email:").'</td><td><a href="'.$attributes['local_email'].'" target="_blank">'.$attributes['local_email'].'</a></td></tr>';
191 191
     }
192 192
     if (!empty($attributes['local_phone'])) {
193
-        $supportInfo .= '<tr><td>' . ("tel:") . '</td><td><a href="' . $attributes['local_phone'] . '" target="_blank">' . $attributes['local_phone'] . '</a></td></tr>';
193
+        $supportInfo .= '<tr><td>'.("tel:").'</td><td><a href="'.$attributes['local_phone'].'" target="_blank">'.$attributes['local_phone'].'</a></td></tr>';
194 194
     }
195 195
     if ($supportInfo != '') {
196
-        $supportInfo = "<table><tr><th colspan='2'>" . _("If you encounter problems, then you can obtain direct assistance from your organisation at:") . "</th></tr>$supportInfo</table>";
196
+        $supportInfo = "<table><tr><th colspan='2'>"._("If you encounter problems, then you can obtain direct assistance from your organisation at:")."</th></tr>$supportInfo</table>";
197 197
     } else {
198
-        $supportInfo = "<table><tr><th colspan='2'>" . _("If you encounter problems you should ask those who gave you your account for help.") . "</th></tr></table>";
198
+        $supportInfo = "<table><tr><th colspan='2'>"._("If you encounter problems you should ask those who gave you your account for help.")."</th></tr></table>";
199 199
     }
200 200
     ?>
201 201
     <script>
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
             var logo = <?php echo $statusInfo['idp_logo']; ?>;
205 205
             var idpId = <?php echo $statusInfo['idp_id']; ?>;
206 206
             <?php
207
-                if($message != '') {
207
+                if ($message != '') {
208 208
                     echo "message = \"$message\";\n";
209 209
                 }
210 210
             ?>
Please login to merge, or discard this patch.
web/lib/admin/API.php 3 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -607,8 +607,7 @@
 block discarded – undo
607 607
         $output = json_encode(["result" => "SUCCESS", "details" => $details], JSON_PRETTY_PRINT);
608 608
         if ($output === FALSE) {
609 609
             $this->returnError(API::ERROR_INTERNAL_ERROR, "Unable to JSON encode return data: ". json_last_error(). " - ". json_last_error_msg());
610
-        }
611
-        else {
610
+        } else {
612 611
             echo $output;
613 612
         }
614 613
     }
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -236,7 +236,7 @@
 block discarded – undo
236 236
     const AUXATTRIB_SB_USERNAME = "ATTRIB-MANAGED-USERNAME";
237 237
     const AUXATTRIB_SB_USERID = "ATTRIB-MANAGED-USERID";
238 238
     const AUXATTRIB_SB_CERTSERIAL = "ATTRIB-MANAGED-CERTSERIAL";
239
-	const AUXATTRIB_SB_CERTCN = "ATTRIB-MANAGED-CERTCN";
239
+    const AUXATTRIB_SB_CERTCN = "ATTRIB-MANAGED-CERTCN";
240 240
     const AUXATTRIB_SB_CERTANNOTATION = "ATTRIB-MANAGED-CERTANNOTATION";
241 241
     const AUXATTRIB_SB_EXPIRY = "ATTRIB-MANAGED-EXPIRY"; /* MySQL timestamp format */
242 242
     const AUXATTRIB_TOKEN = "ATTRIB-TOKEN";
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
     const ACTIONS = [
250 250
         // Inst-level actions.
251 251
         API::ACTION_NEWINST_BY_REF => [
252
-            "REQ" => [API::AUXATTRIB_EXTERNALID,],
252
+            "REQ" => [API::AUXATTRIB_EXTERNALID, ],
253 253
             "OPT" => [
254 254
                 'general:geo_coordinates',
255 255
                 'general:logo_file',
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
             ],
267 267
         ],
268 268
         API::ACTION_NEWINST => [
269
-            "REQ" => [API::AUXATTRIB_INSTTYPE,], // "IdP", "SP" or "IdPSP"
269
+            "REQ" => [API::AUXATTRIB_INSTTYPE, ], // "IdP", "SP" or "IdPSP"
270 270
             "OPT" => [
271 271
                 'general:instname',
272 272
                 'general:geo_coordinates',
@@ -562,8 +562,8 @@  discard block
 block discarded – undo
562 562
 
563 563
                 case \core\Options::TYPECODE_COORDINATES:
564 564
                     $extension = \core\Options::TYPECODE_TEXT;
565
-                    $coercedInline["option"][$basename] = $oneAttrib['NAME'] . "#";
566
-                    $coercedInline["value"][$basename . "-" . $extension] = $oneAttrib['VALUE'];
565
+                    $coercedInline["option"][$basename] = $oneAttrib['NAME']."#";
566
+                    $coercedInline["value"][$basename."-".$extension] = $oneAttrib['VALUE'];
567 567
                     break;
568 568
                 case \core\Options::TYPECODE_TEXT:
569 569
                 // Fall-through: they all get the same treatment.
@@ -573,18 +573,18 @@  discard block
 block discarded – undo
573 573
                 // Fall-through: they all get the same treatment.
574 574
                 case \core\Options::TYPECODE_INTEGER:
575 575
                     $extension = $optionInfo['type'];
576
-                    $coercedInline["option"][$basename] = $oneAttrib['NAME'] . "#";
577
-                    $coercedInline["value"][$basename . "-" . $extension] = $oneAttrib['VALUE'];
576
+                    $coercedInline["option"][$basename] = $oneAttrib['NAME']."#";
577
+                    $coercedInline["value"][$basename."-".$extension] = $oneAttrib['VALUE'];
578 578
                     if ($optionInfo['flag'] == "ML") {
579
-                        $coercedInline["value"][$basename . "-lang"] = $oneAttrib['LANG'];
579
+                        $coercedInline["value"][$basename."-lang"] = $oneAttrib['LANG'];
580 580
                     }
581 581
                     break;
582 582
                 case \core\Options::TYPECODE_FILE:
583 583
                     // Binary data is expected in base64 encoding. This is true also for PEM files!
584 584
                     $extension = $optionInfo['type'];
585
-                    $coercedInline["option"][$basename] = $oneAttrib['NAME'] . "#";
586
-                    file_put_contents($dir['dir'] . "/" . $basename . "-" . $extension, base64_decode($oneAttrib['VALUE']));
587
-                    $coercedFile["value"]['tmp_name'][$basename . "-" . $extension] = $dir['dir'] . "/" . $basename . "-" . $extension;
585
+                    $coercedInline["option"][$basename] = $oneAttrib['NAME']."#";
586
+                    file_put_contents($dir['dir']."/".$basename."-".$extension, base64_decode($oneAttrib['VALUE']));
587
+                    $coercedFile["value"]['tmp_name'][$basename."-".$extension] = $dir['dir']."/".$basename."-".$extension;
588 588
                     break;
589 589
                 default:
590 590
                     throw new Exception("We don't seem to know this type code!");
@@ -613,7 +613,7 @@  discard block
 block discarded – undo
613 613
     public function returnSuccess($details) {
614 614
         $output = json_encode(["result" => "SUCCESS", "details" => $details], JSON_PRETTY_PRINT);
615 615
         if ($output === FALSE) {
616
-            $this->returnError(API::ERROR_INTERNAL_ERROR, "Unable to JSON encode return data: ". json_last_error(). " - ". json_last_error_msg());
616
+            $this->returnError(API::ERROR_INTERNAL_ERROR, "Unable to JSON encode return data: ".json_last_error()." - ".json_last_error_msg());
617 617
         }
618 618
         else {
619 619
             echo $output;
Please login to merge, or discard this patch.
web/admin/112365365321.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
  *          <base_url>/copyright.php after deploying the software
20 20
  */
21 21
 
22
-require_once dirname(dirname(__DIR__)) . '/config/_config.php';
22
+require_once dirname(dirname(__DIR__)).'/config/_config.php';
23 23
 
24 24
 $uiElements = new web\lib\admin\UIElements();
25 25
 
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
                         // filesystem cleanup
76 76
                     case web\lib\common\FormElements::BUTTON_DELETE:
77 77
                         $i = web\lib\admin\Maintenance::deleteObsoleteTempDirs();
78
-                        echo "<div class='ca-summary'><table>" . $uiElements->boxRemark(sprintf("Deleted %d cache directories.", $i), "Cache deleted") . "</table></div>";
78
+                        echo "<div class='ca-summary'><table>".$uiElements->boxRemark(sprintf("Deleted %d cache directories.", $i), "Cache deleted")."</table></div>";
79 79
                         break;
80 80
                     default:
81 81
                         break;
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
                     $admin_query = $dbHandle->exec("SELECT SUM(downloads_admin) AS admin, SUM(downloads_user) AS user, SUM(downloads_silverbullet) as silverbullet FROM downloads WHERE device_id = '$index'");
142 142
                     // SELECT -> mysqli_result, not boolean
143 143
                     while ($a = mysqli_fetch_object(/** @scrutinizer ignore-type */ $admin_query)) {
144
-                        echo "<td>" . $device_array['display'] . "</td><td>" . $a->admin . "</td><td>" . $a->user . "</td><td>" . $a->silverbullet . "</td><td>" . sprintf("%s", $a->user + $a->silverbullet) . "</td>";
144
+                        echo "<td>".$device_array['display']."</td><td>".$a->admin."</td><td>".$a->user."</td><td>".$a->silverbullet."</td><td>".sprintf("%s", $a->user + $a->silverbullet)."</td>";
145 145
                         $gross_admin = $gross_admin + $a->admin;
146 146
                         $gross_user = $gross_user + $a->user;
147 147
                         $gross_silverbullet = $gross_silverbullet + $a->silverbullet;
Please login to merge, or discard this patch.
web/admin/overview_sp.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -150,8 +150,8 @@  discard block
 block discarded – undo
150 150
                         <td>
151 151
                             <?php
152 152
                                 echo "<img src='" . $radiusMessages[$deploymentObject->radius_status_1]['icon'] . 
153
-                                     "' alt='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] . 
154
-                                     "' title='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] . "'>";
153
+                                        "' alt='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] . 
154
+                                        "' title='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] . "'>";
155 155
                             ?>
156 156
                         </td>
157 157
                     </tr>
@@ -173,8 +173,8 @@  discard block
 block discarded – undo
173 173
                         <td>
174 174
                             <?php
175 175
                                 echo "<img src='" . $radiusMessages[$deploymentObject->radius_status_2]['icon'] .
176
-                                     "' alt='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] . 
177
-                                     "' title='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] . "'>";
176
+                                        "' alt='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] . 
177
+                                        "' title='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] . "'>";
178 178
                             ?>
179 179
                         </td>
180 180
                     </tr>
Please login to merge, or discard this patch.
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
  */
27 27
 ?>
28 28
 <?php
29
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
29
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
30 30
 
31 31
 $deco = new \web\lib\admin\PageDecoration();
32 32
 $validator = new \web\lib\common\InputValidation();
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 } else {
39 39
     $link = 'http://';
40 40
 }
41
-$link .= $_SERVER['SERVER_NAME'] . $_SERVER['SCRIPT_NAME'];
41
+$link .= $_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME'];
42 42
 $link = htmlspecialchars($link);
43 43
 
44 44
 echo $deco->defaultPagePrelude(sprintf(_("%s: %s Dashboard"), \config\Master::APPEARANCE['productname'], $uiElements->nomenclatureHotspot));
@@ -99,29 +99,29 @@  discard block
 block discarded – undo
99 99
     ?>
100 100
     <hr><h2><?php $tablecaption = _("Available Support actions"); echo $tablecaption; ?></h2>
101 101
     <table>
102
-        <caption><?php echo $tablecaption;?></caption>
102
+        <caption><?php echo $tablecaption; ?></caption>
103 103
         <tr>
104
-        <th class='wai-invisible' scope='col'><?php echo _("Action");?></th>
105
-        <th class='wai-invisible' scope='col'><?php echo _("Trigger");?></th>
104
+        <th class='wai-invisible' scope='col'><?php echo _("Action"); ?></th>
105
+        <th class='wai-invisible' scope='col'><?php echo _("Trigger"); ?></th>
106 106
         </tr>
107 107
             <?php
108 108
         if (\config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS'] !== NULL) {
109 109
             echo "<tr>
110
-                        <td>" . sprintf(_("Diagnose reachability and connection parameters of %ss"),$uiElements->nomenclatureInst) . "</td>
110
+                        <td>" . sprintf(_("Diagnose reachability and connection parameters of %ss"), $uiElements->nomenclatureInst)."</td>
111 111
                         <td><form method='post' action='../diag/action_realmcheck.php?inst_id=$my_inst->identifier' accept-charset='UTF-8'>
112 112
                               <!--<input type='text' name='realm' id='realm'>-->
113 113
                               <input type='hidden' name='comefrom' id='comefrom' value='$link'/>
114
-                              <button id='realmcheck' style='cursor:pointer;' type='submit'>" . _("Go!") . "</button>
114
+                              <button id='realmcheck' style='cursor:pointer;' type='submit'>"._("Go!")."</button>
115 115
                             </form>
116 116
                         </td>
117 117
                     </tr>";
118 118
         }
119 119
         if (\config\ConfAssistant::CONSORTIUM['name'] == "eduroam") { // SW: APPROVED
120 120
             echo "<tr>
121
-                        <td>" . sprintf(_("Check %s server status"), $uiElements->nomenclatureFed) . "</td>
121
+                        <td>" . sprintf(_("Check %s server status"), $uiElements->nomenclatureFed)."</td>
122 122
                         <td>
123 123
                            <form action='https://monitor.eduroam.org/mon_direct.php' accept-charset='UTF-8'>
124
-                              <button style='cursor:pointer;' type='submit'>" . _("Go!") . "</button>
124
+                              <button style='cursor:pointer;' type='submit'>" . _("Go!")."</button>
125 125
                            </form>
126 126
                         </td>
127 127
                     </tr>";
@@ -132,10 +132,10 @@  discard block
 block discarded – undo
132 132
     <?php
133 133
     $hotspotProfiles = $my_inst->listDeployments();
134 134
     if (count($hotspotProfiles) == 0) { // no profiles yet.
135
-        echo "<h2>" . sprintf(_("There are not yet any known deployments for your %s."), $uiElements->nomenclatureHotspot) . "</h2>";
135
+        echo "<h2>".sprintf(_("There are not yet any known deployments for your %s."), $uiElements->nomenclatureHotspot)."</h2>";
136 136
     }
137 137
     if (count($hotspotProfiles) > 0) { // no profiles yet.
138
-        echo "<h2>" . sprintf(_("Deployments for this %s"), $uiElements->nomenclatureHotspot) . "</h2>";
138
+        echo "<h2>".sprintf(_("Deployments for this %s"), $uiElements->nomenclatureHotspot)."</h2>";
139 139
         // display an info box with the connection data
140 140
     }
141 141
    
@@ -154,26 +154,26 @@  discard block
 block discarded – undo
154 154
         ?>
155 155
         <div style='display: table-row; margin-bottom: 20px;'>
156 156
             <div class='profilebox' style='display: table-cell;'>
157
-                <h2><?php echo core\DeploymentManaged::PRODUCTNAME . " (<span style='color:" . ( $deploymentObject->status == \core\AbstractDeployment::INACTIVE ? "red;'>" . _("inactive") : "green;'>" . _("active") ) . "</span>)"; ?></h2>
157
+                <h2><?php echo core\DeploymentManaged::PRODUCTNAME." (<span style='color:".($deploymentObject->status == \core\AbstractDeployment::INACTIVE ? "red;'>"._("inactive") : "green;'>"._("active"))."</span>)"; ?></h2>
158 158
                 <table>
159
-                    <caption><?php echo _("Deployment Details");?></caption>
159
+                    <caption><?php echo _("Deployment Details"); ?></caption>
160 160
                     <tr>
161
-                        <th class='wai-invisible' scope='col'><?php echo("Server IP addresses");?></th>
162
-                        <th class='wai-invisible' scope='col'><?php echo("Server Port label");?></th>
163
-                        <th class='wai-invisible' scope='col'><?php echo("Server Port value");?></th>
164
-                        <th class='wai-invisible' scope='col'><?php echo("Deployment Status");?></th>
161
+                        <th class='wai-invisible' scope='col'><?php echo("Server IP addresses"); ?></th>
162
+                        <th class='wai-invisible' scope='col'><?php echo("Server Port label"); ?></th>
163
+                        <th class='wai-invisible' scope='col'><?php echo("Server Port value"); ?></th>
164
+                        <th class='wai-invisible' scope='col'><?php echo("Deployment Status"); ?></th>
165 165
                     </tr>
166 166
                     <tr>
167 167
                         <td><strong><?php echo _("Your primary RADIUS server") ?></strong><br/>
168 168
                         <?php
169 169
                             if ($deploymentObject->host1_v4 !== NULL) {
170
-                                echo _("IPv4") . ": " . $deploymentObject->host1_v4;
170
+                                echo _("IPv4").": ".$deploymentObject->host1_v4;
171 171
                             }
172 172
                             if ($deploymentObject->host1_v4 !== NULL && $deploymentObject->host1_v6 !== NULL) {
173 173
                                 echo "<br/>";
174 174
                             }
175 175
                             if ($deploymentObject->host1_v6 !== NULL) {
176
-                                echo _("IPv6") . ": " . $deploymentObject->host1_v6;
176
+                                echo _("IPv6").": ".$deploymentObject->host1_v6;
177 177
                             }
178 178
                             ?>
179 179
                         </td>
@@ -181,9 +181,9 @@  discard block
 block discarded – undo
181 181
                         <td><?php echo $deploymentObject->port1; ?></td>
182 182
                         <td>
183 183
                             <?php
184
-                                echo "<img src='" . $radiusMessages[$deploymentObject->radius_status_1]['icon'] . 
185
-                                     "' alt='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] . 
186
-                                     "' title='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] . "'>";
184
+                                echo "<img src='".$radiusMessages[$deploymentObject->radius_status_1]['icon']. 
185
+                                     "' alt='".$radiusMessages[$deploymentObject->radius_status_1]['text']. 
186
+                                     "' title='".$radiusMessages[$deploymentObject->radius_status_1]['text']."'>";
187 187
                             ?>
188 188
                         </td>
189 189
                     </tr>
@@ -191,22 +191,22 @@  discard block
 block discarded – undo
191 191
                         <td><strong><?php echo _("Your backup RADIUS server") ?><br/></strong>
192 192
                             <?php
193 193
                             if ($deploymentObject->host2_v4 !== NULL) {
194
-                                echo _("IPv4") . ": " . $deploymentObject->host2_v4;
194
+                                echo _("IPv4").": ".$deploymentObject->host2_v4;
195 195
                             }
196 196
                             if ($deploymentObject->host2_v4 !== NULL && $deploymentObject->host2_v6 !== NULL) {
197 197
                                 echo "<br/>";
198 198
                             }
199 199
                             if ($deploymentObject->host2_v6 !== NULL) {
200
-                                echo _("IPv6") . ": " . $deploymentObject->host2_v6;
200
+                                echo _("IPv6").": ".$deploymentObject->host2_v6;
201 201
                             }
202 202
                             ?></td>
203 203
                         <td><?php echo _("RADIUS port number: ") ?></td>
204 204
                         <td><?php echo $deploymentObject->port2; ?></td>
205 205
                         <td>
206 206
                             <?php
207
-                                echo "<img src='" . $radiusMessages[$deploymentObject->radius_status_2]['icon'] .
208
-                                     "' alt='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] . 
209
-                                     "' title='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] . "'>";
207
+                                echo "<img src='".$radiusMessages[$deploymentObject->radius_status_2]['icon'].
208
+                                     "' alt='".$radiusMessages[$deploymentObject->radius_status_2]['text']. 
209
+                                     "' title='".$radiusMessages[$deploymentObject->radius_status_2]['text']."'>";
210 210
                             ?>
211 211
                         </td>
212 212
                     </tr>
@@ -257,12 +257,12 @@  discard block
 block discarded – undo
257 257
                                     if (isset($res['FAILURE']) && $res['FAILURE'] > 0) {
258 258
                                         echo '<br>';
259 259
                                         if ($res['FAILURE'] == 2) {
260
-                                            echo ' <span style="color: red;">' . _("Activation failure.") . '</span>';
260
+                                            echo ' <span style="color: red;">'._("Activation failure.").'</span>';
261 261
                                         } else {
262 262
                                             if (isset($_GET['res'][1]) && $_GET['res']['1'] == 'FAILURE') {
263
-                                                echo ' <span style="color: red;">' . _("Activation failure for your primary RADIUS server.") . '</span>';
263
+                                                echo ' <span style="color: red;">'._("Activation failure for your primary RADIUS server.").'</span>';
264 264
                                             } else {
265
-                                                echo ' <span style="color: red;">' . _("Activation failure for your backup RADIUS server.") . '</span>';
265
+                                                echo ' <span style="color: red;">'._("Activation failure for your backup RADIUS server.").'</span>';
266 266
                                             }
267 267
                                         }
268 268
                                     }
@@ -282,12 +282,12 @@  discard block
 block discarded – undo
282 282
                                     if ($res['FAILURE'] > 0) {
283 283
                                         echo '<br>';
284 284
                                         if ($res['FAILURE'] == 2) {
285
-                                            echo ' <span style="color: red;">' . _("Failure during deactivation, your request is queued for handling") . '</span>';
285
+                                            echo ' <span style="color: red;">'._("Failure during deactivation, your request is queued for handling").'</span>';
286 286
                                         } else {
287 287
                                             if (isset($_GET['res'][1]) && $_GET['res']['1'] == 'FAILURE') {
288
-                                                echo ' <span style="color: red;">' . _("Deactivation failure for your primary RADIUS server, your request is queued.") . '</span>';
288
+                                                echo ' <span style="color: red;">'._("Deactivation failure for your primary RADIUS server, your request is queued.").'</span>';
289 289
                                             } else {
290
-                                                echo ' <span style="color: red;">' . _("Deactivation failure for your backup RADIUS server, your request is queued.") . '</span>';
290
+                                                echo ' <span style="color: red;">'._("Deactivation failure for your backup RADIUS server, your request is queued.").'</span>';
291 291
                                             }
292 292
                                         }
293 293
                                     }
Please login to merge, or discard this patch.
utils/SP_consistency_check.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 require_once dirname(dirname(__FILE__)) . "/config/_config.php";
3 3
 /**
4
-    * check if URL responds with 200
5
-    *
6
-    * @param string $srv server name
7
-    * @return integer or NULL
4
+ * check if URL responds with 200
5
+ *
6
+ * @param string $srv server name
7
+ * @return integer or NULL
8 8
 */
9 9
 function checkConfigRADIUSDaemon ($srv) {
10 10
     $ch = curl_init();
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,22 +1,22 @@  discard block
 block discarded – undo
1 1
 <?php
2
-require_once dirname(dirname(__FILE__)) . "/config/_config.php";
2
+require_once dirname(dirname(__FILE__))."/config/_config.php";
3 3
 /**
4 4
     * check if URL responds with 200
5 5
     *
6 6
     * @param string $srv server name
7 7
     * @return integer or NULL
8 8
 */
9
-function checkConfigRADIUSDaemon ($srv) {
9
+function checkConfigRADIUSDaemon($srv) {
10 10
     $ch = curl_init();
11 11
     if ($ch === FALSE) {
12 12
         return NULL;
13 13
     }
14 14
     $timeout = 10;
15
-    curl_setopt ( $ch, CURLOPT_URL, $srv );
16
-    curl_setopt ( $ch, CURLOPT_RETURNTRANSFER, 1 );
17
-    curl_setopt ( $ch, CURLOPT_TIMEOUT, $timeout );
15
+    curl_setopt($ch, CURLOPT_URL, $srv);
16
+    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
17
+    curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
18 18
     curl_exec($ch);
19
-    $http_code = curl_getinfo( $ch, CURLINFO_HTTP_CODE );
19
+    $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
20 20
     if ($http_code == 200) {
21 21
         return 1;
22 22
     }
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
 }
53 53
 $siteStatus = array();
54 54
 foreach (array_keys($brokenDeployments) as $server_id) {
55
-    print "check $server_id " . $radiusSite[$server_id] . "\n";
56
-    $siteStatus[$server_id]  = checkConfigRADIUSDaemon('http://' . $radiusSite[$server_id]);
55
+    print "check $server_id ".$radiusSite[$server_id]."\n";
56
+    $siteStatus[$server_id] = checkConfigRADIUSDaemon('http://'.$radiusSite[$server_id]);
57 57
     if ($siteStatus[$server_id]) {
58 58
         echo "\ncheck radius\n";
59 59
         echo \config\Diagnostics::RADIUSSPTEST['port']."\n";
Please login to merge, or discard this patch.
core/UserAPI.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
         $this->installerPath = $cache['path'];
84 84
         if ($this->installerPath !== NULL && $token === NULL && $password === NULL) {
85 85
             $this->loggerInstance->debug(4, "Using cached installer for: $device\n");
86
-            $installerProperties['link'] = "API.php?action=downloadInstaller&lang=" . $this->languageInstance->getLang() . "&profile=$profileId&device=$device&generatedfor=$generatedFor";
86
+            $installerProperties['link'] = "API.php?action=downloadInstaller&lang=".$this->languageInstance->getLang()."&profile=$profileId&device=$device&generatedfor=$generatedFor";
87 87
             $installerProperties['mime'] = $cache['mime'];
88 88
         } else {
89 89
             $myInstaller = $this->generateNewInstaller($device, $profile, $generatedFor, $token, $password);
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
             $this->loggerInstance->debug(5, "generateNewInstaller() - Device setup done");
172 172
             $installer = $dev->writeInstaller();
173 173
             $this->loggerInstance->debug(5, "generateNewInstaller() - writeInstaller complete");
174
-            $iPath = $dev->FPATH . '/tmp/' . $installer;
174
+            $iPath = $dev->FPATH.'/tmp/'.$installer;
175 175
             if ($iPath && is_file($iPath)) {
176 176
                 if (isset($dev->options['mime'])) {
177 177
                     $out['mime'] = $dev->options['mime'];
@@ -179,17 +179,17 @@  discard block
 block discarded – undo
179 179
                     $info = new \finfo();
180 180
                     $out['mime'] = $info->file($iPath, FILEINFO_MIME_TYPE);
181 181
                 }
182
-                $this->installerPath = $dev->FPATH . '/' . $installer;
182
+                $this->installerPath = $dev->FPATH.'/'.$installer;
183 183
                 rename($iPath, $this->installerPath);
184 184
                 $integerEap = (new \core\common\EAP($dev->selectedEap))->getIntegerRep();
185 185
                 $profile->updateCache($device, $this->installerPath, $out['mime'], $integerEap);
186 186
                 if (\config\Master::DEBUG_LEVEL < 4) {
187
-                    \core\common\Entity::rrmdir($dev->FPATH . '/tmp');
187
+                    \core\common\Entity::rrmdir($dev->FPATH.'/tmp');
188 188
                 }
189
-                $this->loggerInstance->debug(4, "Generated installer: " . $this->installerPath . ": for: $device, EAP:" . $integerEap . "\n");
190
-                $out['link'] = "API.php?action=downloadInstaller&lang=" . $this->languageInstance->getLang() . "&profile=" . $profile->identifier . "&device=$device&generatedfor=$generatedFor";
189
+                $this->loggerInstance->debug(4, "Generated installer: ".$this->installerPath.": for: $device, EAP:".$integerEap."\n");
190
+                $out['link'] = "API.php?action=downloadInstaller&lang=".$this->languageInstance->getLang()."&profile=".$profile->identifier."&device=$device&generatedfor=$generatedFor";
191 191
             } else {
192
-                $this->loggerInstance->debug(2, "Installer generation failed for: " . $profile->identifier . ":$device:" . $this->languageInstance->getLang() . "\n");
192
+                $this->loggerInstance->debug(2, "Installer generation failed for: ".$profile->identifier.":$device:".$this->languageInstance->getLang()."\n");
193 193
                 $out['link'] = 0;
194 194
             }
195 195
         }
@@ -302,13 +302,13 @@  discard block
 block discarded – undo
302 302
         $file = $this->installerPath;
303 303
         $filetype = $output['mime'];
304 304
         $this->loggerInstance->debug(4, "installer MIME type:$filetype\n");
305
-        header("Content-type: " . $filetype);
305
+        header("Content-type: ".$filetype);
306 306
         if ($filetype !== "application/x-wifi-config") { // for those installers to work on Android, Content-Disposition MUST NOT be set
307
-            header('Content-Disposition: inline; filename="' . basename($file) . '"');
307
+            header('Content-Disposition: inline; filename="'.basename($file).'"');
308 308
         } else {
309 309
             header('Content-Transfer-Encoding: base64');
310 310
         }
311
-        header('Content-Length: ' . filesize($file));
311
+        header('Content-Length: '.filesize($file));
312 312
         ob_clean();
313 313
         flush();
314 314
         readfile($file);
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
         $filetype = $info->buffer($inputImage, FILEINFO_MIME_TYPE);
330 330
         $offset = 60 * 60 * 24 * 30;
331 331
         // gmdate cannot fail here - time() is its default argument (and integer), and we are adding an integer to it
332
-        $expiresString = "Expires: " . /** @scrutinizer ignore-type */ gmdate("D, d M Y H:i:s", time() + $offset) . " GMT";
332
+        $expiresString = "Expires: "./** @scrutinizer ignore-type */ gmdate("D, d M Y H:i:s", time() + $offset)." GMT";
333 333
         $blob = $inputImage;
334 334
 
335 335
         if ($resize === TRUE) {
@@ -384,7 +384,7 @@  discard block
 block discarded – undo
384 384
         $filetype = 'image/png'; // default, only one code path where it can become different
385 385
         list($width, $height, $resize) = $this->testForResize($widthIn, $heightIn);
386 386
         if ($resize) {
387
-            $logoFile = ROOT . '/web/downloads/logos/' . $identifier . '_' . $width . '_' . $height . '.png';
387
+            $logoFile = ROOT.'/web/downloads/logos/'.$identifier.'_'.$width.'_'.$height.'.png';
388 388
         }
389 389
         if (is_file($logoFile)) { // $logoFile could be an empty string but then we will get a FALSE
390 390
             $this->loggerInstance->debug(4, "Using cached logo $logoFile for: $identifier\n");
@@ -477,7 +477,7 @@  discard block
 block discarded – undo
477 477
             if (!isset($device['match'])) {
478 478
                 continue;
479 479
             }
480
-            if (preg_match('/' . $device['match'] . '/', $browser)) {
480
+            if (preg_match('/'.$device['match'].'/', $browser)) {
481 481
                 return $this->returnDevice($devId, $device);
482 482
             }
483 483
         }
Please login to merge, or discard this patch.