Passed
Push — release_2_0 ( c9a182...4d277c )
by Stefan
09:38
created
web/admin/edit_profile_result.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
  *          <base_url>/copyright.php after deploying the software
20 20
  */
21 21
 
22
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
22
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
23 23
 
24 24
 $auth = new \web\lib\admin\Authentication();
25 25
 $deco = new \web\lib\admin\PageDecoration();
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
             $profile = $validator->Profile($_GET['profile_id'], $my_inst->identifier);
57 57
         } else {
58 58
             $profile = $my_inst->newProfile(core\AbstractProfile::PROFILETYPE_RADIUS);
59
-            $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP " . $my_inst->identifier . " - Profile created");
59
+            $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP ".$my_inst->identifier." - Profile created");
60 60
         }
61 61
 
62 62
         if (!$profile instanceof \core\ProfileRADIUS) {
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
             $uiElements = new web\lib\admin\UIElements();
119 119
             // set realm info, if submitted
120 120
             if ($realm !== FALSE) {
121
-                $profile->setRealm($anonLocal . "@" . $realm);
121
+                $profile->setRealm($anonLocal."@".$realm);
122 122
                 echo $uiElements->boxOkay(sprintf(_("Realm: <strong>%s</strong>"), $realm));
123 123
             } else {
124 124
                 $profile->setRealm("");
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
                     echo $uiElements->boxError(_("Realm check username cannot be configured: realm is missing!"));
145 145
                 } else {
146 146
                     $profile->setRealmcheckUser(true, $checkuser_name);
147
-                    echo $uiElements->boxOkay(sprintf(_("Special username for realm check is <strong>%s</strong>, the value is <strong>%s</strong>"), _("ON"), $checkuser_name . "@" . $realm));
147
+                    echo $uiElements->boxOkay(sprintf(_("Special username for realm check is <strong>%s</strong>, the value is <strong>%s</strong>"), _("ON"), $checkuser_name."@".$realm));
148 148
                 }
149 149
             } else {
150 150
                 $profile->setRealmCheckUser(false);
@@ -156,12 +156,12 @@  discard block
 block discarded – undo
156 156
                 $extratext = "";
157 157
                 if (!empty($realm)) {
158 158
                     if ($hint !== FALSE) {
159
-                        $extratext = " " . sprintf(_("The realm portion MUST be exactly '...@%s'."), $realm);
159
+                        $extratext = " ".sprintf(_("The realm portion MUST be exactly '...@%s'."), $realm);
160 160
                     } else {
161
-                        $extratext = " " . sprintf(_("The realm portion MUST end with '%s' but sub-realms of it are allowed (i.e. 'user@%s' and 'user@<...>.%s' are both acceptable)."), $realm, $realm, $realm);
161
+                        $extratext = " ".sprintf(_("The realm portion MUST end with '%s' but sub-realms of it are allowed (i.e. 'user@%s' and 'user@<...>.%s' are both acceptable)."), $realm, $realm, $realm);
162 162
                     }
163 163
                 }
164
-                echo $uiElements->boxOkay(_("Where possible, supplicants will verify that username inputs contain a syntactically correct realm.") . $extratext);
164
+                echo $uiElements->boxOkay(_("Where possible, supplicants will verify that username inputs contain a syntactically correct realm.").$extratext);
165 165
             } else {
166 166
                 $profile->setInputVerificationPreference(false, false);
167 167
             }
@@ -193,29 +193,29 @@  discard block
 block discarded – undo
193 193
                 echo $uiElements->boxOkay(_("Redirection is <strong>OFF</strong>"));
194 194
             }
195 195
 
196
-            $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile " . $profile->identifier . " - attributes changed");
196
+            $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile ".$profile->identifier." - attributes changed");
197 197
 
