Test Failed
Push — release_2_1 ( ee5593...b2e811 )
by Tomasz
13:15 queued 27s
created
web/admin/css/wizard.css.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
 // we need to know if we are serving a RTL language so we can flip some heading
22 22
 // items
23 23
 header("Content-Type:text/css");
24
-require_once dirname(dirname(dirname(__DIR__))) . "/config/_config.php";
24
+require_once dirname(dirname(dirname(__DIR__)))."/config/_config.php";
25 25
 $langInstance = new core\common\Language();
26 26
 $start = $langInstance->rtl ? "right" : "left";
27 27
 $end = $langInstance->rtl ? "left" : "right";
Please login to merge, or discard this patch.
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   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -64,80 +64,80 @@  discard block
 block discarded – undo
64 64
     
65 65
     private function setMessages() {
66 66
         // SUPPORT
67
-        $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>";
67
+        $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>";
68 68
         if (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_RADIUS'] == "LOCAL") {
69
-            $h .= "<p>" .
70
-            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>" .
71
-            "<p>" .
72
-            _("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>";
69
+            $h .= "<p>".
70
+            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>".
71
+            "<p>".
72
+            _("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>";
73 73
             if (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_SILVERBULLET'] == "LOCAL") {
74
-                $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>";
74
+                $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>";
75 75
             }
76 76
         } elseif (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_SILVERBULLET'] == "LOCAL") {
77
-            $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>";
77
+            $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>";
78 78
         }
79 79
         $this->helpMessage['support'] = $h;
80 80
 
81 81
         // MEDIA
82
-        $h = "<p>" .
83
-            sprintf(_("In this section, you define on which media %s should be configured on user devices."), \config\ConfAssistant::CONSORTIUM['display_name']) . "</p><ul>";
82
+        $h = "<p>".
83
+            sprintf(_("In this section, you define on which media %s should be configured on user devices."), \config\ConfAssistant::CONSORTIUM['display_name'])."</p><ul>";
84 84
         $h .= "<li>";
85
-        $h .= "<strong>" . ( count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0 ? _("Additional SSIDs:") : _("SSIDs:")) . " </strong>";
85
+        $h .= "<strong>".(count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0 ? _("Additional SSIDs:") : _("SSIDs:"))." </strong>";
86 86
         if (count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0) {
87 87
             $ssidlist = "";
88 88
             foreach (\config\ConfAssistant::CONSORTIUM['ssid'] as $ssid) {
89
-                $ssidlist .= ", '<strong>" . $ssid . "</strong>'";
89
+                $ssidlist .= ", '<strong>".$ssid."</strong>'";
90 90
             }
91 91
             $ssidlist = substr($ssidlist, 2);
92 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"));
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.");
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 98
          $h .= "</li>";
99 99
 
100 100
         $h .= "<li>";
101
-        $h .= "<strong>" . ( count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0 ? _("Additional Hotspot 2.0 / Passpoint Consortia:") : _("Hotspot 2.0 / Passpoint Consortia:")) . " </strong>";
101
+        $h .= "<strong>".(count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0 ? _("Additional Hotspot 2.0 / Passpoint Consortia:") : _("Hotspot 2.0 / Passpoint Consortia:"))." </strong>";
102 102
         if (count(\config\ConfAssistant::CONSORTIUM['interworking-consortium-oi']) > 0) {
103 103
             $consortiumlist = "";
104 104
             foreach (\config\ConfAssistant::CONSORTIUM['interworking-consortium-oi'] as $oi) {
105
-                $consortiumlist .= ", '<strong>" . $oi . "</strong>'";
105
+                $consortiumlist .= ", '<strong>".$oi."</strong>'";
106 106
             }
107 107
             $consortiumlist = substr($consortiumlist, 2);
108 108
             $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);
109 109
 
110
-            $h .= "<br/>" . sprintf(_("It is also possible to define custom additional OIs with the option '%s' below."), $this->displayName("media:consortium_OI"));
110
+            $h .= "<br/>".sprintf(_("It is also possible to define custom additional OIs with the option '%s' below."), $this->displayName("media:consortium_OI"));
111 111
         } else {
112 112
             $h .= _("Please configure which Consortium OIs should be configured in the installers.");
113 113
         }
114 114
         $h .= "</li>";
115
-        $h .= "<li><strong>" . _("Support for wired IEEE 802.1X:") . " </strong>"
116
-        . _("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).") .
115
+        $h .= "<li><strong>"._("Support for wired IEEE 802.1X:")." </strong>"
116
+        . _("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).").
117 117
         "</li>";
118
-        $h .= "<li><strong>" . _("Removal of bootstrap/onboarding SSIDs:") . " </strong>"
118
+        $h .= "<li><strong>"._("Removal of bootstrap/onboarding SSIDs:")." </strong>"
119 119
         . _("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'.")
120 120
         . "</li>";
121 121
         $h .= "</ul>";
122 122
         $this->helpMessage['media'] = $h;
123 123
         
124 124
         // IDP GENERAL
125
-        $h = "<p>" .
126
-        _("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>".
125
+        $h = "<p>".
126
+        _("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>".
127 127
             "<ul>".
128
-                "<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>".
129
-                "<li>".sprintf(_("<strong>Name</strong>: The %s 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->nomenclatureParticipant) . "</li>".
128
+                "<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>".
129
+                "<li>".sprintf(_("<strong>Name</strong>: The %s 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->nomenclatureParticipant)."</li>".
130 130
             "</ul>";
131 131
         $this->helpMessage['idp_general'] = $h;
132 132
         
133 133
         // PROFILE GENERAL
134
-        $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>".
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
-            "<p>" . _("You can also tell us your RADIUS realm. ");
134
+        $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>".
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
+            "<p>"._("You can also tell us your RADIUS realm. ");
137 137
             if (\config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS'] !== NULL) {
138 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
-        $h .= _("It is required to enter the realm name if you want to support anonymous outer identities (see below).") . "</p>";
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
@@ -147,24 +147,24 @@  discard block
 block discarded – undo
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
154
-        $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>";
154
+        $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>";
155 155
         $this->helpMessage['eap_support'] = $h;
156 156
         
157 157
         // LOCATIOM
158
-        $h = "<p>" .
159
-                    _("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.") .
158
+        $h = "<p>".
159
+                    _("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.").
160 160
                     "</p>
161 161
                      <ul>" .
162 162
                     _("<li>Drag the marker in the map to your place, or</li>
163 163
 <li>enter your street address in the field below for lookup, or</li>
164
-<li>use the 'Locate Me!' button</li>") .
164
+<li>use the 'Locate Me!' button</li>").
165 165
                     "</ul>
166 166
                      <strong>" .
167
-                    _("We will use the coordinates as indicated by the marker for geolocation.") .
167
+                    _("We will use the coordinates as indicated by the marker for geolocation.").
168 168
                     "</strong>";
169 169
         $this->helpMessage['location'] = $h;
170 170
     }
Please login to merge, or discard this patch.
core/IdP.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -115,12 +115,12 @@  discard block
 block discarded – undo
115 115
         $this->name = $this->languageInstance->getLocalisedValue($this->getAttributes('general:instname'));
116 116
         $eligibility = $this->eligibility($instQuery->type);
117 117
         if (in_array(IdP::ELIGIBILITY_IDP, $eligibility) && in_array(IdP::ELIGIBILITY_SP, $eligibility)) {
118
-            $eligType = IdP::TYPE_IDPSP . "";
118
+            $eligType = IdP::TYPE_IDPSP."";
119 119
             $this->type = $eligType;
120 120
         } elseif (in_array(IdP::ELIGIBILITY_IDP, $eligibility)) {
121
-            $eligType = IdP::TYPE_IDP . "";
121
+            $eligType = IdP::TYPE_IDP."";
122 122
         } else {
123
-            $eligType = IdP::TYPE_SP . "";
123
+            $eligType = IdP::TYPE_SP."";
124 124
         }
125 125
         $this->type = $eligType;
126 126
         $this->loggerInstance->debug(4, "--- END Constructing new IdP object $instId ... ---\n");
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
      */
135 135
     public function listProfiles(bool $activeOnly = FALSE)
136 136
     {
137
-        $query = "SELECT profile_id FROM profile WHERE inst_id = $this->identifier" . ($activeOnly ? " AND showtime = 1" : "")." ORDER BY preference";
137
+        $query = "SELECT profile_id FROM profile WHERE inst_id = $this->identifier".($activeOnly ? " AND showtime = 1" : "")." ORDER BY preference";
138 138
         $allProfiles = $this->databaseHandle->exec($query);
139 139
         $returnarray = [];
140 140
         // SELECT -> resource, not boolean
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
             $returnarray[] = $oneProfile;
145 145
         }
146 146
 
147
-        $this->loggerInstance->debug(4, "listProfiles: " . /** @scrutinizer ignore-type */ print_r($returnarray, true));
147
+        $this->loggerInstance->debug(4, "listProfiles: "./** @scrutinizer ignore-type */ print_r($returnarray, true));
148 148
         return $returnarray;
149 149
     }
150 150
 
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
      */
157 157
     public function listDeployments(bool $activeOnly = FALSE)
158 158
     {
159
-        $query = "SELECT deployment_id FROM deployment WHERE inst_id = $this->identifier" . ($activeOnly ? " AND status = " . AbstractDeployment::ACTIVE : "");
159
+        $query = "SELECT deployment_id FROM deployment WHERE inst_id = $this->identifier".($activeOnly ? " AND status = ".AbstractDeployment::ACTIVE : "");
160 160
         $allDeployments = $this->databaseHandle->exec($query);
161 161
         $returnarray = [];
162 162
         // SELECT -> resource, not boolean
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
             $returnarray[] = new DeploymentManaged($this, $deploymentQuery->deployment_id);
165 165
         }
166 166
 
167
-        $this->loggerInstance->debug(4, "listDeployments: " . /** @scrutinizer ignore-type */ print_r($returnarray, true));
167
+        $this->loggerInstance->debug(4, "listDeployments: "./** @scrutinizer ignore-type */ print_r($returnarray, true));
168 168
         return $returnarray;
169 169
     }
170 170
 
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
         $redirectProfileIds = [];
191 191
         $allProfileLevels = $this->databaseHandle->exec("SELECT profile_id, sufficient_config + showtime AS maxlevel FROM profile WHERE inst_id = $this->identifier ORDER BY maxlevel DESC");
192 192
         // SELECT yields a resource, not a boolean
193
-        if ($allProfileLevels->num_rows == 0 ) {
193
+        if ($allProfileLevels->num_rows == 0) {
194 194
             return self::PROFILES_INCOMPLETE;
195 195
         }
196 196
         $allProfilesArray = $allProfileLevels->fetch_all(MYSQLI_ASSOC);
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
         $allProfiles = $this->databaseHandle->exec("SELECT MIN(openroaming) AS maxlevel FROM profile WHERE inst_id = $this->identifier");
219 219
         // SELECT yields a resource, not a boolean
220 220
         while ($res = mysqli_fetch_object(/** @scrutinizer ignore-type */ $allProfiles)) {
221
-            return (is_numeric($res->maxlevel) ? (int)$res->maxlevel : AbstractProfile::OVERALL_OPENROAMING_LEVEL_NO ); // insts without profiles should get a "NO"
221
+            return (is_numeric($res->maxlevel) ? (int) $res->maxlevel : AbstractProfile::OVERALL_OPENROAMING_LEVEL_NO); // insts without profiles should get a "NO"
222 222
         }
223 223
         return AbstractProfile::OVERALL_OPENROAMING_LEVEL_NO;
224 224
     }
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
                 case AbstractProfile::PROFILETYPE_SILVERBULLET:
350 350
                     $theProfile = new ProfileSilverbullet($identifier, $this);
351 351
                     $theProfile->addSupportedEapMethod(new \core\common\EAP(\core\common\EAP::EAPTYPE_SILVERBULLET), 1);
352
-                    $theProfile->setRealm($this->identifier . "-" . $theProfile->identifier . "." . strtolower($this->federation) . strtolower(\config\ConfAssistant::SILVERBULLET['realm_suffix']));
352
+                    $theProfile->setRealm($this->identifier."-".$theProfile->identifier.".".strtolower($this->federation).strtolower(\config\ConfAssistant::SILVERBULLET['realm_suffix']));
353 353
                     return $theProfile;
354 354
                 default:
355 355
                     throw new Exception("This type of profile is unknown and can not be added.");
@@ -492,7 +492,7 @@  discard block
 block discarded – undo
492 492
     public function getExternalDBId()
493 493
     {
494 494
         if (\config\ConfAssistant::CONSORTIUM['name'] == "eduroam" && isset(\config\ConfAssistant::CONSORTIUM['deployment-voodoo']) && \config\ConfAssistant::CONSORTIUM['deployment-voodoo'] == "Operations Team") { // SW: APPROVED
495
-            $idQuery = $this->databaseHandle->exec("SELECT external_db_id FROM institution WHERE inst_id = $this->identifier AND external_db_syncstate = " . self::EXTERNAL_DB_SYNCSTATE_SYNCED);
495
+            $idQuery = $this->databaseHandle->exec("SELECT external_db_id FROM institution WHERE inst_id = $this->identifier AND external_db_syncstate = ".self::EXTERNAL_DB_SYNCSTATE_SYNCED);
496 496
             // SELECT -> it's a resource, not a boolean
497 497
             if (mysqli_num_rows(/** @scrutinizer ignore-type */ $idQuery) == 0) {
498 498
                 return FALSE;
@@ -558,16 +558,16 @@  discard block
 block discarded – undo
558 558
         }
559 559
         foreach ($baseline as $lang => $value) {
560 560
             if (!key_exists($lang, $newvalues)) {
561
-                $retval[IdP::INSTNAME_CHANGED] .= "#[Language " . strtoupper($lang) . "] DELETED";
561
+                $retval[IdP::INSTNAME_CHANGED] .= "#[Language ".strtoupper($lang)."] DELETED";
562 562
             } else {
563 563
                 if ($value != $newvalues[$lang]) {
564
-                    $retval[IdP::INSTNAME_CHANGED] .= "#[Language " . strtoupper($lang) . "] CHANGED from '" . $baseline[$lang] . "' to '" . $newvalues[$lang] . "'";
564
+                    $retval[IdP::INSTNAME_CHANGED] .= "#[Language ".strtoupper($lang)."] CHANGED from '".$baseline[$lang]."' to '".$newvalues[$lang]."'";
565 565
                 }
566 566
             }
567 567
         }
568 568
         foreach ($newvalues as $lang => $value) {
569 569
             if (!key_exists($lang, $baseline)) {
570
-                $retval[IdP::INSTNAME_CHANGED] .= "#[Language " . strtoupper($lang) . "] ADDED as '" . $value . "'";
570
+                $retval[IdP::INSTNAME_CHANGED] .= "#[Language ".strtoupper($lang)."] ADDED as '".$value."'";
571 571
             }
572 572
         }
573 573
         return $retval;
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/admin/action_req_certificate.php 2 patches
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
     /* Messages */
92 92
     $messages = [
93 93
     'WRONG_SUBJECT' => _('Submitted Certificate Signing Request contains subject field that does not start with ') . 
94
-                       $subject_prefix  . '<br>' . _("See CSR generation rules below."),
94
+                        $subject_prefix  . '<br>' . _("See CSR generation rules below."),
95 95
     'WRONG_CRL' => _('Submitted Certificate Signing Request is broken - unable to extract the public key from CSR')
96 96
     ];
97 97
     $settings = array();
@@ -171,16 +171,16 @@  discard block
 block discarded – undo
171 171
                     $ou = $serverInfo["names"][$langInstance->getLang()];
172 172
                 }
173 173
                 print($ou);
174
-		$modou = 0;
175
-		if (str_contains($ou, ',')) {
176
-		    $modou = 1;
177
-		    $ou = str_replace(",", "/,", $ou);
178
-		}
179
-		$ou = preg_replace('/\s+/', ' ',  $ou);
180
-		if (strlen($ou) >= 64) {
181
-			$ou = substr($ou, 0, 64);
182
-			$modou += 2;
183
-		}
174
+        $modou = 0;
175
+        if (str_contains($ou, ',')) {
176
+            $modou = 1;
177
+            $ou = str_replace(",", "/,", $ou);
178
+        }
179
+        $ou = preg_replace('/\s+/', ' ',  $ou);
180
+        if (strlen($ou) >= 64) {
181
+            $ou = substr($ou, 0, 64);
182
+            $modou += 2;
183
+        }
184 184
                 $DN[] = "O=".iconv('UTF-8', 'ASCII//TRANSLIT', $ou);
185 185
                 $serverList = explode(",", $serverInfo["servers"]);
186 186
                 $DN[] = "CN=" . $serverList[0];
@@ -205,20 +205,20 @@  discard block
 block discarded – undo
205 205
         echo "<p style='font-size: large'>" . _("Requesting a certificate with the following properties");
206 206
         echo "<ul>";
207 207
         echo "<li>" . _("Policy OIDs: ") . implode(", ", $policies) . "</li>";
208
-	echo "<li>" . _("Distinguished Name: ") . implode(", ", $DN);
209
-	if ($modou > 0) {
210
-	    echo " (";
208
+    echo "<li>" . _("Distinguished Name: ") . implode(", ", $DN);
209
+    if ($modou > 0) {
210
+        echo " (";
211 211
             echo _("Organization field adjusted"). ': ';
212
-	    $desc = array();
213
-	    if ($modou >= 2) {
214
-		$desc[] = _("truncated to 64 chars");
215
-	    }
216
-	    if ($modou == 1 || $modou == 3) {
217
-		$desc[] = _("commas escaped");
212
+        $desc = array();
213
+        if ($modou >= 2) {
214
+        $desc[] = _("truncated to 64 chars");
215
+        }
216
+        if ($modou == 1 || $modou == 3) {
217
+        $desc[] = _("commas escaped");
218 218
             }
219
-	    echo implode(', ', $desc);
220
-	    echo ")";
221
-	}
219
+        echo implode(', ', $desc);
220
+        echo ")";
221
+    }
222 222
         echo "</li>";
223 223
         echo "<li>" . _("subjectAltName:DNS : ") . implode(", ", $serverList) . "</li>";
224 224
         echo "<li>" . _("Requester Contact Details: ") . $firstName . " &lt;" . $firstMail . "&gt;" . "</li>";
@@ -360,7 +360,7 @@  discard block
 block discarded – undo
360 360
         <?php if (empty($policies)) {?>
361 361
         eduroam IdP/SP
362 362
         <?php } else {
363
-           echo implode(', ', $policies); 
363
+            echo implode(', ', $policies); 
364 364
         }?>
365 365
         </span>
366 366
         </h3>
Please login to merge, or discard this patch.
Spacing   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 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
 $auth = new \web\lib\admin\Authentication();
32 32
 $deco = new \web\lib\admin\PageDecoration();
33 33
 $validator = new \web\lib\common\InputValidation();
@@ -90,23 +90,23 @@  discard block
 block discarded – undo
90 90
     $subject_prefix = implode(', ', array_reverse($DN));
91 91
     /* Messages */
92 92
     $messages = [
93
-    'WRONG_SUBJECT' => _('Submitted Certificate Signing Request contains subject field that does not start with ') . 
94
-                       $subject_prefix  . '<br>' . _("See CSR generation rules below."),
93
+    'WRONG_SUBJECT' => _('Submitted Certificate Signing Request contains subject field that does not start with '). 
94
+                       $subject_prefix.'<br>'._("See CSR generation rules below."),
95 95
     'WRONG_CRL' => _('Submitted Certificate Signing Request is broken - unable to extract the public key from CSR')
96 96
     ];
97 97
     $settings = array();
98
-    if  (isset($_SESSION['CSR_ERRORS']) && $_SESSION['CSR_ERRORS'] != '') {
99
-        print '<h3 id="errorbox"><font color="red">'. $messages[$_SESSION['CSR_ERRORS']].'</font></h3>';
98
+    if (isset($_SESSION['CSR_ERRORS']) && $_SESSION['CSR_ERRORS'] != '') {
99
+        print '<h3 id="errorbox"><font color="red">'.$messages[$_SESSION['CSR_ERRORS']].'</font></h3>';
100 100
         unset($_SESSION['CSR_ERRORS']);
101 101
     }
102
-    if  (isset($_SESSION['FORM_SETTINGS']) && $_SESSION['FORM_SETTINGS'] != '') {
102
+    if (isset($_SESSION['FORM_SETTINGS']) && $_SESSION['FORM_SETTINGS'] != '') {
103 103
         $settings = $_SESSION['FORM_SETTINGS'];
104 104
         unset($_SESSION['FORM_SETTINGS']);
105 105
     }
106 106
     if (empty($settings) && isset($_POST['LEVEL'])) {
107 107
         $settings = array('LEVEL' => $_POST['LEVEL'], 'NRO-list' => $_POST['NRO-list'], 'INST-list' => $_POST['INST-list']);
108 108
     }
109
-    if  ( isset($_POST['requestcert']) && $_POST['requestcert'] == \web\lib\common\FormElements::BUTTON_SAVE) {
109
+    if (isset($_POST['requestcert']) && $_POST['requestcert'] == \web\lib\common\FormElements::BUTTON_SAVE) {
110 110
         // basic sanity checks before we hand this over to openssl
111 111
         $sanitisedCsr = $validator->string($_POST['CSR'] ?? "", TRUE);
112 112
         //print $sanitisedCsr; 
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
         $dc = array();
122 122
         if (!empty($subject_keys) && $subject_keys[0] == 'DC' && $subject['DC']) {
123 123
             foreach ($subject['DC'] as $v) {
124
-                $dc[] = 'DC=' . $v;
124
+                $dc[] = 'DC='.$v;
125 125
             }
126 126
             if ($DN !== array_reverse($dc)) {
127 127
                 $dc = array();
@@ -141,12 +141,12 @@  discard block
 block discarded – undo
141 141
                 }
142 142
                 $fed = $validator->existingFederation($_POST['NRO-list']);
143 143
                 $country = strtoupper($fed->tld);
144
-                $code = isset($cat->knownFederations[$country]['code']) ? $cat->knownFederations[$country]['code'] : $country ;
144
+                $code = isset($cat->knownFederations[$country]['code']) ? $cat->knownFederations[$country]['code'] : $country;
145 145
                 $DN[] = "C=$code";
146
-                $DN[] = "O=NRO of " . iconv('UTF-8', 'ASCII//TRANSLIT', $cat->knownFederations[$country]['name']);
146
+                $DN[] = "O=NRO of ".iconv('UTF-8', 'ASCII//TRANSLIT', $cat->knownFederations[$country]['name']);
147 147
                 $serverInfo = $externalDb->listExternalTlsServersFederation($fed->tld);
148 148
                 $serverList = explode(",", array_key_first($serverInfo));
149
-                $DN[] = "CN=" . $serverList[0];
149
+                $DN[] = "CN=".$serverList[0];
150 150
                 $policies[] = "eduroam IdP";
151 151
                 $policies[] = "eduroam SP";
152 152
                 $firstName = $serverInfo[array_key_first($serverInfo)][0]["name"];
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
                     throw new Exception(sprintf("Sorry: you are not %s admin for the %s requested in the form.", $uiElements->nomenclatureFed, $uiElements->nomenclatureFed));
163 163
                 }
164 164
                 $country = strtoupper($matches[1]);
165
-                $code = isset($cat->knownFederations[$country]['code']) ? $cat->knownFederations[$country]['code'] : $country ;
165
+                $code = isset($cat->knownFederations[$country]['code']) ? $cat->knownFederations[$country]['code'] : $country;
166 166
                 $DN[] = "C=$code";
167 167
                 $serverInfo = $extInsts[$_POST['INST-list']];
168 168
                 if (isset($serverInfo["names"]["en"])) {
@@ -176,14 +176,14 @@  discard block
 block discarded – undo
176 176
 		    $modou = 1;
177 177
 		    $ou = str_replace(",", "/,", $ou);
178 178
 		}
179
-		$ou = preg_replace('/\s+/', ' ',  $ou);
179
+		$ou = preg_replace('/\s+/', ' ', $ou);
180 180
 		if (strlen($ou) >= 64) {
181 181
 			$ou = substr($ou, 0, 64);
182 182
 			$modou += 2;
183 183
 		}
184 184
                 $DN[] = "O=".iconv('UTF-8', 'ASCII//TRANSLIT', $ou);
185 185
                 $serverList = explode(",", $serverInfo["servers"]);
186
-                $DN[] = "CN=" . $serverList[0];
186
+                $DN[] = "CN=".$serverList[0];
187 187
                 switch ($serverInfo["type"]) {
188 188
                     case core\IdP::TYPE_IDPSP:
189 189
                         $policies[] = "eduroam IdP";
@@ -202,13 +202,13 @@  discard block
 block discarded – undo
202 202
             default:
203 203
                 throw new Exception("Sorry: Unknown level of issuance requested.");
204 204
         }
205
-        echo "<p style='font-size: large'>" . _("Requesting a certificate with the following properties");
205
+        echo "<p style='font-size: large'>"._("Requesting a certificate with the following properties");
206 206
         echo "<ul>";
207
-        echo "<li>" . _("Policy OIDs: ") . implode(", ", $policies) . "</li>";
208
-	echo "<li>" . _("Distinguished Name: ") . implode(", ", $DN);
207
+        echo "<li>"._("Policy OIDs: ").implode(", ", $policies)."</li>";
208
+	echo "<li>"._("Distinguished Name: ").implode(", ", $DN);
209 209
 	if ($modou > 0) {
210 210
 	    echo " (";
211
-            echo _("Organization field adjusted"). ': ';
211
+            echo _("Organization field adjusted").': ';
212 212
 	    $desc = array();
213 213
 	    if ($modou >= 2) {
214 214
 		$desc[] = _("truncated to 64 chars");
@@ -220,8 +220,8 @@  discard block
 block discarded – undo
220 220
 	    echo ")";
221 221
 	}
222 222
         echo "</li>";
223
-        echo "<li>" . _("subjectAltName:DNS : ") . implode(", ", $serverList) . "</li>";
224
-        echo "<li>" . _("Requester Contact Details: ") . $firstName . " &lt;" . $firstMail . "&gt;" . "</li>";
223
+        echo "<li>"._("subjectAltName:DNS : ").implode(", ", $serverList)."</li>";
224
+        echo "<li>"._("Requester Contact Details: ").$firstName." &lt;".$firstMail."&gt;"."</li>";
225 225
         echo "</ul></p>";
226 226
 
227 227
         $vettedCsr = $validator->string($_POST['CSR'], true);
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
         $loggerInstance->debug(2, $DN, "CERT DN: ", "\n");
238 238
         // our certs can be good for max 5 years
239 239
         $fed->requestCertificate($user->identifier, $newCsrWithMeta, $expiryDays);
240
-        echo "<p>" . _("The certificate was requested.") . "</p>";
240
+        echo "<p>"._("The certificate was requested.")."</p>";
241 241
         ?>
242 242
         <form action="overview_certificates.php" method="GET">
243 243
             <button type="submit"><?php echo _("Back to Certificate Overview"); ?></button>
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
         switch (count($feds)) {
256 256
             case 0:
257 257
                 echo "<div>";
258
-                echo $uiElements->boxRemark("<strong>" . sprintf(_("None of your %s servers has complete information in the database."),$uiElements->nomenclatureFed)."</strong>" . _("At least the DNS names of TLS servers and a role-based contact mail address are required."));
258
+                echo $uiElements->boxRemark("<strong>".sprintf(_("None of your %s servers has complete information in the database."), $uiElements->nomenclatureFed)."</strong>"._("At least the DNS names of TLS servers and a role-based contact mail address are required."));
259 259
                 echo "</div>";
260 260
                 break;
261 261
             case 1:
@@ -263,22 +263,22 @@  discard block
 block discarded – undo
263 263
                 if (empty($settings) || (isset($settings['LEVEL']) && $settings['LEVEL'] == 'NRO')) {
264 264
                     echo ' checked';
265 265
                 }
266
-                echo '>' . sprintf(_("Certificate for %s") ." ", $uiElements->nomenclatureFed) . '</input>';
267
-                echo " <strong>" . $cat->knownFederations[$feds[0]->tld]['name'] . "</strong>";
268
-                echo '<input type="hidden" name="NRO-list" id="NRO-list" value="' . $feds[0]->tld . '"/>';
266
+                echo '>'.sprintf(_("Certificate for %s")." ", $uiElements->nomenclatureFed).'</input>';
267
+                echo " <strong>".$cat->knownFederations[$feds[0]->tld]['name']."</strong>";
268
+                echo '<input type="hidden" name="NRO-list" id="NRO-list" value="'.$feds[0]->tld.'"/>';
269 269
                 break;
270 270
             default:
271 271
                 echo '<input type="radio" name="LEVEL" id="NRO" value="NRO"';
272 272
                 if (empty($settings) || isset($settings['LEVEL']) && $settings['LEVEL'] == 'NRO') {
273 273
                     echo ' checked';
274 274
                 }
275
-                echo '>' . sprintf(_("Certificate for %s") ." ", $uiElements->nomenclatureFed) . '</input>';
275
+                echo '>'.sprintf(_("Certificate for %s")." ", $uiElements->nomenclatureFed).'</input>';
276 276
                 ?>
277 277
                 <select name="NRO-list" id="NRO-list">
278 278
                     <option value="notset"><?php echo _("---PLEASE CHOOSE---"); ?></option>
279 279
                     <?php
280 280
                     foreach ($feds as $oneFed) {
281
-                        echo '<option value="' . strtoupper($oneFed->tld) . '">' . $cat->knownFederations[$oneFed->tld]['name'] . "</option>";
281
+                        echo '<option value="'.strtoupper($oneFed->tld).'">'.$cat->knownFederations[$oneFed->tld]['name']."</option>";
282 282
                         #echo '<option value="AAA' . strtoupper($oneFed->tld) . '">' . $oneIdP["names"][$langObject->getLang()] . "</option>";
283 283
                         
284 284
                     }
@@ -291,18 +291,18 @@  discard block
 block discarded – undo
291 291
         <script>
292 292
             var instservers = [];
293 293
             var instpolicies = [];
294
-            var nroservers = '<?php echo str_replace(",", ", ", array_key_first($serverInfo));?>';
294
+            var nroservers = '<?php echo str_replace(",", ", ", array_key_first($serverInfo)); ?>';
295 295
         <?php 
296 296
         $allIdPs = [];
297 297
         foreach ($allAuthorizedFeds as $oneFed) {
298 298
             foreach ($externalDb->listExternalTlsServersInstitution($oneFed['value']) as $id => $oneIdP) {
299
-                $allIdPs[$id] = '[' . substr($id, 0, 2) . '] ' . $oneIdP["name"];            
300
-                echo "instservers['" . $id . "']='" . str_replace(",", ", ", $oneIdP["servers"]) . "';\n";
301
-                echo "instpolicies['" . $id . "']='";
299
+                $allIdPs[$id] = '['.substr($id, 0, 2).'] '.$oneIdP["name"];            
300
+                echo "instservers['".$id."']='".str_replace(",", ", ", $oneIdP["servers"])."';\n";
301
+                echo "instpolicies['".$id."']='";
302 302
                 if ($oneIdP["type"] == 'IdPSP') {
303 303
                     echo "eduroam IdP/SP";
304 304
                 } else {
305
-                    echo "eduroam " . $oneIdP["type"];
305
+                    echo "eduroam ".$oneIdP["type"];
306 306
                 }
307 307
                 echo "';\n";
308 308
             }
@@ -340,9 +340,9 @@  discard block
 block discarded – undo
340 340
             <option value="notset"><?php echo _("---PLEASE CHOOSE---"); ?></option>
341 341
 <?php
342 342
 foreach ($allIdPs as $id => $name) {
343
-    echo '<option value="' . $id . '"';
343
+    echo '<option value="'.$id.'"';
344 344
     if (isset($settings['INST-list']) && $settings['INST-list'] == $id) { echo ' selected'; }
345
-    echo '>' . $name . "</option>";
345
+    echo '>'.$name."</option>";
346 346
 }
347 347
 ?>
348 348
         </select>
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
             <?php 
352 352
             echo _('According to the above settings you will receive')
353 353
             ?>
354
-            <span id='certlevel'><?php echo _('NRO level certificate');?></span>
354
+            <span id='certlevel'><?php echo _('NRO level certificate'); ?></span>
355 355
             
356 356
         for server names:
357 357
         <span id='serversinfo'><?php echo str_replace(",", ", ", array_key_first($serverInfo)); ?></span>
@@ -367,7 +367,7 @@  discard block
 block discarded – undo
367 367
         <?php
368 368
         } else {
369 369
             echo "<div>";
370
-            echo $uiElements->boxRemark(sprintf(_("<strong>No organisation inside your %s has complete information in the database</strong>."." "._("At least the DNS names of TLS servers and a role-based contact mail address are required.")),$uiElements->nomenclatureFed), "No TLS capable org!", true);
370
+            echo $uiElements->boxRemark(sprintf(_("<strong>No organisation inside your %s has complete information in the database</strong>."." "._("At least the DNS names of TLS servers and a role-based contact mail address are required.")), $uiElements->nomenclatureFed), "No TLS capable org!", true);
371 371
             echo "</div>";
372 372
         }
373 373
         ?>
@@ -377,10 +377,10 @@  discard block
 block discarded – undo
377 377
         <h2><?php echo _("2. CSR generation"); ?></h2>
378 378
         <p>
379 379
         <?php 
380
-        echo _("The CSR subject field has to start with ") .'<b>' . $subject_prefix . '</b><br>';
380
+        echo _("The CSR subject field has to start with ").'<b>'.$subject_prefix.'</b><br>';
381 381
         echo _("One way to generate an acceptable certificate request is via this openssl one-liner:"); ?></p>
382 382
         <?php 
383
-        echo "<b>openssl req -new -newkey rsa:4096 -out test.csr -keyout test.key -subj /". implode('/', array_reverse($DN)) ."/C=XY/O=WillBeReplaced/CN=will.be.replaced</b>";
383
+        echo "<b>openssl req -new -newkey rsa:4096 -out test.csr -keyout test.key -subj /".implode('/', array_reverse($DN))."/C=XY/O=WillBeReplaced/CN=will.be.replaced</b>";
384 384
         ?>
385 385
         <h2><?php echo _("3. Submission"); ?></h2>
386 386
 <?php echo _("Please paste your CSR here:"); ?><br/><textarea name="CSR" id="CSR" rows="20" cols="85"/></textarea><br/>
Please login to merge, or discard this patch.
web/lib/admin/AbstractMap.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
         \core\common\Entity::intoThePotatoes();
138 138
         $wizard = new \web\lib\admin\Wizard($wizardMode);
139 139
         $retval = "<fieldset class='option_container_map'>
140
-        <legend><strong>" . _("Location") . "</strong></legend>";
140
+        <legend><strong>" . _("Location")."</strong></legend>";
141 141
         $retval .= $wizard->displayHelp("location");
142 142
         if ($additional) {
143 143
             $retval .= _("You can enter an <strong>additional</strong> location here. You can see the already defined locations in the 'General Information' field.");
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
      */
155 155
     protected function htmlPostEdit($allowDirectInput) {
156 156
         \core\common\Entity::intoThePotatoes();
157
-        $retval = "<br/>" . _("Latitude:") . " <input style='width:80px' name='geo_lat' id='geo_lat' " .($allowDirectInput ? "": "readonly"). ">" . _("Longitude:") . " <input name='geo_long' id='geo_long' style='width:80px' " .($allowDirectInput ? "": "readonly"). "></fieldset>";
157
+        $retval = "<br/>"._("Latitude:")." <input style='width:80px' name='geo_lat' id='geo_lat' ".($allowDirectInput ? "" : "readonly").">"._("Longitude:")." <input name='geo_long' id='geo_long' style='width:80px' ".($allowDirectInput ? "" : "readonly")."></fieldset>";
158 158
         \core\common\Entity::outOfThePotatoes();
159 159
         return $retval;
160 160
     }
Please login to merge, or discard this patch.