Test Failed
Push — master ( 2fef99...0fc838 )
by Stefan
40:28 queued 33:14
created
web/admin/edit_profile_result.php 1 patch
Spacing   +22 added lines, -22 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();
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
             echo $deco->pageheader(sprintf(_("%s: Edit Profile - Result"), \config\Master::APPEARANCE['productname']), "ADMIN-IDP");
53 53
         } else {
54 54
             $profile = $my_inst->newProfile(core\AbstractProfile::PROFILETYPE_RADIUS);
55
-            $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP " . $my_inst->identifier . " - Profile created");
55
+            $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP ".$my_inst->identifier." - Profile created");
56 56
             echo $deco->pageheader(sprintf(_("%s: Profile wizard (step 3 completed)"), \config\Master::APPEARANCE['productname']), "ADMIN-IDP");
57 57
         }
58 58
         if (!$profile instanceof \core\ProfileRADIUS) {
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
             $uiElements = new web\lib\admin\UIElements();
114 114
             // set realm info, if submitted
115 115
             if ($realm !== FALSE) {
116
-                $profile->setRealm($anonLocal . "@" . $realm);
116
+                $profile->setRealm($anonLocal."@".$realm);
117 117
                 echo $uiElements->boxOkay(sprintf(_("Realm: <strong>%s</strong>"), $realm));
118 118
             } else {
119 119
                 $profile->setRealm("");
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
                     echo $uiElements->boxError(_("Realm check username cannot be configured: realm is missing!"));
137 137
                 } else {
138 138
                     $profile->setRealmcheckUser(true, $checkuser_name);
139
-                    echo $uiElements->boxOkay(sprintf(_("Special username for realm check is <strong>%s</strong>, the value is <strong>%s</strong>"), _("ON"), $checkuser_name . "@" . $realm));
139
+                    echo $uiElements->boxOkay(sprintf(_("Special username for realm check is <strong>%s</strong>, the value is <strong>%s</strong>"), _("ON"), $checkuser_name."@".$realm));
140 140
                 }
141 141
             } else {
142 142
                 $profile->setRealmCheckUser(false);
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
                 } else {
150 150
                     $profile->setInputVerificationPreference($verify, $hint);
151 151
                     if ($hint !== FALSE) {
152
-                        $extratext = " " . sprintf(_("and the input field will be prefilled with '<strong>@%s</strong>'."), $realm);
152
+                        $extratext = " ".sprintf(_("and the input field will be prefilled with '<strong>@%s</strong>'."), $realm);
153 153
                     } else {
154 154
                         $extratext = ".";
155 155
                     }
@@ -186,29 +186,29 @@  discard block
 block discarded – undo
186 186
                 echo $uiElements->boxOkay(_("Redirection is <strong>OFF</strong>"));
187 187
             }
188 188
 
189
-            $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile " . $profile->identifier . " - attributes changed");
189
+            $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile ".$profile->identifier." - attributes changed");
190 190
 
