Test Setup Failed
Push — master ( c22334...63dce7 )
by Stefan
07:00
created
web/admin/edit_profile_result.php 1 patch
Spacing   +28 added lines, -28 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) {
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
             $uiElements = new web\lib\admin\UIElements();
122 122
             // set realm info, if submitted
123 123
             if ($realm !== FALSE) {
124
-                $profile->setRealm($anonLocal . "@" . $realm);
124
+                $profile->setRealm($anonLocal."@".$realm);
125 125
                 echo $uiElements->boxOkay(sprintf(_("Realm: <strong>%s</strong>"), $realm));
126 126
             } else {
127 127
                 $profile->setRealm("");
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
                     echo $uiElements->boxError(_("Realm check username cannot be configured: realm is missing!"));
148 148
                 } else {
149 149
                     $profile->setRealmcheckUser(true, $checkuser_name);
150
-                    echo $uiElements->boxOkay(sprintf(_("Special username for realm check is <strong>%s</strong>, the value is <strong>%s</strong>"), _("ON"), $checkuser_name . "@" . $realm));
150
+                    echo $uiElements->boxOkay(sprintf(_("Special username for realm check is <strong>%s</strong>, the value is <strong>%s</strong>"), _("ON"), $checkuser_name."@".$realm));
151 151
                 }
152 152
             } else {
153 153
                 $profile->setRealmCheckUser(false);
@@ -159,12 +159,12 @@  discard block
 block discarded – undo
159 159
                 $extratext = "";
160 160
                 if (!empty($realm)) {
161 161
                     if ($hint !== FALSE) {
162
-                        $extratext = " " . sprintf(_("The realm portion MUST be exactly '...@%s'."), $realm);
162
+                        $extratext = " ".sprintf(_("The realm portion MUST be exactly '...@%s'."), $realm);
163 163
                     } else {
164
-                        $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
+                        $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);
165 165
                     }
166 166
                 }
167
-                echo $uiElements->boxOkay(_("Where possible, supplicants will verify that username inputs contain a syntactically correct realm.") . $extratext);
167
+                echo $uiElements->boxOkay(_("Where possible, supplicants will verify that username inputs contain a syntactically correct realm.").$extratext);
168 168
             } else {
169 169
                 $profile->setInputVerificationPreference(false, false);
170 170
             }
@@ -196,30 +196,30 @@  discard block
 block discarded – undo
196 196
                 echo $uiElements->boxOkay(_("Redirection is <strong>OFF</strong>"));
197 197
             }
198 198
 
199
-            $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile " . $profile->identifier . " - attributes changed");
199
+            $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile ".$profile->identifier." - attributes changed");
200 200
             // reload the profile to ingest new CA and server names if any; before checking EAP completeness
201 201
             $reloadedProfileNr1 = \core\ProfileFactory::instantiate($profile->identifier);
202 202
             foreach (\core\common\EAP::listKnownEAPTypes() as $a) {
203 203
                 if ($a->getIntegerRep() == \core\common\EAP::INTEGER_SILVERBULLET) { // do not allow adding silverbullet via the backdoor
204 204
                     continue;
205 205
                 }
206
-                if (isset($_POST[$a->getPrintableRep()]) && isset($_POST[$a->getPrintableRep() . "-priority"]) && is_numeric($_POST[$a->getPrintableRep() . "-priority"])) {
207
-                    $priority = (int) $_POST[$a->getPrintableRep() . "-priority"];
206
+                if (isset($_POST[$a->getPrintableRep()]) && isset($_POST[$a->getPrintableRep()."-priority"]) && is_numeric($_POST[$a->getPrintableRep()."-priority"])) {
207
+                    $priority = (int) $_POST[$a->getPrintableRep()."-priority"];
208 208
                     // add EAP type to profile as requested, but ...
209 209
                     $reloadedProfileNr1->addSupportedEapMethod($a, $priority);
210
-                    $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile " . $reloadedProfileNr1->identifier . " - supported EAP types changed");
210
+                    $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile ".$reloadedProfileNr1->identifier." - supported EAP types changed");
211 211
                     // see if we can enable the EAP type, or if info is missing
212 212
                     $eapcompleteness = $reloadedProfileNr1->isEapTypeDefinitionComplete($a);
213 213
                     if ($eapcompleteness === true) {
214
-                        echo $uiElements->boxOkay(_("Supported EAP Type: ") . "<strong>" . $a->getPrintableRep() . "</strong>");
214
+                        echo $uiElements->boxOkay(_("Supported EAP Type: ")."<strong>".$a->getPrintableRep()."</strong>");
215 215
                     } else {
216 216
                         $warntext = "";
217 217
                         if (is_array($eapcompleteness)) {
218 218
                             foreach ($eapcompleteness as $item) {
219
-                                $warntext .= "<strong>" . $uiElements->displayName($item) . "</strong> ";
219
+                                $warntext .= "<strong>".$uiElements->displayName($item)."</strong> ";
220 220
                             }
221 221
                         }
222
-                        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
+                        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."));
223 223
                     }
224 224
                 }
225 225
             }
@@ -230,23 +230,23 @@  discard block
 block discarded – undo
230 230
             if (count($significantChanges) > 0) {
231 231
                 $myInstOriginal = new \core\IdP($profile->institution);
232 232
                 // send a notification/alert mail to someone we know is in charge
233
-                $text = _("To whom it may concern,") . "\n\n";
233
+                $text = _("To whom it may concern,")."\n\n";
234 234
                 /// were made to the *Identity Provider* *LU* / integer number of IdP / (previously known as) Name
235
-                $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
+                $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";
236 236
                 if (isset($significantChanges[\core\AbstractProfile::CA_CLASH_ADDED])) {
237
-                    $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";
238
-                    $text .= $significantChanges[\core\AbstractProfile::CA_CLASH_ADDED] . "\n\n";
237
+                    $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";
238
+                    $text .= $significantChanges[\core\AbstractProfile::CA_CLASH_ADDED]."\n\n";
239 239
                 }
240 240
                 if (isset($significantChanges[\core\AbstractProfile::CA_ADDED])) {
241
-                    $text .= _("A new trusted root CA was added. The details are below:") . "\n\n";
242
-                    $text .= $significantChanges[\core\AbstractProfile::CA_ADDED] . "\n\n";
241
+                    $text .= _("A new trusted root CA was added. The details are below:")."\n\n";
242
+                    $text .= $significantChanges[\core\AbstractProfile::CA_ADDED]."\n\n";
243 243
                 }
244 244
                 if (isset($significantChanges[\core\AbstractProfile::SERVERNAME_ADDED])) {
245
-                    $text .= _("A new acceptable server name for the authentication server was added. The details are below:") . "\n\n";
246
-                    $text .= $significantChanges[\core\AbstractProfile::SERVERNAME_ADDED] . "\n\n";
245
+                    $text .= _("A new acceptable server name for the authentication server was added. The details are below:")."\n\n";
246
+                    $text .= $significantChanges[\core\AbstractProfile::SERVERNAME_ADDED]."\n\n";
247 247
                 }
248
-                $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";
249
-                $text .= _("Greetings, ") . "\n\n" . \config\Master::APPEARANCE['productname_long'];
248
+                $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";
249
+                $text .= _("Greetings, ")."\n\n".\config\Master::APPEARANCE['productname_long'];
250 250
                 // (currently, send hard-wired to NRO - future: for linked insts, check eduroam DBv2 and send to registered admins directly)
251 251
                 $fed = new core\Federation($myInstOriginal->federation);
252 252
                 foreach ($fed->listFederationAdmins() as $id) {
@@ -303,14 +303,14 @@  discard block
 block discarded – undo
303 303
                         $oneHostOkay = FALSE;
304 304
                         $testCandidates = [];
305 305
                         foreach ($dnsChecks->NAPTR_hostname_records as $oneServer) {
306
-                            $testCandidates[$oneServer['hostname']][] = ($oneServer['family'] == "IPv4" ? $oneServer['IP'] : "[" . $oneServer['IP'] . "]") . ":" . $oneServer['port'];
306
+                            $testCandidates[$oneServer['hostname']][] = ($oneServer['family'] == "IPv4" ? $oneServer['IP'] : "[".$oneServer['IP']."]").":".$oneServer['port'];
307 307
                         }
308 308
                         foreach ($testCandidates as $oneHost => $listOfIPs) {
309 309
                             $connectionTests = new core\diag\RFC6614Tests(array_values($listOfIPs), $oneHost, "openroaming");
310 310
                             // for now (no OpenRoaming client certs available) only run server-side tests
311 311
                             foreach ($listOfIPs as $oneIP) {
312 312
                                 $connectionResult = $connectionTests->cApathCheck($oneIP);
313
-                                if ($connectionResult != core\diag\AbstractTest::RETVAL_OK || ( isset($connectionTests->TLS_CA_checks_result['cert_oddity']) && count($connectionTests->TLS_CA_checks_result['cert_oddity']) > 0)) {
313
+                                if ($connectionResult != core\diag\AbstractTest::RETVAL_OK || (isset($connectionTests->TLS_CA_checks_result['cert_oddity']) && count($connectionTests->TLS_CA_checks_result['cert_oddity']) > 0)) {
314 314
                                     $allHostsOkay = FALSE;
315 315
                                 } else {
316 316
                                     $oneHostOkay = TRUE;
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
         <?php
346 346
         if (count($reloadedProfileNr2->getEapMethodsinOrderOfPreference(1)) > 0) {
347 347
             echo "<form method='post' action='overview_installers.php?inst_id=$my_inst->identifier&profile_id=$reloadedProfileNr2->identifier' accept-charset='UTF-8'>
348
-        <button type='submit'>" . _("Continue to Installer Fine-Tuning and Download") . "</button>
348
+        <button type='submit'>"._("Continue to Installer Fine-Tuning and Download")."</button>
349 349
     </form>";
350 350
         }
351 351
         echo $deco->footer();
Please login to merge, or discard this patch.
web/skins/modern/index.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -44,8 +44,8 @@  discard block
 block discarded – undo
44 44
 $operatingSystem = $Gui->detectOS();
45 45
 $Gui->loggerInstance->debug(4, $operatingSystem);
46 46
 if ($operatingSystem) {
47
-    print "recognisedOS = '".$operatingSystem['device'] . "';\n";
48
-    print "recognisedOShs20 = '".$operatingSystem['hs20'] . "';\n";
47
+    print "recognisedOS = '".$operatingSystem['device']."';\n";
48
+    print "recognisedOShs20 = '".$operatingSystem['hs20']."';\n";
49 49
     $vendorlogo = $Gui->skinObject->findResourceUrl("IMAGES", "vendorlogo/");
50 50
     if ($vendorlogo !== FALSE) {
51 51
         print "vendorlogo = '$vendorlogo';\n";
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
     }
55 55
 }
56 56
 
57
-print 'downloadMessage = "'.$Gui->textTemplates->templates[\web\lib\user\DOWNLOAD_MESSAGE] . '";';
57
+print 'downloadMessage = "'.$Gui->textTemplates->templates[\web\lib\user\DOWNLOAD_MESSAGE].'";';
58 58
 //TODO modify this based on OS detection
59 59
 $userAgent = $_SERVER['HTTP_USER_AGENT'] ?? "";
60 60
 if (preg_match('/Android/', $userAgent)) {
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
     <?php echo $divs->divHeading($visibility); ?>
84 84
     <div id="main_page">
85 85
         <div id="loading_ico">
86
-          <?php echo _("Authenticating") . "..." ?><br><img src="<?php echo $Gui->skinObject->findResourceUrl("IMAGES", "icons/loading51.gif"); ?>" alt="Authenticating ..."/>
86
+          <?php echo _("Authenticating")."..." ?><br><img src="<?php echo $Gui->skinObject->findResourceUrl("IMAGES", "icons/loading51.gif"); ?>" alt="Authenticating ..."/>
87 87
         </div>
88 88
         <div id="info_overlay"> <!-- device info -->
89 89
             <div id="info_window"></div>
Please login to merge, or discard this patch.
web/admin/overview_federation.php 1 patch
Spacing   +35 added lines, -35 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
 $deco = new \web\lib\admin\PageDecoration();
25 25
 $uiElements = new web\lib\admin\UIElements();
@@ -50,16 +50,16 @@  discard block
 block discarded – undo
50 50
     <div class="infobox">
51 51
         <h2><?php $tablecaption = _("Your Personal Information"); echo $tablecaption; ?></h2>
52 52
         <table>
53
-            <caption><?php echo $tablecaption;?></caption>
53
+            <caption><?php echo $tablecaption; ?></caption>
54 54
             <tr>
55
-                <th class="wai-invisible" scope="col"><?php echo _("Property Type");?></th>
56
-                <th class="wai-invisible" scope="col"><?php echo _("Language if applicable");?></th>
57
-                <th class="wai-invisible" scope="col"><?php echo _("Property Value");?></th>
55
+                <th class="wai-invisible" scope="col"><?php echo _("Property Type"); ?></th>
56
+                <th class="wai-invisible" scope="col"><?php echo _("Language if applicable"); ?></th>
57
+                <th class="wai-invisible" scope="col"><?php echo _("Property Value"); ?></th>
58 58
             </tr>            
59 59
             <?php echo $uiElements->infoblock($user->getAttributes(), "user", "User"); ?>
60 60
             <tr>
61 61
                 <td>
62
-                    <?php echo "" . _("Unique Identifier") ?>
62
+                    <?php echo ""._("Unique Identifier") ?>
63 63
                 </td>
64 64
                 <td>
65 65
                 </td>
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
     $mgmt = new \core\UserManagement();
75 75
 
76 76
     if (!$user->isFederationAdmin()) {
77
-        echo "<p>" . sprintf(_("You are not a %s manager."), $uiElements->nomenclatureFed) . "</p>";
77
+        echo "<p>".sprintf(_("You are not a %s manager."), $uiElements->nomenclatureFed)."</p>";
78 78
         echo $deco->footer();
79 79
         exit(0);
80 80
     }
@@ -88,16 +88,16 @@  discard block
 block discarded – undo
88 88
                 <?php $tablecaption2 = sprintf(_("%s Properties: %s"), $uiElements->nomenclatureFed, $thefed->name); echo $tablecaption2; ?>
89 89
             </h2>
90 90
             <table>
91
-            <caption><?php echo $tablecaption2;?></caption>
91
+            <caption><?php echo $tablecaption2; ?></caption>
92 92
             <tr>
93
-                <th class="wai-invisible" scope="col"><?php echo _("Property Type");?></th>
94
-                <th class="wai-invisible" scope="col"><?php echo _("Language if applicable");?></th>
95
-                <th class="wai-invisible" scope="col"><?php echo _("Property Value");?></th>
93
+                <th class="wai-invisible" scope="col"><?php echo _("Property Type"); ?></th>
94
+                <th class="wai-invisible" scope="col"><?php echo _("Language if applicable"); ?></th>
95
+                <th class="wai-invisible" scope="col"><?php echo _("Property Value"); ?></th>
96 96
             </tr>
97 97
                 <!-- fed properties -->
98 98
                 <tr>
99 99
                     <td>
100
-                        <?php echo "" . _("Country") ?>
100
+                        <?php echo ""._("Country") ?>
101 101
                     </td>
102 102
                     <td>
103 103
                     </td>
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
                     default:
179 179
                         throw new Exception("Error: unknown encryption status of invitation!?!");
180 180
                 }
181
-                echo $uiElements->boxRemark(ngettext("The invitation email was sent successfully.", "All invitation emails were sent successfully.", $counter) . " " . $cryptText, _("Sent successfully."));
181
+                echo $uiElements->boxRemark(ngettext("The invitation email was sent successfully.", "All invitation emails were sent successfully.", $counter)." ".$cryptText, _("Sent successfully."));
182 182
                 break;
183 183
             case "FAILURE":
184 184
                 echo $uiElements->boxError(_("No invitation email could be sent!"), _("Sending failure!"));
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
                     default:
199 199
                         throw new Exception("Error: unknown encryption status of invitation!?!");
200 200
                 }
201
-                echo $uiElements->boxWarning(sprintf(_("Some invitation emails were sent successfully (%s in total), the others failed."), $counter) . " " . $cryptText, _("Partial success."));
201
+                echo $uiElements->boxWarning(sprintf(_("Some invitation emails were sent successfully (%s in total), the others failed."), $counter)." ".$cryptText, _("Partial success."));
202 202
                 break;
203 203
             case "INVALIDSYNTAX":
204 204
                 echo $uiElements->boxError(_("The invitation email address was malformed, no invitation was sent!"), _("The invitation email address was malformed, no invitation was sent!"));
@@ -214,27 +214,27 @@  discard block
 block discarded – undo
214 214
     } else {
215 215
         $link = 'http://';
216 216
     }
217
-    $link .= $_SERVER['SERVER_NAME'] . $_SERVER['SCRIPT_NAME'];
217
+    $link .= $_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME'];
218 218
     $link = htmlspecialchars($link);
219 219
     if (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_RADIUS'] == 'LOCAL' && \config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS'] == 'LOCAL') {
220 220
         echo "<table><tr>
221
-                        <td>" . sprintf(_("Diagnose reachability and connection parameters of any %s %s"), \config\ConfAssistant::CONSORTIUM['display_name'], $uiElements->nomenclatureInst) . "</td>
221
+                        <td>" . sprintf(_("Diagnose reachability and connection parameters of any %s %s"), \config\ConfAssistant::CONSORTIUM['display_name'], $uiElements->nomenclatureInst)."</td>
222 222
                         <td><form method='post' action='../diag/action_realmcheck.php' accept-charset='UTF-8'>
223 223
                               <input type='hidden' name='comefrom' id='comefrom' value='$link'/>
224
-                              <button id='realmcheck' style='cursor:pointer;' type='submit'>" . _("Go!") . "</button>
224
+                              <button id='realmcheck' style='cursor:pointer;' type='submit'>"._("Go!")."</button>
225 225
                             </form>
226 226
                         </td>
227 227
                     </tr>
228 228
                     </table>";
229 229
     }
230 230
     if (\config\ConfAssistant::CONSORTIUM['name'] == 'eduroam') {
231
-        $helptext = "<h3>" . sprintf(_("Need help? Refer to the <a href='%s'>%s manual</a>"), "https://wiki.geant.org/x/qJg7Bw", $uiElements->nomenclatureFed) . "</h3>";
231
+        $helptext = "<h3>".sprintf(_("Need help? Refer to the <a href='%s'>%s manual</a>"), "https://wiki.geant.org/x/qJg7Bw", $uiElements->nomenclatureFed)."</h3>";
232 232
     } else {
233 233
         $helptext = "";
234 234
     }
235 235
     ?>
236 236
     <table class='user_overview' style='border:0px;'>
237
-        <caption><?php echo _("Participant Details");?></caption>
237
+        <caption><?php echo _("Participant Details"); ?></caption>
238 238
         <tr>
239 239
             <th scope='col'><?php echo _("Configured / Visible / OpenRoaming"); ?></th>
240 240
             <th scope='col'><?php echo sprintf(_("%s Name"), $uiElements->nomenclatureInst); ?></th>
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
             $pending_invites = $mgmt->listPendingInvitations();
244 244
 
245 245
             if (\config\Master::DB['enforce-external-sync']) {
246
-                echo "<th scope='col'>" . sprintf(_("%s Database Sync Status"), \config\ConfAssistant::CONSORTIUM['display_name']) . "</th>";
246
+                echo "<th scope='col'>".sprintf(_("%s Database Sync Status"), \config\ConfAssistant::CONSORTIUM['display_name'])."</th>";
247 247
             }
248 248
             ?>
249 249
             <th scope='col'>
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
         foreach ($feds as $onefed) {
259 259
             $thefed = new \core\Federation(strtoupper($onefed['value']));
260 260
             /// nomenclature for 'federation', federation name, nomenclature for 'inst'
261
-            echo "<tr><td colspan='8'><strong>" . sprintf(_("The following %s are in your %s %s:"), $uiElements->nomenclatureInst, $uiElements->nomenclatureFed, '<span style="color:green">' . $thefed->name . '</span>') . "</strong></td></tr>";
261
+            echo "<tr><td colspan='8'><strong>".sprintf(_("The following %s are in your %s %s:"), $uiElements->nomenclatureInst, $uiElements->nomenclatureFed, '<span style="color:green">'.$thefed->name.'</span>')."</strong></td></tr>";
262 262
 
263 263
             // extract only pending invitations for *this* fed
264 264
             $display_pendings = FALSE;
@@ -283,9 +283,9 @@  discard block
 block discarded – undo
283 283
                 // deployment status; need to dive into profiles for this
284 284
                 // show happy eyeballs if at least one profile is configured/showtime                    
285 285
                 echo "<td>";
286
-                echo ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_CONFIGURED ? "C" : "-" ) 
286
+                echo ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_CONFIGURED ? "C" : "-") 
287 287
                         . " " 
288
-                        . ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_SHOWTIME ? "V" : "-" )
288
+                        . ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_SHOWTIME ? "V" : "-")
289 289
                         . " "
290 290
                         . "<span style='color:";
291 291
                 switch ($idp_instance->maxOpenRoamingStatus()) {
@@ -320,23 +320,23 @@  discard block
 block discarded – undo
320 320
                     }
321 321
                 }
