Test Failed
Pull Request — master (#325)
by Dimitri
43:06 queued 24:12
created
web/admin/edit_profile.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -181,9 +181,9 @@  discard block
 block discarded – undo
181 181
         </legend>
182 182
         <?php
183 183
         if ($wizardStyle) {
184
-             echo "<p>" . _("We will now define a profile for your user group(s).  You can add as many profiles as you like by choosing the appropriate button on the end of the page. After we are done, the wizard is finished and you will be taken to the main IdP administration page.") . "</p>";
184
+                echo "<p>" . _("We will now define a profile for your user group(s).  You can add as many profiles as you like by choosing the appropriate button on the end of the page. After we are done, the wizard is finished and you will be taken to the main IdP administration page.") . "</p>";
185 185
         }
186
-         ?>
186
+            ?>
187 187
         <h3><?php echo _("Profile Name and RADIUS realm"); ?>
188 188
         </h3>
189 189
         <?php    
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
 
331 331
     <?php
332 332
     echo $wizard->displayHelp("redirect");
333
-     ?>
333
+        ?>
334 334
     <p>
335 335
 
336 336
         <?php
Please login to merge, or discard this patch.
Spacing   +28 added lines, -28 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();
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
         $detectRealm = $validator->string($_POST['realm_to_detect']);
128 128
         $localname = $validator->string($_POST['username_to_detect']);
129 129
         $checker = new \core\diag\RADIUSTests($detectRealm, $localname);
130
-        $detectionResult = $checker->autodetectCAWithProbe($localname . "@" . $detectRealm);
130
+        $detectionResult = $checker->autodetectCAWithProbe($localname."@".$detectRealm);
131 131
         $loggerInstance->debug(2, "CA Auto-Detection yields:");
132 132
         $loggerInstance->debug(2, $detectionResult);
133 133
         if ($detectionResult['ROOT_CA'] !== NULL) { // we are lucky!
@@ -171,8 +171,8 @@  discard block
 block discarded – undo
171 171
     <?php
172 172
     echo $uiElements->instLevelInfoBoxes($my_inst);
173 173
 
174
-    echo "<form enctype='multipart/form-data' action='edit_profile_result.php?inst_id=$my_inst->identifier" . ($my_profile !== NULL ? "&amp;profile_id=" . $my_profile->identifier : "") . "' method='post' accept-charset='UTF-8'>
175
-                <input type='hidden' name='MAX_FILE_SIZE' value='" . \config\Master::MAX_UPLOAD_SIZE . "'>";
174
+    echo "<form enctype='multipart/form-data' action='edit_profile_result.php?inst_id=$my_inst->identifier".($my_profile !== NULL ? "&amp;profile_id=".$my_profile->identifier : "")."' method='post' accept-charset='UTF-8'>
175
+                <input type='hidden' name='MAX_FILE_SIZE' value='" . \config\Master::MAX_UPLOAD_SIZE."'>";
176 176
     $optionDisplay = new \web\lib\admin\OptionDisplay($profile_options, \core\Options::LEVEL_PROFILE);
177 177
     ?>
178 178
     <fieldset class="option_container">
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
         </legend>
182 182
         <?php
183 183
         if ($wizardStyle) {
184
-             echo "<p>" . _("We will now define a profile for your user group(s).  You can add as many profiles as you like by choosing the appropriate button on the end of the page. After we are done, the wizard is finished and you will be taken to the main IdP administration page.") . "</p>";
184
+             echo "<p>"._("We will now define a profile for your user group(s).  You can add as many profiles as you like by choosing the appropriate button on the end of the page. After we are done, the wizard is finished and you will be taken to the main IdP administration page.")."</p>";
185 185
         }
186 186
          ?>
187 187
         <h3><?php echo _("Profile Name and RADIUS realm"); ?>
@@ -258,37 +258,37 @@  discard block
 block discarded – undo
258 258
             <tr>
259 259
                 <!-- checkbox and input field for anonymity support, available only when realm is known-->
260 260
                 <td>
261
-                    <span id='anon_support_label' style='<?php echo ($realm == "" ? "color:#999999" : "" ); ?>'>
261
+                    <span id='anon_support_label' style='<?php echo ($realm == "" ? "color:#999999" : ""); ?>'>
262 262
                         <?php echo _("Enable Anonymous Outer Identity:"); ?>
263 263
                     </span>
264 264
                 </td>
265 265
                 <td>
266
-                    <input type='checkbox' <?php echo ($useAnon != FALSE ? "checked" : "" ) . ($realm == "" ? " disabled" : "" ); ?> name='anon_support' onclick='
266
+                    <input type='checkbox' <?php echo ($useAnon != FALSE ? "checked" : "").($realm == "" ? " disabled" : ""); ?> name='anon_support' onclick='
267 267
                             if (this.form.elements["anon_support"].checked !== true) {
268 268
                                 this.form.elements["anon_local"].setAttribute("disabled", "disabled");
269 269
                             } else {
270 270
                                 this.form.elements["anon_local"].removeAttribute("disabled");
271 271
                             }
272 272
                             ;'/>
273
-                    <input type='text' <?php echo ($useAnon == FALSE ? "disabled" : "" ); ?> name='anon_local' value='<?php echo $anonLocal; ?>'/>
273
+                    <input type='text' <?php echo ($useAnon == FALSE ? "disabled" : ""); ?> name='anon_local' value='<?php echo $anonLocal; ?>'/>
274 274
                 </td>
275 275
             </tr>
276 276
             <tr>
277 277
                 <!-- checkbox and input field for check realm outer id, available only when realm is known-->
278 278
                 <td>
279
-                    <span id='checkuser_label' style='<?php echo ($realm == "" ? "color:#999999" : "" ); ?>'>
279
+                    <span id='checkuser_label' style='<?php echo ($realm == "" ? "color:#999999" : ""); ?>'>
280 280
                         <?php echo _("Use special Outer Identity for realm checks:"); ?>
281 281
                     </span>
282 282
                 </td>
283 283
                 <td>
284
-                    <input type='checkbox' <?php echo ($checkuserOuter != FALSE ? "checked" : "" ) . ($realm == "" ? " disabled" : "" ); ?> name='checkuser_support' onclick='
284
+                    <input type='checkbox' <?php echo ($checkuserOuter != FALSE ? "checked" : "").($realm == "" ? " disabled" : ""); ?> name='checkuser_support' onclick='
285 285
                             if (this.form.elements["checkuser_support"].checked !== true) {
286 286
                                 this.form.elements["checkuser_local"].setAttribute("disabled", "disabled");
287 287
                             } else {
288 288
                                 this.form.elements["checkuser_local"].removeAttribute("disabled");
289 289
                             }
290 290
                             ;'/>
291
-                    <input type='text' <?php echo ($checkuserOuter == FALSE ? "disabled" : "" ); ?> name='checkuser_local' value='<?php echo $checkuserValue; ?>'/>
291
+                    <input type='text' <?php echo ($checkuserOuter == FALSE ? "disabled" : ""); ?> name='checkuser_local' value='<?php echo $checkuserValue; ?>'/>
292 292
                 </td>
293 293
             </tr>
294 294
             <tr>
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
                 </td>
304 304
                 <td>
305 305
                     <input type='checkbox' <?php
306
-                    echo ($verify != FALSE ? "checked" : "" );
306
+                    echo ($verify != FALSE ? "checked" : "");
307 307
                     ?> name='verify_support' onclick='
308 308
                                 if (this.form.elements["verify_support"].checked !== true || this.form.elements["realm"].value.length == 0) {
309 309
                                     this.form.elements["hint_support"].setAttribute("disabled", "disabled");
@@ -315,12 +315,12 @@  discard block
 block discarded – undo
315 315
             </tr>
316 316
             <tr>
317 317
                 <td>
318
-                    <span id='hint_label' style='<?php echo ($realm == "" ? "color:#999999" : "" ); ?>'>
318
+                    <span id='hint_label' style='<?php echo ($realm == "" ? "color:#999999" : ""); ?>'>
319 319
                         <?php echo _("Enforce exact realm in username"); ?>
320 320
                     </span>
321 321
                 </td>
322 322
                 <td>
323
-                    <input type='checkbox' <?php echo ($verify == FALSE ? "disabled" : "" ); ?> name='hint_support' <?php echo ( $hint != FALSE ? "checked" : "" ); ?> />
323
+                    <input type='checkbox' <?php echo ($verify == FALSE ? "disabled" : ""); ?> name='hint_support' <?php echo ($hint != FALSE ? "checked" : ""); ?> />
324 324
                 </td>
325 325
             </tr>
326 326
         </table>
@@ -334,14 +334,14 @@  discard block
 block discarded – undo
334 334
     <p>
335 335
 
336 336
         <?php
337
-        echo "<span id='redirect_label' style='" . ($realm == "" ? "color:#999999" : "" ) . "'><label for='redirect'>" . _("Redirect end users to own web page:") . "</label></span>
338
-                          <input type='checkbox'  name='redirect' id='redirect' " . ($blacklisted === FALSE ? "" : "checked " ) . "onclick='
337
+        echo "<span id='redirect_label' style='".($realm == "" ? "color:#999999" : "")."'><label for='redirect'>"._("Redirect end users to own web page:")."</label></span>
338
+                          <input type='checkbox'  name='redirect' id='redirect' " . ($blacklisted === FALSE ? "" : "checked ")."onclick='
339 339
                               if (this.form.elements[\"redirect\"].checked != true) {
340 340
                                 this.form.elements[\"redirect_target\"].setAttribute(\"disabled\", \"disabled\");
341 341
                               } else {
342 342
                                 this.form.elements[\"redirect_target\"].removeAttribute(\"disabled\");
343 343
                               };'/>
344
-                          <input type='text' name='redirect_target' " . ($blacklisted !== FALSE ? "value='$blacklisted'" : "disabled" ) . "/>";
344
+                          <input type='text' name='redirect_target' " . ($blacklisted !== FALSE ? "value='$blacklisted'" : "disabled")."/>";
345 345
         ?>
346 346
     </p>
347 347
 
@@ -381,7 +381,7 @@  discard block
 block discarded – undo
381 381
                         <?php
382 382
                         $D = [];
383 383
                         foreach ($prefill_methods as $prio => $value) {
384
-                            print '<li>' . $value->getPrintableRep() . "</li>\n";
384
+                            print '<li>'.$value->getPrintableRep()."</li>\n";
385 385
                             $D[$value->getPrintableRep()] = $prio;
386 386
                         }
387 387
                         ?>
@@ -407,7 +407,7 @@  discard block
 block discarded – undo
407 407
                             }
408 408
                             $display = $a->getPrintableRep();
409 409
                             if (!isset($D[$a->getPrintableRep()])) {
410
-                                print '<li class="eap1">' . $a->getPrintableRep() . "</li>\n";
410
+                                print '<li class="eap1">'.$a->getPrintableRep()."</li>\n";
411 411
                             }
412 412
                         }
413 413
                         ?>
@@ -420,8 +420,8 @@  discard block
 block discarded – undo
420 420
     foreach ($methods as $a) {
421 421
         $display = $a->getPrintableRep();
422 422
         $v = isset($D[$display]) ? $D[$display] : '';
423
-        print '<input type="hidden" class="eapm" name="' . $display . '" id="EAP-' . $display . '" value="' . $display . '">';
424
-        print '<input type="hidden" class="eapmv" name="' . $display . '-priority" id="EAP-' . $display . '-priority" value="' . $v . '">';
423
+        print '<input type="hidden" class="eapm" name="'.$display.'" id="EAP-'.$display.'" value="'.$display.'">';
424
+        print '<input type="hidden" class="eapmv" name="'.$display.'-priority" id="EAP-'.$display.'-priority" value="'.$v.'">';
425 425
     }
426 426
     ?>
427 427
     <br style="clear:both;" />
@@ -441,11 +441,11 @@  discard block
 block discarded – undo
441 441
 foreach ($optionsAlreadySet as $optionNames) {
442 442
     if (preg_match("/^support:/", $optionNames)) {
443 443
         $has_support_options[$optionNames] = "SET";
444
-        $support_text .= "<li><strong>" . $uiElements->displayName($optionNames) . "</strong></li>";
444
+        $support_text .= "<li><strong>".$uiElements->displayName($optionNames)."</strong></li>";
445 445
     }
446 446
     if (preg_match("/^media:/", $optionNames)) {
447 447
         $has_media_options[$optionNames] = "SET";
448
-        $media_text .= "<li><strong>" . $uiElements->displayName($optionNames) . "</strong></li>";
448
+        $media_text .= "<li><strong>".$uiElements->displayName($optionNames)."</strong></li>";
449 449
     }
450 450
 }
451 451
 $fields = [
@@ -454,12 +454,12 @@  discard block
 block discarded – undo
454 454
     "media" => _("Media Properties for this profile")];
455 455
 
456 456
 foreach ($fields as $name => $description) {
457
-    echo "<fieldset class='option_container' id='" . $name . "_override'>
457
+    echo "<fieldset class='option_container' id='".$name."_override'>
458 458
     <legend><strong>$description</strong></legend>
459 459
     <p>";
460 460
     echo $wizard->displayHelp($name);
461
-    if (count(${"has_" . $name . "_options"}) > 0) {
462
-        printf(ngettext("The option %s is already defined IdP-wide. If you set it here on profile level, this setting will override the IdP-wide one.", "The options %s are already defined IdP-wide. If you set them here on profile level, these settings will override the IdP-wide ones.", count(${"has_" . $name . "_options"})), "<ul>" . ${$name . "_text"} . "</ul>");
461
+    if (count(${"has_".$name."_options"}) > 0) {
462
+        printf(ngettext("The option %s is already defined IdP-wide. If you set it here on profile level, this setting will override the IdP-wide one.", "The options %s are already defined IdP-wide. If you set them here on profile level, these settings will override the IdP-wide ones.", count(${"has_".$name."_options"})), "<ul>".${$name."_text"}."</ul>");
463 463
     }
464 464
     echo "</p>";
465 465
     echo $optionDisplay->prefilledOptionTable($name, $my_inst->federation);
@@ -469,7 +469,7 @@  discard block
 block discarded – undo
469 469
     echo "</fieldset>";
470 470
 }
471 471
 if ($wizardStyle) {
472
-    echo "<p>" . _("When you are sure that everything is correct, please click on 'Save data' and you will be taken to your IdP Dashboard page.") . "</p>";
472
+    echo "<p>"._("When you are sure that everything is correct, please click on 'Save data' and you will be taken to your IdP Dashboard page.")."</p>";
473 473
 }
474 474
 if ($editMode == 'readonly') {
475 475
     $discardLabel = _("Return");
@@ -477,6 +477,6 @@  discard block
 block discarded – undo
477 477
 if ($editMode == 'fullaccess') {
478 478
     $discardLabel = _("Discard changes");
479 479
 }
480
-echo "<p><button type='submit' id='submitbutton' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_SAVE . "'>" . _("Save data") . "</button><button type='button' class='delete' id=='abortbutton' style='visibility: visible' value='abort' onclick='javascript:window.location = \"overview_org.php?inst_id=$my_inst->identifier\"'>".$discardLabel."</button></p></form>";
480
+echo "<p><button type='submit' id='submitbutton' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_SAVE."'>"._("Save data")."</button><button type='button' class='delete' id=='abortbutton' style='visibility: visible' value='abort' onclick='javascript:window.location = \"overview_org.php?inst_id=$my_inst->identifier\"'>".$discardLabel."</button></p></form>";
481 481
 echo $deco->footer();
482 482
 
Please login to merge, or discard this patch.
web/lib/admin/Wizard.php 2 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -89,13 +89,13 @@  discard block
 block discarded – undo
89 89
                 $ssidlist .= ", '<strong>" . $ssid . "</strong>'";
90 90
             }
91 91
             $ssidlist = substr($ssidlist, 2);
92
-             $h .= sprintf(ngettext("We will always configure this SSID for WPA2/AES: %s.", "We will always configure these SSIDs for WPA2/AES: %s.", count(\config\ConfAssistant::CONSORTIUM['ssid'])), $ssidlist);
93
-             $h .= "<br/>" . sprintf(_("It is also possible to define custom additional SSIDs with the option '%s' below."), $this->displayName("media:SSID"));
92
+                $h .= sprintf(ngettext("We will always configure this SSID for WPA2/AES: %s.", "We will always configure these SSIDs for WPA2/AES: %s.", count(\config\ConfAssistant::CONSORTIUM['ssid'])), $ssidlist);
93
+                $h .= "<br/>" . sprintf(_("It is also possible to define custom additional SSIDs with the option '%s' below."), $this->displayName("media:SSID"));
94 94
         } else {
95
-             $h .=  _("Please configure which SSIDs should be configured in the installers.");
95
+                $h .=  _("Please configure which SSIDs should be configured in the installers.");
96 96
         }
97
-         $h .= " " . _("By default, we will only configure the SSIDs with WPA2/AES encryption. By using the '(with WPA/TKIP)' option you can specify that we should include legacy support for WPA/TKIP where possible.");
98
-         $h .= "</li>";
97
+            $h .= " " . _("By default, we will only configure the SSIDs with WPA2/AES encryption. By using the '(with WPA/TKIP)' option you can specify that we should include legacy support for WPA/TKIP where possible.");
98
+            $h .= "</li>";
99 99
 
100 100
         $h .= "<li>";
101 101
         $h .= "<strong>" . ( count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0 ? _("Additional Hotspot 2.0 / Passpoint Consortia:") : _("Hotspot 2.0 / Passpoint Consortia:")) . " </strong>";
@@ -135,19 +135,19 @@  discard block
 block discarded – undo
135 135
             "<p>" . _("Optionally, you can provide a longer descriptive text about who this profile is for. If you specify it, it will be displayed on the download page after the user has selected the profile name in the list.") . "</p>".
136 136
             "<p>" . _("You can also tell us your RADIUS realm. ");
137 137
             if (\config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS'] !== NULL) {
138
-               $h .= sprintf(_("This is useful if you want to use the sanity check module later, which tests reachability of your realm in the %s infrastructure. "), \config\ConfAssistant::CONSORTIUM['display_name']);
138
+                $h .= sprintf(_("This is useful if you want to use the sanity check module later, which tests reachability of your realm in the %s infrastructure. "), \config\ConfAssistant::CONSORTIUM['display_name']);
139 139
             }
140 140
         $h .= _("It is required to enter the realm name if you want to support anonymous outer identities (see below).") . "</p>";
141 141
         $this->helpMessage['profile'] = $h;
142 142
         
143 143
         // REALM
144 144
         $h = "<p>".sprintf(_("Some installers support a feature called 'Anonymous outer identity'. If you don't know what this is, please read <a href='%s'>this article</a>."), "https://confluence.terena.org/display/H2eduroam/eap-types")."</p>".
145
-          "<p>"._("On some platforms, the installers can suggest username endings and/or verify the user input to contain the realm suffix.")."</p>".
146
-          "<p>"._("The realm check feature needs to know an outer ID which actually gets a chance to authenticate. If your RADIUS server lets only select usernames pass, it is useful to supply the information which of those (outer ID) username we can use for testing.")."</p>";
145
+            "<p>"._("On some platforms, the installers can suggest username endings and/or verify the user input to contain the realm suffix.")."</p>".
146
+            "<p>"._("The realm check feature needs to know an outer ID which actually gets a chance to authenticate. If your RADIUS server lets only select usernames pass, it is useful to supply the information which of those (outer ID) username we can use for testing.")."</p>";
147 147
         $this->helpMessage['realm'] = $h;
148 148
         
149 149
         // REDIRECT
150
-         $h ="<p>"._("The CAT has a download area for end users. There, they will, for example, learn about the support pointers you entered earlier. The CAT can also immediately offer the installers for the profile for download. If you don't want that, you can instead enter a web site location where you want your users to be redirected to. You, as the administrator, can still download the profiles to place them on that page (see the 'Compatibility Matrix' button on the dashboard).") . "</p>";
150
+            $h ="<p>"._("The CAT has a download area for end users. There, they will, for example, learn about the support pointers you entered earlier. The CAT can also immediately offer the installers for the profile for download. If you don't want that, you can instead enter a web site location where you want your users to be redirected to. You, as the administrator, can still download the profiles to place them on that page (see the 'Compatibility Matrix' button on the dashboard).") . "</p>";
151 151
         $this->helpMessage['redirect'] = $h;
152 152
         
153 153
         // EAP
Please login to merge, or discard this patch.
Spacing   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -107,83 +107,83 @@  discard block
 block discarded – undo
107 107
         foreach ($optionsList as $option) {
108 108
             $this->optionsHelp[$option] = $this->displayName($option, true);
109 109
         }
110
-        array_multisort(array_column($this->optionsHelp,'display'), SORT_ASC, $this->optionsHelp);
110
+        array_multisort(array_column($this->optionsHelp, 'display'), SORT_ASC, $this->optionsHelp);
111 111
     }
112 112
     
113 113
     public function setMessages() {
114 114
         // FED general
115
-        $h = "<p><h3>" . _("Here you set federation-level options.") . "</h3><p>";
116
-        $h .= "<i>" . _("The following options are available:") . "</i><p>";
115
+        $h = "<p><h3>"._("Here you set federation-level options.")."</h3><p>";
116
+        $h .= "<i>"._("The following options are available:")."</i><p>";
117 117
         $h .= "<dl>";
118 118
         foreach ($this->optionsHelp as $o) {
119
-            $h .= "<dt>". $o['display'] . "</dt>";
120
-            $h .= "<dd>" . $o['help'] . "</dd>";
119
+            $h .= "<dt>".$o['display']."</dt>";
120
+            $h .= "<dd>".$o['help']."</dd>";
121 121
         }
122 122
         $h .= "</dl>";
123 123
         $this->helpMessage['fed_general'] = $h;
124 124
         // SUPPORT
125
-        $h = "<p>" . _("This section can be used to upload specific Terms of Use for your users and to display details of how your users can reach your local helpdesk.") . "</p>";
125
+        $h = "<p>"._("This section can be used to upload specific Terms of Use for your users and to display details of how your users can reach your local helpdesk.")."</p>";
126 126
         if (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_RADIUS'] == "LOCAL") {
127
-            $h .= "<p>" .
128
-            sprintf(_("Do you provide helpdesk services for your users? If so, it would be nice if you would tell us the pointers to this helpdesk."), $this->nomenclatureParticipant) . "</p>" .
129
-            "<p>" .
130
-            _("If you enter a value here, it will be added to the installers for all your users, and will be displayed on the download page. If you operate separate helpdesks for different user groups (we call this 'profiles') specify per-profile helpdesk information later in this wizard. If you operate no help desk at all, just leave these fields empty.") . "</p>";
127
+            $h .= "<p>".
128
+            sprintf(_("Do you provide helpdesk services for your users? If so, it would be nice if you would tell us the pointers to this helpdesk."), $this->nomenclatureParticipant)."</p>".
129
+            "<p>".
130
+            _("If you enter a value here, it will be added to the installers for all your users, and will be displayed on the download page. If you operate separate helpdesks for different user groups (we call this 'profiles') specify per-profile helpdesk information later in this wizard. If you operate no help desk at all, just leave these fields empty.")."</p>";
131 131
             if (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_SILVERBULLET'] == "LOCAL") {
132
-                $h .= "<p>" . sprintf(_("For %s deployments, providing at least a local e-mail contact is required."), \config\ConfAssistant::SILVERBULLET['product_name']) . " " . _("This is the contact point for your organisation. It may be displayed publicly.") . "</p>";
132
+                $h .= "<p>".sprintf(_("For %s deployments, providing at least a local e-mail contact is required."), \config\ConfAssistant::SILVERBULLET['product_name'])." "._("This is the contact point for your organisation. It may be displayed publicly.")."</p>";
133 133
             }
134 134
         } elseif (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_SILVERBULLET'] == "LOCAL") {
135
-            $h .= "<p>" . _("Providing at least a local support e-mail contact is required.") . " " . _("This is the contact point for your end users' level 1 support.") . "</p>";
135
+            $h .= "<p>"._("Providing at least a local support e-mail contact is required.")." "._("This is the contact point for your end users' level 1 support.")."</p>";
136 136
         }
137 137
         $this->helpMessage['support'] = $h;
138 138
 
139 139
         // MEDIA
140
-        $h = "<p>" .
141
-            sprintf(_("In this section, you define on which media %s should be configured on user devices."), \config\ConfAssistant::CONSORTIUM['display_name']) . "</p><ul>";
140
+        $h = "<p>".
141
+            sprintf(_("In this section, you define on which media %s should be configured on user devices."), \config\ConfAssistant::CONSORTIUM['display_name'])."</p><ul>";
142 142
         $h .= "<li>";
143
-        $h .= "<strong>" . ( count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0 ? _("Additional SSIDs:") : _("SSIDs:")) . " </strong>";
143
+        $h .= "<strong>".(count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0 ? _("Additional SSIDs:") : _("SSIDs:"))." </strong>";
144 144
         if (count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0) {
145 145
             $ssidlist = "";
146 146
             foreach (\config\ConfAssistant::CONSORTIUM['ssid'] as $ssid) {
147
-                $ssidlist .= ", '<strong>" . $ssid . "</strong>'";
147
+                $ssidlist .= ", '<strong>".$ssid."</strong>'";
148 148
             }
149 149
             $ssidlist = substr($ssidlist, 2);
150 150
              $h .= sprintf(ngettext("We will always configure this SSID for WPA2/AES: %s.", "We will always configure these SSIDs for WPA2/AES: %s.", count(\config\ConfAssistant::CONSORTIUM['ssid'])), $ssidlist);
151
-             $h .= "<br/>" . sprintf(_("It is also possible to define custom additional SSIDs with the option '%s' below."), $this->displayName("media:SSID"));
151
+             $h .= "<br/>".sprintf(_("It is also possible to define custom additional SSIDs with the option '%s' below."), $this->displayName("media:SSID"));
152 152
         } else {
153
-             $h .=  _("Please configure which SSIDs should be configured in the installers.");
153
+             $h .= _("Please configure which SSIDs should be configured in the installers.");
154 154
         }
155
-         $h .= " " . _("By default, we will only configure the SSIDs with WPA2/AES encryption. By using the '(with WPA/TKIP)' option you can specify that we should include legacy support for WPA/TKIP where possible.");
155
+         $h .= " "._("By default, we will only configure the SSIDs with WPA2/AES encryption. By using the '(with WPA/TKIP)' option you can specify that we should include legacy support for WPA/TKIP where possible.");
156 156
          $h .= "</li>";
157 157
 
158 158
         $h .= "<li>";
159
-        $h .= "<strong>" . ( count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0 ? _("Additional Hotspot 2.0 / Passpoint Consortia:") : _("Hotspot 2.0 / Passpoint Consortia:")) . " </strong>";
159
+        $h .= "<strong>".(count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0 ? _("Additional Hotspot 2.0 / Passpoint Consortia:") : _("Hotspot 2.0 / Passpoint Consortia:"))." </strong>";
160 160
         if (count(\config\ConfAssistant::CONSORTIUM['interworking-consortium-oi']) > 0) {
161 161
             $consortiumlist = "";
162 162
             foreach (\config\ConfAssistant::CONSORTIUM['interworking-consortium-oi'] as $oi) {
163
-                $consortiumlist .= ", '<strong>" . $oi . "</strong>'";
163
+                $consortiumlist .= ", '<strong>".$oi."</strong>'";
164 164
             }
165 165
             $consortiumlist = substr($consortiumlist, 2);
166 166
             $h .= sprintf(ngettext("We will always configure this Consortium OI: %s.", "We will always configure these Consortium OIs: %s.", count(\config\ConfAssistant::CONSORTIUM['interworking-consortium-oi'])), $consortiumlist);
167 167
 
168
-            $h .= "<br/>" . sprintf(_("It is also possible to define custom additional OIs with the option '%s' below."), $this->displayName("media:consortium_OI"));
168
+            $h .= "<br/>".sprintf(_("It is also possible to define custom additional OIs with the option '%s' below."), $this->displayName("media:consortium_OI"));
169 169
         } else {
170 170
             $h .= _("Please configure which Consortium OIs should be configured in the installers.");
171 171
         }
172 172
         $h .= "</li>";
173
-        $h .= "<li><strong>" . _("Support for wired IEEE 802.1X:") . " </strong>"
174
-        . _("If you want to configure your users' devices with IEEE 802.1X support for wired ethernet, please check the corresponding box. Note that this makes the installation process a bit more difficult on some platforms (Windows: needs administrator privileges; Apple: attempting to install a profile with wired support on a device without an active wired ethernet card will fail).") .
173
+        $h .= "<li><strong>"._("Support for wired IEEE 802.1X:")." </strong>"
174
+        . _("If you want to configure your users' devices with IEEE 802.1X support for wired ethernet, please check the corresponding box. Note that this makes the installation process a bit more difficult on some platforms (Windows: needs administrator privileges; Apple: attempting to install a profile with wired support on a device without an active wired ethernet card will fail).").
175 175
         "</li>";
176
-        $h .= "<li><strong>" . _("Removal of bootstrap/onboarding SSIDs:") . " </strong>"
176
+        $h .= "<li><strong>"._("Removal of bootstrap/onboarding SSIDs:")." </strong>"
177 177
         . _("If you use a captive portal to distribute configurations, you may want to unconfigure/disable that SSID after the bootstrap process. With this option, the SSID will either be removed, or be defined as 'Only connect manually'.")
178 178
         . "</li>";
179 179
         $h .= "</ul>";
180 180
         $this->helpMessage['media'] = $h;
181 181
         
182 182
         // IDP GENERAL
183
-        $h = "<p>" .
184
-        _("Some properties are valid across all deployment profiles. This is the place where you can describe those properties in a fine-grained way. The solicited information is used as follows:") . "</p>".
183
+        $h = "<p>".
184
+        _("Some properties are valid across all deployment profiles. This is the place where you can describe those properties in a fine-grained way. The solicited information is used as follows:")."</p>".
185 185
             "<ul>".
186
-                "<li>"._("<strong>Logo</strong>: When you submit a logo, we will embed this logo into all installers where a custom logo is possible. We accept any image format, but for best results, we suggest SVG. If you don't upload a logo, we will use the generic logo instead (see top-right corner of this page).") . "</li>".
186
+                "<li>"._("<strong>Logo</strong>: When you submit a logo, we will embed this logo into all installers where a custom logo is possible. We accept any image format, but for best results, we suggest SVG. If you don't upload a logo, we will use the generic logo instead (see top-right corner of this page).")."</li>".
187 187
                 "<li>".sprintf(_("<strong>%s</strong>: The organisation may have names in multiple languages. It is recommended to always populate at least the 'default/other' language, as it is used as a fallback if the system does not have a name in the exact language the user requests a download in."), $this->displayName("general:instname"))."</li>".
188 188
                 "<li>".sprintf(_("<strong>%s</strong>: This acronym will be used as an element of the instller file name instead of one automatically created from first letters of every worg in the institution name. You may add acronyms for multiple lunguages (but only one per language). The acronym will also be used as a keyword for the organisation search on the user's downloads page."), $this->displayName("general:instshortname"))."</li>".
189 189
                 "<li>".sprintf(_("<strong>%s</strong>: You may add several versoions of the organisation name or acronyms which will be used as additional keywords exclusively for the organisation search on the user's downloads page."), $this->displayName("general:instaltname"))."</li>".
@@ -191,13 +191,13 @@  discard block
 block discarded – undo
191 191
         $this->helpMessage['idp_general'] = $h;
192 192
         
193 193
         // PROFILE GENERAL
194
-        $h = "<p>" . _("First of all we need a name for the profile. This will be displayed to end users, so you may want to choose a descriptive name like 'Professors', 'Students of the Faculty of Bioscience', etc.") . "</p>".
195
-            "<p>" . _("Optionally, you can provide a longer descriptive text about who this profile is for. If you specify it, it will be displayed on the download page after the user has selected the profile name in the list.") . "</p>".
196
-            "<p>" . _("You can also tell us your RADIUS realm. ");
194
+        $h = "<p>"._("First of all we need a name for the profile. This will be displayed to end users, so you may want to choose a descriptive name like 'Professors', 'Students of the Faculty of Bioscience', etc.")."</p>".
195
+            "<p>"._("Optionally, you can provide a longer descriptive text about who this profile is for. If you specify it, it will be displayed on the download page after the user has selected the profile name in the list.")."</p>".
196
+            "<p>"._("You can also tell us your RADIUS realm. ");
197 197
             if (\config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS'] !== NULL) {
198 198
                $h .= sprintf(_("This is useful if you want to use the sanity check module later, which tests reachability of your realm in the %s infrastructure. "), \config\ConfAssistant::CONSORTIUM['display_name']);
199 199
             }
200
-        $h .= _("It is required to enter the realm name if you want to support anonymous outer identities (see below).") . "</p>";
200
+        $h .= _("It is required to enter the realm name if you want to support anonymous outer identities (see below).")."</p>";
201 201
         $this->helpMessage['profile'] = $h;
202 202
         
203 203
         // REALM
@@ -207,24 +207,24 @@  discard block
 block discarded – undo
207 207
         $this->helpMessage['realm'] = $h;
208 208
         
209 209
         // REDIRECT
210
-         $h ="<p>"._("The CAT has a download area for end users. There, they will, for example, learn about the support pointers you entered earlier. The CAT can also immediately offer the installers for the profile for download. If you don't want that, you can instead enter a web site location where you want your users to be redirected to. You, as the administrator, can still download the profiles to place them on that page (see the 'Compatibility Matrix' button on the dashboard).") . "</p>";
210
+         $h = "<p>"._("The CAT has a download area for end users. There, they will, for example, learn about the support pointers you entered earlier. The CAT can also immediately offer the installers for the profile for download. If you don't want that, you can instead enter a web site location where you want your users to be redirected to. You, as the administrator, can still download the profiles to place them on that page (see the 'Compatibility Matrix' button on the dashboard).")."</p>";
211 211
         $this->helpMessage['redirect'] = $h;
212 212
         
213 213
         // EAP
214
-        $h = "<p>"._("Now, we need to know which EAP types your IdP supports. If you support multiple EAP types, you can assign every type a priority (1=highest). This tool will always generate an automatic installer for the EAP type with the highest priority; only if the user's device can't use that EAP type, we will use an EAP type further down in the list.") . "</p>";
214
+        $h = "<p>"._("Now, we need to know which EAP types your IdP supports. If you support multiple EAP types, you can assign every type a priority (1=highest). This tool will always generate an automatic installer for the EAP type with the highest priority; only if the user's device can't use that EAP type, we will use an EAP type further down in the list.")."</p>";
215 215
         $this->helpMessage['eap_support'] = $h;
216 216
         
217 217
         // LOCATIOM
218
-        $h = "<p>" .
219
-                    _("The user download interface (see <a href='../'>here</a>), uses geolocation to suggest possibly matching IdPs to the user. The more precise you define the location here, the easier your users will find you.") .
218
+        $h = "<p>".
219
+                    _("The user download interface (see <a href='../'>here</a>), uses geolocation to suggest possibly matching IdPs to the user. The more precise you define the location here, the easier your users will find you.").
220 220
                     "</p>
221 221
                      <ul>" .
222 222
                     _("<li>Drag the marker in the map to your place, or</li>
223 223
 <li>enter your street address in the field below for lookup, or</li>
224
-<li>use the 'Locate Me!' button</li>") .
224
+<li>use the 'Locate Me!' button</li>").
225 225
                     "</ul>
226 226
                      <strong>" .
227
-                    _("We will use the coordinates as indicated by the marker for geolocation.") .
227
+                    _("We will use the coordinates as indicated by the marker for geolocation.").
228 228
                     "</strong>";
229 229
         $this->helpMessage['location'] = $h;
230 230
     }
Please login to merge, or discard this patch.
web/admin/sort_profiles_result.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
 ?>
28 28
 
29 29
 <?php
30
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
30
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
31 31
 
32 32
 $deco = new \web\lib\admin\PageDecoration();
33 33
 $validator = new \web\lib\common\InputValidation();
Please login to merge, or discard this patch.
web/admin/duplicate_profile.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
 ?>
28 28
 
29 29
 <?php
30
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
30
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
31 31
 
32 32
 $deco = new \web\lib\admin\PageDecoration();
33 33
 $validator = new \web\lib\common\InputValidation();
Please login to merge, or discard this patch.
web/admin/duplicate_profile_result.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 ?>
30 30
 
31 31
 <?php
32
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
32
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
33 33
 
34 34
 $deco = new \web\lib\admin\PageDecoration();
35 35
 $validator = new \web\lib\common\InputValidation();
@@ -101,13 +101,13 @@  discard block
 block discarded – undo
101 101
     } 
102 102
 }
103 103
 
104
-$newProfileName =  $validator->string($_POST['new_profile'], true);
104
+$newProfileName = $validator->string($_POST['new_profile'], true);
105 105
 $origProfileName = $validator->string($_POST['orig_profile_name'], true);
106 106
 $handle = \core\DBConnection::handle("INST");
107 107
 
108 108
 $result = runSelect($my_profile->identifier, $fields, 'profile', $handle);
109 109
 $row = $result->fetch_assoc();
110
-$row['showtime']= 0;
110
+$row['showtime'] = 0;
111 111
 $row['preference'] = 1000;
112 112
 copyRow($row, $fields, 'profile', $handle);
113 113
 $newProfileId = $handle->lastID();
Please login to merge, or discard this patch.
web/diag/adminQuery.php 1 patch
Spacing   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
  * License: see the web/copyright.inc.php file in the file structure or
20 20
  *          <base_url>/copyright.php after deploying the software
21 21
  */
22
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
22
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
23 23
 $languageInstance = new \core\common\Language();
24 24
 $languageInstance->setTextDomain("diagnostics");
25 25
 $loggerInstance = new \core\common\Logging();
@@ -63,47 +63,47 @@  discard block
 block discarded – undo
63 63
     $select = "<div id='sp_abuse_problem'>
64 64
 <select style='margin-left: 0px;' id='select_sp_problem'>";
65 65
     foreach ($sp_problem as $pname => $pdesc) {
66
-        $select = $select . "<option value='$pname'>$pdesc</option>\n";
66
+        $select = $select."<option value='$pname'>$pdesc</option>\n";
67 67
     }
68
-    $select = $select . "</select></div>";
68
+    $select = $select."</select></div>";
69 69
     $res = "
70 70
 <input type='hidden' name='token' id='token' value=''>
71 71
 <input type='hidden' name='tests_result' id='tests_result' value=''>
72 72
 <table id='sp_questions'>
73 73
     <tr id='sp_problem_selector'>
74
-        <td>" . _("Select your problem") . "</td>
74
+        <td>" . _("Select your problem")."</td>
75 75
         <td>$select</td>
76 76
     </tr>
77 77
     <tr>
78
-        <td>" . _("What is the realm of the IdP in question?") . "</td>
78
+        <td>"._("What is the realm of the IdP in question?")."</td>
79 79
         <td>
80 80
                 <input type='text' name='admin_realm' id='admin_realm' value='$realmFromURL'>
81
-                <button class='diag_button' id='realm_in_db_admin' style='display: none;' accesskey='R' type='button'>" .
82
-                _("Check this realm") .
81
+                <button class='diag_button' id='realm_in_db_admin' style='display: none;' accesskey='R' type='button'>".
82
+                _("Check this realm").
83 83
                 "</button>
84 84
                 <div id='tests_info_area'></div>
85 85
         </td>
86 86
     </tr>
87 87
     <tr id='outer_user_row' class='hidden_row'>
88
-        <td>" . _("Do you prefer to use a specific outer identity for diagnostics test?") . "</td>
88
+        <td>" . _("Do you prefer to use a specific outer identity for diagnostics test?")."</td>
89 89
         <td>  <input type='text' name='outer_user' id='outer_user' value=''><span id='outer_user_realm'></span>
90 90
     </tr>
91 91
     <tr class='hidden_row'>
92
-        <td>" . _("What is the authentication timestamp of the user session in question?") . "</td>
92
+        <td>" . _("What is the authentication timestamp of the user session in question?")."</td>
93 93
         <td><input type='text' id='timestamp' name='timestamp'>
94 94
             <div id='datepicker'></div>
95 95
         </td>
96 96
     </tr>
97 97
     <tr class='hidden_row'>
98
-        <td>" . _("What is the MAC address of the user session in question?") . "</td>
98
+        <td>" . _("What is the MAC address of the user session in question?")."</td>
99 99
         <td><input type='text' id='mac' name='mac'></td>
100 100
     </tr>
101 101
     <tr class='hidden_row'>
102
-        <td>" . _("Additional comments") . "</td>
102
+        <td>" . _("Additional comments")."</td>
103 103
         <td><textarea id='freetext' name='freetext' cols='60' rows='5'></textarea></td>
104 104
     </tr>
105 105
     <tr class='hidden_row'>
106
-        <td>" . _("Please specify an email address on which the IdP can contact you") . "</td>
106
+        <td>" . _("Please specify an email address on which the IdP can contact you")."</td>
107 107
         <td><input type='text' id='email' name='email'></td>
108 108
     </tr>
109 109
     <tr>
@@ -111,82 +111,82 @@  discard block
 block discarded – undo
111 111
         <td></td>
112 112
     </tr>
113 113
     <tr class='hidden_row' id='send_query_to_idp'>
114
-        <td>" . _("Now you can send your query") . "</td>
115
-        <td><button type='submit' class='diag_button' id='submit_idp_query' name='go'>" . _("Send") . "</button></td>
114
+        <td>" . _("Now you can send your query")."</td>
115
+        <td><button type='submit' class='diag_button' id='submit_idp_query' name='go'>" . _("Send")."</button></td>
116 116
     </tr>
117 117
  </table>";
118
-    $res = $res . $javascript;
118
+    $res = $res.$javascript;
119 119
 }
120 120
 if ($queryType == 'idp') {
121 121
     $select = "<div id='idp_reported_problem' style='display:;'>
122 122
 <select style='margin-left:0px;' id='select_idp_problem'>";
123 123
     foreach ($idp_problem as $pname => $pdesc) {
124
-        $select = $select . "<option value='$pname'>$pdesc</option>\n";
124
+        $select = $select."<option value='$pname'>$pdesc</option>\n";
125 125
     }
126
-    $select = $select . "</select></div>";
126
+    $select = $select."</select></div>";
127 127
     $res = "
128 128
 <table id='idp_questions'>
129 129
     <tr>
130
-        <td>" . _("Select your problem") . "</td>
130
+        <td>" . _("Select your problem")."</td>
131 131
         <td>$select</td>
132 132
     </tr>
133 133
     <tr>
134
-        <td>" . _("Identify the SP by one of following means") . "</td>
134
+        <td>"._("Identify the SP by one of following means")."</td>
135 135
         <td></td>
136 136
     </tr>
137 137
     <tr id='by_opname'>
138
-        <td>" . _("SP Operator-Name attribute") . "</td>
138
+        <td>" . _("SP Operator-Name attribute")."</td>
139 139
         <td><input type='text' id='opname' name='opname' value=''></td>
140 140
     </tr>
141 141
     <tr id='spmanually'>
142
-        <td>" . _("Select the SP manually:") . "</td>
142
+        <td>" . _("Select the SP manually:")."</td>
143 143
         <td>
144 144
             <div id='select_asp_country'><a href='' id='asp_countries_list'>
145
-            <span id='opnameselect'>" . _("click to select country and organisation") . "</a></span>
145
+            <span id='opnameselect'>" . _("click to select country and organisation")."</a></span>
146 146
             </div>
147 147
             <div id='select_asp_area'></div>
148 148
         </td>
149 149
     </tr>
150 150
     <tr id='asp_desc' style='display: none;'>
151
-        <td>" . _("or") . ' ' . _("at least describe the SP location") . "</td>
151
+        <td>" . _("or").' '._("at least describe the SP location")."</td>
152 152
         <td><input type='text' id='asp_location' name='asp_location' value=''></td>
153 153
     </tr>
154 154
     <tr>
155
-        <td>" . _("What is the outer ID of the user session in question?") . "</td>
155
+        <td>" . _("What is the outer ID of the user session in question?")."</td>
156 156
         <td><input type='text' id='outer_id' name='outer_id' value=''></td>
157 157
     </tr>
158 158
     <tr>
159
-        <td>" . _("What is the authentication timestamp of the user session in question?") . "</td>
159
+        <td>" . _("What is the authentication timestamp of the user session in question?")."</td>
160 160
         <td>
161 161
             <input type='text' id='timestamp' name='timestamp'>
162 162
             <div id='datepicker'></div>
163 163
         </td>
164 164
     </tr>
165 165
     <tr>
166
-        <td>" . _("What is the MAC address of the user session in question?") . "</td>
166
+        <td>" . _("What is the MAC address of the user session in question?")."</td>
167 167
         <td><input type='text' id='mac' name='mac'></td>
168 168
     </tr>
169 169
     <tr>
170
-        <td>" . _("Additional comments about the problem") . "</td>
170
+        <td>" . _("Additional comments about the problem")."</td>
171 171
         <td><textarea id='freetext' name='freetext' cols='60' rows='5'></textarea></td>
172 172
     </tr>
173 173
     <tr>
174
-        <td>" . _("Do you have any contact details by which the user wishes to be contacted by the SP?") . "</td>
174
+        <td>" . _("Do you have any contact details by which the user wishes to be contacted by the SP?")."</td>
175 175
         <td><textarea id='c_details' name='c_details' cols='60' rows='5'></textarea></td>
176 176
     </tr>
177 177
     <tr>
178
-        <td>" . _("Please specify an email address on which the SP can contact you") . "</td>
178
+        <td>" . _("Please specify an email address on which the SP can contact you")."</td>
179 179
         <td><input type='text' id='email' name='email'></td>
180 180
     </tr>
181 181
     <tr class='hidden_row' id='send_query_to_sp'>
182
-        <td>" . _("Now you can send your query") . "</td>
183
-        <td><button type='submit' class='diag_button' id='submit_sp_query' name='go'>" . _("Send") . "</button></td>
182
+        <td>" . _("Now you can send your query")."</td>
183
+        <td><button type='submit' class='diag_button' id='submit_sp_query' name='go'>" . _("Send")."</button></td>
184 184
     </tr>
185 185
 </table>";
186
-    $res = $res . $javascript;
186
+    $res = $res.$javascript;
187 187
 }
188 188
 if ($queryType == 'idp_send' || $queryType == 'sp_send') {
189
-    include_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
189
+    include_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
190 190
     $cat = new \core\CAT();
191 191
     $returnArray = array();
192 192
     if (count((array) $o) > 0) {
@@ -195,8 +195,8 @@  discard block
 block discarded – undo
195 195
             switch ($key) {
196 196
                 case 'realm':
197 197
                     $pos = strpos($value, '@');
198
-                    if ($pos !== FALSE ) {
199
-                        $value = substr($value, $pos+1);
198
+                    if ($pos !== FALSE) {
199
+                        $value = substr($value, $pos + 1);
200 200
                     }
201 201
                 case 'email':
202 202
                     $returnArray[$key] = filter_var($value, FILTER_VALIDATE_EMAIL);
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
         $mail = \core\common\OutsideComm::mailHandle();
238 238
         $emails = ['[email protected]'];
239 239
         //$emails = explode(',', $returnArray['idpcontact']);
240
-        $mail->FromName = \config\Master::APPEARANCE['productname'] . " Notification System";
240
+        $mail->FromName = \config\Master::APPEARANCE['productname']." Notification System";
241 241
         foreach ($emails as $email) {
242 242
             $mail->addAddress($email);
243 243
         }
@@ -247,11 +247,11 @@  discard block
 block discarded – undo
247 247
         } else {
248 248
             $link = 'http://';
249 249
         }
250
-        $link .= $_SERVER['SERVER_NAME'] . \core\CAT::getRootUrlPath() . '/diag/show_realmcheck.php?token=' . $returnArray['token'];
250
+        $link .= $_SERVER['SERVER_NAME'].\core\CAT::getRootUrlPath().'/diag/show_realmcheck.php?token='.$returnArray['token'];
251 251
         $returnArray['testurl'] = $link;
252 252
         $mail->Subject = _('Suspected a technical problem with the IdP');
253
-        $txt = _("We suspect a technical problem with the IdP handling the realm") . ' ' . 
254
-                $returnArray['realm'] . ".\n";
253
+        $txt = _("We suspect a technical problem with the IdP handling the realm").' '. 
254
+                $returnArray['realm'].".\n";
255 255
         $txt .= _("The CAT diagnostic test was run for this realm during reporting.\n");
256 256
         $txt .= _("The overall result was ");
257 257
         if ($returnArray['tests_result'] == 0) {
@@ -259,15 +259,15 @@  discard block
 block discarded – undo
259 259
         } else {
260 260
             $txt .= _("failure");
261 261
         }
262
-        $txt .= ".\n" . _("To see details go to ");
262
+        $txt .= ".\n"._("To see details go to ");
263 263
         $txt .= "$link\n\n";
264
-        $txt .= _("The reported problem details are as follows") . "\n";
265
-        $txt .= _("timestamp") . ": " . $returnArray['timestamp'] . "\n";
266
-        $txt .= _("client MAC address") . ": " . $returnArray['mac'] . "\n";
264
+        $txt .= _("The reported problem details are as follows")."\n";
265
+        $txt .= _("timestamp").": ".$returnArray['timestamp']."\n";
266
+        $txt .= _("client MAC address").": ".$returnArray['mac']."\n";
267 267
         if ($returnArray['freetext']) {
268
-            $txt .= _("additional comments") . ': ' . $returnArray['freetext'] . "\n";
268
+            $txt .= _("additional comments").': '.$returnArray['freetext']."\n";
269 269
         }
270
-        $txt .= "\n" . _("You can contact the incident reporter at") . ' ' . $returnArray['email'];
270
+        $txt .= "\n"._("You can contact the incident reporter at").' '.$returnArray['email'];
271 271
         
272 272
         $mail->Body = $txt;
273 273
         $sent = $mail->send();
Please login to merge, or discard this patch.
web/diag/findRealm.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
             $telepath = new \core\diag\Telepath($givenRealm);
109 109
             $outerUser = $telepath->getOuter();
110 110
         }
111
-        $testsuite = new \core\diag\RADIUSTests($givenRealm, $outerUser . '@' . $givenRealm);
111
+        $testsuite = new \core\diag\RADIUSTests($givenRealm, $outerUser.'@'.$givenRealm);
112 112
        
113 113
         $naptr = $rfc7585suite->relevantNAPTR(); 
114 114
         if ($naptr != \core\diag\RADIUSTests::RETVAL_NOTCONFIGURED && $naptr > 0) {
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
 $json_data = json_encode($returnArray);
207 207
 
208 208
 if ($token) {
209
-    $loggerInstance->debug(4, 'JSON data written to ' .$jsonDir.'/'.$token);
209
+    $loggerInstance->debug(4, 'JSON data written to '.$jsonDir.'/'.$token);
210 210
     file_put_contents($jsonDir.'/'.$token.'/realm', $json_data);
211 211
 }
212 212
 header("Content-type: application/json; utf-8");
Please login to merge, or discard this patch.
core/AbstractProfile.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
                     // for now (no OpenRoaming client certs available) only run server-side tests
333 333
                     foreach ($listOfIPs as $oneIP) {
334 334
                         $connectionResult = $connectionTests->cApathCheck($oneIP);
335
-                        if ($connectionResult != \core\diag\AbstractTest::RETVAL_OK || ( isset($connectionTests->TLS_CA_checks_result['cert_oddity']) && count($connectionTests->TLS_CA_checks_result['cert_oddity']) > 0)) {
335
+                        if ($connectionResult != \core\diag\AbstractTest::RETVAL_OK || (isset($connectionTests->TLS_CA_checks_result['cert_oddity']) && count($connectionTests->TLS_CA_checks_result['cert_oddity']) > 0)) {
336 336
                             $allHostsOkay = FALSE;
337 337
                         } else {
338 338
                             $oneHostOkay = TRUE;
@@ -486,7 +486,7 @@  discard block
 block discarded – undo
486 486
             // which is different from the outer username we put into installers
487 487
             return $this->getAttributes("internal:checkuser_value")[0]['value']."@".$realm;
488 488
         }
489
-        if (count($this->getAttributes("internal:use_anon_outer")) > 0 && $this->getAttributes("internal:anon_local_value")[0]['value'] != NULL ) {
489
+        if (count($this->getAttributes("internal:use_anon_outer")) > 0 && $this->getAttributes("internal:anon_local_value")[0]['value'] != NULL) {
490 490
             // no special check username, but there is an anon outer ID for
491 491
             // installers - so let's use that one
492 492
             return $this->getAttributes("internal:anon_local_value")[0]['value']."@".$realm;
@@ -642,7 +642,7 @@  discard block
 block discarded – undo
642 642
         }
643 643
 
644 644
         $monthlyList = [];
645
-        $monthly = $this->frontendHandle->exec("SELECT downloads_user,device_id FROM downloads_history WHERE profile_id=? AND stat_date=DATE_FORMAT(NOW(),'%Y-%m-01')", "i",  $this->identifier);
645
+        $monthly = $this->frontendHandle->exec("SELECT downloads_user,device_id FROM downloads_history WHERE profile_id=? AND stat_date=DATE_FORMAT(NOW(),'%Y-%m-01')", "i", $this->identifier);
646 646
         while ($statsQuery = mysqli_fetch_object(/** @scrutinizer ignore-type */ $monthly)) {
647 647
             $monthlyList[$statsQuery->device_id] = $statsQuery->downloads_user;
648 648
         }
@@ -654,7 +654,7 @@  discard block
 block discarded – undo
654 654
         }        
655 655
         
656 656
         \core\common\Entity::intoThePotatoes();
657
-        ksort($finalarray, SORT_STRING|SORT_FLAG_CASE);
657
+        ksort($finalarray, SORT_STRING | SORT_FLAG_CASE);
658 658
         \core\common\Entity::outOfThePotatoes();
659 659
         return $finalarray;
660 660
     }
@@ -964,7 +964,7 @@  discard block
 block discarded – undo
964 964
         $profileStatus = self::CERT_STATUS_NONE;
965 965
         foreach ($rows as $row) {
966 966
             $encodedCert = $row[0];
967
-            $tm = $x509->processCertificate(base64_decode($encodedCert))['full_details']['validTo_time_t']- time();
967
+            $tm = $x509->processCertificate(base64_decode($encodedCert))['full_details']['validTo_time_t'] - time();
968 968
             if ($tm < \config\ConfAssistant::CERT_WARNINGS['expiry_critical']) {
969 969
                 $certStatus = self::CERT_STATUS_ERROR;
970 970
             } elseif ($tm < \config\ConfAssistant::CERT_WARNINGS['expiry_warning']) {
Please login to merge, or discard this patch.
web/admin/overview_radsec_readiness.php 1 patch
Spacing   +22 added lines, -22 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
 $auth = new \web\lib\admin\Authentication();
32 32
 $deco = new \web\lib\admin\PageDecoration();
@@ -82,9 +82,9 @@  discard block
 block discarded – undo
82 82
         echo '<br/>';
83 83
         echo _("In the 'Timestamp' column we show last update time.");
84 84
         echo '<p/>';
85
-        echo _('To check eduroam database specification see') . 
86
-                ' <a target="_blank" href="https://monitor.eduroam.org/eduroam-database/v2/docs/eduroam-database-ver30112021.pdf">' .
87
-                _('this document') . '</a>.<p/>';
85
+        echo _('To check eduroam database specification see'). 
86
+                ' <a target="_blank" href="https://monitor.eduroam.org/eduroam-database/v2/docs/eduroam-database-ver30112021.pdf">'.
87
+                _('this document').'</a>.<p/>';
88 88
         echo _('If you cannot find your institution on this list it means that this institiution is not present in your upstream data.');        
89 89
         echo '<p/>';
90 90
         $allAuthorizedFeds = $user->getAttributes("user:fedadmin");
@@ -93,11 +93,11 @@  discard block
 block discarded – undo
93 93
         ?>
94 94
         
95 95
     <select name="INST-list" id="INST-list">
96
-        <option value=""><?php echo _('---PLEASE CHOOSE---');?></option>
96
+        <option value=""><?php echo _('---PLEASE CHOOSE---'); ?></option>
97 97
         <?php 
98 98
         $instdata = array();
99 99
         foreach ($extInsts as $iid => $oneInst) {
100
-            print '<option value="' . $iid . '">' . $oneInst['name'] . '</option>';
100
+            print '<option value="'.$iid.'">'.$oneInst['name'].'</option>';
101 101
             $instdata[$iid] = array();
102 102
             $instdata[$iid]['name'] = $oneInst['name'];   
103 103
             $instdata[$iid]['type'] = _('no data');
@@ -111,22 +111,22 @@  discard block
 block discarded – undo
111 111
             $contactdata = '';
112 112
             foreach ($oneInst['contacts'] as $oneContact) {
113 113
                 if ($contactdata != '') {
114
-                    $contactdata = $contactdata . '<br>';
114
+                    $contactdata = $contactdata.'<br>';
115 115
                 }
116 116
                 if ($oneContact['name']) {
117
-                    $contactdata = $contactdata . $oneContact['name'];
117
+                    $contactdata = $contactdata.$oneContact['name'];
118 118
                 }
119 119
                 if ($contactdata != '') {
120
-                    $contactdata = $contactdata . '<br>';
120
+                    $contactdata = $contactdata.'<br>';
121 121
                 }
122 122
                 if ($oneContact['mail']) {
123
-                    $contactdata = $contactdata . $oneContact['mail'];
123
+                    $contactdata = $contactdata.$oneContact['mail'];
124 124
                 }
125 125
                 if ($contactdata != '') {
126
-                    $contactdata = $contactdata . '<br>';
126
+                    $contactdata = $contactdata.'<br>';
127 127
                 }
128 128
                 if ($oneContact['phone']) {
129
-                    $contactdata = $contactdata . $oneContact['phone'];
129
+                    $contactdata = $contactdata.$oneContact['phone'];
130 130
                 }        
131 131
             }
132 132
             if ($contactdata == '') {
@@ -145,11 +145,11 @@  discard block
 block discarded – undo
145 145
             var instts = [];
146 146
             <?php
147 147
             foreach (array_keys($instdata) as $iid) {
148
-                echo "instservers['" . $iid . "']='" . $instdata[$iid]['servers']. "';\n";
149
-                echo "instname['" . $iid . "']='" . $instdata[$iid]['name']. "';\n";
150
-                echo "insttype['" . $iid . "']='" . $instdata[$iid]['type']. "';\n";
151
-                echo "instcontact['" . $iid . "']='" . $instdata[$iid]['contacts']. "';\n";
152
-                echo "instts['" . $iid . "']='" . $instdata[$iid]['ts']. "';\n";
148
+                echo "instservers['".$iid."']='".$instdata[$iid]['servers']."';\n";
149
+                echo "instname['".$iid."']='".$instdata[$iid]['name']."';\n";
150
+                echo "insttype['".$iid."']='".$instdata[$iid]['type']."';\n";
151
+                echo "instcontact['".$iid."']='".$instdata[$iid]['contacts']."';\n";
152
+                echo "instts['".$iid."']='".$instdata[$iid]['ts']."';\n";
153 153
             }
154 154
             ?>
155 155
             $(document).ready(function(){
@@ -171,18 +171,18 @@  discard block
 block discarded – undo
171 171
     <div id="instdata_area">
172 172
         <table>
173 173
             <tr><th align="left" width="350">
174
-                    <?php echo _('Name');?>
174
+                    <?php echo _('Name'); ?>
175 175
                 </th><th align="left" width="100">
176
-                    <?php echo _('Type');?>
176
+                    <?php echo _('Type'); ?>
177 177
                 </th>
178 178
                 <th align="left" width="200">
179
-                    <?php echo _('Servers');?>
179
+                    <?php echo _('Servers'); ?>
180 180
                 </th>
181 181
                 <th align="left" width="200">
182
-                    <?php echo _('Contact data');?>
182
+                    <?php echo _('Contact data'); ?>
183 183
                 </th>
184 184
                 <th align="left" width="100">
185
-                    <?php echo _('Timestamp');?>
185
+                    <?php echo _('Timestamp'); ?>
186 186
                 </th>
187 187
             </tr>
188 188
             <tr id="toshow"></tr>
Please login to merge, or discard this patch.