Test Setup Failed
Push — master ( b1b146...6aeb5f )
by Stefan
06:53
created
web/admin/edit_profile_result.php 1 patch
Spacing   +26 added lines, -26 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();
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
         }
44 44
         $profileToBeDel = $validator->existingProfile($_GET['profile_id'], $my_inst->identifier);
45 45
         $profileToBeDel->destroy();
46
-        $loggerInstance->writeAudit($_SESSION['user'], "DEL", "Profile " . $profileToBeDel->identifier);
46
+        $loggerInstance->writeAudit($_SESSION['user'], "DEL", "Profile ".$profileToBeDel->identifier);
47 47
         header("Location: overview_org.php?inst_id=$my_inst->identifier");
48 48
         exit;
49 49
     case web\lib\common\FormElements::BUTTON_SAVE:
@@ -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) {
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
             $uiElements = new web\lib\admin\UIElements();
121 121
             // set realm info, if submitted
122 122
             if ($realm !== FALSE) {
123
-                $profile->setRealm($anonLocal . "@" . $realm);
123
+                $profile->setRealm($anonLocal."@".$realm);
124 124
                 echo $uiElements->boxOkay(sprintf(_("Realm: <strong>%s</strong>"), $realm));
125 125
             } else {
126 126
                 $profile->setRealm("");
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
                     echo $uiElements->boxError(_("Realm check username cannot be configured: realm is missing!"));
147 147
                 } else {
148 148
                     $profile->setRealmcheckUser(true, $checkuser_name);
149
-                    echo $uiElements->boxOkay(sprintf(_("Special username for realm check is <strong>%s</strong>, the value is <strong>%s</strong>"), _("ON"), $checkuser_name . "@" . $realm));
149
+                    echo $uiElements->boxOkay(sprintf(_("Special username for realm check is <strong>%s</strong>, the value is <strong>%s</strong>"), _("ON"), $checkuser_name."@".$realm));
150 150
                 }
151 151
             } else {
152 152
                 $profile->setRealmCheckUser(false);
@@ -158,12 +158,12 @@  discard block
 block discarded – undo
158 158
                 $extratext = "";
159 159
                 if (!empty($realm)) {
160 160
                     if ($hint !== FALSE) {
161
-                        $extratext = " " . sprintf(_("The realm portion MUST be exactly '...@%s'."), $realm);
161
+                        $extratext = " ".sprintf(_("The realm portion MUST be exactly '...@%s'."), $realm);
162 162
                     } else {
163
-                        $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);
163
+                        $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);
164 164
                     }
165 165
                 }
166
-                echo $uiElements->boxOkay(_("Where possible, supplicants will verify that username inputs contain a syntactically correct realm.") . $extratext);
166
+                echo $uiElements->boxOkay(_("Where possible, supplicants will verify that username inputs contain a syntactically correct realm.").$extratext);
167 167
             } else {
168 168
                 $profile->setInputVerificationPreference(false, false);
169 169
             }
@@ -195,30 +195,30 @@  discard block
 block discarded – undo
195 195
                 echo $uiElements->boxOkay(_("Redirection is <strong>OFF</strong>"));
196 196
             }
197 197
 
198
-            $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile " . $profile->identifier . " - attributes changed");
198
+            $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile ".$profile->identifier." - attributes changed");
199 199
             // reload the profile to ingest new CA and server names if any; before checking EAP completeness
200 200
             $reloadedProfileNr1 = \core\ProfileFactory::instantiate($profile->identifier);