198 198
             foreach (\core\common\EAP::listKnownEAPTypes() as $a) {
199 199
                 if ($a->getIntegerRep() == \core\common\EAP::INTEGER_SILVERBULLET) { // do not allow adding silverbullet via the backdoor
200 200
                     continue;
201 201
                 }
202
-                if (isset($_POST[$a->getPrintableRep()]) && isset($_POST[$a->getPrintableRep() . "-priority"]) && is_numeric($_POST[$a->getPrintableRep() . "-priority"])) {
203
-                    $priority = (int) $_POST[$a->getPrintableRep() . "-priority"];
202
+                if (isset($_POST[$a->getPrintableRep()]) && isset($_POST[$a->getPrintableRep()."-priority"]) && is_numeric($_POST[$a->getPrintableRep()."-priority"])) {
203
+                    $priority = (int) $_POST[$a->getPrintableRep()."-priority"];
204 204
                     // add EAP type to profile as requested, but ...
205 205
                     $profile->addSupportedEapMethod($a, $priority);
206
-                    $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile " . $profile->identifier . " - supported EAP types changed");
206
+                    $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile ".$profile->identifier." - supported EAP types changed");
207 207
                     // see if we can enable the EAP type, or if info is missing
208 208
                     $eapcompleteness = $profile->isEapTypeDefinitionComplete($a);
209 209
                     if ($eapcompleteness === true) {
210
-                        echo $uiElements->boxOkay(_("Supported EAP Type: ") . "<strong>" . $a->getPrintableRep() . "</strong>");
210
+                        echo $uiElements->boxOkay(_("Supported EAP Type: ")."<strong>".$a->getPrintableRep()."</strong>");
211 211
                     } else {
212 212
                         $warntext = "";
213 213
                         if (is_array($eapcompleteness)) {
214 214
                             foreach ($eapcompleteness as $item) {
215
-                                $warntext .= "<strong>" . $uiElements->displayName($item) . "</strong> ";
215
+                                $warntext .= "<strong>".$uiElements->displayName($item)."</strong> ";
216 216
                             }
217 217
                         }
218
-                        echo $uiElements->boxWarning(sprintf(_("Supported EAP Type: <strong>%s</strong> is missing required information %s !"), $a->getPrintableRep(), $warntext) . "<br/>" . _("The EAP type was added to the profile, but you need to complete the missing information before we can produce installers for you."));
218
+                        echo $uiElements->boxWarning(sprintf(_("Supported EAP Type: <strong>%s</strong> is missing required information %s !"), $a->getPrintableRep(), $warntext)."<br/>"._("The EAP type was added to the profile, but you need to complete the missing information before we can produce installers for you."));
219 219
                     }
220 220
                 }
221 221
             }
@@ -225,23 +225,23 @@  discard block
 block discarded – undo
225 225
             if (count($significantChanges) > 0) {
226 226
                 $myInstOriginal = new \core\IdP($profile->institution);
227 227
                 // send a notification/alert mail to someone we know is in charge
228
-                $text = _("To whom it may concern,") . "\n\n";
228
+                $text = _("To whom it may concern,")."\n\n";
229 229
                 /// were made to the *Identity Provider* *LU* / integer number of IdP / (previously known as) Name
230
-                $text .= sprintf(_("significant changes were made to a RADIUS deployment profile of the %s %s / %s / '%s'."), $ui->nomenclatureInst, strtoupper($myInstOriginal->federation), $myInstOriginal->identifier, $myInstOriginal->name) . "\n\n";
230
+                $text .= sprintf(_("significant changes were made to a RADIUS deployment profile of the %s %s / %s / '%s'."), $ui->nomenclatureInst, strtoupper($myInstOriginal->federation), $myInstOriginal->identifier, $myInstOriginal->name)."\n\n";
231 231
                 if (isset($significantChanges[\core\AbstractProfile::CA_CLASH_ADDED])) {
232
-                    $text .= _("WARNING! A new trusted root CA was added, and it has the exact same name as a previously existing root CA. This may (but does not necessarily) mean that this is an attempt to insert an unauthorised trust root by disguising as the genuine one. The details are below:") . "\n\n";
233
-                    $text .= $significantChanges[\core\AbstractProfile::CA_CLASH_ADDED] . "\n\n";
232
+                    $text .= _("WARNING! A new trusted root CA was added, and it has the exact same name as a previously existing root CA. This may (but does not necessarily) mean that this is an attempt to insert an unauthorised trust root by disguising as the genuine one. The details are below:")."\n\n";
233
+                    $text .= $significantChanges[\core\AbstractProfile::CA_CLASH_ADDED]."\n\n";
234 234
                 }
235 235
                 if (isset($significantChanges[\core\AbstractProfile::CA_ADDED])) {
236 236
                     $text .= _("A new trusted root CA was added. The details are below:")."\n\n";
237
-                    $text .= $significantChanges[\core\AbstractProfile::CA_ADDED] . "\n\n";
237
+                    $text .= $significantChanges[\core\AbstractProfile::CA_ADDED]."\n\n";
238 238
                 }
239 239
                 if (isset($significantChanges[\core\AbstractProfile::SERVERNAME_ADDED])) {
240
-                    $text .= _("A new acceptable server name for the authentication server was added. The details are below:") . "\n\n";
241
-                    $text .= $significantChanges[\core\AbstractProfile::SERVERNAME_ADDED] . "\n\n";
240
+                    $text .= _("A new acceptable server name for the authentication server was added. The details are below:")."\n\n";
241
+                    $text .= $significantChanges[\core\AbstractProfile::SERVERNAME_ADDED]."\n\n";
242 242
                 }
243
-                $text .= _("This mail is merely a cross-check because these changes can be security-relevant. If the change was expected, you do not need to take any action.") . "\n\n";
244
-                $text .= _("Greetings, ") . "\n\n" . CONFIG['APPEARANCE']['productname_long'];
243
+                $text .= _("This mail is merely a cross-check because these changes can be security-relevant. If the change was expected, you do not need to take any action.")."\n\n";
244
+                $text .= _("Greetings, ")."\n\n".CONFIG['APPEARANCE']['productname_long'];
245 245
                 // (currently, send hard-wired to NRO - future: for linked insts, check eduroam DBv2 and send to registered admins directly)
246 246
                 $fed = new core\Federation($myInstOriginal->federation);
247 247
                 foreach ($fed->listFederationAdmins() as $id) {
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
         <?php
261 261
         if (count($reloadedProfile->getEapMethodsinOrderOfPreference(1)) > 0) {
262 262
             echo "<form method='post' action='overview_installers.php?inst_id=$my_inst->identifier&profile_id=$reloadedProfile->identifier' accept-charset='UTF-8'>
263
-        <button type='submit'>" . _("Continue to Installer Fine-Tuning and Download") . "</button>
263
+        <button type='submit'>"._("Continue to Installer Fine-Tuning and Download")."</button>
264 264
     </form>";
265 265
         }
266 266
         echo $deco->footer();
Please login to merge, or discard this patch.
web/skins/modern/div_user_welcome.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -42,12 +42,12 @@
 block discarded – undo
42 42
     if (false /* display only if IdP has opted in to OpenRoaming - or maybe always, and only display pertinent ones from the set of consortia? */) {
43 43
         foreach ([
44 44
                 "eduroam" => [ 
45
-                      "TOU"  => "https://wiki.geant.org/display/H2eduroam/Terms+and+Conditions",
46
-                      "PRIV" => "https://www.eduroam.org/privacy/",
45
+                        "TOU"  => "https://wiki.geant.org/display/H2eduroam/Terms+and+Conditions",
46
+                        "PRIV" => "https://www.eduroam.org/privacy/",
47 47
                     ], 
48 48
                 "OpenRoaming" => [ 
49
-                      "TOU"  => "https://wballiance.com/openroaming/toc-2020/",
50
-                      "PRIV" => "https://wballiance.com/openroaming/privacy-policy-2020/",
49
+                        "TOU"  => "https://wballiance.com/openroaming/toc-2020/",
50
+                        "PRIV" => "https://wballiance.com/openroaming/privacy-policy-2020/",
51 51
                     ]
52 52
             ] as $consortium => $terms) {
53 53
             printf("<p>" . _("When connecting to %s hotspots, the following <a href='%s'>Terms and Conditions</a> and <a href='%s'>Privacy Notice</a> apply." . "</p>"), $consortium, $terms['TOU'], $terms['PRIV']);
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
                       "PRIV" => "https://wballiance.com/openroaming/privacy-policy-2020/",
51 51
                     ]
52 52
             ] as $consortium => $terms) {
53
-            printf("<p>" . _("When connecting to %s hotspots, the following <a href='%s'>Terms and Conditions</a> and <a href='%s'>Privacy Notice</a> apply." . "</p>"), $consortium, $terms['TOU'], $terms['PRIV']);
53
+            printf("<p>"._("When connecting to %s hotspots, the following <a href='%s'>Terms and Conditions</a> and <a href='%s'>Privacy Notice</a> apply."."</p>"), $consortium, $terms['TOU'], $terms['PRIV']);
54 54
         }
55 55
         // this would actually be a checkbox which grays out the actual download button until ACKed
56 56
         echo "<p>"._("I agree to be bound by these Terms and Conditions.")."</p>";
Please login to merge, or discard this patch.