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