201 201
             foreach (\core\common\EAP::listKnownEAPTypes() as $a) {
202 202
                 if ($a->getIntegerRep() == \core\common\EAP::INTEGER_SILVERBULLET) { // do not allow adding silverbullet via the backdoor
203 203
                     continue;
204 204
                 }
205
-                if (isset($_POST[$a->getPrintableRep()]) && isset($_POST[$a->getPrintableRep() . "-priority"]) && is_numeric($_POST[$a->getPrintableRep() . "-priority"])) {
206
-                    $priority = (int) $_POST[$a->getPrintableRep() . "-priority"];
205
+                if (isset($_POST[$a->getPrintableRep()]) && isset($_POST[$a->getPrintableRep()."-priority"]) && is_numeric($_POST[$a->getPrintableRep()."-priority"])) {
206
+                    $priority = (int) $_POST[$a->getPrintableRep()."-priority"];
207 207
                     // add EAP type to profile as requested, but ...
208 208
                     $reloadedProfileNr1->addSupportedEapMethod($a, $priority);
209
-                    $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile " . $reloadedProfileNr1->identifier . " - supported EAP types changed");
209
+                    $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile ".$reloadedProfileNr1->identifier." - supported EAP types changed");
210 210
                     // see if we can enable the EAP type, or if info is missing
211 211
                     $eapcompleteness = $reloadedProfileNr1->isEapTypeDefinitionComplete($a);
212 212
                     if ($eapcompleteness === true) {
213
-                        echo $uiElements->boxOkay(_("Supported EAP Type: ") . "<strong>" . $a->getPrintableRep() . "</strong>");
213
+                        echo $uiElements->boxOkay(_("Supported EAP Type: ")."<strong>".$a->getPrintableRep()."</strong>");
214 214
                     } else {
215 215
                         $warntext = "";
216 216
                         if (is_array($eapcompleteness)) {
217 217
                             foreach ($eapcompleteness as $item) {
218
-                                $warntext .= "<strong>" . $uiElements->displayName($item) . "</strong> ";
218
+                                $warntext .= "<strong>".$uiElements->displayName($item)."</strong> ";
219 219
                             }
220 220
                         }
221
-                        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."));
221
+                        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."));
222 222
                     }
223 223
                 }
224 224
             }
@@ -229,23 +229,23 @@  discard block
 block discarded – undo
229 229
             if (count($significantChanges) > 0) {
230 230
                 $myInstOriginal = new \core\IdP($profile->institution);
231 231
                 // send a notification/alert mail to someone we know is in charge
232
-                $text = _("To whom it may concern,") . "\n\n";
232
+                $text = _("To whom it may concern,")."\n\n";
233 233
                 /// were made to the *Identity Provider* *LU* / integer number of IdP / (previously known as) Name
234
-                $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";
234
+                $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";
235 235
                 if (isset($significantChanges[\core\AbstractProfile::CA_CLASH_ADDED])) {
236
-                    $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";
237
-                    $text .= $significantChanges[\core\AbstractProfile::CA_CLASH_ADDED] . "\n\n";
236
+                    $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";
237
+                    $text .= $significantChanges[\core\AbstractProfile::CA_CLASH_ADDED]."\n\n";
238 238
                 }
239 239
                 if (isset($significantChanges[\core\AbstractProfile::CA_ADDED])) {
240
-                    $text .= _("A new trusted root CA was added. The details are below:") . "\n\n";
241
-                    $text .= $significantChanges[\core\AbstractProfile::CA_ADDED] . "\n\n";
240
+                    $text .= _("A new trusted root CA was added. The details are below:")."\n\n";
241
+                    $text .= $significantChanges[\core\AbstractProfile::CA_ADDED]."\n\n";
242 242
                 }
243 243
                 if (isset($significantChanges[\core\AbstractProfile::SERVERNAME_ADDED])) {
244
-                    $text .= _("A new acceptable server name for the authentication server was added. The details are below:") . "\n\n";
245
-                    $text .= $significantChanges[\core\AbstractProfile::SERVERNAME_ADDED] . "\n\n";
244
+                    $text .= _("A new acceptable server name for the authentication server was added. The details are below:")."\n\n";
245
+                    $text .= $significantChanges[\core\AbstractProfile::SERVERNAME_ADDED]."\n\n";
246 246
                 }
247
-                $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";
248
-                $text .= _("Greetings, ") . "\n\n" . \config\Master::APPEARANCE['productname_long'];
247
+                $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";
248
+                $text .= _("Greetings, ")."\n\n".\config\Master::APPEARANCE['productname_long'];
249 249
                 // (currently, send hard-wired to NRO - future: for linked insts, check eduroam DBv2 and send to registered admins directly)
250 250
                 $fed = new core\Federation($myInstOriginal->federation);
251 251
                 foreach ($fed->listFederationAdmins() as $id) {
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
         <?php
314 314
         if (count($reloadedProfileNr2->getEapMethodsinOrderOfPreference(1)) > 0) {
315 315
             echo "<form method='post' action='overview_installers.php?inst_id=$my_inst->identifier&profile_id=$reloadedProfileNr2->identifier' accept-charset='UTF-8'>
316
-        <button type='submit'>" . _("Continue to Installer Fine-Tuning and Download") . "</button>
316
+        <button type='submit'>"._("Continue to Installer Fine-Tuning and Download")."</button>
317 317
     </form>";
318 318
         }
319 319
         echo $deco->footer();
Please login to merge, or discard this patch.
web/admin/overview_installers.php 1 patch
Spacing   +14 added lines, -14 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(__DIR__)) . "/config/_config.php";
22
+require_once dirname(dirname(__DIR__))."/config/_config.php";
23 23
 
24 24
 $deco = new \web\lib\admin\PageDecoration();
25 25
 $validator = new \web\lib\common\InputValidation();
@@ -44,9 +44,9 @@  discard block
 block discarded – undo
44 44
 
45 45
     $preflist = $my_profile->getEapMethodsinOrderOfPreference();
46 46
     ?>
47
-    <h1><?php $tablecaption = sprintf(_("Device compatiblity matrix for %s of %s "), $profile_name, $inst_name); echo $tablecaption;?></h1>
47
+    <h1><?php $tablecaption = sprintf(_("Device compatiblity matrix for %s of %s "), $profile_name, $inst_name); echo $tablecaption; ?></h1>
48 48
     <table class="compatmatrix">
49
-        <caption><?php echo $tablecaption;?></caption>
49
+        <caption><?php echo $tablecaption; ?></caption>
50 50
         <tr>
51 51
             <th scope='col'></th>
52 52
             <th scope='col'><?php echo _("Device"); ?></th>
@@ -54,10 +54,10 @@  discard block
 block discarded – undo
54 54
             <?php
55 55
             foreach ($preflist as $method) {
56 56
                 $escapedMethod = $method->getIntegerRep();
57
-                echo "<th  scope='col' style='min-width:200px'>" . $method->getPrintableRep() . "<br/>
57
+                echo "<th  scope='col' style='min-width:200px'>".$method->getPrintableRep()."<br/>
58 58
                         <form method='post' action='inc/toggleRedirect.inc.php?inst_id=$my_inst->identifier&amp;profile_id=$my_profile->identifier' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'>
59 59
                         <input type='hidden' name='eaptype' value='$escapedMethod'>
60
-                        <button class='redirect' type='submit'>" . _("EAP-Type-specific options...") . "</button>
60
+                        <button class='redirect' type='submit'>"._("EAP-Type-specific options...")."</button>
61 61
                         </form></th>";
62 62
             }
63 63
             ?>
@@ -73,10 +73,10 @@  discard block
 block discarded – undo
73 73
         foreach (\devices\Devices::listDevices() as $index => $description) {
74 74
 
75 75
             echo "<tr>";
76
-            echo "<td align='center'><img src='../resources/images/vendorlogo/" . $description['group'] . ".png' alt='logo'></td><td>" . $description['display'] . "<br/>
76
+            echo "<td align='center'><img src='../resources/images/vendorlogo/".$description['group'].".png' alt='logo'></td><td>".$description['display']."<br/>
77 77
                         <form method='post' action='inc/toggleRedirect.inc.php?inst_id=$my_inst->identifier&amp;profile_id=$my_profile->identifier' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'>
78 78
                         <input type='hidden' name='device' value='$index'>
79
-                        <button class='redirect' type='submit'>" . _("Device-specific options...") . "</button>
79
+                        <button class='redirect' type='submit'>"._("Device-specific options...")."</button>
80 80
                         </form>
81 81
                         </td>";
82 82
             $factory = new \core\DeviceFactory($index);
@@ -85,16 +85,16 @@  discard block
 block discarded – undo
85 85
                 $footnotesForDevEapCombo = [];
86 86
                 $display_footnote = FALSE;
87 87
                 $langObject = new \core\common\Language();
88
-                $downloadform = "<form action='" . rtrim(dirname(dirname($_SERVER['SCRIPT_NAME'])), '/') . "/user/API.php?action=downloadInstaller&profile=$my_profile->identifier&lang=" . $langObject->getLang() . "' method='post' accept-charset='UTF-8'>
88
+                $downloadform = "<form action='".rtrim(dirname(dirname($_SERVER['SCRIPT_NAME'])), '/')."/user/API.php?action=downloadInstaller&profile=$my_profile->identifier&lang=".$langObject->getLang()."' method='post' accept-charset='UTF-8'>
89 89
                                        <input type='hidden' name='device' value='$index'/>
90 90
                                        <input type='hidden' name='generatedfor'  value='admin'/>
91
-                                       <button class='download'>" . sprintf(_("%s<br/>Installer"), config\ConfAssistant::CONSORTIUM['display_name']) . "</button>
91
+                                       <button class='download'>".sprintf(_("%s<br/>Installer"), config\ConfAssistant::CONSORTIUM['display_name'])."</button>
92 92
                                      ";
93 93
                 if (sizeof($my_profile->getAttributes("media:openroaming")) > 0 && $factory->device->options['openroaming'] == true) {
94
-                $downloadform .= "<form action='" . rtrim(dirname(dirname($_SERVER['SCRIPT_NAME'])), '/') . "/user/API.php?action=downloadInstaller&profile=$my_profile->identifier&openroaming=1&lang=" . $langObject->getLang() . "' method='post' accept-charset='UTF-8'>
94
+                $downloadform .= "<form action='".rtrim(dirname(dirname($_SERVER['SCRIPT_NAME'])), '/')."/user/API.php?action=downloadInstaller&profile=$my_profile->identifier&openroaming=1&lang=".$langObject->getLang()."' method='post' accept-charset='UTF-8'>
95 95
                                        <input type='hidden' name='device' value='$index'/>
96 96
                                        <input type='hidden' name='generatedfor'  value='admin'/>
97
-                                       <button class='download'>" . sprintf(_("%s + OpenRoaming<br/>Installer"), config\ConfAssistant::CONSORTIUM['display_name']) . "</button>
97
+                                       <button class='download'>".sprintf(_("%s + OpenRoaming<br/>Installer"), config\ConfAssistant::CONSORTIUM['display_name'])."</button>
98 98
                                      ";
99 99
                 }
100 100
                 
@@ -159,8 +159,8 @@  discard block
 block discarded – undo
159 159
     </table>
160 160
     <p><strong><?php $tablecaption2 = _("Legend:"); echo $tablecaption2; ?></strong></p>
161 161
     <table class="compatmatrix">
162
-        <caption><?php echo $tablecaption2;?></caption>
163
-        <tr><th scope="col"><?php echo _("Colour");?></th><th scope='col'><?php echo _("Meaning");?></th></tr>
162
+        <caption><?php echo $tablecaption2; ?></caption>
163
+        <tr><th scope="col"><?php echo _("Colour"); ?></th><th scope='col'><?php echo _("Meaning"); ?></th></tr>
164 164
         <tr><td class="compat_redirected">&nbsp;&nbsp;&nbsp;</td> <td><?php echo _("redirection is set"); ?></td></tr>
165 165
         <tr><td class="compat_default">&nbsp;&nbsp;&nbsp;</td>    <td><?php echo _("will be offered on download site"); ?></td></tr>
166 166
         <tr><td class="compat_secondary">&nbsp;&nbsp;&nbsp;</td>  <td><?php echo _("configured, but not preferred EAP type"); ?></td></tr>
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
     </table>
170 170
     <?php
171 171
     if (count($distinctFootnotes)) {
172
-        echo "<p><strong>" . _("Footnotes:") . "</strong></p><table>";
172
+        echo "<p><strong>"._("Footnotes:")."</strong></p><table>";
173 173
         foreach ($distinctFootnotes as $number => $text) {
174 174
             echo "<tr><td>($number) - </td><td>$text</td></tr>";
175 175
         }
Please login to merge, or discard this patch.
core/diag/RFC7585Tests.php 1 patch
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -197,7 +197,6 @@
 block discarded – undo
197 197
      * - RETVAL_NOTCONFIGURED; needs \config\Diagnostics::RADIUSTESTS['TLS-discoverytag']
198 198
      * - RETVAL_INVALID (at least one format error)
199 199
      * - RETVAL_OK (all fine)
200
-
201 200
      * @return int one of two RETVALs above
202 201
      */
203 202
     public function relevantNAPTRcompliance($discoverytag = \config\Diagnostics::RADIUSTESTS['TLS-discoverytag'])
Please login to merge, or discard this patch.