322 322
                 echo "<td style='vertical-align:top;'>
323
-                         <input type='hidden' name='inst' value='" . $index . "'>" . $idp_instance->name . (empty($listOfSilverbulletRealms) ? "" : "<ul><li>" ) . implode("</li><li>", $listOfSilverbulletRealms) . (empty($listOfSilverbulletRealms) ? "" : "</li><ul>" ) . "
323
+                         <input type='hidden' name='inst' value='" . $index."'>".$idp_instance->name.(empty($listOfSilverbulletRealms) ? "" : "<ul><li>").implode("</li><li>", $listOfSilverbulletRealms).(empty($listOfSilverbulletRealms) ? "" : "</li><ul>")."
324 324
                       </td>";
325 325
                 // external DB sync, if configured as being necessary
326 326
                 if (\config\Master::DB['enforce-external-sync']) {
327 327
                     echo "<td style='display: ruby;'>";
328 328
                     if ($readonly === FALSE) {
329
-                        echo "<form method='post' action='inc/manageDBLink.inc.php?inst_id=" . $idp_instance->identifier . "' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'>
330
-                                    <button type='submit'>" . _("Manage DB Link") . "</button></form>&nbsp;&nbsp;";
329
+                        echo "<form method='post' action='inc/manageDBLink.inc.php?inst_id=".$idp_instance->identifier."' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'>
330
+                                    <button type='submit'>" . _("Manage DB Link")."</button></form>&nbsp;&nbsp;";
331 331
                     }
332 332
                     switch ($idp_instance->getExternalDBSyncState()) {
333 333
                         case \core\IdP::EXTERNAL_DB_SYNCSTATE_NOTSUBJECTTOSYNCING:
334 334
                             break;
335 335
                         case \core\IdP::EXTERNAL_DB_SYNCSTATE_SYNCED:
336
-                            echo "<div class='acceptable'>" . _("Linked") . "</div>";
336
+                            echo "<div class='acceptable'>"._("Linked")."</div>";
337 337
                             break;
338 338
                         case \core\IdP::EXTERNAL_DB_SYNCSTATE_NOT_SYNCED:
339
-                            echo "<div class='notacceptable'>" . _("NOT linked") . "</div>";
339
+                            echo "<div class='notacceptable'>"._("NOT linked")."</div>";
340 340
 
341 341
 
342 342
                             break;
@@ -349,9 +349,9 @@  discard block
 block discarded – undo
349 349
                 echo "<td style='vertical-align: top;'>";
350 350
                 if ($readonly === FALSE) {
351 351
                     echo "<div style='white-space: nowrap;'>
352
-                                  <form method='post' action='inc/manageAdmins.inc.php?inst_id=" . $index . "' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'>
352
+                                  <form method='post' action='inc/manageAdmins.inc.php?inst_id=" . $index."' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'>
353 353
                                       <button type='submit'>" .
354
-                    _("Add/Remove Administrators") . "
354
+                    _("Add/Remove Administrators")."
355 355
                                       </button>
356 356
                                   </form>
357 357
                                 </div>";
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
                 echo "<tr>
365 365
                             <td colspan='2'>
366 366
                                <strong>" .
367
-                sprintf(_("Pending invitations in the %s:"), $uiElements->nomenclatureFed) . "
367
+                sprintf(_("Pending invitations in the %s:"), $uiElements->nomenclatureFed)."
368 368
                                </strong>
369 369
                             </td>
370 370
                          </tr>";
@@ -372,16 +372,16 @@  discard block
 block discarded – undo
372 372
                     if (strtoupper($oneinvite['country']) == strtoupper($thefed->tld)) {
373 373
                         echo "<tr>
374 374
                                     <td>" .
375
-                        $oneinvite['name'] . "
375
+                        $oneinvite['name']."
376 376
                                     </td>
377 377
                                     <td>" .
378
-                        $oneinvite['mail'] . "
378
+                        $oneinvite['mail']."
379 379
                                     </td>
380 380
                                     <td colspan=2>";
381 381
                         if ($readonly === FALSE) {
382 382
                             echo "<form method='post' action='overview_federation.php' accept-charset='UTF-8'>
383
-                                <input type='hidden' name='invitation_id' value='" . $oneinvite['token'] . "'/>
384
-                                <button class='delete' type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_DELETE . "'>" . _("Revoke Invitation") . "</button> "
383
+                                <input type='hidden' name='invitation_id' value='" . $oneinvite['token']."'/>
384
+                                <button class='delete' type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_DELETE."'>"._("Revoke Invitation")."</button> "
385 385
                             . sprintf(_("(expires %s)"), $oneinvite['expiry'])
386 386
                             . "</form>";
387 387
                         }
Please login to merge, or discard this patch.
core/IdP.php 1 patch
Spacing   +13 added lines, -13 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();
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(3, "--- END Constructing new IdP object ... ---\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" : "");
137
+        $query = "SELECT profile_id FROM profile WHERE inst_id = $this->identifier".($activeOnly ? " AND showtime = 1" : "");
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
 
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
         $allProfiles = $this->databaseHandle->exec("SELECT MIN(openroaming) AS maxlevel FROM profile WHERE inst_id = $this->identifier");
198 198
         // SELECT yields a resource, not a boolean
199 199
         while ($res = mysqli_fetch_object(/** @scrutinizer ignore-type */ $allProfiles)) {
200
-            return (is_numeric($res->maxlevel) ? (int)$res->maxlevel : AbstractProfile::OVERALL_OPENROAMING_LEVEL_NO ); // insts without profiles should get a "NO"
200
+            return (is_numeric($res->maxlevel) ? (int) $res->maxlevel : AbstractProfile::OVERALL_OPENROAMING_LEVEL_NO); // insts without profiles should get a "NO"
201 201
         }
202 202
         return AbstractProfile::OVERALL_OPENROAMING_LEVEL_NO;
203 203
     }
@@ -331,7 +331,7 @@  discard block
 block discarded – undo
331 331
                 case AbstractProfile::PROFILETYPE_SILVERBULLET:
332 332
                     $theProfile = new ProfileSilverbullet($identifier, $this);
333 333
                     $theProfile->addSupportedEapMethod(new \core\common\EAP(\core\common\EAP::EAPTYPE_SILVERBULLET), 1);
334
-                    $theProfile->setRealm($this->identifier . "-" . $theProfile->identifier . "." . strtolower($this->federation) . strtolower(\config\ConfAssistant::SILVERBULLET['realm_suffix']));
334
+                    $theProfile->setRealm($this->identifier."-".$theProfile->identifier.".".strtolower($this->federation).strtolower(\config\ConfAssistant::SILVERBULLET['realm_suffix']));
335 335
                     return $theProfile;
336 336
                 default:
337 337
                     throw new Exception("This type of profile is unknown and can not be added.");
@@ -473,7 +473,7 @@  discard block
 block discarded – undo
473 473
     public function getExternalDBId()
474 474
     {
475 475
         if (\config\ConfAssistant::CONSORTIUM['name'] == "eduroam" && isset(\config\ConfAssistant::CONSORTIUM['deployment-voodoo']) && \config\ConfAssistant::CONSORTIUM['deployment-voodoo'] == "Operations Team") { // SW: APPROVED
476
-            $idQuery = $this->databaseHandle->exec("SELECT external_db_id FROM institution WHERE inst_id = $this->identifier AND external_db_syncstate = " . self::EXTERNAL_DB_SYNCSTATE_SYNCED);
476
+            $idQuery = $this->databaseHandle->exec("SELECT external_db_id FROM institution WHERE inst_id = $this->identifier AND external_db_syncstate = ".self::EXTERNAL_DB_SYNCSTATE_SYNCED);
477 477
             // SELECT -> it's a resource, not a boolean
478 478
             if (mysqli_num_rows(/** @scrutinizer ignore-type */ $idQuery) == 0) {
479 479
                 return FALSE;
@@ -539,16 +539,16 @@  discard block
 block discarded – undo
539 539
         }
540 540
         foreach ($baseline as $lang => $value) {
541 541
             if (!key_exists($lang, $newvalues)) {
542
-                $retval[IdP::INSTNAME_CHANGED] .= "#[Language " . strtoupper($lang) . "] DELETED";
542
+                $retval[IdP::INSTNAME_CHANGED] .= "#[Language ".strtoupper($lang)."] DELETED";
543 543
             } else {
544 544
                 if ($value != $newvalues[$lang]) {
545
-                    $retval[IdP::INSTNAME_CHANGED] .= "#[Language " . strtoupper($lang) . "] CHANGED from '" . $baseline[$lang] . "' to '" . $newvalues[$lang] . "'";
545
+                    $retval[IdP::INSTNAME_CHANGED] .= "#[Language ".strtoupper($lang)."] CHANGED from '".$baseline[$lang]."' to '".$newvalues[$lang]."'";
546 546
                 }
547 547
             }
548 548
         }
549 549
         foreach ($newvalues as $lang => $value) {
550 550
             if (!key_exists($lang, $baseline)) {
551
-                $retval[IdP::INSTNAME_CHANGED] .= "#[Language " . strtoupper($lang) . "] ADDED as '" . $value . "'";
551
+                $retval[IdP::INSTNAME_CHANGED] .= "#[Language ".strtoupper($lang)."] ADDED as '".$value."'";
552 552
             }
553 553
         }
554 554
         return $retval;
Please login to merge, or discard this patch.
devices/chromebook/DeviceChromebook.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
         $cryptoJson = openssl_encrypt($clearJson, 'AES-256-CBC', $encryptionKey, OPENSSL_RAW_DATA, $initVector);
122 122
         $hmac = hash_hmac("sha1", $cryptoJson, $encryptionKey, TRUE);
123 123
 
124
-        $this->loggerInstance->debug(4, "Clear = $clearJson\nSalt = $salt\nPW = " . $password . "\nb(IV) = " . base64_encode($initVector) . "\nb(Cipher) = " . base64_encode($cryptoJson) . "\nb(HMAC) = " . base64_encode($hmac));
124
+        $this->loggerInstance->debug(4, "Clear = $clearJson\nSalt = $salt\nPW = ".$password."\nb(IV) = ".base64_encode($initVector)."\nb(Cipher) = ".base64_encode($cryptoJson)."\nb(HMAC) = ".base64_encode($hmac));
125 125
 
126 126
         // now, generate the container that holds all the crypto data
127 127
         $finalArray = [
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
     private function wiredBlock($eapdetails)
196 196
     {
197 197
         return [
198
-            "GUID" => \core\common\Entity::uuid('', "wired-dot1x-ethernet") . "}",
198
+            "GUID" => \core\common\Entity::uuid('', "wired-dot1x-ethernet")."}",
199 199
             "Name" => "eduroam configuration (wired network)",
200 200
             "Remove" => false,
201 201
             "Type" => "Ethernet",
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
         // if silverbullet, we deliver the client cert inline
237 237
 
238 238
         if ($selectedEap == \core\common\EAP::EAPTYPE_SILVERBULLET) {
239
-            $eaparray['ClientCertRef'] = "[" . $this->clientCert['GUID'] . "]";
239
+            $eaparray['ClientCertRef'] = "[".$this->clientCert['GUID']."]";
240 240
             $eaparray['ClientCertType'] = "Ref";
241 241
         }
242 242
 
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
         $jsonArray = ["Type" => "UnencryptedConfiguration"];
272 272
 
273 273
         foreach ($this->attributes['internal:CAs'][0] as $ca) {
274
-            $caRefs[] = "{" . $ca['uuid'] . "}";
274
+            $caRefs[] = "{".$ca['uuid']."}";
275 275
         }
276 276
         // define CA certificates
277 277
         foreach ($this->attributes['internal:CAs'][0] as $ca) {
@@ -281,15 +281,15 @@  discard block
 block discarded – undo
281 281
             if ($caSanitized1 === FALSE) {
282 282
                 throw new Exception("Error cropping PEM data at its BEGIN marker.");
283 283
             }
284
-            $this->loggerInstance->debug(4, $caSanitized1 . "\n");
284
+            $this->loggerInstance->debug(4, $caSanitized1."\n");
285 285
             // remove \n
286 286
             $caSanitized = str_replace("\n", "", $caSanitized1);
287
-            $jsonArray["Certificates"][] = ["GUID" => "{" . $ca['uuid'] . "}", "Remove" => false, "Type" => "Authority", "X509" => $caSanitized];
288
-            $this->loggerInstance->debug(3, $caSanitized . "\n");
287
+            $jsonArray["Certificates"][] = ["GUID" => "{".$ca['uuid']."}", "Remove" => false, "Type" => "Authority", "X509" => $caSanitized];
288
+            $this->loggerInstance->debug(3, $caSanitized."\n");
289 289
         }
290 290
         // if we are doing silverbullet, include the unencrypted(!) P12 as a client certificate
291 291
         if ($this->selectedEap == \core\common\EAP::EAPTYPE_SILVERBULLET) {
292
-            $jsonArray["Certificates"][] = ["GUID" => "[" . $this->clientCert['GUID'] . "]", "PKCS12" => base64_encode($this->clientCert['certdataclear']), "Remove" => false, "Type" => "Client"];
292
+            $jsonArray["Certificates"][] = ["GUID" => "[".$this->clientCert['GUID']."]", "PKCS12" => base64_encode($this->clientCert['certdataclear']), "Remove" => false, "Type" => "Client"];
293 293
         }
294 294
         $eaparray = $this->eapBlock($caRefs);
295 295
         // define Wi-Fi networks
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
 
313 313
         file_put_contents('installer_profile', $finalJson);
314 314
 
315
-        $fileName = $this->installerBasename . '.onc';
315
+        $fileName = $this->installerBasename.'.onc';
316 316
 
317 317
         if (!$this->sign) {
318 318
             rename("installer_profile", $fileName);
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
         // have the notion of signing
324 324
         // but if they ever change their mind, we are prepared
325 325
 
326
-        $outputFromSigning = system($this->sign . " installer_profile '$fileName' > /dev/null");
326
+        $outputFromSigning = system($this->sign." installer_profile '$fileName' > /dev/null");
327 327
         if ($outputFromSigning === FALSE) {
328 328
             $this->loggerInstance->debug(2, "Signing the ONC installer $fileName FAILED!\n");
329 329
         }
Please login to merge, or discard this patch.
devices/apple_mobileconfig/MobileconfigSuperclass.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -522,7 +522,7 @@  discard block
 block discarded – undo
522 522
         if (
523 523
                 get_class($this) == "devices\apple_mobileconfig\DeviceMobileconfigIos12plus" || 
524 524
                 get_class($this) == "devices\apple_mobileconfig\DeviceMobileconfigOsX"
525
-           ) {
525
+            ) {
526 526
                     return "WPA2";
527 527
                 } else {
528 528
                     return "WPA";
@@ -809,7 +809,7 @@  discard block
 block discarded – undo
809 809
                             \core\common\Entity::$nomenclature_inst, 
810 810
                             count($this->CAsAccountedFor)+1, 
811 811
                             ($ca['root'] ? _("Root") : _("Intermediate"))) . 
812
-              "</string>
812
+                "</string>
813 813
                <key>PayloadIdentifier</key>
814 814
                <string>" . self::IPHONE_PAYLOAD_PREFIX . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.credential.$this->caSerial</string>
815 815
                <key>PayloadOrganization</key>
Please login to merge, or discard this patch.
Spacing   +51 added lines, -51 removed lines patch added patch discarded remove patch
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
         \core\common\Entity::intoThePotatoes();
146 146
         // that's what all variants support. Sub-classes can change it.
147 147
         $this->setSupportedEapMethods([\core\common\EAP::EAPTYPE_PEAP_MSCHAP2, \core\common\EAP::EAPTYPE_TTLS_PAP, \core\common\EAP::EAPTYPE_TTLS_MSCHAP2, \core\common\EAP::EAPTYPE_SILVERBULLET]);
148
-        foreach(\core\common\EAP::listKnownEAPTypes() as $eapType) {
148
+        foreach (\core\common\EAP::listKnownEAPTypes() as $eapType) {
149 149
             if ($eapType->isPasswordRequired() || $eapType->isPasswordOptional()) {
150 150
                 $this->specialities['internal:verify_userinput_suffix'][serialize($eapType->getArrayRep())] = _("It is not possible to actively verify the user input for suffix match; but if there is no 'Terms of Use' configured, the installer will display a corresponding hint to the user instead.");
151 151
                 $this->specialities['media:openroaming'][serialize($eapType->getArrayRep())] = _("OpenRoaming is not provisioned due to severe UI limitations during install time.");
@@ -185,15 +185,15 @@  discard block
 block discarded – undo
185 185
       <key>PayloadDescription</key>
186 186
          <string>$tagline</string>
187 187
       <key>PayloadDisplayName</key>
188
-         <string>" . \config\ConfAssistant::CONSORTIUM['display_name'] . "</string>
188
+         <string>".\config\ConfAssistant::CONSORTIUM['display_name']."</string>
189 189
       <key>PayloadIdentifier</key>
190
-         <string>" . self::IPHONE_PAYLOAD_PREFIX . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang</string>
190
+         <string>" . self::IPHONE_PAYLOAD_PREFIX.".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang</string>
191 191
       <key>PayloadOrganization</key>
192
-         <string>" . htmlspecialchars(iconv("UTF-8", "UTF-8//IGNORE", $this->attributes['general:instname'][0]), ENT_XML1, 'UTF-8') . ( $this->attributes['internal:profile_count'][0] > 1 ? " (" . htmlspecialchars(iconv("UTF-8", "UTF-8//IGNORE", $this->attributes['profile:name'][0]), ENT_XML1, 'UTF-8') . ")" : "") . "</string>
192
+         <string>".htmlspecialchars(iconv("UTF-8", "UTF-8//IGNORE", $this->attributes['general:instname'][0]), ENT_XML1, 'UTF-8').($this->attributes['internal:profile_count'][0] > 1 ? " (".htmlspecialchars(iconv("UTF-8", "UTF-8//IGNORE", $this->attributes['profile:name'][0]), ENT_XML1, 'UTF-8').")" : "")."</string>
193 193
       <key>PayloadType</key>
194 194
          <string>Configuration</string>
195 195
       <key>PayloadUUID</key>
196
-         <string>" . \core\common\Entity::uuid('', self::IPHONE_PAYLOAD_PREFIX . $this->massagedConsortium . $this->massagedCountry . $this->massagedInst . $this->massagedProfile) . "</string>
196
+         <string>" . \core\common\Entity::uuid('', self::IPHONE_PAYLOAD_PREFIX.$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile)."</string>
197 197
       <key>PayloadVersion</key>
198 198
          <integer>1</integer>";
199 199
         \core\common\Entity::outOfThePotatoes();
@@ -225,21 +225,21 @@  discard block
 block discarded – undo
225 225
     {
226 226
         \core\common\Entity::intoThePotatoes();
227 227
         if (isset($this->attributes['support:info_file'])) {
228
-            return MobileconfigSuperclass::BUFFER_CONSENT_PRE . htmlspecialchars(iconv("UTF-8", "UTF-8//TRANSLIT", $this->attributes['support:info_file'][0]), ENT_XML1, 'UTF-8') . MobileconfigSuperclass::BUFFER_CONSENT_POST;
228
+            return MobileconfigSuperclass::BUFFER_CONSENT_PRE.htmlspecialchars(iconv("UTF-8", "UTF-8//TRANSLIT", $this->attributes['support:info_file'][0]), ENT_XML1, 'UTF-8').MobileconfigSuperclass::BUFFER_CONSENT_POST;
229 229
         }
230 230
         if ($this->attributes['internal:verify_userinput_suffix'][0] != 0) {
231 231
             if ($this->attributes['internal:hint_userinput_suffix'][0] != 0) {
232
-                $retval = MobileconfigSuperclass::BUFFER_CONSENT_PRE . sprintf(_("Important Notice: your username MUST end exactly with '...@%s' !"), $this->attributes['internal:realm'][0]) . MobileconfigSuperclass::BUFFER_CONSENT_POST;
232
+                $retval = MobileconfigSuperclass::BUFFER_CONSENT_PRE.sprintf(_("Important Notice: your username MUST end exactly with '...@%s' !"), $this->attributes['internal:realm'][0]).MobileconfigSuperclass::BUFFER_CONSENT_POST;
233 233
                 \core\common\Entity::outOfThePotatoes();
234 234
                 return $retval;
235 235
             } else { 
236 236
             if (strlen($this->attributes['internal:realm'][0]) > 0) {
237 237
                 /// note space between variable and exclamation mark - makes sure users don't mistakenly think the exclamation mark is part of the required username!
238
-                $retval = MobileconfigSuperclass::BUFFER_CONSENT_PRE . sprintf(_("Important Notice: your username MUST contain an '@' and end with ...%s !"), $this->attributes['internal:realm'][0]) . MobileconfigSuperclass::BUFFER_CONSENT_POST;
238
+                $retval = MobileconfigSuperclass::BUFFER_CONSENT_PRE.sprintf(_("Important Notice: your username MUST contain an '@' and end with ...%s !"), $this->attributes['internal:realm'][0]).MobileconfigSuperclass::BUFFER_CONSENT_POST;
239 239
                 \core\common\Entity::outOfThePotatoes();
240 240
                 return $retval;
241 241
             }
242
-            $retval = MobileconfigSuperclass::BUFFER_CONSENT_PRE . _("Important Notice: your username MUST be in the form of xxx@yyy where the yyy is a common suffix identifying your Identity Provider. Please find out what to use there and enter the username in the correct format.") . MobileconfigSuperclass::BUFFER_CONSENT_POST;
242
+            $retval = MobileconfigSuperclass::BUFFER_CONSENT_PRE._("Important Notice: your username MUST be in the form of xxx@yyy where the yyy is a common suffix identifying your Identity Provider. Please find out what to use there and enter the username in the correct format.").MobileconfigSuperclass::BUFFER_CONSENT_POST;
243 243
             \core\common\Entity::outOfThePotatoes();
244 244
             return $retval;
245 245
             }
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
         // also escape htmlspecialchars
264 264
         // not all names and profiles have a name, so be prepared
265 265
 
266
-        $this->loggerInstance->debug(5, "List of available attributes: " . var_export($this->attributes, TRUE));
266
+        $this->loggerInstance->debug(5, "List of available attributes: ".var_export($this->attributes, TRUE));
267 267
 
268 268
         $this->instName = $this->attributes['general:instname'][0] ?? _("Unnamed Organisation");
269 269
         $this->profileName = $this->attributes['profile:name'][0] ?? _("Unnamed Profile");
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
 
306 306
         file_put_contents('installer_profile', $outputXml);
307 307
 
308
-        $fileName = $this->installerBasename . '.mobileconfig';
308
+        $fileName = $this->installerBasename.'.mobileconfig';
309 309
 
310 310
         if (!$this->sign) {
311 311
             rename("installer_profile", $fileName);
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
             return $fileName;
314 314
         }
315 315
         // still here? Then we are signing.
316
-        $signing = system($this->sign . " installer_profile '$fileName' > /dev/null");
316
+        $signing = system($this->sign." installer_profile '$fileName' > /dev/null");
317 317
         if ($signing === FALSE) {
318 318
             $this->loggerInstance->debug(2, "Signing the mobileconfig installer $fileName FAILED!\n");
319 319
         }
@@ -332,19 +332,19 @@  discard block
 block discarded – undo
332 332
         \core\common\Entity::intoThePotatoes();
333 333
         $ssidCount = count($this->attributes['internal:SSID']);
334 334
         $certCount = count($this->attributes['internal:CAs'][0]);
335
-        $out = "<p>" . _("For best results, please use the built-in browser (Safari) to open the configuration file.") . "</p>";
335
+        $out = "<p>"._("For best results, please use the built-in browser (Safari) to open the configuration file.")."</p>";
336 336
         $out .= "<p>";
337 337
         $out .= _("The profile will install itself after you click (or tap) the button. You will be asked for confirmation/input at several points:");
338 338
         $out .= "<ul>";
339
-        $out .= "<li>" . _("to install the profile") . "</li>";
340
-        $out .= "<li>" . ngettext("to accept the server certificate authority", "to accept the server certificate authorities", $certCount);
339
+        $out .= "<li>"._("to install the profile")."</li>";
340
+        $out .= "<li>".ngettext("to accept the server certificate authority", "to accept the server certificate authorities", $certCount);
341 341
         if ($certCount > 1) {
342
-            $out .= " " . sprintf(_("(%d times)"), $certCount);
342
+            $out .= " ".sprintf(_("(%d times)"), $certCount);
343 343
         }
344 344
         $out .= "</li>";
345
-        $out .= "<li>" . _("to enter the username and password you have been given by your organisation");
345
+        $out .= "<li>"._("to enter the username and password you have been given by your organisation");
346 346
         if ($ssidCount > 1) {
347
-            $out .= " " . sprintf(_("(%d times each, because %s is installed for %d SSIDs)"), $ssidCount, \config\ConfAssistant::CONSORTIUM['display_name'], $ssidCount);
347
+            $out .= " ".sprintf(_("(%d times each, because %s is installed for %d SSIDs)"), $ssidCount, \config\ConfAssistant::CONSORTIUM['display_name'], $ssidCount);
348 348
         }
349 349
         $out .= "</li>";
350 350
         $out .= "</ul>";
@@ -384,7 +384,7 @@  discard block
 block discarded – undo
384 384
                <key>ServiceProviderRoamingEnabled</key>
385 385
                <true/>
386 386
                <key>DisplayedOperatorName</key>
387
-               <string>" . $oiName . "</string>";
387
+               <string>" . $oiName."</string>";
388 388
         // if we don't know the realm, omit the entire DomainName key
389 389
         if (isset($this->attributes['internal:realm'])) {
390 390
             $retval .= "<key>DomainName</key>
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
                 <array>";
398 398
 
399 399
         foreach ($consortiumOi as $oneCons) {
400
-            $retval .= "<string>" . strtoupper($oneCons) . "</string>";
400
+            $retval .= "<string>".strtoupper($oneCons)."</string>";
401 401
         }
402 402
 
403 403
         $retval .= "</array>";
@@ -435,7 +435,7 @@  discard block
 block discarded – undo
435 435
                   <dict>
436 436
                       <key>AcceptEAPTypes</key>
437 437
                          <array>
438
-                            <integer>" . $eapType['OUTER'] . "</integer>
438
+                            <integer>" . $eapType['OUTER']."</integer>
439 439
                          </array>
440 440
                       <key>EAPFASTProvisionPAC</key>
441 441
                             <true />
@@ -448,7 +448,7 @@  discard block
 block discarded – undo
448 448
 ";
449 449
         if ($realm !== NULL) {
450 450
             $retval .= "<key>OuterIdentity</key>
451
-                                    <string>" . htmlspecialchars($realm, ENT_XML1, 'UTF-8') . "</string>
451
+                                    <string>" . htmlspecialchars($realm, ENT_XML1, 'UTF-8')."</string>
452 452
 ";
453 453
         }
454 454
         $retval .= "<key>PayloadCertificateAnchorUUID</key>
@@ -472,11 +472,11 @@  discard block
 block discarded – undo
472 472
         $retval .= "
473 473
                          </array>";
474 474
         if ($eapType['INNER'] == \core\common\EAP::NE_SILVERBULLET) {
475
-            $retval .= "<key>UserName</key><string>" . $this->clientCert["certObject"]->username . "</string>";
475
+            $retval .= "<key>UserName</key><string>".$this->clientCert["certObject"]->username."</string>";
476 476
         }
477 477
         $retval .= "
478 478
                       <key>TTLSInnerAuthentication</key>
479
-                         <string>" . ($eapType['INNER'] == \core\common\EAP::NE_PAP ? "PAP" : "MSCHAPv2") . "</string>
479
+                         <string>" . ($eapType['INNER'] == \core\common\EAP::NE_PAP ? "PAP" : "MSCHAPv2")."</string>
480 480
                    </dict>";
481 481
         return $retval;
482 482
     }
@@ -496,9 +496,9 @@  discard block
 block discarded – undo
496 496
             // characters are still reversed, invert on use!
497 497
             $buffer .= "<string>Manual</string>
498 498
                   <key>ProxyServer</key>
499
-                  <string>" . strrev($serverAndPort[1]) . "</string>
499
+                  <string>" . strrev($serverAndPort[1])."</string>
500 500
                   <key>ProxyServerPort</key>
501
-                  <integer>" . strrev($serverAndPort[0]) . "</integer>
501
+                  <integer>" . strrev($serverAndPort[0])."</integer>
502 502
                   <key>ProxyPACFallbackAllowed</key>
503 503
                   <false/>";
504 504
         } else {
@@ -548,7 +548,7 @@  discard block
 block discarded – undo
548 548
                     throw new Exception("SSID must be a string!");
549 549
                 }
550 550
                 $escapedSSID = htmlspecialchars($toBeConfigured, ENT_XML1, 'UTF-8');
551
-                $payloadIdentifier = "wifi." . $this->serial;
551
+                $payloadIdentifier = "wifi.".$this->serial;
552 552
                 $payloadShortName = sprintf(_("%s - SSID %s"), $prettyName, $escapedSSID);
553 553
                 $payloadName = sprintf(_("%s configuration for network name %s"), $prettyName, $escapedSSID);
554 554
                 $encryptionTypeString = $this->encryptionString();
@@ -578,9 +578,9 @@  discard block
 block discarded – undo
578 578
                 if (count($toBeConfigured) == 0) {
579 579
                     return "";
580 580
                 }
581
-                $payloadIdentifier = "hs20.".implode('-',$toBeConfigured);
581
+                $payloadIdentifier = "hs20.".implode('-', $toBeConfigured);
582 582
                 $payloadShortName = sprintf(_("%s - RCOI"), $prettyName);
583
-                $payloadName = sprintf(_("%s configuration (Passpoint RCOI)"),$prettyName);
583
+                $payloadName = sprintf(_("%s configuration (Passpoint RCOI)"), $prettyName);
584 584
                 $encryptionTypeString = $this->encryptionString();
585 585
                 $setupModesString = "";
586 586
                 $wifiNetworkIdentification = $this->passPointBlock($toBeConfigured, $prettyName);
@@ -599,11 +599,11 @@  discard block
 block discarded – undo
599 599
                <key>PayloadDisplayName</key>
600 600
                   <string>$payloadShortName</string>
601 601
                <key>PayloadIdentifier</key>
602
-                  <string>" . self::IPHONE_PAYLOAD_PREFIX . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang.$payloadIdentifier</string>
602
+                  <string>".self::IPHONE_PAYLOAD_PREFIX.".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang.$payloadIdentifier</string>
603 603
                <key>PayloadOrganization</key>
604
-                  <string>" . $this->massagedConsortium . ".1x-config.org</string>
604
+                  <string>".$this->massagedConsortium.".1x-config.org</string>
605 605
                <key>PayloadType</key>
606
-                  <string>com.apple." . ($blocktype == MobileconfigSuperclass::NETWORK_BLOCK_TYPE_WIRED ? "firstactiveethernet" : "wifi") . ".managed</string>";
606
+                  <string>com.apple." . ($blocktype == MobileconfigSuperclass::NETWORK_BLOCK_TYPE_WIRED ? "firstactiveethernet" : "wifi").".managed</string>";
607 607
         $retval .= $this->proxySettings();
608 608
         $retval .= $setupModesString;
609 609
         if ($eapType['INNER'] == \core\common\EAP::NE_SILVERBULLET) {
@@ -615,7 +615,7 @@  discard block
 block discarded – undo
615 615
         }
616 616
         $retval .= "
617 617
                <key>PayloadUUID</key>
618
-                  <string>" . \core\common\Entity::uuid() . "</string>
618
+                  <string>" . \core\common\Entity::uuid()."</string>
619 619
                <key>PayloadVersion</key>
620 620
                   <integer>1</integer>
621 621
                   $wifiNetworkIdentification</dict>";
@@ -645,15 +645,15 @@  discard block
 block discarded – undo
645 645
 	<key>IsHotspot</key>
646 646
 	<false/>
647 647
 	<key>PayloadDescription</key>
648
-	<string>" . sprintf(_("This SSID should not be used after bootstrapping %s"), \config\ConfAssistant::CONSORTIUM['display_name']) . "</string>
648
+	<string>" . sprintf(_("This SSID should not be used after bootstrapping %s"), \config\ConfAssistant::CONSORTIUM['display_name'])."</string>
649 649
 	<key>PayloadDisplayName</key>
650
-	<string>" . _("Disabled WiFi network") . "</string>
650
+	<string>" . _("Disabled WiFi network")."</string>
651 651
 	<key>PayloadIdentifier</key>
652
-	<string>" . self::IPHONE_PAYLOAD_PREFIX . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang.wifi.disabled.$this->removeSerial</string>
652
+	<string>" . self::IPHONE_PAYLOAD_PREFIX.".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang.wifi.disabled.$this->removeSerial</string>
653 653
 	<key>PayloadType</key>
654 654
 	<string>com.apple.wifi.managed</string>
655 655
 	<key>PayloadUUID</key>
656
-	<string>" . \core\common\Entity::uuid() . "</string>
656
+	<string>".\core\common\Entity::uuid()."</string>
657 657
 	<key>PayloadVersion</key>
658 658
 	<real>1</real>";
659 659
         $retval .= $this->proxySettings();
@@ -733,12 +733,12 @@  discard block
 block discarded – undo
733 733
         $mimeBlob = base64_encode($binaryBlob);
734 734
         $mimeFormatted = chunk_split($mimeBlob, 52, "\r\n");
735 735
         $payloadUUID = \core\common\Entity::uuid('', $mimeBlob);
736
-        $retArray = ["block" => "<dict>" .
736
+        $retArray = ["block" => "<dict>".
737 737
             // we don't include the import password. It's displayed on screen, and should be input by the user.
738 738
             // <key>Password</key>
739 739
             //   <string>" . $this->clientCert['password'] . "</string>
740 740
             "<key>PayloadCertificateFileName</key>
741
-                     <string>" . $this->massagedConsortium . ".pfx</string>
741
+                     <string>" . $this->massagedConsortium.".pfx</string>
742 742
                   <key>PayloadContent</key>
743 743
                      <data>
744 744
 $mimeFormatted
@@ -746,7 +746,7 @@  discard block
 block discarded – undo
746 746
                   <key>PayloadDescription</key>
747 747
                      <string>MIME Base-64 encoded PKCS#12 Client Certificate</string>
748 748
                   <key>PayloadDisplayName</key>
749
-                     <string>" . _("User certificate") . "</string>
749
+                     <string>"._("User certificate")."</string>
750 750
                   <key>PayloadIdentifier</key>
751 751
                      <string>com.apple.security.pkcs12.$payloadUUID</string>
752 752
                   <key>PayloadType</key>
@@ -756,7 +756,7 @@  discard block
 block discarded – undo
756 756
                   <key>PayloadVersion</key>
757 757
                      <integer>1</integer>
758 758
                 </dict>",
759
-            "UUID" => $payloadUUID,];
759
+            "UUID" => $payloadUUID, ];
760 760
         \core\common\Entity::outOfThePotatoes();
761 761
         return $retArray;
762 762
     }
@@ -774,7 +774,7 @@  discard block
 block discarded – undo
774 774
         }
775 775
         $expiryTime = new \DateTime($this->clientCert['certObject']->expiry);
776 776
         return "<key>RemovalDate</key>
777
-        <date>" . $expiryTime->format("Y-m-d") . "T" . $expiryTime->format("H:i:s") . "Z</date>";
777
+        <date>" . $expiryTime->format("Y-m-d")."T".$expiryTime->format("H:i:s")."Z</date>";
778 778
     }
779 779
 
780 780
     /**
@@ -796,27 +796,27 @@  discard block
 block discarded – undo
796 796
             $stream = "
797 797
             <dict>
798 798
                <key>PayloadCertificateFileName</key>
799
-               <string>" . $ca['uuid'] . ".der</string>
799
+               <string>" . $ca['uuid'].".der</string>
800 800
                <key>PayloadContent</key>
801 801
                <data>
802
-" . $trimmedPem . "</data>
802
+" . $trimmedPem."</data>
803 803
                <key>PayloadDescription</key>
804
-               <string>" . sprintf(_("The %s Certification Authority"), \core\common\Entity::$nomenclature_inst) . "</string>
804
+               <string>" . sprintf(_("The %s Certification Authority"), \core\common\Entity::$nomenclature_inst)."</string>
805 805
                <key>PayloadDisplayName</key>
806 806
                <string>" . 
807 807
                     /// example: "Identity Provider CA #1 (Root)"
808
-                    sprintf(_("%s CA #%d (%s)" ), 
808
+                    sprintf(_("%s CA #%d (%s)"), 
809 809
                             \core\common\Entity::$nomenclature_inst, 
810
-                            count($this->CAsAccountedFor)+1, 
811
-                            ($ca['root'] ? _("Root") : _("Intermediate"))) . 
810
+                            count($this->CAsAccountedFor) + 1, 
811
+                            ($ca['root'] ? _("Root") : _("Intermediate"))). 
812 812
               "</string>
813 813
                <key>PayloadIdentifier</key>
814
-               <string>" . self::IPHONE_PAYLOAD_PREFIX . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.credential.$this->caSerial</string>
814
+               <string>" . self::IPHONE_PAYLOAD_PREFIX.".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.credential.$this->caSerial</string>
815 815
                <key>PayloadOrganization</key>
816
-               <string>" . $this->massagedConsortium . ".1x-config.org</string>
816
+               <string>".$this->massagedConsortium.".1x-config.org</string>
817 817
                <key>PayloadType</key>
818 818
                <string>com.apple.security.root</string>
819
-               <key>PayloadUUID</key><string>" . $ca['uuid'] . "</string>
819
+               <key>PayloadUUID</key><string>" . $ca['uuid']."</string>
820 820
                <key>PayloadVersion</key>
821 821
                <integer>1</integer>
822 822
             </dict>";
Please login to merge, or discard this patch.
web/lib/user/TextTemplates.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 const DOWNLOAD_REDIRECT_CONTINUE = 1054;
52 52
 const SB_GO_AWAY = 1060;
53 53
 const SB_FRONTPAGE_BIGDOWNLOADBUTTON = 1061;
54
-const SB_FRONTPAGE_ROLLER_CUSTOMBUILT= 1062;
54
+const SB_FRONTPAGE_ROLLER_CUSTOMBUILT = 1062;
55 55
 
56 56
 
57 57
 /**
@@ -103,13 +103,13 @@  discard block
 block discarded – undo
103 103
         ];
104 104
         $this->templates[WELCOME_ABOARD_TERMS] = "";
105 105
         foreach ($this->templates[NETWORK_TERMS_AND_PRIV] as $consortium => $terms) {
106
-            $this->templates[WELCOME_ABOARD_TERMS] .= sprintf("<p>" . _("Please remember that 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_LINK'], $terms['PRIV_LINK']);
106
+            $this->templates[WELCOME_ABOARD_TERMS] .= sprintf("<p>"._("Please remember that 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_LINK'], $terms['PRIV_LINK']);
107 107
         }
108 108
     //    $this->templates[WELCOME_ABOARD_TERMS] .= "<p>"._("I agree to be bound by these Terms and Conditions.")."</p>";
109 109
         $this->templates[WELCOME_ABOARD_BACKTODOWNLOADS] = _("Back to downloads");
110 110
         $this->templates[EDUROAM_WELCOME_ADVERTISING] = sprintf(_("We would like to warmly welcome you among the several million users of %s! From now on, you will be able to use internet access resources on thousands of universities, research centres and other places all over the globe. All of this completely free of charge!"), \config\ConfAssistant::CONSORTIUM['display_name']);
111 111
         $this->templates[HEADING_TOPLEVEL_GREET] = sprintf(_("Welcome to %s"), \config\Master::APPEARANCE['productname']);
112
-        $this->templates[HEADING_TOPLEVEL_PURPOSE] = sprintf(_("Connect your device to %s"),\config\ConfAssistant::CONSORTIUM['display_name']);
112
+        $this->templates[HEADING_TOPLEVEL_PURPOSE] = sprintf(_("Connect your device to %s"), \config\ConfAssistant::CONSORTIUM['display_name']);
113 113
         $this->templates[FRONTPAGE_ROLLER_EASY] = sprintf(_("%s installation made easy:"), \config\ConfAssistant::CONSORTIUM['display_name']);
114 114
         $this->templates[FRONTPAGE_ROLLER_CUSTOMBUILT] = _("Custom built for your organisation");
115 115
         $this->templates[FRONTPAGE_BIGDOWNLOADBUTTON] = sprintf(_("Click here to download your %s installer"), \config\ConfAssistant::CONSORTIUM['display_name'], \config\ConfAssistant::CONSORTIUM['display_name']);
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 && isset($factory->device->options['hs20']) && $factory->device->options['hs20'] == 1) {
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
                 
@@ -163,8 +163,8 @@  discard block
 block discarded – undo
163 163
     </table>
164 164
     <p><strong><?php $tablecaption2 = _("Legend:"); echo $tablecaption2; ?></strong></p>
165 165
     <table class="compatmatrix">
166
-        <caption><?php echo $tablecaption2;?></caption>
167
-        <tr><th scope="col"><?php echo _("Colour");?></th><th scope='col'><?php echo _("Meaning");?></th></tr>
166
+        <caption><?php echo $tablecaption2; ?></caption>
167
+        <tr><th scope="col"><?php echo _("Colour"); ?></th><th scope='col'><?php echo _("Meaning"); ?></th></tr>
168 168
         <tr><td class="compat_redirected">&nbsp;&nbsp;&nbsp;</td> <td><?php echo _("redirection is set"); ?></td></tr>
169 169
         <tr><td class="compat_default">&nbsp;&nbsp;&nbsp;</td>    <td><?php echo _("will be offered on download site"); ?></td></tr>
170 170
         <tr><td class="compat_secondary">&nbsp;&nbsp;&nbsp;</td>  <td><?php echo _("configured, but not preferred EAP type"); ?></td></tr>
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
     </table>
174 174
     <?php
175 175
     if (count($distinctFootnotes)) {
176
-        echo "<p><strong>" . _("Footnotes:") . "</strong></p><table>";
176
+        echo "<p><strong>"._("Footnotes:")."</strong></p><table>";
177 177
         foreach ($distinctFootnotes as $number => $text) {
178 178
             echo "<tr><td>($number) - </td><td>$text</td></tr>";
179 179
         }
Please login to merge, or discard this patch.
web/diag/action_realmcheck.php 3 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -566,9 +566,9 @@  discard block
 block discarded – undo
566 566
                     $naptr = $rfc7585suite->relevantNAPTR();
567 567
                     if ($naptr == \core\diag\RADIUSTests::RETVAL_NOTCONFIGURED) {
568 568
                         if ($dynType == "") {
569
-                        	echo "<tr><td>" . _("Dynamic discovery test is not configured") . "</td><td>";
569
+                            echo "<tr><td>" . _("Dynamic discovery test is not configured") . "</td><td>";
570 570
                         } else {
571
-                        	echo "<tr><td>" . _("OpenRoaming connectivity test is not configured") . "</td><td>";
571
+                            echo "<tr><td>" . _("OpenRoaming connectivity test is not configured") . "</td><td>";
572 572
                         }
573 573
                     } else {
574 574
                         echo "<table>";
@@ -672,7 +672,7 @@  discard block
 block discarded – undo
672 672
                         echo "}
673 673
               </script>";
674 674
                         } else {
675
-                   echo ' 
675
+                    echo ' 
676 676
               function run_openroaming() {
677 677
                  running_ajax_openroaming = 0;
678 678
                  $("#main_openroaming_ico").attr("src",icon_loading);
@@ -705,7 +705,7 @@  discard block
 block discarded – undo
705 705
          </tr></table>";
706 706
                     }
707 707
                     if (count($orrealm)) {
708
-                      echo "<hr><strong>" . _("OpenRoaming connectivity tests") . "</strong>
708
+                        echo "<hr><strong>" . _("OpenRoaming connectivity tests") . "</strong>
709 709
          <table><tr>
710 710
          <td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='main_openroaming_ico' class='icon'></td><td id='main_openroaming_result' style='display:none'>&nbsp;</td>
711 711
          </tr></table>";
@@ -743,10 +743,10 @@  discard block
 block discarded – undo
743 743
             <?php
744 744
             for ($i=3; $i<5; $i++) {
745 745
                 if ($i == 3 && $naptr == 0) {
746
-                   continue;
746
+                    continue;
747 747
                 }
748 748
                 if ($i == 4 && count($orrealm) == 0) {
749
-                   continue;
749
+                    continue;
750 750
                 }
751 751
                 if ($i == 3) {
752 752
                     $rfc7585suite = $dnsChecks;
@@ -763,16 +763,16 @@  discard block
 block discarded – undo
763 763
                     echo "_tests'><fieldset class='option_container'>
764 764
                 <legend><strong>";
765 765
                     if ($i==3) {
766
-                     echo _("DYNAMIC connectivity tests");
766
+                        echo _("DYNAMIC connectivity tests");
767 767
                     } else {
768
-                     echo _("OpenRoaming connectivity tests");
768
+                        echo _("OpenRoaming connectivity tests");
769 769
                     }
770 770
                     echo  "</strong></legend>";
771 771
                     $prefix1 = 'dynamic';
772 772
                     $prefix2 = '';
773 773
                     if ($i == 4) {
774
-                    	$prefix1 = 'openroaming';
775
-                    	$prefix2 = $prefix1;
774
+                        $prefix1 = 'openroaming';
775
+                        $prefix2 = $prefix1;
776 776
                     }
777 777
                     $resultstoprint = [];
778 778
                     if (count($rfc7585suite->NAPTR_hostname_records) > 0) {
Please login to merge, or discard this patch.
Spacing   +74 added lines, -74 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
 $loggerInstance = new \core\common\Logging();
25 25
 
@@ -69,13 +69,13 @@  discard block
 block discarded – undo
69 69
             $dnsChecksOR = new \core\diag\RFC7585Tests($check_realm, "aaa+auth:radius.tls.tcp");
70 70
         }
71 71
     } else {
72
-        $error_message = _("You asked for a realm check, but we don't know the realm for this profile!") . "</p>";
72
+        $error_message = _("You asked for a realm check, but we don't know the realm for this profile!")."</p>";
73 73
     }
74 74
 } else { // someone else's realm, and we don't know anything about it... only shallow checks
75 75
     $check_realm = $validator->realm($realm ?? $_SESSION['check_realm'] ?? "");
76 76
     if ($check_realm !== FALSE) {
77 77
         $_SESSION['check_realm'] = $check_realm;
78
-        $testsuite = new \core\diag\RADIUSTests($check_realm, "@" . $check_realm);
78
+        $testsuite = new \core\diag\RADIUSTests($check_realm, "@".$check_realm);
79 79
         $dnsChecks = new \core\diag\RFC7585Tests($check_realm);
80 80
     } else {
81 81
         $error_message = _("No valid realm name given, cannot execute any checks!");
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
     var listofcas = "<?php echo _("You should update your list of accredited CAs") ?>";
123 123
     var getitfrom = "<?php echo _("Get it from here.") ?>";
124 124
     var listsource = "<?php echo \config\Diagnostics::RADIUSTESTS['accreditedCAsURL'] ?>";
125
-    var moretext = "<?php echo _("more") . "&raquo;" ?>";
125
+    var moretext = "<?php echo _("more")."&raquo;" ?>";
126 126
     var lesstext = "<?php echo "&laquo" ?>";
127 127
     var morealltext = "<?php echo _("Show detailed information for all tests") ?>";
128 128
     var unknownca_code = "<?php echo \core\diag\RADIUSTests::CERTPROB_UNKNOWN_CA ?>";
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
                         }
266 266
                     }
267 267
                     cliinfo = cliinfo + '<li><table><tbody><tr><td class="icon_td"><img class="icon" src="' + icons[level] + '" style="width: 24px;"></td><td>' + state;
268
-                    cliinfo = cliinfo + ' <?php echo "(" . sprintf(_("elapsed time: %sms."), "'+data.ca[key].certificate[c].time_millisec+'&nbsp;") . ")"; ?>' + add + '</td></tr>';
268
+                    cliinfo = cliinfo + ' <?php echo "(".sprintf(_("elapsed time: %sms."), "'+data.ca[key].certificate[c].time_millisec+'&nbsp;").")"; ?>' + add + '</td></tr>';
269 269
                     cliinfo = cliinfo + '</tbody></table></ul></li>';
270 270
                     if (data.ca[key].certificate[c].finalerror === 1) {
271 271
                         cliinfo = cliinfo + '<li>' + restskipped + '</li>';
@@ -468,8 +468,8 @@  discard block
 block discarded – undo
468 468
 <?php
469 469
 foreach (\config\Diagnostics::RADIUSTESTS['UDP-hosts'] as $hostindex => $host) {
470 470
     print "
471
-$(\"#live_src" . $hostindex . "_img\").attr('src',icon_loading);
472
-$(\"#live_src" . $hostindex . "_img\").show();
471
+$(\"#live_src" . $hostindex."_img\").attr('src',icon_loading);
472
+$(\"#live_src" . $hostindex."_img\").show();
473 473
 $.ajax({
474 474
     url: 'radius_tests.php?src=0&hostindex=$hostindex&realm='+realm,
475 475
     type: 'POST',
@@ -499,15 +499,15 @@  discard block
 block discarded – undo
499 499
 <?php
500 500
 foreach (\config\Diagnostics::RADIUSTESTS['UDP-hosts'] as $hostindex => $host) {
501 501
     if ($testedProfile !== NULL) {
502
-        $extraarg = "profile_id: " . $testedProfile->identifier . ", ";
502
+        $extraarg = "profile_id: ".$testedProfile->identifier.", ";
503 503
     } else {
504 504
         $extraarg = "";
505 505
     }
506 506
     print "
507
-$(\"#src" . $hostindex . "_img\").attr('src',icon_loading);
507
+$(\"#src" . $hostindex."_img\").attr('src',icon_loading);
508 508
 $(\"#src$hostindex\").html('');
509 509
 running_ajax_stat++;
510
-$.get('radius_tests.php',{test_type: 'udp', $extraarg realm: realm, src: $hostindex, lang: '" . $gui->languageInstance->getLang() . "', hostindex: '$hostindex'  }, udp, 'json');
510
+$.get('radius_tests.php',{test_type: 'udp', $extraarg realm: realm, src: $hostindex, lang: '".$gui->languageInstance->getLang()."', hostindex: '$hostindex'  }, udp, 'json');
511 511
 
512 512
 ";
513 513
 }
@@ -534,7 +534,7 @@  discard block
 block discarded – undo
534 534
     if ($check_realm === FALSE) {
535 535
         print "<p>$error_message</p>";
536 536
     } else {
537
-        print "<h1>" . sprintf(_("Realm testing for: %s"), $check_realm) . "</h1>\n";
537
+        print "<h1>".sprintf(_("Realm testing for: %s"), $check_realm)."</h1>\n";
538 538
         ?>
539 539
         <div id="debug_out" style="display: none"></div>
540 540
         <div id="tabs" style="min-width: 600px; max-width:1000px">
@@ -555,25 +555,25 @@  discard block
 block discarded – undo
555 555
                     // NAPTR existence check
556 556
                     if ($dynType == "") {
557 557
                         $rfc7585suite = $dnsChecks;
558
-                        echo "<strong>" . _("DNS checks") . "</strong><div>";
558
+                        echo "<strong>"._("DNS checks")."</strong><div>";
559 559
                     } else {
560 560
                         if (count($orrealm) == 0) {
561 561
                             continue;
562 562
                         }
563 563
                         $rfc7585suite = $dnsChecksOR;
564
-                        echo "<strong>" . _("OpenRoaming DNS checks") . "</strong><div>";
564
+                        echo "<strong>"._("OpenRoaming DNS checks")."</strong><div>";
565 565
                     }
566 566
                     $naptr = $rfc7585suite->relevantNAPTR();
567 567
                     if ($naptr == \core\diag\RADIUSTests::RETVAL_NOTCONFIGURED) {
568 568
                         if ($dynType == "") {
569
-                        	echo "<tr><td>" . _("Dynamic discovery test is not configured") . "</td><td>";
569
+                        	echo "<tr><td>"._("Dynamic discovery test is not configured")."</td><td>";
570 570
                         } else {
571
-                        	echo "<tr><td>" . _("OpenRoaming connectivity test is not configured") . "</td><td>";
571
+                        	echo "<tr><td>"._("OpenRoaming connectivity test is not configured")."</td><td>";
572 572
                         }
573 573
                     } else {
574 574
                         echo "<table>";
575 575
                         // output in friendly words
576
-                        echo "<tr><td>" . _("Checking NAPTR existence:") . "</td><td>";
576
+                        echo "<tr><td>"._("Checking NAPTR existence:")."</td><td>";
577 577
                         switch ($naptr) {
578 578
                             case \core\diag\RFC7585Tests::RETVAL_NONAPTR:
579 579
                                 echo _("This realm has no NAPTR records.");
@@ -588,7 +588,7 @@  discard block
 block discarded – undo
588 588
 
589 589
                         // compliance checks for NAPTRs
590 590
                         if ($naptr > 0) {
591
-                            echo "<tr><td>" . _("Checking NAPTR compliance (flag = S and regex = {empty}):") . "</td><td>";
591
+                            echo "<tr><td>"._("Checking NAPTR compliance (flag = S and regex = {empty}):")."</td><td>";
592 592
                             $naptr_valid = $rfc7585suite->relevantNAPTRcompliance();
593 593
                             switch ($naptr_valid) {
594 594
                                 case \core\diag\RADIUSTests::RETVAL_OK:
@@ -603,7 +603,7 @@  discard block
 block discarded – undo
603 603
                         // SRV resolution
604 604
                         if ($naptr > 0 && $naptr_valid == \core\diag\RADIUSTests::RETVAL_OK) {
605 605
                             $srv = $rfc7585suite->relevantNAPTRsrvResolution();
606
-                            echo "<tr><td>" . _("Checking SRVs:") . "</td><td>";
606
+                            echo "<tr><td>"._("Checking SRVs:")."</td><td>";
607 607
                             switch ($srv) {
608 608
                                 case \core\diag\RADIUSTests::RETVAL_SKIPPED:
609 609
                                     echo _("This check was skipped.");
@@ -619,7 +619,7 @@  discard block
 block discarded – undo
619 619
                         // IP addresses for the hosts
620 620
                         if ($naptr > 0 && $naptr_valid == \core\diag\RADIUSTests::RETVAL_OK && $srv > 0) {
621 621
                             $hosts = $rfc7585suite->relevantNAPTRhostnameResolution();
622
-                            echo "<tr><td>" . _("Checking IP address resolution:") . "</td><td>";
622
+                            echo "<tr><td>"._("Checking IP address resolution:")."</td><td>";
623 623
                             switch ($srv) {
624 624
                                 case \core\diag\RADIUSTests::RETVAL_SKIPPED:
625 625
                                     echo _("This check was skipped.");
@@ -636,12 +636,12 @@  discard block
 block discarded – undo
636 636
                         echo "</table><br/>";
637 637
                         if ($dynType == "") {
638 638
                             if (count($testsuite->listerrors()) == 0) {
639
-                                echo sprintf(_("Realm is <strong>%s</strong> "), _(($naptr > 0 ? "DYNAMIC" : "STATIC"))) . _("with no DNS errors encountered. Congratulations!");
639
+                                echo sprintf(_("Realm is <strong>%s</strong> "), _(($naptr > 0 ? "DYNAMIC" : "STATIC")))._("with no DNS errors encountered. Congratulations!");
640 640
                             } else {
641
-                                echo sprintf(_("Realm is <strong>%s</strong> "), _(($naptr > 0 ? "DYNAMIC" : "STATIC"))) . _("but there were DNS errors! Check them!") . " " . _("You should re-run the tests after fixing the errors; more errors might be uncovered at that point. The exact error causes are listed below.");
641
+                                echo sprintf(_("Realm is <strong>%s</strong> "), _(($naptr > 0 ? "DYNAMIC" : "STATIC")))._("but there were DNS errors! Check them!")." "._("You should re-run the tests after fixing the errors; more errors might be uncovered at that point. The exact error causes are listed below.");
642 642
                                 echo "<div class='notacceptable'><table>";
643 643
                                 foreach ($testsuite->listerrors() as $details) {
644
-                                    echo "<tr><td>" . $details['TYPE'] . "</td><td>" . $details['TARGET'] . "</td></tr>";
644
+                                    echo "<tr><td>".$details['TYPE']."</td><td>".$details['TARGET']."</td></tr>";
645 645
                                 }
646 646
                                 echo "</table></div>";
647 647
                             }
@@ -660,13 +660,13 @@  discard block
 block discarded – undo
660 660
                  $("#dynamic_tests").show();
661 661
               ';
662 662
                         foreach ($rfc7585suite->NAPTR_hostname_records as $hostindex => $addr) {
663
-                            $host = ($addr['family'] == "IPv6" ? "[" : "") . $addr['IP'] . ($addr['family'] == "IPv6" ? "]" : "") . ":" . $addr['port'];
663
+                            $host = ($addr['family'] == "IPv6" ? "[" : "").$addr['IP'].($addr['family'] == "IPv6" ? "]" : "").":".$addr['port'];
664 664
                             $expectedName = $addr['hostname'];
665 665
                             print "
666 666
                             running_ajax_dyn++;
667
-                            $.ajax({url:'radius_tests.php', data:{test_type: 'capath', realm: realm, src: '$host', lang: '" . $gui->languageInstance->getLang() . "', hostindex: '$hostindex', expectedname: '$expectedName' }, error: eee, success: capath, dataType: 'json'}); 
667
+                            $.ajax({url:'radius_tests.php', data:{test_type: 'capath', realm: realm, src: '$host', lang: '".$gui->languageInstance->getLang()."', hostindex: '$hostindex', expectedname: '$expectedName' }, error: eee, success: capath, dataType: 'json'}); 
668 668
                             running_ajax_dyn++;
669
-                            $.ajax({url:'radius_tests.php', data:{test_type: 'clients', realm: realm, src: '$host', lang: '" . $gui->languageInstance->getLang() . "', hostindex: '$hostindex' }, error: eee, success: clients, dataType: 'json'}); 
669
+                            $.ajax({url:'radius_tests.php', data:{test_type: 'clients', realm: realm, src: '$host', lang: '".$gui->languageInstance->getLang()."', hostindex: '$hostindex' }, error: eee, success: clients, dataType: 'json'}); 
670 670
                        ";
671 671
                         }
672 672
                         echo "}
@@ -682,11 +682,11 @@  discard block
 block discarded – undo
682 682
                  $("#openroaming_tests").show();
683 683
               ';
684 684
                         foreach ($rfc7585suite->NAPTR_hostname_records as $hostindex => $addr) {
685
-                            $host = ($addr['family'] == "IPv6" ? "[" : "") . $addr['IP'] . ($addr['family'] == "IPv6" ? "]" : "") . ":" . $addr['port'];
685
+                            $host = ($addr['family'] == "IPv6" ? "[" : "").$addr['IP'].($addr['family'] == "IPv6" ? "]" : "").":".$addr['port'];
686 686
                             $expectedName = $addr['hostname'];
687 687
                             print "
688 688
                             running_ajax_openroaming++;
689
-                            $.ajax({url:'radius_tests.php', data:{test_type: 'openroamingcapath', realm: realm, src: '$host', lang: '" . $gui->languageInstance->getLang() . "', hostindex: '$hostindex', expectedname: '$expectedName' }, error: eee, success: capath, dataType: 'json'}); 
689
+                            $.ajax({url:'radius_tests.php', data:{test_type: 'openroamingcapath', realm: realm, src: '$host', lang: '".$gui->languageInstance->getLang()."', hostindex: '$hostindex', expectedname: '$expectedName' }, error: eee, success: capath, dataType: 'json'}); 
690 690
                        ";
691 691
                         }
692 692
                         echo "}
@@ -694,18 +694,18 @@  discard block
 block discarded – undo
694 694
                         } 
695 695
                     }
696 696
                 }
697
-                    echo "<strong>" . _("Static connectivity tests") . "</strong>
697
+                    echo "<strong>"._("Static connectivity tests")."</strong>
698 698
          <table><tr>
699 699
          <td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='main_static_ico' class='icon'></td><td id='main_static_result' style='display:none'>&nbsp;</td>
700 700
          </tr></table>";
701 701
                     if ($naptr > 0) {
702
-                        echo "<hr><strong>" . _("Dynamic connectivity tests") . "</strong>
702
+                        echo "<hr><strong>"._("Dynamic connectivity tests")."</strong>
703 703
          <table><tr>
704 704
          <td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='main_dynamic_ico' class='icon'></td><td id='main_dynamic_result' style='display:none'>&nbsp;</td>
705 705
          </tr></table>";
706 706
                     }
707 707
                     if (count($orrealm)) {
708
-                      echo "<hr><strong>" . _("OpenRoaming connectivity tests") . "</strong>
708
+                      echo "<hr><strong>"._("OpenRoaming connectivity tests")."</strong>
709 709
          <table><tr>
710 710
          <td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='main_openroaming_ico' class='icon'></td><td id='main_openroaming_result' style='display:none'>&nbsp;</td>
711 711
          </tr></table>";
@@ -725,12 +725,12 @@  discard block
 block discarded – undo
725 725
                     print "<p>";
726 726
                     foreach (\config\Diagnostics::RADIUSTESTS['UDP-hosts'] as $hostindex => $host) {
727 727
                         print "<hr>";
728
-                        printf(_("Testing from: %s"), "<strong>" . \config\Diagnostics::RADIUSTESTS['UDP-hosts'][$hostindex]['display_name'] . "</strong>");
728
+                        printf(_("Testing from: %s"), "<strong>".\config\Diagnostics::RADIUSTESTS['UDP-hosts'][$hostindex]['display_name']."</strong>");
729 729
                         print "<table id='results$hostindex'  style='width:100%' class='udp_results'>
730 730
 <tr>
731
-<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='src" . $hostindex . "_img'></td>
731
+<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='src".$hostindex."_img'></td>
732 732
 <td id='src$hostindex' colspan=2>
733
-" . _("testing...") . "
733
+"._("testing...")."
734 734
 </td>
735 735
 </tr>
736 736
 </table>";
@@ -741,7 +741,7 @@  discard block
 block discarded – undo
741 741
 
742 742
             </div>
743 743
             <?php
744
-            for ($i=3; $i<5; $i++) {
744
+            for ($i = 3; $i < 5; $i++) {
745 745
                 if ($i == 3 && $naptr == 0) {
746 746
                    continue;
747 747
                 }
@@ -754,15 +754,15 @@  discard block
 block discarded – undo
754 754
                     $rfc7585suite = $dnsChecksOR;
755 755
                 }
756 756
             ?>
757
-                <div id="tabs-<?php echo $i;?>">
758
-                    <button id="run_<?php if ($i==3) echo 'd'; else echo 'o';?>_tests"; onclick="run_<?php if ($i==3) echo 'dynamic'; else echo 'openroaming';?>()"><?php if ($i==3) echo _("Repeat dynamic connectivity tests"); else echo _("Repeat OpenRoaming connectivity tests");?></button>
757
+                <div id="tabs-<?php echo $i; ?>">
758
+                    <button id="run_<?php if ($i == 3) echo 'd'; else echo 'o'; ?>_tests"; onclick="run_<?php if ($i == 3) echo 'dynamic'; else echo 'openroaming'; ?>()"><?php if ($i == 3) echo _("Repeat dynamic connectivity tests"); else echo _("Repeat OpenRoaming connectivity tests"); ?></button>
759 759
 
760 760
                 <?php
761 761
                     echo "<div id='";
762
-                    if ($i==3) { echo 'dynamic'; } else { echo 'openroaming'; }
762
+                    if ($i == 3) { echo 'dynamic'; } else { echo 'openroaming'; }
763 763
                     echo "_tests'><fieldset class='option_container'>
764 764
                 <legend><strong>";
765
-                    if ($i==3) {
765
+                    if ($i == 3) {
766 766
                      echo _("DYNAMIC connectivity tests");
767 767
                     } else {
768 768
                      echo _("OpenRoaming connectivity tests");
@@ -776,17 +776,17 @@  discard block
 block discarded – undo
776 776
                     }
777 777
                     $resultstoprint = [];
778 778
                     if (count($rfc7585suite->NAPTR_hostname_records) > 0) {
779
-                        $resultstoprint[] = '<div style="align:right; display: none;" id="' . $prefix1 . '_result_fail">' . _("Some errors were found during the tests, see below") . '</div><div style="align:right; display: none;" id="' . $prefix1 . '_result_pass">' . _("All tests passed, congratulations!") . '</div>';
780
-                        $resultstoprint[] = '<div style="align:right;"><a href="" class="moreall">' . _('Show detailed information for all tests') . '</a></div>' . '<p><strong>' . _("Checking server handshake...") . "</strong><p>";
779
+                        $resultstoprint[] = '<div style="align:right; display: none;" id="'.$prefix1.'_result_fail">'._("Some errors were found during the tests, see below").'</div><div style="align:right; display: none;" id="'.$prefix1.'_result_pass">'._("All tests passed, congratulations!").'</div>';
780
+                        $resultstoprint[] = '<div style="align:right;"><a href="" class="moreall">'._('Show detailed information for all tests').'</a></div>'.'<p><strong>'._("Checking server handshake...")."</strong><p>";
781 781
                         foreach ($rfc7585suite->NAPTR_hostname_records as $hostindex => $addr) {
782
-                            $bracketaddr = ($addr["family"] == "IPv6" ? "[" . $addr["IP"] . "]" : $addr["IP"]);
783
-                            $resultstoprint[] = '<p><strong>' . $bracketaddr . ' TCP/' . $addr['port'] . '</strong>';
782
+                            $bracketaddr = ($addr["family"] == "IPv6" ? "[".$addr["IP"]."]" : $addr["IP"]);
783
+                            $resultstoprint[] = '<p><strong>'.$bracketaddr.' TCP/'.$addr['port'].'</strong>';
784 784
                             $resultstoprint[] = '<ul style="list-style-type: none;" class="caresult"><li>';
785
-                            $resultstoprint[] = "<table id='" . $prefix2 . "caresults$hostindex'  style='width:100%'>
785
+                            $resultstoprint[] = "<table id='".$prefix2."caresults$hostindex'  style='width:100%'>
786 786
 <tr>
787
-<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='" . $prefix2 . "srcca$hostindex" . "_img'></td>
788
-<td id='" . $prefix2 . "srcca$hostindex'>
789
-" . _("testing...") . "
787
+<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='".$prefix2."srcca$hostindex"."_img'></td>
788
+<td id='" . $prefix2."srcca$hostindex'>
789
+"._("testing...")."
790 790
 </td>
791 791
 </tr>
792 792
 </table>";
@@ -794,26 +794,26 @@  discard block
 block discarded – undo
794 794
                         }
795 795
                         $clientstest = [];
796 796
                         foreach ($rfc7585suite->NAPTR_hostname_records as $hostindex => $addr) {
797
-                            $clientstest[] = '<p><strong>' . $addr['IP'] . ' TCP/' . $addr['port'] . '</strong></p><ol>';
798
-                            $clientstest[] = "<span id='" . $prefix2 . "clientresults$hostindex$clinx'><table style='width:100%'>
797
+                            $clientstest[] = '<p><strong>'.$addr['IP'].' TCP/'.$addr['port'].'</strong></p><ol>';
798
+                            $clientstest[] = "<span id='".$prefix2."clientresults$hostindex$clinx'><table style='width:100%'>
799 799
 <tr>
800 800
 <td class='icon_td'>";
801
-                            if ($i == 4 ) {
801
+                            if ($i == 4) {
802 802
                                 $clientstest[] = "<!--";
803 803
                             }
804
-                            $clientstest[] = "<img src='../resources/images/icons/loading51.gif' id='" . $prefix2 . "srcclient$hostindex" . "_img'></td>
805
-<td id='" . $prefix2 . "srcclient$hostindex'>
806
-" . _("testing...");
804
+                            $clientstest[] = "<img src='../resources/images/icons/loading51.gif' id='".$prefix2."srcclient$hostindex"."_img'></td>
805
+<td id='" . $prefix2."srcclient$hostindex'>
806
+"._("testing...");
807 807
 
808
-                            if ($i == 4 ) {
809
-                                $clientstest[] = "-->" . _("not implemented yet");
808
+                            if ($i == 4) {
809
+                                $clientstest[] = "-->"._("not implemented yet");
810 810
                             }
811 811
                             $clientstest[] = "</td></tr></table></span>";
812 812
                             $clientstest[] = '</ol>';
813 813
                         }
814 814
                         echo '<div style="align:right;">';
815 815
                         echo join('', $resultstoprint);
816
-                        echo '<span id="' . $prefix2 . 'clientstest" style="display: none;"><p><hr><b>' . _('Checking if certificates from  CAs are accepted...') . '</b><p>' . _('A few client certificates will be tested to check if servers are resistant to some certificate problems.') . '<p>';
816
+                        echo '<span id="'.$prefix2.'clientstest" style="display: none;"><p><hr><b>'._('Checking if certificates from  CAs are accepted...').'</b><p>'._('A few client certificates will be tested to check if servers are resistant to some certificate problems.').'<p>';
817 817
                         print join('', $clientstest);
818 818
                         echo '</span>';
819 819
                         echo '</div>';
@@ -827,7 +827,7 @@  discard block
 block discarded – undo
827 827
                 //     check if truncates/dies on Operator-Name
828 828
                 if ($my_profile !== NULL) {
829 829
                     echo "<div id='tabs-n'><fieldset class='option_container'>
830
-                <legend><strong>" . _("Live login test") . "</strong></legend>";
830
+                <legend><strong>" . _("Live login test")."</strong></legend>";
831 831
                     $prof_compl = $my_profile->getEapMethodsinOrderOfPreference(1);
832 832
                     if (count($prof_compl) > 0) {
833 833
                         $passwordReqired = FALSE;
@@ -840,34 +840,34 @@  discard block
 block discarded – undo
840 840
                                 $clientCertRequired = TRUE;
841 841
                             }
842 842
                         }
843
-                        echo "<div id='disposable_credential_container'><p>" . _("If you enter an existing login credential here, you can test the actual authentication from various checkpoints all over the world.") . "</p>
844
-                    <p>" . _("The test will use all EAP types you have set in your profile information to check whether the right CAs and server names are used, and of course whether the login with these credentials and the given EAP type actually worked. If you have set anonymous outer ID, the test will use that.") . "</p>
845
-                    <p>" . _("Note: the tool purposefully does not offer you to save these credentials, and they will never be saved in any way on the server side. Please use only <strong>temporary test accounts</strong> here; permanently valid test accounts in the wild are considered harmful!") . "</p></div>
843
+                        echo "<div id='disposable_credential_container'><p>"._("If you enter an existing login credential here, you can test the actual authentication from various checkpoints all over the world.")."</p>
844
+                    <p>" . _("The test will use all EAP types you have set in your profile information to check whether the right CAs and server names are used, and of course whether the login with these credentials and the given EAP type actually worked. If you have set anonymous outer ID, the test will use that.")."</p>
845
+                    <p>" . _("Note: the tool purposefully does not offer you to save these credentials, and they will never be saved in any way on the server side. Please use only <strong>temporary test accounts</strong> here; permanently valid test accounts in the wild are considered harmful!")."</p></div>
846 846
                     <form enctype='multipart/form-data' id='live_form' accept-charset='UTF-8'>
847 847
                     <input type='hidden' name='test_type' value='udp_login'>
848
-                    <input type='hidden' name='lang' value='" . $gui->languageInstance->getLang() . "'>
849
-                    <input type='hidden' name='profile_id' value='" . $my_profile->identifier . "'>
848
+                    <input type='hidden' name='lang' value='" . $gui->languageInstance->getLang()."'>
849
+                    <input type='hidden' name='profile_id' value='" . $my_profile->identifier."'>
850 850
                     <table id='live_tests'>";
851 851
 // if any password based EAP methods are available enable this section
852 852
                         if ($passwordReqired) {
853
-                            echo "<tr><td colspan='2'><strong>" . _("Password-based EAP types") . "</strong></td></tr>
854
-                        <tr><td>" . _("Real (inner) username:") . "</td><td><input type='text' id='username' class='mandatory' name='username'/></td></tr>";
855
-                            echo "<tr><td>" . _("Anonymous outer ID (optional):") . "</td><td><input type='text' id='outer_username' name='outer_username'/></td></tr>";
856
-                            echo "<tr><td>" . _("Password:") . "</td><td><input type='text' id='password' class='mandatory' name='password'/></td></tr>";
853
+                            echo "<tr><td colspan='2'><strong>"._("Password-based EAP types")."</strong></td></tr>
854
+                        <tr><td>" . _("Real (inner) username:")."</td><td><input type='text' id='username' class='mandatory' name='username'/></td></tr>";
855
+                            echo "<tr><td>"._("Anonymous outer ID (optional):")."</td><td><input type='text' id='outer_username' name='outer_username'/></td></tr>";
856
+                            echo "<tr><td>"._("Password:")."</td><td><input type='text' id='password' class='mandatory' name='password'/></td></tr>";
857 857
                         }
858 858
                         // ask for cert + privkey if TLS-based method is active
859 859
                         if ($clientCertRequired) {
860
-                            echo "<tr><td colspan='2'><strong>" . _("Certificate-based EAP types") . "</strong></td></tr>
861
-                        <tr><td>" . _("Certificate file (.p12 or .pfx):") . "</td><td><input type='file' id='cert' accept='application/x-pkcs12' name='cert'/></td></tr>
862
-                        <tr><td>" . _("Certificate password, if any:") . "</td><td><input type='text' id='privkey' name='privkey_pass'/></td></tr>
863
-                        <tr><td>" . _("Username, if different from certificate Subject:") . "</td><td><input type='text' id='tls_username' name='tls_username'/></td></tr>";
860
+                            echo "<tr><td colspan='2'><strong>"._("Certificate-based EAP types")."</strong></td></tr>
861
+                        <tr><td>" . _("Certificate file (.p12 or .pfx):")."</td><td><input type='file' id='cert' accept='application/x-pkcs12' name='cert'/></td></tr>
862
+                        <tr><td>" . _("Certificate password, if any:")."</td><td><input type='text' id='privkey' name='privkey_pass'/></td></tr>
863
+                        <tr><td>" . _("Username, if different from certificate Subject:")."</td><td><input type='text' id='tls_username' name='tls_username'/></td></tr>";
864 864
                         }
865
-                        echo "<tr><td colspan='2'><button id='submit_credentials'>" . _("Submit credentials") . "</button></td></tr></table></form>";
865
+                        echo "<tr><td colspan='2'><button id='submit_credentials'>"._("Submit credentials")."</button></td></tr></table></form>";
866 866
                         echo "<div id='live_login_results' style='display:none'>";
867 867
                         foreach (\config\Diagnostics::RADIUSTESTS['UDP-hosts'] as $hostindex => $host) {
868 868
                             print "<hr>";
869
-                            printf(_("Testing from: %s"), "<strong>" . \config\Diagnostics::RADIUSTESTS['UDP-hosts'][$hostindex]['display_name'] . "</strong>");
870
-                            print "<span style='position:relative'><img src='../resources/images/icons/loading51.gif' id='live_src" . $hostindex . "_img' style='width:24px; position: absolute; left: 20px; bottom: 0px; '></span>";
869
+                            printf(_("Testing from: %s"), "<strong>".\config\Diagnostics::RADIUSTESTS['UDP-hosts'][$hostindex]['display_name']."</strong>");
870
+                            print "<span style='position:relative'><img src='../resources/images/icons/loading51.gif' id='live_src".$hostindex."_img' style='width:24px; position: absolute; left: 20px; bottom: 0px; '></span>";
871 871
                             print "<div id='eap_test$hostindex' class='eap_test_results'></div>";
872 872
                         }
873 873
                         echo "</div>";
@@ -882,9 +882,9 @@  discard block
 block discarded – undo
882 882
             }
883 883
 
884 884
             if (isset($_POST['comefrom'])) {
885
-                $return = htmlspecialchars_decode($_POST['comefrom']) . ( $inst_id ? "?inst_id=" . $inst_id : "" );
885
+                $return = htmlspecialchars_decode($_POST['comefrom']).($inst_id ? "?inst_id=".$inst_id : "");
886 886
                 echo "<form method='post' action='$return' accept-charset='UTF-8'>
887
-                    <button type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_CLOSE . "'>" . sprintf(_("Return to %s administrator area"), core\common\Entity::$nomenclature_inst) . "</button>"
887
+                    <button type='submit' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_CLOSE."'>".sprintf(_("Return to %s administrator area"), core\common\Entity::$nomenclature_inst)."</button>"
888 888
                 . "</form>";
889 889
             }
890 890
             if ($check_realm !== FALSE) {
Please login to merge, or discard this patch.
Braces   +16 added lines, -1 removed lines patch added patch discarded remove patch
@@ -755,7 +755,22 @@
 block discarded – undo
755 755
                 }
756 756
             ?>
757 757
                 <div id="tabs-<?php echo $i;?>">
758
-                    <button id="run_<?php if ($i==3) echo 'd'; else echo 'o';?>_tests"; onclick="run_<?php if ($i==3) echo 'dynamic'; else echo 'openroaming';?>()"><?php if ($i==3) echo _("Repeat dynamic connectivity tests"); else echo _("Repeat OpenRoaming connectivity tests");?></button>
758
+                    <button id="run_<?php if ($i==3) {
759
+    echo 'd';
760
+} else {
761
+    echo 'o';
762
+}
763
+?>_tests"; onclick="run_<?php if ($i==3) {
764
+    echo 'dynamic';
765
+} else {
766
+    echo 'openroaming';
767
+}
768
+?>()"><?php if ($i==3) {
769
+    echo _("Repeat dynamic connectivity tests");
770
+} else {
771
+    echo _("Repeat OpenRoaming connectivity tests");
772
+}
773
+?></button>
759 774
 
760 775
                 <?php
761 776
                     echo "<div id='";
Please login to merge, or discard this patch.