191 191
             foreach (\core\common\EAP::listKnownEAPTypes() as $a) {
192 192
                 if ($a->getIntegerRep() == \core\common\EAP::INTEGER_SILVERBULLET) { // do not allow adding silverbullet via the backdoor
193 193
                     continue;
194 194
                 }
195
-                if (isset($_POST[$a->getPrintableRep()]) && isset($_POST[$a->getPrintableRep() . "-priority"]) && is_numeric($_POST[$a->getPrintableRep() . "-priority"])) {
196
-                    $priority = (int) $_POST[$a->getPrintableRep() . "-priority"];
195
+                if (isset($_POST[$a->getPrintableRep()]) && isset($_POST[$a->getPrintableRep()."-priority"]) && is_numeric($_POST[$a->getPrintableRep()."-priority"])) {
196
+                    $priority = (int) $_POST[$a->getPrintableRep()."-priority"];
197 197
                     // add EAP type to profile as requested, but ...
198 198
                     $profile->addSupportedEapMethod($a, $priority);
199
-                    $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile " . $profile->identifier . " - supported EAP types changed");
199
+                    $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile ".$profile->identifier." - supported EAP types changed");
200 200
                     // see if we can enable the EAP type, or if info is missing
201 201
                     $eapcompleteness = $profile->isEapTypeDefinitionComplete($a);
202 202
                     if ($eapcompleteness === true) {
203
-                        echo $uiElements->boxOkay(_("Supported EAP Type: ") . "<strong>" . $a->getPrintableRep() . "</strong>");
203
+                        echo $uiElements->boxOkay(_("Supported EAP Type: ")."<strong>".$a->getPrintableRep()."</strong>");
204 204
                     } else {
205 205
                         $warntext = "";
206 206
                         if (is_array($eapcompleteness)) {
207 207
                             foreach ($eapcompleteness as $item) {
208
-                                $warntext .= "<strong>" . $uiElements->displayName($item) . "</strong> ";
208
+                                $warntext .= "<strong>".$uiElements->displayName($item)."</strong> ";
209 209
                             }
210 210
                         }
211
-                        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."));
211
+                        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."));
212 212
                     }
213 213
                 }
214 214
             }
@@ -218,23 +218,23 @@  discard block
 block discarded – undo
218 218
             if (count($significantChanges) > 0) {
219 219
                 $myInstOriginal = new \core\IdP($profile->institution);
220 220
                 // send a notification/alert mail to someone we know is in charge
221
-                $text = _("To whom it may concern,") . "\n\n";
221
+                $text = _("To whom it may concern,")."\n\n";
222 222
                 /// were made to the *Identity Provider* *LU* / integer number of IdP / (previously known as) Name
223
-                $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";
223
+                $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";
224 224
                 if (isset($significantChanges[\core\AbstractProfile::CA_CLASH_ADDED])) {
225
-                    $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";
226
-                    $text .= $significantChanges[\core\AbstractProfile::CA_CLASH_ADDED] . "\n\n";
225
+                    $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";
226
+                    $text .= $significantChanges[\core\AbstractProfile::CA_CLASH_ADDED]."\n\n";
227 227
                 }
228 228
                 if (isset($significantChanges[\core\AbstractProfile::CA_ADDED])) {
229 229
                     $text .= _("A new trusted root CA was added. The details are below:\n\n");
230
-                    $text .= $significantChanges[\core\AbstractProfile::CA_ADDED] . "\n\n";
230
+                    $text .= $significantChanges[\core\AbstractProfile::CA_ADDED]."\n\n";
231 231
                 }
232 232
                 if (isset($significantChanges[\core\AbstractProfile::SERVERNAME_ADDED])) {
233
-                    $text .= _("A new acceptable server name for the authentication server was added. The details are below:") . "\n\n";
234
-                    $text .= $significantChanges[\core\AbstractProfile::SERVERNAME_ADDED] . "\n\n";
233
+                    $text .= _("A new acceptable server name for the authentication server was added. The details are below:")."\n\n";
234
+                    $text .= $significantChanges[\core\AbstractProfile::SERVERNAME_ADDED]."\n\n";
235 235
                 }
236
-                $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";
237
-                $text .= _("Greetings, ") . "\n\n" . \config\Master::APPEARANCE['productname_long'];
236
+                $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";
237
+                $text .= _("Greetings, ")."\n\n".\config\Master::APPEARANCE['productname_long'];
238 238
                 // (currently, send hard-wired to NRO - future: for linked insts, check eduroam DBv2 and send to registered admins directly)
239 239
                 $fed = new core\Federation($myInstOriginal->federation);
240 240
                 foreach ($fed->listFederationAdmins() as $id) {
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
         <?php
254 254
         if (count($reloadedProfile->getEapMethodsinOrderOfPreference(1)) > 0) {
255 255
             echo "<form method='post' action='overview_installers.php?inst_id=$my_inst->identifier&profile_id=$reloadedProfile->identifier' accept-charset='UTF-8'>
256
-        <button type='submit'>" . _("Continue to Installer Fine-Tuning and Download") . "</button>
256
+        <button type='submit'>"._("Continue to Installer Fine-Tuning and Download")."</button>
257 257
     </form>";
258 258
         }
259 259
         echo $deco->footer();
Please login to merge, or discard this patch.